HomeAI & Machine LearningToolformer Self-Annotation Loss Filter (2D)

Toolformer Self-Annotation Loss Filter (2D)

Interactive 2D simulator of the Toolformer self-annotation filter: sample candidate API calls at each position in a token stream, score them by how much they reduce the loss of predicting future tokens, and keep only the calls that clear a threshold.

AI & Machine Learning2DAdvanced60 FPS📱 Mobile-adapted⇄ 3D version
2d-ai-topic-11 ↗ Open standalone

Toolformer-style training builds its tool-use dataset without a single human label: the model samples candidate API calls at points in ordinary text, executes them, and keeps only the ones that measurably reduce its own loss on the tokens that follow. This 2D simulator renders that filtering step as three linked panels — a pannable token stream with paired loss bars at each candidate site, a live histogram of the loss-reduction distribution against the threshold τ, and a running strip chart of the acceptance rate across batches. Tune the threshold, how many candidate calls are sampled per site, how spread out candidate usefulness is, and the fixed cost charged for actually calling a tool, and watch every panel respond live.

⚙ Under the hood

Watch a language model self-annotate its own tool-use training data in a pannable 2D token stream: sample candidate API calls at each position, score them by how much they reduce the loss on the following tokens, and keep only the calls that clear a threshold — with a live ΔL histogram and an acceptance-rate strip chart alongside.

Toolformerfunction callingself-supervisionLLM trainingdata filtering

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)