barbaroo/Sprotin_parallel
Viewer • Updated • 126k • 23
How to use barbaroo/nllb_200_600M_en_fo with Transformers:
# Use a pipeline as a high-level helper
# Warning: Pipeline type "translation" is no longer supported in transformers v5.
# You must load the model directly (see below) or downgrade to v4.x with:
# 'pip install "transformers<5.0.0'
from transformers import pipeline
pipe = pipeline("translation", model="barbaroo/nllb_200_600M_en_fo") # Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("barbaroo/nllb_200_600M_en_fo")
model = AutoModelForSeq2SeqLM.from_pretrained("barbaroo/nllb_200_600M_en_fo", device_map="auto")en) to Faroese (fo). Important: While the model can produce fluent translations, it is not guaranteed to be perfectly accurate on all inputs. Users should verify critical or sensitive content through human experts.
Datasets:
Flores-200 dataset is described in Section 4 of the NLLB paper/documentation.
Motivation:
Flores-200 is currently the only machine translation benchmark available for Faroese.
Below is a simple usage example in Python with Hugging Face Transformers:
from transformers import pipeline
model_name = "barbaroo/nllb_200_600M_en_fo"
translator = pipeline(
"translation",
model=model_name,
tokenizer=model_name,
src_lang="eng_Latn", # Language code for English
tgt_lang="fao_Latn" # Language code for Faroese
)
text = "Hello, how are you?"
translation = translator(text)
print(translation)
If you use this model or find it helpful in your research, please cite: [COMING SOON]
For questions, feedback, or collaboration inquiries, feel free to reach out:
Base model
facebook/nllb-200-distilled-600M