Switchboard

switchboard-router-0.5b-ONNX

The browser build of Switchboard v0.1 (switchboardllm/switchboard-router-0.5b), for Transformers.js. It runs on the visitor's device with WebGPU or WebAssembly, so prompts never leave the browser.

Use it

import { AutoModelForCausalLM, AutoTokenizer } from "@huggingface/transformers"; // 4.2.0 or later

const repo = "switchboardllm/switchboard-router-0.5b-ONNX";
const tokenizer = await AutoTokenizer.from_pretrained(repo);
const model = await AutoModelForCausalLM.from_pretrained(repo, { dtype: "q8", device: "webgpu" });

const inputs = tokenizer.apply_chat_template(
  [{ role: "user", content: "Write a haiku about rain" }],
  { add_generation_prompt: true, return_dict: true },
);
const out = await model.generate({ ...inputs, max_new_tokens: 24, do_sample: false });
const text = tokenizer.batch_decode(out.slice(null, [inputs.input_ids.dims[1], null]), { skip_special_tokens: true })[0];
console.log(JSON.parse(text)); // { tier: "small", domain: "writing" }

Transformers.js 3.x can't run this file. Use 4.2.0 or later.

The file

File onnx/model_quantized.onnx, 660 MB
Quantization 8-bit asymmetric weights (block size 32) for every linear layer, 4-bit embedding table
Speed about 350 ms per routing decision with WebGPU in desktop Chrome

Does it route like the full model?

Measured in desktop Chrome (WebGPU) against the full-precision model, October 12, 2026:

Same decision as full precision
300 random held-out prompts 299 of 300
47 borderline prompts (picked to cover all three tiers) 45 of 47
Domain label 347 of 347
Valid JSON 347 of 347

Smaller builds broke the router: 4-bit linear layers matched only 66% of decisions, so this build keeps them in 8 bits. For exact decisions on your own machine, use the GGUF build, which matched 347 of 347.

Results, training data and limitations are in the full model card.

Downloads last month
907
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for switchboardllm/switchboard-router-0.5b-ONNX

Quantized
(2)
this model

Space using switchboardllm/switchboard-router-0.5b-ONNX 1