ZygAI OSS Translator — English → Lithuanian

ZygAI OSS Translate Lithuanian is a fine-tuned version of openbmb/MiniCPM5-1B, specialized for English to Lithuanian translation. It is part of the ZygAI open source initiative to bring AI tools to the Lithuanian language.

🇱🇹 First open-source Lithuanian translation model based on MiniCPM5 architecture.

Demo

Try it live: ZygAI Translate Lithuanian DEMO

Run Locally

# Clone repository
git clone https://huggingface.co/spaces/ZygAI/ZygAI-Translate-Lithuanian-DEMO
cd ZygAI-Translate-Lithuanian-DEMO

# Create and activate Python environment
python -m venv env
source env/bin/activate

# Install dependencies and run
pip install -r requirements.txt
python app.py

Quick Start

from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch

base_model = "openbmb/MiniCPM5-1B"
lora_model = "ZygAI/ZygAI-OSS-Translate-Lithuanian"

tokenizer = AutoTokenizer.from_pretrained(base_model)
model = AutoModelForCausalLM.from_pretrained(base_model, dtype=torch.float16)
model = PeftModel.from_pretrained(model, lora_model)
model.eval()

def translate(text):
    prompt = f"### Instruction:\n{text}\n### Response:\n"
    inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
    with torch.no_grad():
        outputs = model.generate(**inputs, max_new_tokens=128)
    result = tokenizer.decode(outputs[0], skip_special_tokens=True)
    return result.split("### Response:\n")[-1]

print(translate("Hello, how are you?"))
# → Labas pasaulis
print(translate("How are you?"))
# → O kaip jūs?

Training Details

Parameter Value
Base model openbmb/MiniCPM5-1B
Dataset Helsinki-NLP/opus-100 (en-lt)
Training samples 50,000
Method SFT + LoRA (PEFT)
LoRA rank 16
LoRA alpha 32
Epochs 3
Batch size 4
Max sequence length 256
Hardware NVIDIA A100 SXM
Framework TRL + Transformers

Limitations

Translation quality is functional but not perfect — this is an open-source community model, not a production translation service. Future versions will include larger datasets, better evaluation metrics, and improved inference quality.

About ZygAI

ZygAI is a Lithuanian AI platform developed by ZygMediaGroup. This model is part of ZygAI's open source effort to develop Lithuanian language AI tools accessible to everyone.

License

Apache 2.0

Citation

@software{vonwerra2020trl,
  title   = {{TRL: Transformers Reinforcement Learning}},
  author  = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
  license = {Apache-2.0},
  url     = {https://github.com/huggingface/trl},
  year    = {2020}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ZygAI/ZygAI-OSS-Translate-Lithuanian

Adapter
(13)
this model

Datasets used to train ZygAI/ZygAI-OSS-Translate-Lithuanian

Space using ZygAI/ZygAI-OSS-Translate-Lithuanian 1