CoolFace
Modelpublic

nhuvo/nllb-600m-en-vimedner-mt-vi2en

sourceHugging Facecc-by-nc-4.0updated 1mo agoView on Hugging Face
0likes17downloads
Model Card

nllb-600m-en-vimedner-mt-vi2en

`facebook/nllb-200-distilled-600M` fine-tuned for Vietnamese → English biomedical translation on En-ViMedNER.

Dataset details, splits, and citation: [nhuvo/En-ViMedNER](https://huggingface.co/datasets/nhuvo/En-ViMedNER).

Usage

python
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

repo = "nhuvo/nllb-600m-en-vimedner-mt-vi2en"
tok = AutoTokenizer.from_pretrained(repo, src_lang="vie_Latn")
model = AutoModelForSeq2SeqLM.from_pretrained(repo)

text = "Bệnh nhân đái tháo đường típ 2 được tuyển vào nghiên cứu."
inputs = tok(text, return_tensors="pt")
outputs = model.generate(
    **inputs,
    forced_bos_token_id=tok.convert_tokens_to_ids("eng_Latn"),
    max_new_tokens=256,
)
print(tok.batch_decode(outputs, skip_special_tokens=True)[0])

Related