Belarusian to English Translator (be-en)

This model is a fine-tuned version of Helsinki-NLP/opus-mt-mul-en for translating text from Belarusian (be) to English (en).

Model Description

The model was fine-tuned using the transformers library on the Belarusian-English split of the OPUS-100 dataset. It is based on the MarianMT architecture and is optimized for quick and accurate translation of short to medium-length sentences.

Example of usage

You can use this model directly with the transformers library:

import torch
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

# Load model and tokenizer
model_name = "Aleton/be-en-translator"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)

# Set device
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device)

# Text to translate
text = "Прывітанне, як справы?"

# Generate translation
inputs = tokenizer(text, return_tensors="pt").to(device)
outputs = model.generate(**inputs, max_length=128)
translated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(translated_text)
# Expected output: Hello, how are you?
Downloads last month
12
Safetensors
Model size
77.1M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Aleton/be-en-translator

Finetuned
(21)
this model

Dataset used to train Aleton/be-en-translator