← All models

text-generation · text · WebAssembly / WebGPU · ~1.7 GB (q8)

Falcon3 1B Instruct — TII's compact multilingual LLM in your browser

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.

At a glance

Modelonnx-community/Falcon3-1B-Instruct (ONNX build of tiiuae/Falcon3-1B-Instruct)
Tasktext-generation (causal LM, instruction-tuned chat)
ArchitectureFalcon3 — a Llama-style decoder-only transformer (model_type: llama), 1.7B params, 131k-token vocab, 8k context
Params / dtype1.7B · q8 on WASM (onnx/model_quantized.onnx) · q4f16 on WebGPU (onnx/model_q4f16.onnx)
BackendWebAssembly (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
LanguagesMultilingual — English, French, Spanish, Portuguese and others (Falcon3 strength)
LicenseFalcon LLM License 2.0 (TII, permissive/Apache-2.0-based)
Web APIsWebAssembly, Web Workers, ES module imports (WebGPU optional)

Run it

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.

assistantThe model auto-loads when it's already cached; otherwise click Download once. Then say hello — I stream my reply token by token, on your device. Try me in another language.
Sampling controls

See inside — the next-token distribution

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.

Constructed chat template

Load the model and click "Show next-token distribution".

Top candidates for the next token

The bars appear here.

Why it matters

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.

Use cases

Basics

Ask a question, watch the answer stream on your device — the core chat loop.

Practical

Multilingual structured extraction: free text in any language → schema-shaped JSON.

Wild

Polyglot persona engine: the same model role-plays a character in the language you pick.

Multi-model

On-device RAG: MiniLM retrieves, Falcon3 answers with citations.

How the API works

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.

References