transformers safetensors t5 text2text-generation text-to-text nlp sharded large-model en dataset:natural_questions base_model:google/t5-11b-ssm-nq base_model:finetune:google/t5-11b-ssm-nq license:apache-2.0 autotrain_compatible text-generation-inference endpoints_compatible region:us
---
base_model: google/t5-11b-ssm-nq
datasets:
- natural_questions
language: en
library_name: transformers
license: apache-2.0
metrics:
- rouge
- bleu
model_name: T5-11B-SSM-NQ Sharded
pipeline_tag: text2text-generation
tags:
- t5
- text-to-text
- nlp
- sharded
- large-model
model_id: iarroyof/t5-11b-ssm-nq-sharded
size: 11B
widget:
- text: What is the capital of France?
- text: 'Translate English to French: How are you?'
---

## Model Description

This is a sharded version of the [T5-11B-SSM-NQ](https://huggingface.co/google/t5-11b-ssm-nq) model, fine-tuned on the **Natural Questions** dataset for text-to-text generation tasks. The model is stored and processed in multiple shards to facilitate easier handling of its large size (11 billion parameters).

## Usage

This model can be used for text-to-text generation tasks like question answering and text summarization. 

```python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch

tokenizer = AutoTokenizer.from_pretrained('iarroyof/t5-11b-ssm-nq-sharded')
model = AutoModelForSeq2SeqLM.from_pretrained(
    'iarroyof/t5-11b-ssm-nq-sharded',
    device_map='auto',
    low_cpu_mem_usage=True,
    torch_dtype=torch.float16,
)

inputs = tokenizer('What is and how to deal with insomnia?', return_tensors='pt').input_ids.to('cuda')
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
---