Skip to content

Next-word suggestions (beta)

Suggests the next word or phrase for the text typed so far, as a keyboard does, in 475 languages.

r = ym.suggest("Thank you very much for your", "eng_Latn")
print(r.text, r.source, r.score)    # text is "" when nothing is confident enough to show
const r = await ym.suggest("Nitakupigia simu bada", "swh_Latn");
  • Each language has calibrated settings, tuned on held-out text to save the most keystrokes while at least half of the suggestions shown are right. When the model has nothing confident to say, a word-list fallback may.
  • source says which made the suggestion: "glide" (the model) or "bigram" (the word list).
  • A half-typed word is finished first ("tomor" → "row"), then the next words follow while the model stays confident.

More or fewer suggestions

eagerness is one knob from 0 to 1. At 0.5 each language uses its calibrated settings; higher shows more suggestions (and shorter ones), lower shows fewer, safer ones.

ym.suggest(text, "hau_Latn", eagerness=0.8)
await ym.suggest(text, "hau_Latn", { eagerness: 0.8 });

Your own settings

Every calibrated setting can also be overridden per call (these win over eagerness):

ym.suggest(text, "eng_Latn", cutoff=0.4, bigram_cutoff=None, min_chars=3)
ym.suggest_settings("eng_Latn")      # the calibrated values
await ym.suggest(text, "eng_Latn", { cutoff: 0.4, bigramCutoff: null, minChars: 3 });
await ym.suggestSettings("eng_Latn");
Setting What it does
cutoff the model's confidence cutoff, 0–1: higher shows fewer, safer suggestions
bigram_cutoff / bigramCutoff the word-list fallback's cutoff, 0–1; None / null turns the fallback off
min_chars / minChars the shortest suggestion worth showing, in characters

How good is it

Share of keystrokes saved on held-out typed text varies a lot by language: about a third for English, a tenth for Hausa, and a few percent for languages with little web text. Every model card lists its languages: olaverse/YellowMIST-Glide-1.0-<REGION>.

Beta

Good on written text, weaker on chat. Each suggestion runs the model several times, so in a browser call it from a Web Worker.