Edit model card

Модель ruT5-base была fine-tuned для задачи text-to-text, предназначенная для Russian текст.

Uses

from transformers import AutoTokenizer, T5ForConditionalGeneration

chat_checkpoint = 'r1char9/T5_chat'
chat_model = T5ForConditionalGeneration.from_pretrained(chat_checkpoint)
chat_tokenizer = AutoTokenizer.from_pretrained(chat_checkpoint)

text='Что самое главное в человеке ?'

def chat_fun(self, text: str):
    tokenized_sentence = self.chat_tokenizer(text, return_tensors='pt', truncation=True)
    res = self.chat_model.generate(**tokenized_sentence, num_beams=2, max_length=100)            
    return self.chat_tokenizer.decode(res[0], skip_special_tokens=True)
    

text = chat_fun(text=text)
# Самое главное в человеке - это его любовь и уважение к другим людям. 
# Это означает, что он должен быть искренним и искренним в своих мыслях и чувствах, 
# а также готов жертвовать своим личным и профессиональным идеалами и ценностям, чтобы достичь своих целей.
Downloads last month
298
Safetensors
Model size
223M params
Tensor type
F32
·
Inference API
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.