## Model Details
- **Base: mt5**
- **Developed by**: Aldiyar Saken, Sultaniyar Quandyq, Alibek Kamiluly, Kurmash Apayev, Adai Shomanov and Aliya Nugumanova.

## Model Description

This model is based on the google/mt5-large model. The model was fine-tuned on a Kazakh language version of the Stanford Question Answering Dataset (SQuAD) using 30,000 samples.

## Inference

```python

from transformers import T5Tokenizer, T5TokenizerFast
from transformers import T5ForConditionalGeneration
import sentencepiece

tokenizer = T5Tokenizer.from_pretrained("Kyrmasch/t5-kazakh-qa")
model = T5ForConditionalGeneration.from_pretrained("Kyrmasch/t5-kazakh-qa")

context = "Қазақстан Еуразия құрлығының орталығында орналасқан және аумақтың көлемі бойынша (жер шарының бетінде 2%) әлемде тоғызыншы орынға ие. Қазақстан аумағы бүкіл Батыс Еуропадан үлкен."
question = "Қазақстан жер көлемі жөнінен дүние жүзінде нешінші орында?"

encoded = tokenizer.encode_plus(context, question, max_length=128, pad_to_max_length=True, truncation=True, return_tensors="pt")
input_ids = encoded["input_ids"].to('cpu')
attention_mask = encoded["attention_mask"].to('cpu')
output = model.generate(input_ids=input_ids, attention_mask=attention_mask, max_length=128)
answer = ''.join([tokenizer.decode(ids, skip_special_tokens=True) for ids in output])
```
{"language": ["kk"], "license": "apache-2.0", "widget": [{"text": "\u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d \u0415\u0443\u0440\u0430\u0437\u0438\u044f \u049b\u04b1\u0440\u043b\u044b\u0493\u044b\u043d\u044b\u04a3 \u043e\u0440\u0442\u0430\u043b\u044b\u0493\u044b\u043d\u0434\u0430 \u043e\u0440\u043d\u0430\u043b\u0430\u0441\u049b\u0430\u043d \u0436\u04d9\u043d\u0435 \u0430\u0443\u043c\u0430\u049b\u0442\u044b\u04a3 \u043a\u04e9\u043b\u0435\u043c\u0456 \u0431\u043e\u0439\u044b\u043d\u0448\u0430 (\u0436\u0435\u0440 \u0448\u0430\u0440\u044b\u043d\u044b\u04a3 \u0431\u0435\u0442\u0456\u043d\u0434\u0435 2%) \u04d9\u043b\u0435\u043c\u0434\u0435 \u0442\u043e\u0493\u044b\u0437\u044b\u043d\u0448\u044b \u043e\u0440\u044b\u043d\u0493\u0430 \u0438\u0435. \u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d \u0430\u0443\u043c\u0430\u0493\u044b \u0431\u04af\u043a\u0456\u043b \u0411\u0430\u0442\u044b\u0441 \u0415\u0443\u0440\u043e\u043f\u0430\u0434\u0430\u043d \u04af\u043b\u043a\u0435\u043d. \u049a\u0430\u0437\u0430\u049b\u0441\u0442\u0430\u043d \u0436\u0435\u0440 \u043a\u04e9\u043b\u0435\u043c\u0456 \u0436\u04e9\u043d\u0456\u043d\u0435\u043d \u0434\u04af\u043d\u0438\u0435 \u0436\u04af\u0437\u0456\u043d\u0434\u0435 \u043d\u0435\u0448\u0456\u043d\u0448\u0456 \u043e\u0440\u044b\u043d\u0434\u0430?", "example_title": "example 1"}, {"text": "\u049a\u0430\u0440 \u04b1\u0441\u0430\u049b \u043c\u04b1\u0437 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u0434\u0430\u0440\u044b\u043d\u0430\u043d \u0442\u04b1\u0440\u0430\u0434\u044b. \u049a\u0430\u0440 \u0434\u0435\u043f \u0430\u0442\u043c\u043e\u0441\u0444\u0435\u0440\u0430\u043b\u044b\u049b \u0436\u0430\u0443\u044b\u043d-\u0448\u0430\u0448\u044b\u043d\u0434\u044b \u0430\u0439\u0442\u0430\u0434\u044b. \u049a\u0430\u0440 \u0434\u0435\u0433\u0435\u043d \u043d\u0435?", "example_title": "example 2"}, {"text": "\u0410\u0431\u0430\u0439 \u0430\u049b\u044b\u043d \u0442\u0443\u0440\u0430\u043b\u044b 4 \u0442\u043e\u043c\u0434\u044b\u049b \"\u0410\u0431\u0430\u0439 \u0436\u043e\u043b\u044b\" \u0440\u043e\u043c\u0430\u043d\u044b \u0436\u0430\u0437\u044b\u043b\u0493\u0430\u043d. \u0411\u04b1\u043b \u0440\u043e\u043c\u0430\u043d\u043d\u044b\u04a3 \u0430\u0432\u0442\u043e\u0440\u044b \u041c\u04b1\u0445\u0442\u0430\u0440 \u04d8\u0443\u0435\u0437\u043e\u0432. \u0411\u04b1\u043b \u043a\u0456\u0442\u0430\u043f\u0442\u0430\u0440\u0434\u0430 \u0431\u0430\u043b\u0430 \u0410\u0431\u0430\u0439\u0434\u044b\u04a3 \u0442\u04b1\u043b\u0493\u0430, \u04d9\u0440\u0456 \u0431\u043e\u043b\u0430\u0448\u0430\u049b \u0430\u049b\u044b\u043d \u0431\u043e\u043b\u044b\u043f \u049b\u0430\u043b\u044b\u043f\u0442\u0430\u0441\u049b\u0430\u043d\u0493\u0430 \u0434\u0435\u0439\u0456\u043d\u0433\u0456 \u0443\u0430\u049b\u044b\u0442\u0442\u0430\u0440 \u043a\u0435\u0437\u0435\u04a3\u0434\u0435\u0440\u043c\u0435\u043d \u0436\u0430\u0437\u044b\u043b\u0493\u0430\u043d. \u00ab\u0410\u0431\u0430\u0439 \u0436\u043e\u043b\u044b\u00bb \u0440\u043e\u043c\u0430\u043d\u044b\u043d \u0436\u0430\u0437\u0493\u0430\u043d \u043a\u0456\u043c?", "example_title": "example 3"}]}
transformers pytorch safetensors t5 text2text-generation kk license:apache-2.0 autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #safetensors #t5 #text2text-generation #kk #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

