โ† All models ยท Gemma 3 270M

use case ยท practical

Free text โ†’ structured JSON

The most useful thing a small on-device LLM does for a product: read messy human text and emit clean, schema-shaped JSON your form or API can consume, with nothing leaving the device. Paste a review, email, or note and extract it. The page then runs JSON.parse() on the output to prove it's real, machine-readable data โ€” not just plausible-looking text.

Run it

Target fields

summary ยท sentiment (positive/neutral/negative) ยท action_items[] ยท people[]

Raw model output

The model's JSON appears here as it streams.

Parsed JSON.parse() result

If the output is valid JSON, the parsed object shows here.

Why this pattern works

A system prompt fixes the schema and demands "JSON only, no prose"; greedy decoding keeps the output deterministic. The page strips any stray code fences and runs JSON.parse() โ€” the honest test of whether the model produced machine-readable output, not just plausible text. Small models occasionally miss a field or drop a brace; validating in-page and re-prompting is the shippable pattern. This is exactly the narrow, structured job a 270M model is well suited to.

Next rung: Wild โ€” the persona engine โ†’