/ Модель

Характеристики

Контекст
1 024 токена
Параметры
290 млн
Лицензия
Apache 2.0
Архитектура
m2m_100 · dense
Базовая модель
nllb-200-distilled-600M
Опубликована
6 апр 2026

nllb-en-id-finetuned

ПереводТекст → текст4 профессии

Двунаправленная модель для перевода текстов между английским и индонезийским языками, дообученная на базе NLLB-200.

56скачиваний за 30 дней0лайковвеса обновлены12 июл 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Ik45/nllb-en-id-finetuned — дообученная двунаправленная модель перевода английского и индонезийского языков, основанная на facebook/nllb-200-distilled-600M и разработанная для специализации NLLB на этой языковой паре. Она использует архитектуру M2M100 типа encoder-decoder и содержит около 290,3 млн параметров по метаданным; в README описаны сокращение словаря и дообучение с оптимизатором GaLore. Модель предназначена для перевода текстов в направлениях английский → индонезийский и индонезийский → английский. Для этих направлений README приводит результаты на FLORES-200 devtest: sacreBLEU 42,71 и 37,87 соответственно. Метаданные указывают контекст до 1024 токенов, а README отмечает оптимальное качество для последовательностей до 256 токенов. Модель опубликована в формате safetensors под лицензией Apache-2.0.

Модель специализировалась на общей тематике английско-индонезийских текстов. Сокращённый словарь и настройка на одну языковую пару могут ухудшить перевод других языков, редких имён, смешанной англо-индонезийской речи, новых слов и сленга; для технических, юридических и медицинских материалов может потребоваться дополнительная настройка. При генерации нужно задавать корректный идентификатор целевого языка через forced_bos_token_id.

Сценарии применения

  • перевод английских текстов на индонезийский
  • перевод индонезийских текстов на английский
  • перевод общетематических предложений между английским и индонезийским
  • локализация англоязычного контента для индонезийской аудитории

Ограничения

Оптимизирована для английского и индонезийского; качество на других языковых парах, редких именах, смешанных языках, новых словах и сленге может быть ниже. README рекомендует для лучшего качества ограничивать последовательности примерно 256 токенами и задавать корректный forced_bos_token_id для целевого языка.

Для каких профессий подходит4

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

NLLB-Indo-Bilingual: Pruned & Fine-Tuned English↔Indonesian Translation Model

Production-ready bilingual translation model optimized for English ↔ Indonesian (bidirectional) through vocabulary pruning and continual fine-tuning with GaLore memory-efficient optimization.


📋 Table of Contents


🔭 Overview

This model is a specialized bilingual variant of Meta's NLLB-200-distilled-600M, designed specifically for high-quality English-Indonesian translation in both directions. Through a two-stage pipeline of leaf-based vocabulary pruning and GaLore-optimized continual fine-tuning, we achieve:

  • ~27% parameter reduction (600M → 442M active params) via vocabulary pruning
  • Preserved translation quality with competitive BLEU/chrF++ scores
  • Efficient inference with reduced memory footprint
  • Bidirectional capability (EN→ID and ID→EN) via balanced training

Key Innovations

TechniquePurposeImpact
Leaf-Based Frequency PruningRemove unused vocabulary tokens56% vocab reduction (256K → 87K)
Embedding RemappingAlign embeddings with pruned vocabMaintains token representations
Token BatchingFairseq-style --max-tokens training2-3× GPU throughput improvement
GaLore OptimizationMemory-efficient fine-tuningFull fine-tuning on 2× T4 GPUs

🏗️ Model Details

AttributeValue
Base ArchitectureM2M100 (Encoder-Decoder)
Base Modelfacebook/nllb-200-distilled-600M
Vocabulary Size86,915 tokens (pruned from 256,204)
Hidden Size1,024
Encoder/Decoder Layers12 / 12
Attention Heads16
FFN Dimension4,096
Total Parameters441,719,808 (~442M)
Tied EmbeddingsYes (shared encoder/decoder/lm_head)
Max Sequence Length2,048 tokens
Supported Pairseng_Latn ↔ ind_Latn

Vocabulary Composition

The pruned vocabulary retains:

  • ✅ All English and Indonesian atomic tokens
  • ✅ Language tags (eng_Latn, ind_Latn)
  • ✅ Special tokens (BOS, EOS, PAD, UNK)
  • ✅ High-frequency merge tokens
  • ❌ Low-frequency multilingual tokens (pruned)

