---
title: t5-small-squad11
canonical_url: "https://www.modelscope.cn/models/LLM-Research/t5-small-squad11"
md_url: "https://www.modelscope.cn/models/LLM-Research/t5-small-squad11.md"
repository: LLM-Research/t5-small-squad11
last_updated: 2024-09-08
pipeline_tag: text2text-generation
tasks:
  - text2text-generation
model_type:
  - t5
architectures:
  - T5ForConditionalGeneration
library_name:
  - transformer
  - pytorch
frameworks:
  - pytorch
language:
  - en
downloads: 2146
stars: 0
---

# t5-small-squad11

> t5-small-squad11 - LLM-Research 在 ModelScope 开源的模型。SQuAD 1.1 question-answering based on T5-small. Example use:

- **Repository**: LLM-Research/t5-small-squad11
- **Tasks**: text2text-generation
- **Downloads**: 2146
- **Stars**: 0
- **Last updated**: 2024-09-08

Source: https://www.modelscope.cn/models/LLM-Research/t5-small-squad11

---

SQuAD 1.1 question-answering based on T5-small. 
Example use: 

```python
from transformers import T5Config, T5ForConditionalGeneration, T5Tokenizer

model_name = "allenai/t5-small-next-word-generator-qoogle"
tokenizer = T5Tokenizer.from_pretrained(model_name)
model = T5ForConditionalGeneration.from_pretrained(model_name)

def run_model(input_string, **generator_args):
    input_ids = tokenizer.encode(input_string, return_tensors="pt")
    res = model.generate(input_ids, **generator_args)
    output = tokenizer.batch_decode(res, skip_special_tokens=True)
    print(output)
    return output

run_model("Who is the winner of 2009 olympics? \n Jack and Jill participated, but James won the games.")```
which should result in the following:
```
['James']
```