## Model Details
- Base: mt5
- Developed by: Aldiyar Saken, Sultaniyar Quandyq, Alibek Kamiluly, Kurmash Apayev, Adai Shomanov and Aliya Nugumanova.

## Model Description

This model is based on the google/mt5-large model. The model was fine-tuned on a Kazakh language version of the Stanford Question Answering Dataset (SQuAD) using 30,000 samples.

## Inference


## Model Details
- Base: mt5
- Developed by: Aldiyar Saken, Sultaniyar Quandyq, Alibek Kamiluly, Kurmash Apayev, Adai Shomanov and Aliya Nugumanova. ## Model Description

This model is based on the google/mt5-large model. The model was fine-tuned on a Kazakh language version of the Stanford Question Answering Dataset (SQuAD) using 30,000 samples. ## Inference
TAGS
#transformers #pytorch #safetensors #t5 #text2text-generation #kk #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 ## Model Details
- Base: mt5
- Developed by: Aldiyar Saken, Sultaniyar Quandyq, Alibek Kamiluly, Kurmash Apayev, Adai Shomanov and Aliya Nugumanova. ## Model Description

This model is based on the google/mt5-large model. The model was fine-tuned on a Kazakh language version of the Stanford Question Answering Dataset (SQuAD) using 30,000 samples. ## Inference
TAGS
#transformers #pytorch #safetensors #t5 #text2text-generation #kk #license-apache-2.0 #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
## Model Details
- Base: mt5
- Developed by: Aldiyar Saken, Sultaniyar Quandyq, Alibek Kamiluly, Kurmash Apayev, Adai Shomanov and Aliya Nugumanova.## Model Description

This model is based on the google/mt5-large model. The model was fine-tuned on a Kazakh language version of the Stanford Question Answering Dataset (SQuAD) using 30,000 samples.## Inference