📊 Performance

FLORES-200 Benchmark Results

Evaluated on FLORES-200 devtest set using sacreBLEU and chrF++:

DirectionsacreBLEUchrF++Status
EN → ID42.7166.68✅ Fine-tuned
ID → EN37.8763.04✅ Fine-tuned
EN → ID (original)41.2165.65Baseline
ID → EN (original)39.4363.66Baseline

Note: The fine-tuned model shows improvement on EN→ID (+1.5 BLEU) while maintaining competitive ID→EN performance. The slight ID→EN decrease is expected when specializing a multilingual model for a single pair.

Efficiency Metrics

MetricOriginalPrunedImprovement
Vocabulary Size256,20486,915-66%
Embedding Parameters~262M~89M-66%
Model File Size~2.4 GB~1.65 GB-31%
Active Parameters~600M~442M-26%
Inference LatencyBaseline~15% faster+15%

🚀 Usage

Quick Start

from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
import torch
# Load model and tokenizer
model_name = "ik4545/nllb-indo-bilingual"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
def translate(text: str, src_lang: str, tgt_lang: str) -> str:
    """Translate text between English and Indonesian."""
    tokenizer.src_lang = src_lang
    inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=512)
    # Get forced BOS token for target language
    forced_bos_token_id = tokenizer.convert_tokens_to_ids(tgt_lang)
    with torch.no_grad():
        outputs = model.generate(
            **inputs,
            forced_bos_token_id=forced_bos_token_id,
            max_length=256,
            num_beams=4,
            early_stopping=True,
            length_penalty=1.0,
        )
    return tokenizer.decode(outputs[0], skip_special_tokens=True)
# English → Indonesian
en_text = "Artificial intelligence is rapidly advancing in Indonesia."
id_translation = translate(en_text, "eng_Latn", "ind_Latn")
print(f"EN → ID: {id_translation}")
# Output: "Kecerdasan buatan semakin berkembang pesat di Indonesia."
# Indonesian → English
id_text = "Pemerintah mengumumkan kebijakan baru tentang pendidikan."
en_translation = translate(id_text, "ind_Latn", "eng_Latn")
print(f"ID → EN: {en_translation}")
# Output: "The government announced new policies regarding education."

Using the Pipeline API

from transformers import pipeline
# English to Indonesian
en_to_id = pipeline(
    "translation",
    model="ik4545/nllb-indo-bilingual",
    src_lang="eng_Latn",
    tgt_lang="ind_Latn",
    device=0  # Use GPU if available
)
result = en_to_id("The weather is very nice today.")
print(result[0]["translation_text"])

Supported Language Codes

LanguageCodeDirection
Englisheng_LatnSource & Target
Indonesianind_LatnSource & Target

🧪 Training Methodology

Stage 1: Leaf-Based Vocabulary Pruning

Following Purason et al. (2026), we implemented leaf-based frequency pruning:

  1. Frequency Analysis: Token frequencies computed on 50M characters of EN/ID corpus (FineWeb)
  2. Leaf Detection: Identify tokens that are never used as merge-rule components
  3. Frequency-Gated Pruning: Remove low-frequency leaf tokens (freq ≤ 5 threshold)
  4. Merge Validation: Ensure no unreachable tokens are created post-pruning
  5. Embedding Remapping: Slice and remap embedding matrix to new vocabulary Pruning Statistics:
  • Original vocabulary: 256,204 tokens
  • Pruned vocabulary: 86,915 tokens
  • Tokens removed: 169,289 (66%)
  • Pruning ratio: 80% of non-atomic tokens

Stage 2: GaLore Continual Fine-Tuning

Fine-tuned on 500K parallel EN-ID sentence pairs using:

HyperparameterValue
OptimizerGaLoreAdamW (attention/FFN) + AdamW (embeddings)
GaLore Rank128
Learning Rate (GaLore)5e-4
Learning Rate (Embeddings)1e-4
Batch StrategyToken Batching (max 16,384 tokens/GPU)
Gradient Accumulation8 steps
Training Epochs2
Label Smoothing0.0
Hardware2× NVIDIA Tesla T4 (16GB VRAM)
FrameworkPyTorch DDP + HuggingFace Transformers

