# Den4ikAI/FRED-T5-XL_instructor
Инструкционная модель на FRED-T5-XL.

# Пример использования
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
use_cuda = torch.cuda.is_available()
device = torch.device("cuda" if use_cuda else "cpu")
tokenizer = AutoTokenizer.from_pretrained("Den4ikAI/FRED-T5-XL_instructor")
model = AutoModelForSeq2SeqLM.from_pretrained("Den4ikAI/FRED-T5-XL_instructor", torch_dtype=torch.float16).to(device)
model.eval()

from transformers import GenerationConfig

generation_config = GenerationConfig.from_pretrained("Den4ikAI/FRED-T5-XL_instructor")
def generate(prompt):
  data = tokenizer(f"<SC6>Человек: {prompt}\nБот: <extra_id_0>", return_tensors="pt").to(model.device)
  output_ids = model.generate(
      **data,
      generation_config=generation_config
  )[0]
  out = tokenizer.decode(output_ids.tolist())
  return out

while 1:
  print(generate(input(":> ")))

```
# Citation
```
@MISC{Den4ikAI/FRED-T5-XL_instructor,
    author  = {Denis Petrov},
    title   = {Russian Instructor Model},
    url     = {https://huggingface.co/Den4ikAI/FRED-T5-XL_instructor/},
    year    = 2023
}
```
{"language": ["ru"], "license": "mit", "pipeline_tag": "text2text-generation", "widget": [{"text": "<SC6>\u0427\u0435\u043b\u043e\u0432\u0435\u043a: \u041e\u0442\u0432\u0435\u0442\u044c \u043d\u0430 \u0432\u043e\u043f\u0440\u043e\u0441. \u041f\u043e\u0447\u0435\u043c\u0443 \u0442\u0440\u0430\u0432\u0430 \u0437\u0435\u043b\u0435\u043d\u0430\u044f?\\n\u0411\u043e\u0442: <extra_id_0>"}]}
transformers pytorch safetensors t5 text2text-generation ru license:mit autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #safetensors #t5 #text2text-generation #ru #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

# Den4ikAI/FRED-T5-XL_instructor
Инструкционная модель на FRED-T5-XL.

# Пример использования


# Den4ikAI/FRED-T5-XL_instructor
Инструкционная модель на FRED-T5-XL. # Пример использования
TAGS
#transformers #pytorch #safetensors #t5 #text2text-generation #ru #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
 # Den4ikAI/FRED-T5-XL_instructor
Инструкционная модель на FRED-T5-XL. # Пример использования