Instructions to use BlockwardSARL/qartify-nllb-menu-translation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BlockwardSARL/qartify-nllb-menu-translation 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="BlockwardSARL/qartify-nllb-menu-translation")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("BlockwardSARL/qartify-nllb-menu-translation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Qartify NLLB Menu Translation
A fine-tuned NLLB-200 Distilled 600M model for multilingual restaurant menu translation, developed for the Qartify platform.
This repository contains:
- the original fine-tuned PyTorch checkpoint
- an optimized ONNX INT8 version for production inference
- the dish-name protection lexicon used by the translation pipeline
Model Overview
Base Model
facebook/nllb-200-distilled-600M
Supported Languages
- Arabic (
arb_Arab) - French (
fra_Latn) - English (
eng_Latn)
Supported translation directions:
- Arabic โ French
- Arabic โ English
- French โ Arabic
- French โ English
- English โ Arabic
- English โ French
Training
The model was fine-tuned on a curated multilingual restaurant menu dataset containing:
- restaurant menu items
- dish names
- food descriptions
- multilingual parallel translations
- manually reviewed and cleaned samples
The objective was to improve translation quality for restaurant menus while preserving culturally specific food names.
Evaluation
Translation Quality
| Metric | Score |
|---|---|
| BLEU | 49.77 |
The fine-tuned checkpoint significantly improves restaurant menu translation compared with the original NLLB model.
Dish Name Preservation
Dish-name preservation is achieved using a detect-and-substitute post-processing pipeline together with the provided dish lexicon.
Result
- 100% dish-name preservation on the protected evaluation dataset.
The translation model generates the translated sentence, while the post-processing pipeline restores protected dish names exactly.
Example
Arabic
ุทุงุฌูู ุฏุฌุงุฌ ุจุงูุฎุถุฑ
โ
French
Tajine de poulet aux lรฉgumes
Arabic
ูุณูุณ ุนุถูู
โ
English
Organic Couscous
Loading the PyTorch Checkpoint
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained(
"BlockwardSARL/qartify-nllb-menu-translation/checkpoint"
)
model = AutoModelForSeq2SeqLM.from_pretrained(
"BlockwardSARL/qartify-nllb-menu-translation/checkpoint"
)
Example inference:
tokenizer.src_lang = "arb_Arab"
inputs = tokenizer(
"ุทุงุฌูู ุฏุฌุงุฌ ุจุงูุฎุถุฑ",
return_tensors="pt"
)
generated = model.generate(
**inputs,
forced_bos_token_id=tokenizer.convert_tokens_to_ids("fra_Latn")
)
translation = tokenizer.batch_decode(
generated,
skip_special_tokens=True
)
print(translation[0])
ONNX Inference
This repository also provides an optimized ONNX INT8 Dynamic Quantized version intended for fast production inference with ONNX Runtime.
The ONNX model offers:
- lower memory usage
- faster inference
- production-ready deployment
Dish Protection
The repository includes:
lexicon/
โโโ dish_lexicon.json
This lexicon is used by the translation service to preserve protected dish names through the detect-and-substitute pipeline.
Repository Structure
checkpoint/
โโโ config.json
โโโ model.safetensors
โโโ tokenizer.json
โโโ tokenizer_config.json
โโโ sentencepiece.bpe.model
โโโ generation_config.json
โโโ special_tokens_map.json
onnx_int8_dynamic/
โโโ encoder_model.onnx
โโโ decoder_model.onnx
โโโ decoder_with_past_model.onnx
โโโ ...
lexicon/
โโโ dish_lexicon.json
Intended Use
Recommended for:
- restaurant menu translation
- OCR menu pipelines
- food ordering platforms
- hospitality applications
- multilingual restaurant management systems
Limitations
The model was fine-tuned specifically for restaurant menu translation.
Performance on general-domain text has not been evaluated.
Perfect dish-name preservation requires the accompanying dish lexicon and detect-and-substitute pipeline.
Citation
If you use this model in academic work, please cite:
Qartify NLLB Menu Translation
Blockward SARL
2026
Authors
Developed by Blockward SARL
Master Research Internship โ Qartify AI
Ranya El Hamdaoui