All models
    LID-608 family · Language identification

    lid-lite-608

    608 languages in 37 MB, on a single CPU thread.

    lid-lite-608 is the fast member of the LID-608 line. It knows the same 608 languages and returns the same labels as lid-neural-608, but it is a small fastText model that runs anywhere, with no GPU and no deep-learning stack.

    Also in LID-608:lid-neural-608
    lid-lite-608 banner
    608
    Languages
    37 MB
    Model size
    6,800/s
    Texts per CPU thread
    0.839
    Avg F1, 20 African languages
    / Why it exists

    The problem it solves

    Language identification often has to run on everything: every page of a web crawl, every message through a gateway, every document in an archive. At that volume a GPU model is too slow and too expensive.

    The existing fast detectors are either far larger or know far fewer languages, and they misfile low-resource African languages into bigger neighbours. lid-lite-608 is small enough to run everywhere and wide enough to find the languages others lose.

    / Benchmarks

    The numbers

    20 African languages

    20 African languages

    Higher F1 than GlotLID on 18 of 20 major African languages, averaging 0.839 against 0.757. The biggest jumps are Kinyarwanda, Xhosa, Wolof and Lingala.

    Against detectors many times its size

    Against detectors many times its size

    At 37 MB it beats GlotLID and Meta’s fastText LID on the held-out test (0.858), 1-5 word input (0.672), Tatoeba (0.922) and UDHR-LID (0.910).

    / What you get

    Highlights

    Tiny and fast

    About 3× the languages of Meta’s fastText LID at 1/32 of its size, and 1/45 the size of GlotLID.

    Better on African languages

    Average F1 0.839 across 20 major African languages against 0.757 for GlotLID, with big gains on Kinyarwanda, Xhosa, Wolof and Lingala.

    Same modes as the neural model

    Coverage mode for corpus building, traffic mode for user input. Swap to lid-neural-608 without changing any labels.

    Filters junk

    The noise class for numbers, URLs and code scores F1 0.961, so it doubles as a cleaning pass on raw crawls.

    / Quick start

    Run it in a few lines

    $pip install "olaverse[lid]"
    quickstart.py
    from olaverse import LIDLite608
    
    lid = LIDLite608()                                  # coverage mode (default)
    lid.predict("Ẹ kú àárọ̀, ṣé dáadáa ni?")             # → 'yor_Latn'
    lid.predict_proba("Habari za asubuhi", top_k=3)
    # → {'swh_Latn': 0.916, 'swc_Latn': 0.084, 'hau_Latn': 0.0}
    
    # Traffic mode for user-facing input
    LIDLite608(mode="traffic").predict("Bonjour mon ami")   # → 'fra_Latn'
    / LID-608 family

    Which LID-608 model?

    Need the best accuracy on short text? lid-neural-608 shares the labels and modes, so you can send it only the hard cases.

    lid-neural-608 →lid-lite-608THIS PAGE
    Size140M parameters37 MB
    Speed~1,100 texts/s on an A100~6,800 texts/s on one CPU thread
    Held-out accuracy0.8670.858
    1-5 words, traffic mode0.9060.829
    Everyday phrases, traffic mode0.9430.838
    Best forUser input and short textBulk filtering, CPU and edge
    / Where it shines

    Best for

    • Filtering web crawls and building language corpora at scale on ordinary CPUs.
    • Edge and serverless deployments, where a 37 MB model with no deep-learning stack matters.
    • Finding low-resource African languages that other detectors misfile.
    • A fast first pass in front of lid-neural-608, sending it only the hard cases.
    / Built with
    fastText Python Apache-2.0