T5_chat

A fine-tuned version of ai-forever/ruT5-base for open-domain text generation / conversational response generation in Russian.

The model takes a text prompt (e.g. a question or a conversational turn) and generates a free-form text continuation or reply.

Usage

from transformers import AutoTokenizer, T5ForConditionalGeneration

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


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


text = "Что самое главное в человеке ?"
response = chat_fun(text)

print(response)
# Самое главное в человеке - это его любовь и уважение к другим людям.
# Это означает, что он должен быть искренним и искренним в своих мыслях и чувствах,
# а также готов жертвовать своим личным и профессиональным идеалами и ценностям, чтобы достичь своих целей.

Limitations

  • The model may produce factually inaccurate, repetitive, or inconsistent responses, as is common for smaller open-domain generation models.
  • No content filtering or safety alignment has been applied — outputs should be reviewed before use in any user-facing application.
Downloads last month
357
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for r1char9/T5_chat

Finetuned
(24)
this model

Collection including r1char9/T5_chat