Models Jul 31, 2026 7 min read

    Introducing DiacNet-1.1: Multilingual Diacritic Restoration for 10 Languages

    OO
    Olumide Ola
    Olaverse Lab
    Introducing DiacNet-1.1: Multilingual Diacritic Restoration for 10 Languages

    Overview

    Diacritics-such as accents, tone marks, and special characters-are essential for clarity, pronunciation, and meaning in many languages. Yet, they are often stripped away in digital text due to technical limitations, user input habits, or data processing errors. This loss can lead to ambiguity, mispronunciation, and even miscommunication.

    Today, we’re excited to introduce DiacNet-1.1, a state-of-the-art model designed to restore diacritics to text across 10 languages in a single, unified system. Developed by olaverse, DiacNet-1.1 is fine-tuned from Google’s ByT5-base (580M parameters) and trained on 7 million sentences of commercially licensed text. Whether you’re working with Yorùbá, Vietnamese, Polish, or Spanish, DiacNet-1.1 can help you recover the nuances of written language with remarkable accuracy.


    Supported Languages

    DiacNet-1.1 supports the following 10 languages:

    • Yorùbá (<yor>)
    • Igbo (<ibo>)
    • Hausa (<hau>)
    • Vietnamese (<vie>)
    • Polish (<pol>)
    • Turkish (<tur>)
    • Portuguese (<por>)
    • Spanish (<spa>)
    • French (<fra>)
    • Italian (<ita>)

    You can also use the <auto> tag to let the model infer the language automatically, with minimal impact on accuracy.


    How It Works

    DiacNet-1.1 is a sequence-to-sequence model that takes stripped text (text without diacritics) and predicts the fully diacritized version. The model is trained on a diverse corpus of web and encyclopedic text, ensuring robustness across different domains.

    Example Usage

    Here’s how you can use DiacNet-1.1 in just a few lines of Python:

    from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
    
    # Load the model and tokenizer
    tok = AutoTokenizer.from_pretrained("olaverse/diacnet-1.1")
    model = AutoModelForSeq2SeqLM.from_pretrained("olaverse/diacnet-1.1")
    
    # Restore diacritics to Yorùbá text
    text = "<yor> se eranko naa si gbo o?"
    inputs = tok(text, return_tensors="pt")
    out = model.generate(**inputs, max_new_tokens=512)
    print(tok.decode(out[0], skip_special_tokens=True))
    # Output: ṣé ẹranko náà sì gbọ́ ọ?

    Language Tagging

    Prefix your input text with the appropriate language tag to guide the model:

    # Vietnamese
    text = "<vie> Toi khong biet tieng Viet"
    # Output: Tôi không biết tiếng Việt
    
    # Polish
    text = "<pol> Lodz jest piekna"
    # Output: Łódź jest piękna
    
    # Auto-detect language
    text = "<auto> El nino esta en la casa"
    # Output: El niño está en la casa

    Performance

    DiacNet-1.1 was evaluated on diacbench, a benchmark of 1,000 held-out sentences per language, sourced independently from the training corpus. The model was tested using the following metrics:

    • DER (Diacritic Error Rate): Errors restricted to diacritic-eligible characters.
    • WER (Word Error Rate): Measures errors at the word level.
    • CER (Character Error Rate): Measures errors at the character level.
    • Exact Match: Percentage of sentences restored perfectly.

    Benchmark Results

    LanguageDERWERCERExact Match
    Italian0.00020.10%0.04%99.3%
    Portuguese0.00311.39%0.23%88.0%
    French0.00530.77%0.18%94.7%
    Polish0.00582.65%0.33%85.3%
    Turkish0.00681.50%0.35%91.7%
    Spanish0.00812.06%0.35%83.0%
    Vietnamese0.046011.98%3.06%36.0%
    Igbo0.05084.78%1.29%41.0%
    Hausa0.05932.53%0.51%59.7%
    Yorùbá0.200642.18%14.50%0.3%

    Note: The lower exact-match scores for Vietnamese and Yorùbá reflect the high density of diacritic marks in these languages. Even a single error can cause the entire sentence to fail the exact-match metric. DER is the most meaningful metric for these languages.


    Improvements Over DiacNet-1.0

    DiacNet-1.1 represents a significant leap forward from its predecessor, DiacNet-1.0, with improvements across multiple languages:

    LanguageDER (1.0 → 1.1)WER (1.0 → 1.1)Verdict
    Vietnamese0.1264 → 0.046021.98% → 11.98%1.1, 2.7× better
    Turkish0.0447 → 0.006819.20% → 1.50%1.1, 6.6× better
    Polish0.0357 → 0.005815.12% → 2.65%1.1, 6.2× better
    Italian0.0015 → 0.00020.66% → 0.10%1.1, 7.5× better
    Portuguese0.0072 → 0.00311.80% → 1.39%1.1 better
    Spanish0.0084 → 0.00812.19% → 2.06%~equal
    French0.0038 → 0.00531.46% → 0.77%Mixed
    Igbo0.0359 → 0.05088.34% → 4.78%Mixed
    Hausa0.0383 → 0.05938.58% → 2.53%Mixed
    Yorùbá0.1554 → 0.200627.69% → 42.18%1.0 better

    Key Observations

    1. Major Gains: DiacNet-1.1 achieves 2.7× to 7.5× better performance on Vietnamese, Turkish, Polish, and Italian.
    2. Mixed Results: For French, Igbo, and Hausa, the model shows trade-offs between DER and WER. For example, while DER increased slightly for Hausa, WER improved dramatically (8.58% → 2.53%), and exact-match scores jumped from 0% to 59.7%.
    3. Yorùbá Challenge: The model’s performance on Yorùbá regressed due to the lower quality of diacritic annotations in the larger training corpus. DiacNet-1.0 was trained on ~2,000 high-quality Yorùbá passages, while DiacNet-1.1’s corpus, though much larger, had a lower diacritic density. This highlights a critical trade-off: more data isn’t always better if annotation quality suffers.

    Priority for Next Release: Improving Yorùbá, Igbo, and Hausa performance by incorporating higher-quality annotated data.


    Comparison with General-Purpose LLMs

    We benchmarked DiacNet-1.1 against Claude Sonnet 4.5 and GPT-4o-mini on the same diacbench dataset. The results reveal interesting trade-offs between accuracy and reliability:

    Diacritic Error Rate (DER)

    SystemYorùbáIgboHausaVietnamesePolishTurkishPortugueseSpanishFrenchItalian
    Copy-Input (Floor)0.43580.11710.02360.30620.09150.11130.04760.04260.04710.0333
    DiacNet-1.00.15540.03590.03830.12640.03570.04470.00720.00840.00380.0015
    DiacNet-1.10.20060.05080.05930.04600.00580.00680.00310.00810.00530.0002
    Claude 4.5 (Strict)0.33530.22610.35090.02780.03430.02410.01720.02150.11710.0005
    Claude 4.5 (Fallback)0.19130.04270.01780.01070.00350.00190.00110.00400.00520.0005
    GPT-4o-mini (Strict)0.46070.50350.63680.08470.04300.02610.02800.05550.03410.0085
    GPT-4o-mini (Fallback)0.28110.12770.14320.03990.00700.00380.00240.00890.00230.0052

    Key Takeaways

    1. Strict vs. Fallback Scoring:
    • Strict scoring counts all errors, including cases where the LLM rewrites or translates the input.
    • Fallback scoring assumes a pipeline that detects and skips rewritten outputs, focusing only on diacritic restoration.
    1. DiacNet-1.1 vs. Claude (Strict): DiacNet-1.1 outperforms Claude on 8 out of 10 languages when scored strictly.
    2. DiacNet-1.1 vs. Claude (Fallback): With fallback scoring, Claude outperforms DiacNet-1.1 on 9 out of 10 languages. This highlights that while LLMs can achieve higher accuracy on compliant outputs, they fail to return usable text on 20-35% of inputs (e.g., 34% of Hausa, 26% of Yorùbá, 21% of Igbo).
    3. Reliability: DiacNet-1.1 never rewrites or alters base characters in 94.7–100% of cases, depending on the language. In contrast, LLMs alter 20–50% of inputs, making them unreliable for large-scale processing.

    Output Compliance

    SystemYorùbáIgboHausaVietnamesePolishTurkishPortugueseSpanishFrenchItalian
    DiacNet-1.1100%96.3%94.7%99.3%100%99.7%100%99.7%99.7%100%
    DiacNet-1.098.0%99.0%98.3%96.3%99.3%100%99.7%99.7%100%100%
    Claude 4.574.3%79.3%65.7%97.7%96.7%98.0%97.7%98.3%88.3%100%
    GPT-4o-mini68.0%57.3%49.3%93.7%96.0%94.7%97.7%97.3%96.7%99.7%

    Conclusion: If you need maximum accuracy on a few sentences and can tolerate retries, a frontier LLM like Claude may be the best choice. However, if you need to process millions of sentences reliably, deterministically, and offline, DiacNet-1.1 is the tool for the job.


    Training Details

    AspectDescription
    Base Modelgoogle/byt5-base (580M parameters, byte-level)
    Data7.02M sentences from FineWeb-2 (ODC-By) and Wikipedia (CC BY-SA), filtered for diacritic density, NFC-normalised, and deduplicated.
    ObjectiveSequence-to-sequence: <lang> stripped text → fully diacritized text.
    AugmentationPartial stripping (30%), character noise (7%), <auto> tag (12%), optional gloss conditioning (~6%).
    PrecisionBF16, max 512 bytes.
    Correction PassContinued training on high-density Yorùbá with 35% replay of other languages, learning rate 2e-5.

    Note: All training data is commercially licensed. No non-commercial sources (e.g., MENYO-20k, JW300) were used.


    Limitations

    While DiacNet-1.1 is a powerful tool, it has some limitations:

    1. Yorùbá Tone Marks: The model under-marks tones in Yorùbá due to under-annotated training data. Output should not be treated as publication-ready without review.
    2. Irreducible Errors: Stripping diacritics is lossy. For example, in Italian, both Viaggiò (3rd-person past) and Viaggio (1st-person present) reduce to Viaggio-no model (or human) can recover the original distinction.
    3. Proper Nouns: Names and places (e.g., Àlàmú vs. Àlámù) are unreliable due to insufficient context. Foreign names may also be over-nativized (e.g., Vietnamese TomTôm).
    4. Gloss Conditioning: The model supports optional [g: word=meaning] hints, but their effect on diacbench was neutral to slightly negative. This feature is documented but not recommended for general use.
    5. Structural Guarantees: As a seq2seq model, DiacNet-1.1 can alter base characters. However, measured compliance on diacbench is 94.7–100%, so constrained decoding is advisable for high-stakes pipelines.
    6. Register Bias: The model was trained on web and encyclopedic text. Performance on conversational, poetic, or code-switched text is untested.
    7. Benchmark Limitations: The diacbench dataset contains a small number of defective reference sentences (~1%), which slightly caps measured scores.

    Intended Use Cases

    DiacNet-1.1 is ideal for:

    Restoring diacritics in scraped or user-typed text.
    Cleaning corpora for downstream NLP tasks.
    Assisting typing in languages where diacritics are commonly omitted.

    DiacNet-1.1 is not designed for:

    ❌ Text generation.
    ❌ Translation.
    ❌ Spelling correction.
    ❌ General-purpose language modeling.

    Best Practice: Use DiacNet-1.1 with human review for Yorùbá and any application where a wrong tone mark could change meaning.


    Citation

    If you use DiacNet-1.1 in your research or applications, please cite it as follows:

    @misc{diacnet11,
      author = {olaverse},
      title  = {diacnet-1.1: multilingual diacritic restoration},
      year   = {2026},
      url    = {https://huggingface.co/olaverse/diacnet-1.1}
    }

    DiacNet-1.1 is built on ByT5 (Xue et al.), FineWeb-2, and Wikipedia. Please attribute these sources per their respective licenses.


    Try It Yourself

    Ready to restore diacritics to your text? Head over to the DiacNet-1.1 Hugging Face page to explore the model, download it, and start using it in your projects!


    Questions or feedback? Open an issue on the Hugging Face repository or reach out to the olaverse team.

    Enjoyed this? Every model we write about is open weight and free to download.

    🤗 Follow on Hugging Face

    More from the Blog

    Pretrained From Scratch for Naija: Introducing mist-encoder-base-ng
    Models

    Pretrained From Scratch for Naija: Introducing mist-encoder-base-ng

    The Small Model Behind a Better Chat List: Introducing mist-tg-0.3b
    Models

    The Small Model Behind a Better Chat List: Introducing mist-tg-0.3b

    One Passage In, Real Questions Out: Introducing mist-qg-1.5b
    Models

    One Passage In, Real Questions Out: Introducing mist-qg-1.5b