Downloads · 30 days
4
5% of all-time downloads
flt7007/nllb-mizo-bible-lora
nllb-mizo-bible-lora is a translation model from flt7007. Use it when you need text moved from one language to another. It is set up for peft. The card lists the license as mit.
This is a LoRA adapter for Mizo, trained in two stages on top of facebook/nllb-200-distilled-600M: ...
Downloads · 30 days
4
5% of all-time downloads
All-time downloads
73
Public
Repo size
54.4 MB
Likes
0
Public
Click a slice to open those files.
.json32.3 MB · 59%
From the Hugging Face model README
This is a LoRA adapter for Mizo, trained in two stages on top of
facebook/nllb-200-distilled-600M:
...
This is a LoRA adapter for Mizo, trained in two stages on top of
facebook/nllb-200-distilled-600M:
Stage 1 – Dictionary
Stage 2 – Bible (Eng → Mizo)
This repository contains only the LoRA adapter weights, not the full base model.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
from peft import PeftModel
import torch
BASE_MODEL = "facebook/nllb-200-distilled-600M"
LORA_REPO = "frankiethiak/nllb-mizo-bible-lora" # update if different
tokenizer = AutoTokenizer.from_pretrained(
BASE_MODEL,
src_lang="eng_Latn",
tgt_lang="lus_Latn",
)
base_model = AutoModelForSeq2SeqLM.from_pretrained(BASE_MODEL)
model = PeftModel.from_pretrained(base_model, LORA_REPO)
model.eval()
text = "In the beginning God created the heaven and the earth."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
gen = model.generate(**inputs, max_new_tokens=80, num_beams=4)
print(tokenizer.decode(gen[0], skip_special_tokens=True))