text-generation · text · WebAssembly / WebGPU · ~1.7 GB (q8)
Falcon3 is the Technology Innovation Institute's 2024 open family, and the 1B Instruct is its smallest chat model — deliberately built to be capable at a size that runs anywhere. This page runs it entirely in your browser via Transformers.js: it streams tokens on the universal WebAssembly/CPU path (no GPU required) and automatically takes the WebGPU fast path when your device has one. Chat with it, steer it with a system prompt and sampling controls, and watch the real probability distribution behind every token. Nothing is uploaded; there is no API key and no server.
A different family from the other small chat models here (Qwen2, Llama, Gemma, Mistral): Falcon3 is a TII Falcon architecture, notably strong across English, French, Spanish, Portuguese and more at its size.
| Model | onnx-community/Falcon3-1B-Instruct (ONNX build of tiiuae/Falcon3-1B-Instruct) |
|---|---|
| Task | text-generation (causal LM, instruction-tuned chat) |
| Architecture | Falcon3 — a Llama-style decoder-only transformer (model_type: llama), 1.7B params, 131k-token vocab, 8k context |
| Params / dtype | 1.7B · q8 on WASM (onnx/model_quantized.onnx) · q4f16 on WebGPU (onnx/model_q4f16.onnx) |
| Backend | WebAssembly (CPU) by default — no WebGPU required; auto-upgrades to WebGPU when a real adapter is present |
| Download | ~1.7 GB (q8, WASM) or ~1.3 GB (q4f16, WebGPU), cached after first load |
| Languages | Multilingual — English, French, Spanish, Portuguese and others (Falcon3 strength) |
| License | Falcon LLM License 2.0 (TII, permissive/Apache-2.0-based) |
| Web APIs | WebAssembly, Web Workers, ES module imports (WebGPU optional) |
Heads up: the first load transfers the weights (~1.7 GB on CPU, ~1.3 GB on WebGPU), then it's cached. On the WASM/CPU path a 1.7B model streams at a modest pace — that's the honest cost of a GPU-free universal LLM.
An LLM never "picks a word" — every step it produces a probability over all 131,072 tokens in its vocabulary, and the sampler chooses one. Below is the exact templated prompt the model receives, and — from one real forward pass over the current conversation — the actual top candidates for the very next token, with their probabilities. Raise the temperature and the tail fattens; drop it and the top token dominates. This is the real distribution, computed on your device, not a mock-up.
Load the model and click "Show next-token distribution".
Falcon3-1B is the "runs anywhere" tier of a serious open family. Because it is small and multilingual, it makes client-side language a universal primitive: it works on the locked-down work laptop, the older phone, the kiosk with the GPU blocklisted — and it can read and reply across several languages without a translation API. Private, offline-capable once cached, free to run, no key.
Ask a question, watch the answer stream on your device — the core chat loop.
Multilingual structured extraction: free text in any language → schema-shaped JSON.
Polyglot persona engine: the same model role-plays a character in the language you pick.
On-device RAG: MiniLM retrieves, Falcon3 answers with citations.
It's the standard Transformers.js text-generation pipeline — pass a messages array
(the pipeline applies Falcon3's chat template), a TextStreamer for token-by-token
output, and your sampling settings. The only device-specific choice is device +
dtype, which this page picks by probing for a real WebGPU adapter:
import { pipeline, TextStreamer } from "@huggingface/transformers";
// Probe for a real adapter — WebGPU (q4f16) fast path, else universal WASM (q8) on the CPU.
const adapter = navigator.gpu && await navigator.gpu.requestAdapter().catch(() => null);
const [device, dtype] = adapter ? ["webgpu", "q4f16"] : ["wasm", "q8"];
const generator = await pipeline(
"text-generation", "onnx-community/Falcon3-1B-Instruct", { device, dtype },
);
const messages = [
{ role: "system", content: "You are a helpful, concise assistant." },
{ role: "user", content: "Traduis 'hello' en français." },
];
const streamer = new TextStreamer(generator.tokenizer,
{ skip_prompt: true, skip_special_tokens: true, callback_function: (t) => append(t) });
await generator(messages, {
max_new_tokens: 200, do_sample: true, temperature: 0.7, top_p: 0.9, streamer,
});
The "see inside" panel runs one raw forward pass —
generator.model(generator.tokenizer(prompt)) — reads the last position's
logits, softmaxes them, and shows the real top-k. Everything runs in a Web Worker so
generation never blocks the page; the loader auto-inits an already-cached copy and never silently
re-downloads.