Downloads · 30 days
4
8% of all-time downloads
worldboss/nllb-200-distilled-600M-ewe
nllb-200-distilled-600M-ewe is a translation model from worldboss. Use it when you need text moved from one language to another. The card lists the license as cc-by-nc-4.0.
Fine-tuned facebook/nllb-200-distilled-600M for English → Ewe (engLatn → eweLatn).
Downloads · 30 days
4
8% of all-time downloads
All-time downloads
53
Public
Parameters
615M
5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.5 GB · 99%
From the Hugging Face model README
Fine-tuned facebook/nllb-200-distilled-600M for English → Ewe (eng_Latn → ewe_Latn).
Training data includes Ghana farmer Q&A, NLLB eng_Latn-ewe_Latn, and verse-aligned English–Ewe Bible from ghananlpcommunity/ghana-corpus. Farmer Q&A, NLLB, and the Bible corpus are CC-BY-NC.
import os
os.environ.setdefault("USE_TF", "0")
import torch
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
repo = "worldboss/nllb-200-distilled-600M-ewe"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
dtype = torch.bfloat16 if device.type == "cuda" and torch.cuda.is_bf16_supported() else torch.float32
tokenizer = AutoTokenizer.from_pretrained(repo, src_lang="eng_Latn", tgt_lang="ewe_Latn")
model = AutoModelForSeq2SeqLM.from_pretrained(repo, dtype=dtype).to(device).eval()
forced_bos = tokenizer.convert_tokens_to_ids("ewe_Latn")
text = "How do I plant maize?"
inputs = tokenizer(text, return_tensors="pt").to(device)
with torch.inference_mode():
out = model.generate(
**inputs,
forced_bos_token_id=forced_bos,
num_beams=5,
max_new_tokens=32,
)
print(tokenizer.decode(out[0], skip_special_tokens=True))
Sample prompts:
See translate_from_hub.ipynb in the training repo for the same questions.