Downloads · 30 days
96
9% of all-time downloads
Den4ikAI/FRED-T5-XL_instructor
FRED-T5-XL_instructor is a text generation model from Den4ikAI. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
96
9% of all-time downloads
All-time downloads
1K
Public
Parameters
1.7B
10.4 GB on disk
Likes
5
Public
Click a slice to open those files.
.bin3.5 GB · 50%
From the Hugging Face model README
Инструкционная модель на FRED-T5-XL.
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(":> ")))
@MISC{Den4ikAI/FRED-T5-XL_instructor,
author = {Denis Petrov},
title = {Russian Instructor Model},
url = {https://huggingface.co/Den4ikAI/FRED-T5-XL_instructor/},
year = 2023
}