Key Training Features:

  • 🎯 Token Batching: Fairseq-style --max-tokens for optimal GPU utilization
  • 🔄 Bidirectional Training: Equal mix of EN→ID and ID→EN samples
  • 💾 Gradient Checkpointing: Memory-efficient training
  • ⚡ FP16 Mixed Precision: Accelerated training on T4 GPUs

⚠️ Limitations

  1. Language Scope: Optimized exclusively for English ↔ Indonesian. Performance on other language pairs is not guaranteed and likely degraded compared to the original NLLB-200 model.
  2. Domain Specificity: Best performance on general-domain text. Technical, legal, or medical translations may require domain-specific fine-tuning.
  3. Vocabulary Coverage: The pruned vocabulary may struggle with:
    • Rare proper nouns not in training corpus
    • Code-switching (mixed EN/ID sentences)
    • Very recent neologisms or slang
  4. Sequence Length: Optimal performance for sequences up to 256 tokens. Longer sequences may experience quality degradation.
  5. Inference Requirements: Requires forced_bos_token_id to be set correctly for target language. Without it, the model may generate output in an incorrect language.

📁 Model Files

.
├── config.json                  # Model configuration
├── tokenizer_config.json        # Tokenizer settings
├── tokenizer.json               # Fast tokenizer (BPE)
├── special_tokens_map.json      # Special token mappings
├── model.safetensors            # Model weights (~1.65 GB)
├── generation_config.json       # Generation defaults
└── README.md                    # This file

🤝 Contributing

This model was developed as part of research into efficient multilingual model specialization. For questions, issues, or contributions, please open an issue on the Hugging Face Hub or GitHub repository.

📄 License

This model is licensed under the Apache License 2.0, same as the original NLLB-200 model by Meta AI. The original NLLB-200 model and weights are © Meta Platforms, Inc. This derivative work (pruned vocabulary + fine-tuned weights) is released under the same license terms.

🙏 Acknowledgments

  • Meta AI for the original NLLB-200 model and training recipe
  • HuggingFace for the Transformers and Datasets libraries
  • GaLore Team for memory-efficient optimization techniques
  • FineWeb / HuggingFaceFW for high-quality web-crawled training data

📚 Citation

If you use this model in your research, please cite:

@misc{nllb-indo-bilingual-2026,
  title={NLLB-Indo-Bilingual: Efficient Bilingual Translation via Vocabulary Pruning and GaLore Fine-Tuning},
  author={ik4545},
  year={2026},
  howpublished={\url{[https://huggingface.co/ik4545/nllb-indo-bilingual](https://huggingface.co/ik4545/nllb-indo-bilingual)}}
}
@article{nllb2022,
  title={No Language Left Behind: Scaling Human-Centered Machine Translation},
  author={Costa-jussà, Marta R. and Cross, James and Çelebi, Onur and Elbayad, Maha and Heafield, Kenneth and Heffernan, Kevin and Kalbassi, Elahe and Lam, Janice and Licht, Daniel and Maillard, Jean and Sun, Anna and Wang, Skyler and Wenzek, Guillaume and Youngblood, Al and Akula, Bapi and Barrault, Loïc and González, Gabriel Mejía and Hansanti, Prangthip and Hoffman, John and Jarrett, Semarley and Sadagopan, Kaushik Ram and Rowe, Dirk and Spruit, Shannon and Tran, Chau and Andrews, Pierre and Ayan, Necip Fazil and Bhosale, Shruti and Edunov, Sergey and Fan, Angela and Gao, Cynthia and Goswami, Vedanuj and Guzmán, Francisco and Koehn, Philipp and Mourachko, Alexandre and Ropers, Christophe and Saleem, Safiyyah and Schwenk, Holger and Wang, Jeff},
  journal={arXiv preprint arXiv:2207.04672},
  year={2022}
}
@article{purason2026,
  title={Teaching Old Tokenizers New Words: Leaf-Based Vocabulary Pruning for Multilingual Models},
  author={Purason, T. and others},
  journal={arXiv preprint arXiv:2512.03989v2},
  year={2026}
}
@article{zhao2024galore,
  title={GaLore: Memory-Efficient LLM Training by Gradient Low-Rank Projection},
  author={Zhao, J. and others},
  journal={arXiv preprint arXiv:2403.03507},
  year={2024}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Можно запустить

Подбираем GPU…

Класс архитектуры
M2M100ForConditionalGeneration
Ревизия весов
ad68d63

0 моделей