Downloads · 30 days
9
3% of all-time downloads
i-k-a/my_lenta_model_ru_mt5-base_4_epochs
my_lenta_model_ru_mt5-base_4_epochs is a machine learning model from i-k-a. 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.
This model trained to summarize news post. Trained on data grabbed from russian news site Lenta.ru.
Downloads · 30 days
9
3% of all-time downloads
All-time downloads
291
Public
Parameters
582M
18.6 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
This model trained to summarize news post. Trained on data grabbed from russian news site Lenta.ru.
Модель обучена суммаризации новостных статей. Обучение проводилось на данных, полученных с русского новостного сайта Lenta.ru.
Use code below to infer model.
Используйте код ниже для запуска модели.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
MAX_NEW_TOKENS=400
MODEL_DIR='i-k-a/my_lenta_model_ru_mt5-base_4_epochs'
text = input('Введите текст:')
tokenizer = AutoTokenizer.from_pretrained(MODEL_DIR)
model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_DIR)
inputs = tokenizer(text, return_tensors="pt").input_ids
outputs = model.generate(inputs, max_new_tokens=MAX_NEW_TOKENS, do_sample=False)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(f'Резюме от нейросети: "{result}"\n\nИсходный текст: "{text}"')
Model trained 4 epochs. Length of input text is cut to 1024 tokens. Output is 400 tokens. Trained using Google Colab resources.
google/mt5-base
Google Colab
Google Colab T4 GPU
Python