Downloads · 30 days
6
1% of all-time downloads
d0p3/ukr-t5-small
ukr-t5-small is a machine learning model from d0p3. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
A compact T5-small model fine-tuned for Ukrainian language tasks, with base English understanding.
Downloads · 30 days
6
1% of all-time downloads
All-time downloads
926
Public
Parameters
74.8M
300 MB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors299 MB · 100%
From the Hugging Face model README
A compact T5-small model fine-tuned for Ukrainian language tasks, with base English understanding.
Installation
pip install transformers
Loading the Model
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("path/to/ukr-t5-small")
model = AutoModelForSeq2SeqLM.from_pretrained("path/to/ukr-t5-small")
Example: Machine Translation
text = "(Text in Ukrainian here)"
# Tokenize and translate
inputs = tokenizer("summarize: " + text, return_tensors="pt", max_length=512, truncation=True)
summary_ids = model.generate(inputs["input_ids"], num_beams=4, max_length=128)
# Decode output
summary = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(summary)
This model was fine-tuned on the Leipzig Corpora Collection (specify if there's a particular subset within the collection that you used). For full licensing and usage information of the original dataset, please refer to Leipzig Corpora Collection website