Spaces:
Running
Running
Download index.html from switchboardllm/switchboard: direct link, hf CLI and curl.
- Browser
- Download file 15.8 kB
-
https://huggingface.co/spaces/switchboardllm/switchboard/resolve/main/index.html
- Command line
-
hf download hf://spaces/switchboardllm/switchboard/index.html
-
curl -L -o index.html https://huggingface.co/spaces/switchboardllm/switchboard/resolve/main/index.html
15.8 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Switchboard</title> | |
| <meta name="description" content="A 0.5B open-weights router that picks the cheapest model that can handle each prompt. Try it in your browser."> | |
| <meta property="og:title" content="Switchboard"> | |
| <meta property="og:description" content="Pick the cheapest model that can handle the prompt."> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> | |
| <link href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;600&display=swap" rel="stylesheet"> | |
| <link rel="icon" href="data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 24 24%22%3E%3Ccircle cx=%225%22 cy=%2212%22 r=%223%22 fill=%22%23ea580c%22/%3E%3Ccircle cx=%2219%22 cy=%225%22 r=%222.4%22 fill=%22%23ea580c%22/%3E%3Ccircle cx=%2219%22 cy=%2212%22 r=%222.4%22 fill=%22%23ea580c%22/%3E%3Ccircle cx=%2219%22 cy=%2219%22 r=%222.4%22 fill=%22%23ea580c%22/%3E%3C/svg%3E"> | |
| <link rel="stylesheet" href="style.css?v=9"> | |
| </head> | |
| <body> | |
| <header class="top"> | |
| <div class="top-inner"> | |
| <a class="brand" href="#"> | |
| <svg class="brand-mark" viewBox="0 0 24 24" aria-hidden="true"><circle cx="5" cy="12" r="3"/><circle cx="19" cy="5" r="2.4"/><circle cx="19" cy="12" r="2.4"/><circle cx="19" cy="19" r="2.4"/><path d="M8 12c4 0 5-7 8.6-7"/></svg> | |
| Switchboard | |
| </a> | |
| <nav class="nav"> | |
| <a href="#demo">Demo</a> | |
| <a href="#how">How it works</a> | |
| <a href="savings.html">Savings</a> | |
| <a href="evaluation.html">Evaluation</a> | |
| <a href="#faq">FAQ</a> | |
| <a href="https://huggingface.co/switchboardllm/switchboard-router-0.5b">Model card</a> | |
| </nav> | |
| <a class="btn btn-primary btn-sm" href="#demo">Try the router</a> | |
| </div> | |
| </header> | |
| <main> | |
| <section class="hero"> | |
| <div class="wrap center"> | |
| <p class="badge"><span class="dot" aria-hidden="true"></span>Open weights. Runs in your browser.</p> | |
| <h1>Pick the cheapest model<br><span class="accent">that can handle the prompt</span>.</h1> | |
| <p class="lede">Most prompts don't need a frontier model. Switchboard is a 0.5B router that reads each prompt and sends it to a small, mid or frontier model, so you only pay frontier prices when the prompt needs it.</p> | |
| <div class="cta-row"> | |
| <a class="btn btn-primary" href="#demo">Route a prompt</a> | |
| <a class="btn btn-green" href="https://huggingface.co/switchboardllm/switchboard-router-0.5b">Get the weights <span class="tag">Apache 2.0</span></a> | |
| </div> | |
| <p class="spec">0.5B parameters · one line of JSON out · about 15 tokens per decision</p> | |
| </div> | |
| <div class="wrap"> | |
| <figure class="board-card"> | |
| <canvas id="board" class="board-canvas" aria-label="Animation: prompts flowing into the router and out to the small, mid or frontier line"></canvas> | |
| <figcaption class="board-note">Real prompts from the held-out set and the tier Switchboard v0.1 actually picked. We show an equal number per tier, so the mix isn't to scale.</figcaption> | |
| </figure> | |
| </div> | |
| </section> | |
| <section class="tiers-strip"> | |
| <div class="wrap"> | |
| <p class="strip-title">Three tiers, one decision per prompt</p> | |
| <ul class="tier-cards" id="tier-cards"> | |
| <li class="tier-card" data-tier="small"><span class="lamp" aria-hidden="true"></span><b>Small</b><span class="tier-model" data-model="small"></span></li> | |
| <li class="tier-card" data-tier="mid"><span class="lamp" aria-hidden="true"></span><b>Mid</b><span class="tier-model" data-model="mid"></span></li> | |
| <li class="tier-card" data-tier="frontier"><span class="lamp" aria-hidden="true"></span><b>Frontier</b><span class="tier-model" data-model="frontier"></span></li> | |
| </ul> | |
| </div> | |
| </section> | |
| <section class="band white" id="demo"> | |
| <div class="wrap"> | |
| <h2 class="center">Try it on your own prompt</h2> | |
| <p class="section-lede center">The real model runs in this tab. Nothing you type leaves your device.</p> | |
| <div class="demo"> | |
| <label for="prompt" class="field-label">Prompt</label> | |
| <textarea id="prompt" rows="4" maxlength="2000" placeholder="Paste any prompt you'd send to an LLM"></textarea> | |
| <div class="samples" role="group" aria-label="Sample prompts"> | |
| <button type="button" class="chip" data-prompt="What is the capital of France?">Capital of France</button> | |
| <button type="button" class="chip" data-prompt="Write a haiku about rain">Haiku about rain</button> | |
| <button type="button" class="chip" data-prompt="Design a rate limiter for 10M requests per second across 5 regions, with failure modes and consistency trade-offs">Global rate limiter</button> | |
| <button type="button" class="chip" data-prompt="Unscramble the following words: eglar, ngareo, kobo">Unscramble words</button> | |
| </div> | |
| <div class="demo-actions"> | |
| <button type="button" id="route" class="btn btn-primary">Route prompt</button> | |
| <p id="status" class="status" role="status" aria-live="polite">The first route downloads the router once (660 MB). After that it runs offline in this tab.</p> | |
| </div> | |
| <div class="meter" id="meter" hidden><span id="meter-fill"></span></div> | |
| <div class="readout" id="readout" hidden> | |
| <div class="readout-tiers" aria-hidden="true"> | |
| <span data-pick="small">Small</span><span data-pick="mid">Mid</span><span data-pick="frontier">Frontier</span> | |
| </div> | |
| <pre id="json"></pre> | |
| <p id="verdict"></p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="band cream" id="how"> | |
| <div class="wrap"> | |
| <h2 class="center">How it works</h2> | |
| <p class="analogy">Think of an old telephone switchboard. An operator listened to each caller and plugged the line into the right place. Switchboard does the same with your questions to AI: it reads each one and connects it to an AI that's good enough for it, without paying for the most expensive one every time.</p> | |
| <div class="explainer"> | |
| <div class="story"> | |
| <div class="story-step"><span class="step-n">1</span><div><h3>You ask something</h3><p>A question, a request to write or fix something, anything you'd type into a chatbot.</p></div></div> | |
| <div class="story-step"><span class="step-n">2</span><div><h3>Switchboard reads it first</h3><p>A small AI decides how hard the question is. "What's the capital of France?" is easy. A tricky math proof is hard. This takes less than half a second and costs almost nothing.</p></div></div> | |
| <div class="story-step"><span class="step-n">3</span><div><h3>It goes to the right AI</h3><p>Easy questions go to a small, cheap AI. Medium ones go to a mid-size AI. Only the hard ones go to the most powerful, most expensive AI.</p></div></div> | |
| <div class="story-step"><span class="step-n">4</span><div><h3>You pay less for the same answers</h3><p>Most everyday questions are easy, so most of them stop being billed at the top price. When Switchboard can't read its own answer, it plays it safe and picks the powerful AI.</p></div></div> | |
| </div> | |
| <aside class="bill" aria-labelledby="bill-title"> | |
| <h3 id="bill-title">Same 1,000 questions, two bills</h3> | |
| <p>Each answer about 500 tokens (roughly 375 words), priced on Surplus.</p> | |
| <div class="bill-row"><span>Every question to Claude Opus 5.5</span><b id="bill-all">…</b><span class="bill-bar"><i style="width:100%"></i></span></div> | |
| <div class="bill-row ours"><span>With Switchboard picking the AI</span><b id="bill-routed">…</b><span class="bill-bar"><i id="bill-routed-bar" style="width:0%"></i></span></div> | |
| <p class="fineprint" id="bill-note">Based on Switchboard's results on 10,000 test questions.</p> | |
| </aside> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="band white" id="results"> | |
| <div class="wrap"> | |
| <h2 class="center">Results</h2> | |
| <p class="section-lede center" id="results-intro">Loading the latest evaluation.</p> | |
| <div class="stats" id="figures"></div> | |
| <p class="fineprint center" id="fineprint"></p> | |
| <div class="cta-row"><a class="btn btn-ghost" href="evaluation.html">See the full evaluation</a></div> | |
| </div> | |
| </section> | |
| <section class="band cream" id="start"> | |
| <div class="wrap narrow"> | |
| <h2 class="center">Up and running in a few minutes</h2> | |
| <p class="section-lede center">Run it on your own computer. No GPU, account or API key needed.</p> | |
| <ol class="steps"> | |
| <li><span class="step-n">1</span><h3>Get Ollama</h3><p>Download it free from <a href="https://ollama.com">ollama.com</a> and open it once.</p></li> | |
| <li><span class="step-n">2</span><h3>Ask Switchboard</h3><p>Paste the line below into a terminal. The first run downloads the model once (994 MB).</p></li> | |
| <li><span class="step-n">3</span><h3>Read the answer</h3><p>The tier tells you which size of AI to use. Here, a small one is enough.</p></li> | |
| </ol> | |
| <pre class="code run-code"><code><span class="prompt">$</span> ollama run hf.co/switchboardllm/switchboard-router-0.5b-GGUF "Write a haiku about rain" | |
| <span class="answer">{"tier":"small","domain":"writing"}</span></code></pre> | |
| <h3 class="facts-title">From your own code</h3> | |
| <pre class="code run-code"><code><span class="prompt">$</span> pip install switchboard-router | |
| from switchboard_router import Router | |
| router = Router() # uses Ollama on this computer | |
| router.pick_model("Write a haiku about rain") | |
| <span class="answer">'anthropic/claude-haiku-5.5'</span></code></pre> | |
| <p class="fineprint center">No other dependencies. It works with Ollama, any OpenAI-compatible server, or Transformers, and falls back to the frontier model if routing fails. <a href="https://pypi.org/project/switchboard-router/">switchboard-router on PyPI</a></p> | |
| <h3 class="facts-title">What's inside Switchboard</h3> | |
| <div class="table-wrap"> | |
| <table class="facts"> | |
| <tr><th>Size</th><td>0.5 billion parameters. 994 MB to run on your computer, 660 MB in the browser.</td></tr> | |
| <tr><th>Built on</th><td>Qwen2.5-0.5B-Instruct (Apache 2.0), fully fine-tuned</td></tr> | |
| <tr><th>Trained on</th><td>63,749 real prompts from routellm/gpt4_dataset (Apache 2.0)</td></tr> | |
| <tr><th>Training time</th><td>55 minutes on one RTX 5070 Ti</td></tr> | |
| <tr><th>Answers with</th><td>One line of JSON: a tier (small, mid or frontier) and a topic (code, math, writing or general)</td></tr> | |
| <tr><th>Runs on</th><td>Ollama, llama.cpp, Transformers, and your browser</td></tr> | |
| <tr><th>License</th><td>Apache 2.0, free for commercial use</td></tr> | |
| </table> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="band white" id="faq"> | |
| <div class="wrap"> | |
| <h2 class="center">Questions & answers</h2> | |
| <div class="faq-groups"> | |
| <div class="faq-group"> | |
| <h3>Switchboard</h3> | |
| <details class="faq-item"><summary><span class="faq-n">01</span>What is Switchboard?</summary><p>A small, open AI model that reads a prompt and decides how capable an AI needs to be to answer it: small, mid or frontier. You then send the prompt to an AI of that size.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">02</span>Why not always use the best AI?</summary><p>Price. On Surplus, an answer from Claude Opus 5.5 costs 40 times more than the same answer from Claude Haiku 5.5. Most everyday prompts get an equally good answer from the smaller model.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">03</span>Which base model is it built on?</summary><p>Qwen2.5-0.5B-Instruct from Alibaba, fully fine-tuned on routing examples. It's small on purpose: a router sits in front of every request, so it has to be fast and almost free.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">04</span>Who is behind it?</summary><p>An independent project. It is not affiliated with Anthropic, OpenAI, Alibaba, Robinhood, Surplus or the Switchboard oracle network. Model names appear only to describe where prompts can be sent.</p></details> | |
| </div> | |
| <div class="faq-group"> | |
| <h3>Model & use</h3> | |
| <details class="faq-item"><summary><span class="faq-n">05</span>Does it run on my computer?</summary><p>Yes. The 994 MB build runs with Ollama or llama.cpp on Windows, macOS and Linux, on a normal CPU. The demo on this page runs in your browser.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">06</span>Does my prompt leave my device?</summary><p>Not in the demo on this page, and not when you run it with Ollama. If you call Switchboard through a hosted API, the prompt goes to that server like any other API call.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">07</span>How good is it?</summary><p>On 10,000 test prompts it cut the bill by <span data-fill="cost_saved">…</span> compared with always using Claude Opus 5.5, and sent <span data-fill="under_routed">…</span> of prompts to a cheaper tier than they needed. All the numbers, including the weak spots, are on the <a href="evaluation.html">evaluation page</a>.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">08</span>What if it picks the wrong tier?</summary><p>Too high costs a bit more. Too low can mean a weaker answer, which is the mistake we work hardest to reduce. If its answer can't be read, it falls back to the frontier tier, so a broken routing call never sends you to a weaker AI.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">09</span>Is it free?</summary><p>Yes. The model is Apache 2.0, and running it yourself costs nothing. After the Surplus launch you can also call it on the Surplus API at $0.03 per million tokens, about $0.000005 per routing decision.</p></details> | |
| <details class="faq-item"><summary><span class="faq-n">10</span>What data was it trained on?</summary><p>Real prompts from <a href="https://huggingface.co/datasets/routellm/gpt4_dataset">routellm/gpt4_dataset</a> (Apache 2.0, from LMSYS). Each prompt's label comes from how well a 2023 open model answered it, as scored by a GPT-4 judge. The model card has the details.</p></details> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <section class="closing"> | |
| <canvas id="closing-board" class="closing-canvas" aria-hidden="true"></canvas> | |
| <div class="wrap center closing-inner"> | |
| <h2>Coming to the Surplus API</h2> | |
| <p class="section-lede">After launch, call Switchboard on the same Surplus key as every other model, at $0.03 per million tokens.</p> | |
| <div class="cta-row"> | |
| <a class="btn btn-primary" href="#demo">Try the router</a> | |
| <a class="btn btn-ghost" href="https://huggingface.co/switchboardllm/switchboard-router-0.5b">Read the model card</a> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <script type="module" src="app.js?v=14"></script> | |
| </body> | |
| </html> | |