Step 7 of 8

Text Generator

Use a trained 4-gram model to predict the next words from a seed. Switch between backoff and interpolation to see how smoothing changes what gets sampled.

No trained model in memory. Visit the Training page to build the n-gram counts first.

Controls

Configure the generation run.

The last 3 words form the 4-gram context. Start-tokens fill the gap if the seed is shorter.

0.2 sharp1.0 neutral1.5 diverse

Generated text

Produced by LM2 Interpolation

Choose a model, enter a seed, then click Generate. The output will appear here.
Tip: LM1 may produce repetitive output because it collapses to a unigram fallback when the 4-gram context is unseen. LM2's interpolation always mixes in shorter contexts, which usually makes generation more varied.