kazRush-ru-kk is a translation model for translating from Russian to Kazakh. The model was trained with randomly initialized weights based on the T5 configuration on the available open-source parallel data.
Usage
Using the model requires
sentencepiece
library to be installed.
After installing necessary dependencies the model can be run with the following code:
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
device = 'cuda'
model = AutoModelForSeq2SeqLM.from_pretrained('deepvk/kazRush-ru-kk').to(device)
tokenizer = AutoTokenizer.from_pretrained('deepvk/kazRush-ru-kk')
@torch.inference_modedefgenerate(text, **kwargs):
inputs = tokenizer(text, return_tensors='pt').to(device)
hypotheses = model.generate(**inputs, num_beams=5, **kwargs)
return tokenizer.decode(hypotheses[0], skip_special_tokens=True)
print(generate("Как Кока-Кола может помочь автомобилисту?"))
You can also access the model via
pipeline
wrapper:
Model was trained for 56 hours on 2 GPUs NVIDIA A100 80 Gb.
Evaluation
Current model was compared to another open-source translation model,
NLLB
. We compared our model to all version of NLLB, excluding nllb-moe-54b due to its size.
The metrics - BLEU, chrF and COMET - were calculated on
devtest
part of
FLORES+ evaluation benchmark
, most recent evaluation benchmark for multilingual machine translation.
Calculation of BLEU and chrF follows the standart implementation from
sacreBLEU
, and COMET is calculated using default model described in
COMET repository
.
>>> print(generate("Каждый охотник желает знать, где сидит фазан."))
Әрбір аңшы ғибадатхананың қайда отырғанын білгісі келеді.
>>> print(generate("Местным продуктом-специалитетом с защищённым географическим наименованием по происхождению считается люнебургский степной барашек."))
Шығу тегі бойынша қорғалған географиялық атауы бар жергілікті мамандандырылған өнім болып люнебургтік дала қошқар болып саналады.
>>> print(generate("Помогите мне удивить девушку"))
Қызды таң қалдыруға көмектесіңіз
Citations
@misc{deepvk2024kazRushrukk,
title={kazRush-ru-kk: translation model from Russian to Kazakh},
author={Lebedeva, Anna and Sokolov, Andrey},
url={https://huggingface.co/deepvk/kazRush-ru-kk},
publisher={Hugging Face},
year={2024},
}
Runs of deepvk kazRush-ru-kk on huggingface.co
95
Total runs
0
24-hour runs
-1
3-day runs
-40
7-day runs
-161
30-day runs
More Information About kazRush-ru-kk huggingface.co Model
kazRush-ru-kk huggingface.co is an AI model on huggingface.co that provides kazRush-ru-kk's model effect (), which can be used instantly with this deepvk kazRush-ru-kk model. huggingface.co supports a free trial of the kazRush-ru-kk model, and also provides paid use of the kazRush-ru-kk. Support call kazRush-ru-kk model through api, including Node.js, Python, http.
kazRush-ru-kk huggingface.co is an online trial and call api platform, which integrates kazRush-ru-kk's modeling effects, including api services, and provides a free online trial of kazRush-ru-kk, you can try kazRush-ru-kk online for free by clicking the link below.
deepvk kazRush-ru-kk online free url in huggingface.co:
kazRush-ru-kk is an open source model from GitHub that offers a free installation service, and any user can find kazRush-ru-kk on GitHub to install. At the same time, huggingface.co provides the effect of kazRush-ru-kk install, users can directly use kazRush-ru-kk installed effect in huggingface.co for debugging and trial. It also supports api for free installation.