Ferric masks the model's logits token-by-token so the output cannot leave the grammar of your schema — every generation is guaranteed-conformant JSON, produced deterministically, running entirely on your GPU via WebGPU. Because Ferric owns the logits and is bit-identical across fabrics, the same constrained output is reproducible from a datacenter to this tab. No incumbent runtime does this in a browser.
Try it
Pick a model — a byte-level BPE one (Qwen) or a SentencePiece one (Gemma) — it streams once from Hugging Face onto your GPU, then generates under the constraint. Same pure-Rust code runs both, and produces bit-identical output to the native build. First run downloads the weights; after that it is instant and offline.
The verdict below the output is checked in-page: the text is parsed as JSON and every declared key is confirmed present with the right type. It is green on every run because the sampler physically cannot emit a token that breaks the schema.
Why it matters
Not a prompt asking nicely for JSON, not a retry loop. The grammar is enforced on the logits — invalid tokens have zero probability of being sampled.
Ferric's kernels are bit-identical Metal ↔ WebGPU ↔ Vulkan. Constrain the logits and the constrained result is reproducible everywhere — a property no other runtime holds.
The model, the decoding, and your data never leave the tab. No API key, no server round-trip, no token bill.
The same handle is a Vercel AI SDK LanguageModelV2. Every generateObject() app runs on-device, unchanged.
Vercel AI SDK
This is real ai@5 + zod from npm, driving Ferric as the model. No provider key, no network — the inference happens in this tab.
import { generateObject } from 'ai'; import { z } from 'zod'; import { loadFerric, ferric } from './ferric-provider.js'; // load the GGUF once, straight onto WebGPU const fm = await loadFerric(ggufBytes); const model = ferric(fm); const { object } = await generateObject({ model, // ← Ferric, on-device schema: z.object({ name: z.string(), age: z.number().int(), city: z.string() }), prompt: 'Invent a fictional person.', }); // object is guaranteed to match the schema — decoded under constraint