--- title: "Vocabulary pruning: 9 to 23 tok/s on an 8GB card" description: "GuideboardLabs cut 118,300 English-only rows from Qwen3.8-27B. Decode went from 9 to 23 tok/s on an RX 5700 XT. This lab did not re-run the bench." canonical: "https://bitwidth.ai/guides/vocabulary-pruning-9-to-23-tok-s-on-an-8gb-card" published_time: "2026-11-20T20:21:52.652Z" modified_time: "2026-11-20T20:21:52.652Z" --- Guide # Vocabulary pruning: 9 to 23 tok/s on an 8GB card GuideboardLabs cut 118,300 English-only rows from Qwen3.8-27B. Decode went from 9 to 23 tok/s on an RX 5700 XT. This lab did not re-run the bench. **Bitwidth.AI** Last updated Nov 20, 2026 · 15 min ## TL;DR - GuideboardLabs cut 118,300 English-only rows from Qwen3.8-27B. - Decode went from 9 to 23 tok/s on an RX 5700 XT. - This lab did not re-run the bench. An 8GB card is usually the wrong place for a 27B. Scanfi at GuideboardLabs cut 118,300 of 248,320 vocabulary rows out of a Qwen3.8-27B GGUF, kept English, code, and math, and measured decode going from about 9 tok/s to about 23 tok/s on an RX 5700 XT.[1](https://x.com/GuideboardLabs/status/2122449882409529784) The 7 percent smaller file is not the point. The source no longer fit. About 1.3 GB of weights were streaming over PCIe. Taking 610 MB off the two vocabulary tensors put the model back under the wall.[2](https://huggingface.co/guideboardlabs/Qwen3.8-27B-Q3-DOWN-XS-Monoglot-GGUF) This lab did not re-run those benches. The numbers below are GuideboardLabs' measurements, with the method and the licenses attached. ## What's new On 16 November 2026 GuideboardLabs published three English-only GGUFs under the name Monoglot: a Qwen3.8-27B, a Qwen3.5-9B, and a Qwen3.6-35B-A3B. Each vocabulary is cut to about 130k tokens.[3](https://x.com/GuideboardLabs/status/2122320593185812823) A Hugging Face collection holds the four files in the series, including a second 27B cut built on Unsloth's UD-IQ2_S weights.[4](https://huggingface.co/collections/guideboardlabs/monoglot-english-only-vocabulary-pruning) This is not a retrain and not a re-quant. The surgery deletes rows from `token_embd.weight` and `output.weight` inside an already-quantised GGUF. Surviving rows are gathered in quantised space, so they stay bit-identical to the source.[5](https://github.com/bsaleh03/ASCII-Condensed-prune-tools) The idea and the first public condensed GGUF came from fakezeta's Condensed-P2 release of an Unsloth Q3_K_XL Qwen3.8-27B.[6](https://huggingface.co/fakezeta/Qwen3.8-27B-UD-Q3_K_XL-Condensed-P2) The tool is bsaleh03's ASCII-Condensed-prune-tools. GuideboardLabs applied that tool to three production quants, measured them on one 8GB card, and published the parts that did not work as well as the parts that did. The recommended 27B download is not the file that produced the 9 to 23 jump. Two days after the first cut, GuideboardLabs measured Unsloth's stock UD-IQ2_S 2-bit against their own Q3-DOWN-XS and lost on perplexity at a smaller file size. The UD-IQ2_S Monoglot is the file they tell you to run. The Q3 remains the file with the before-and-after 8GB wall crossing.[7](https://huggingface.co/guideboardlabs/Qwen3.8-27B-UD-IQ2_S-Monoglot-GGUF) Bitwidth has not covered this series. A November 2 digest item titled around "Prune" is Nota AI removing 20 percent of routed experts from Mistral Large 4. That is a different compression.[8](https://bitwidth.ai/articles/hugging-face-daily-digest-nov-2-2026) ## How the prune works Qwen3.8-27B ships a padded token embedding of 248,320 rows.[9](https://huggingface.co/Qwen/Qwen3.8-27B) On a small quant those two vocabulary tensors are a large slice of the file. On GuideboardLabs' Q3-DOWN-XS they were 15.2 percent of the GGUF (874 MB output head at Q5_K, 417 MB embedding at Q2_K). After the prune they are 8.6 percent.[2](https://huggingface.co/guideboardlabs/Qwen3.8-27B-Q3-DOWN-XS-Monoglot-GGUF) The keep-set is per-character and closed under substring, so BPE merges that produce a kept token still have kept parents. GuideboardLabs used policy P1G: ASCII, plus math and typography symbols, Greek, box-drawing and status glyphs, units and currency. That keeps 130,020 rows and cuts 47.64 percent. P2 (ASCII plus Latin-1 and Latin-Extended-A) is the looser policy fakezeta used, at 141,141 rows. P1G drops accented Latin on purpose. Specials, all 256 byte-fallback tokens, and partial-UTF-8 fragments always survive, so any text is still representable. Dropped characters cost one token per UTF-8 byte instead of one per character.[5](https://github.com/bsaleh03/ASCII-Condensed-prune-tools) The tool only accepts byte-level BPE GGUFs (`tokenizer.ggml.model` of `gpt2` or `bpe`). A SentencePiece vocab is refused. Chat templates, special-token strings, and sampler metadata are copied through and remapped. GuideboardLabs reports greedy 64-token English and code continuations that are byte-identical to the source, and a tool-call request that still returns `finish_reason: tool_calls` with the right function name and JSON.[2](https://huggingface.co/guideboardlabs/Qwen3.8-27B-Q3-DOWN-XS-Monoglot-GGUF) `verify_prune.py` with the same `--policy` flag is the check that the structural tests cannot make. A prune with the wrong policy produces a consistent file that contains the wrong tokens. ## Performance All speed numbers in this section are GuideboardLabs on llama.cpp `3ba1ce0`, Vulkan, one RX 5700 XT (8 GB, RDNA1), three repeats, card empty before each run. This lab did not reproduce them. Do not carry the ratios to a 16 GB or 24 GB card, or to CUDA, without a new measurement. The author says the same thing on the cards.[2](https://huggingface.co/guideboardlabs/Qwen3.8-27B-Q3-DOWN-XS-Monoglot-GGUF) The 9 to 23 claim is llama-server at a 16K window, 499-token prompt, two requests, KV cache q8_0, all layers offloaded: - Source Q3-DOWN-XS: prefill 27.2 and 26.5 tok/s, decode 8.9 and 9.8 tok/s, 7.95 GiB of 7.98 VRAM, 1.27 GiB GTT spill - P1G Monoglot: prefill 156.0 and 153.6 tok/s, decode 23.0 and 23.6 tok/s, 7.87 GiB VRAM, 0.56 GiB GTT - File: 8,480,272,384 bytes down to 7,869,784,224 bytes (610 MB, 7.2 percent) llama-bench on the same pair shows why a short decode number can hide the win. Prompt processing at 128, 256, and 384 tokens is flat. At 512 tokens the source falls off a cliff (28.0 tok/s) and the pruned file stays at 173.2 tok/s, about 6.2 times. 512 is llama-server's default ubatch, so that cliff is every prompt chunk in a server, not an edge case. Short-context generate (tg128) only moves 23.81 to 24.46 tok/s, plus 2.7 percent, because that bench never left the card.[2](https://huggingface.co/guideboardlabs/Qwen3.8-27B-Q3-DOWN-XS-Monoglot-GGUF) The mechanism is a threshold, not a slope. At 16K the source file no longer fits. About 1.3 GB of weights stream from system memory over PCIe 3.0 at roughly 13 GB/s. The author prices that at about 98 ms per token on top of the resident read, and the ubatch compute buffer goes over the edge with it. Removing 610 MB puts the file back under the wall. On a card with headroom, the same prune is the 2.7 percent decode gain and nothing else. The recommended 27B is a different file: Unsloth UD-IQ2_S, then the same P1G prune. Unpruned UD-IQ2_S is 8,422,719,488 bytes with wikitext-2 PPL 7.5478 (8 x 512). The Q3-DOWN-XS is 8,480,272,384 bytes with PPL 8.2587 on the same gate. Their 2-bit wins by 8.7 percent perplexity and is 68 MB smaller. After the prune the UD-IQ2_S file is 7,876,946,592 bytes (545 MB off, 6.5 percent). llama-bench tg128 is 23.57 ± 0.03 tok/s. At a 16K window the KV type decides whether you stay on the fast path: - KV q8_0: prefill 28.9 tok/s, decode 10.8 tok/s. The file misses by about 7 MB. - KV q4_0: prefill 153.2 tok/s, decode 21.9 tok/s. Use this.[7](https://huggingface.co/guideboardlabs/Qwen3.8-27B-UD-IQ2_S-Monoglot-GGUF) The other two Monoglot entries are other mechanisms, not other copies of the 8GB wall: - Qwen3.5-9B Q4_K_M already fits (5.24 GiB of 7.98). Vocab was 25 percent of the file. The prune takes 676 MB (12.0 percent) off. Prefill is flat. Decode at depth 8192 goes 49.09 to 52.07 tok/s, plus 6.1 percent.[10](https://huggingface.co/guideboardlabs/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Monoglot-GGUF) - Qwen3.6-35B-A3B Q4_K_M is a 35B MoE with about 3B active. It spills: about 7.6 GiB in VRAM and 12.9 GiB in GTT. The prune takes only 330 MB (1.6 percent) off, and decode at depth 4096 goes 10.16 to 12.76 tok/s, plus 26 percent. Prefill goes 91.95 to 149.38 tok/s, plus 62 percent. The output head is read in full every token even when 8 of 256 experts fire, so halving that head is a transfer win on a card that is already spilling.[11](https://huggingface.co/guideboardlabs/Qwen3.6-35B-A3B-Uncensored-HauhauCS-Aggressive-Monoglot-GGUF) The lead tweet also quotes an Agon board score of 55.33 of 66 (12th of 35, best dense 27B on that board) and a code score moving 14.00 to 19.67, with reasoning unchanged. The author says most of that code gap is Unsloth's requant of the base weights, not the prune.[1](https://x.com/GuideboardLabs/status/2122449882409529784) Agon is the author's harness. The Hugging Face cards explicitly say no instruction-following suite was run on the pruned files, and that perplexity is not comparable across a vocabulary change. Treat those tweet scores as the author's board, not as MMLU-Pro or HumanEval. ## Quality cost Token counts for the same strings, source versus P1G, from the cards: - English prose: 30 to 30 (1.00x) - Python: 41 to 41 (1.00x) - Math with sum, pi, and check glyphs: 27 to 27 (1.00x) - French with accents: 18 to 31 (1.72x) - Japanese: 15 to 40 (2.67x) - Chinese: 15 to 50 (3.33x) - Russian: 17 to 93 (5.47x) English, code, and math tokenise one for one. Anything outside the keep-set falls back to bytes. That inflation hits both the context window and decode. If you need multilingual output, use the unpruned file. GuideboardLabs says so on every card.[7](https://huggingface.co/guideboardlabs/Qwen3.8-27B-UD-IQ2_S-Monoglot-GGUF) What the cards did not measure: IFEval, MMLU-Pro, HumanEval, a multilingual generation sample beyond those token counts, refusal behaviour on the uncensored 9B and 35B-A3B, vision (`mmproj` is not in these repos), or perplexity on the pruned files. The correctness claim is the byte-identical non-vocab tensors, the greedy-identity English and code prompts, and a surviving tool call. That is alignment of rows with token strings. It is not a quality ranking. ## Local setup The prune is a GGUF operation. It lives in llama.cpp and in apps that load GGUF. It does not apply to a Hugging Face safetensors serve. ### vLLM vLLM serves the unpruned Qwen weights. It does not load these Monoglot GGUFs. If you want Qwen3.8-27B on vLLM, use the official Docker image and the base repo. Engine args go after the tag. The image entrypoint is already `vllm serve`.[9](https://huggingface.co/Qwen/Qwen3.8-27B) ```bash docker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3.8-27B \ --tensor-parallel-size 1 ``` On a Spark that only exposes CDI, swap `--runtime nvidia --gpus all` for `--device nvidia.com/gpu=all`. Dedicated `vllm/vllm-openai:` tags are extra, not a replacement for `:latest`. A 27B dense in BF16 or FP8 is a 32 GB or unified-memory job. It is not the 8GB GGUF path this piece is about. ### LM Studio / llama.cpp Download the ready GGUF if you only want the 8GB English-and-code setup. The file GuideboardLabs recommends is `Qwen3.8-27B-UD-IQ2_S-Monoglot-P1G-130K.gguf` (7.88 GB, Apache-2.0, SHA-256 `1ce313ce26c7189bca02eff889f4feb17a53d1d4a890a4b744322342fa138d09`).[7](https://huggingface.co/guideboardlabs/Qwen3.8-27B-UD-IQ2_S-Monoglot-GGUF) ```bash llama-server -m Qwen3.8-27B-UD-IQ2_S-Monoglot-P1G-130K.gguf \ -c 16384 -ngl 999 -ctk q4_0 -ctv q4_0 -fa on ``` KV q4_0 at 16K is the author's instruction for this file. KV q8_0 misses the fast path by about 7 MB on that 8GB card and looks broken rather than slow. LM Studio can load the same GGUF. Match those KV settings in the app if you want the wall-crossing behaviour. The chat template and special tokens come through the prune, so it is a drop-in for the source file on the same port. To prune a GGUF you already have, use the public tool. The repository has no licence, so do not vendor or redistribute the code. Link it, run it, keep the output.[5](https://github.com/bsaleh03/ASCII-Condensed-prune-tools) You need Python 3, numpy, and gguf. The vocab must be byte-level BPE. ```bash python3 prune_vocab.py SRC.gguf DST.gguf --policy P1G python3 verify_prune.py SRC.gguf DST.gguf --policy P1G ``` `verify_prune` must print ALL CHECKS PASSED. Pass the same policy you pruned with. Check the two vocabulary tensors' share of the file first. GuideboardLabs' rule of thumb: if they are under about 8 percent, the prune is a file-size trick and probably not worth the afternoon. Empty the card before you believe a bench. The author lost a first run to 2.5 GB of leaked GPU processes and measured 2.65 tok/s on a model that does 23.8.[2](https://huggingface.co/guideboardlabs/Qwen3.8-27B-Q3-DOWN-XS-Monoglot-GGUF) The 9B and 35B-A3B Monoglot files are Apache-2.0 following their Qwen bases. The uncensored tunings are HauhauCS's. A vocab prune does not change that tuning, and refusal was not tested.[10](https://huggingface.co/guideboardlabs/Qwen3.5-9B-Uncensored-HauhauCS-Aggressive-Monoglot-GGUF) ### One DGX Spark One Spark is 128 GB unified memory. The 8GB VRAM wall this prune is built to cross does not exist on that box. An Unsloth UD-IQ2_S 8.4 GB GGUF already fits with a lot of headroom. The MoE output-head bandwidth trick (the 35B-A3B result) can still apply when a large expert model is spilling, but these files were measured on RDNA1 Vulkan at 8 GB, not on Spark CUDA. Use the Spark setup guide for the machine, then run the unpruned HF or FP4 recipe if that is the path you actually want.[12](https://bitwidth.ai/guides/setting-up-local-ai-on-the-nvidia-dgx-spark) ### Two DGX Sparks The sources do not describe a two-node prune. The operation is one GGUF in, one GGUF out. Tensor parallel is a different problem. Do not invent a cluster recipe from these cards. ### Desktop GPU (5090 and below) 8GB is the reason this series exists. GuideboardLabs' card is an RX 5700 XT, Vulkan, llama.cpp `3ba1ce0`. An NVIDIA 8GB card (a 4060 class, for example) can load the same GGUF in CUDA llama.cpp. The 9 to 23 ratio is not a CUDA number. Measure it if the wall is the question. On 16 GB and 24 GB the Q3-DOWN-XS source already fits. The author says the prune then collapses to about 2.7 percent decode. That is still a smaller file and a smaller output head. It is not a 2.4x story. On a 32 GB 5090, Unsloth's unpruned UD-IQ2_S at 8.4 GB already fits. The Monoglot file is optional. Use it when you want English-and-code tokenisation and a few hundred megabytes back, not because the 5090 is out of VRAM. Leave the source file on disk if you still need Chinese, Japanese, or accented French. Licences, in one place: the Qwen bases and the Monoglot GGUFs are Apache-2.0. Unsloth's UD-IQ2_S is a quant of that base. GuideboardLabs did not re-quantise those weights. The prune tool is linked, not included, because it carries no licence. Credit for the method goes to fakezeta, to bsaleh03, to Unsloth for the 2-bit that won the second cut, and to GuideboardLabs for the 8GB measurements.[7](https://huggingface.co/guideboardlabs/Qwen3.8-27B-UD-IQ2_S-Monoglot-GGUF) How this piece was created This guide was drafted by an agent and published by a person. --- title: "What a base M4 24GB Mac mini actually runs locally" description: "The 32.8 tok/s median on a base M4 24GB is a real-traffic number with a named model, quant, and engine. Here is what that class of Mac holds, next to published 5090 and Spark figures." canonical: "https://bitwidth.ai/guides/what-a-base-m4-24gb-mac-mini-actually-runs-locally" published_time: "2026-11-20T20:21:51.075Z" modified_time: "2026-11-20T20:21:51.075Z" --- Guide # What a base M4 24GB Mac mini actually runs locally The 32.8 tok/s median on a base M4 24GB is a real-traffic number with a named model, quant, and engine. Here is what that class of Mac holds, next to published 5090 and Spark figures. **Bitwidth.AI** Last updated Nov 20, 2026 · 14 min ## TL;DR - The 32.8 tok/s median on a base M4 24GB is a real-traffic number with a named model, quant, and engine. - Here is what that class of Mac holds, next to published 5090 and Spark figures. - A base M4 Mac mini with 24 GB unified memory is a 120 GB/s, 10-core GPU box, not a workstation card. A base M4 Mac mini with 24 GB unified memory is a 120 GB/s, 10-core GPU box, not a workstation card. On 17 November 2026 hailports posted a 32.8 tok/s median decode (69.0 peak) across 938 real answers of 100+ tokens on exactly that chassis. The model, quant, and engine are named. This piece puts those production timings next to independent 24 GB M4 benches and the published RTX 5090 and DGX Spark figures already on this site. ## What's new The machine is the stock M4 Mac mini: 10-core CPU, 10-core GPU, 120 GB/s memory bandwidth, 24 GB unified. It is not an M4 Pro (273 GB/s) and not a 32 GB build. Apple publishes those specs.[1](https://support.apple.com/en-us/121555) macOS does not hand the GPU the whole 24 GB. hailports raises the wired cap with `sysctl iogpu.wired_limit_mb=23040`, which is 22.5 GiB of the 24. ComputingForGeeks measured the default Metal budget on the same class of box at about 17.3 to 17.8 GiB before that sysctl.[2](https://www.hailports.com/gear) [3](https://computingforgeeks.com/ollama-lm-studio-mlx-mac/) The 17 November post is production traffic, not llama-bench. Live median decode 33 tok/s on the board; measured median 32.8; fastest 69.0; 35 percent of answers at 40 tok/s or more; 938 answers of 100+ tokens. hailports' own instruction is to trust the median over hundreds of long answers, not the peak.[4](https://x.com/hailports/status/2122511070686257628) The model on that run is MiniCPM-V 4.7 35B-A3B, a vision MoE with about 35B total parameters and about 3B active per token. The published quant is IQ3_XS (official file 14.5 GB). Runtime is llama.cpp on Metal with every expert on the GPU (`-ngl 99`, `--n-cpu-moe 0`). A later same-day reply names the 3-bit mixed GGUF `MiniCPM-V-4_7-35B-A3B-mix_q3gud_im` plus a Q4_K_M DSpark draft. OpenBMB ships both the IQ3_XS file and DSpark draft GGUFs in `openbmb/MiniCPM-V-4.7-35B-A3B-gguf`. Apache 2.0. Official Q4_K_M is 21.2 GB and the card says it wants roughly 32 GB of unified memory; IQ4_XS or IQ3_XS is the smaller-machine path.[5](https://x.com/hailports/status/2122694460756934725) [6](https://x.com/hailports/status/2122531393498497228) [7](https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B-gguf) [8](https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B) The Nov 2 write-up is the recipe that got a 1,024-token answer to 41.3 tok/s. llama.cpp Metal, commit `f174553`. Context 16,384. KV cache q8_0. One slot (`-np 1`). Flash attention on. DSpark draft window 4, p-min 0.5, greedy. Draft file about 237 MB Q4_K_M. The weights file on that day was a 15.5 GB 3-bit mixed GGUF (14.44 GiB resident). Hailports later swapped that mix for the official 14.5 GB IQ3_XS file and OpenBMB quoted the new daily median: 51.8 tok/s across 802 answers of 100+ tokens on 10 November, same box, same 16k context, same draft.[9](https://x.com/svbrother211/status/2117434007839527107) [10](https://x.com/OpenBMB/status/2119966212176384462) On 19 November the production server moved. Gear now lists Splash as the model server, with llama.cpp Metal kept for the embedder and as the one-command rollback. The weights are Unsloth `Qwen3.6-35B-A3B` UD-Q2_K_XL, 12.29 GB on disk, plus a 0.90 GB vision projector and a 1.05 GB draft. Context 64K, vision and PDF on. Hailports' own pairing: 71.9 tok/s median on real traffic, up from 45.9 on the previous MiniCPM-V 4.7 setup. The changelog line is the same jump, 45.9 to 71.9. The live board at 9:17 PM CT that day read 56.9 tok/s median across 549 answers of 100+ tokens (fastest 184.4, 94 percent at 40+). Unsloth lists UD-Q2_K_XL at 12.3 GB. Qwen's card is Apache 2.0, 256 experts, 8 routed plus 1 shared, 262,144 native context.[2](https://www.hailports.com/gear) [11](https://www.hailports.com/changelog) [12](https://www.hailports.com/) [13](https://huggingface.co/unsloth/Qwen3.6-35B-A3B-GGUF) [14](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) Bitwidth has a beginner macOS path and cluster notes, plus Spark and 5090 guides. There is no live entry-level M4 24 GB decode guide. A pending M5 Ultra 256 GB original is a different class of machine. Do not mix those numbers into this chassis.[15](https://bitwidth.ai/guides/setting-up-local-ai-on-your-home-computer) [16](https://bitwidth.ai/guides/qwen3-8-flash-next-fp4-on-home-iron) ## Performance All Mac numbers below are other people's measurements. This lab did not re-run them. No GPU work was done for this piece. hailports, one base M4 24 GB, MiniCPM-V 4.7 35B-A3B, llama.cpp Metal, real answers of 100+ tokens: - Experts on CPU, no draft: 22.2 tok/s median (3,456 answers), Nov 2 write-up - All experts on GPU, no draft: 31.3 tok/s median (12,385 answers), Nov 2 write-up - GPU plus DSpark window 4: 39.8 tok/s median (110 answers); best full 1,024-token answer 41.3 - Official IQ3_XS swap, same flags: 51.8 tok/s median (802 answers, 74 percent at 40+), 10 November, quoted by OpenBMB - 17 November lead: 32.8 tok/s median, 69.0 fastest, 35 percent at 40+, 938 answers[4](https://x.com/hailports/status/2122511070686257628) [9](https://x.com/svbrother211/status/2117434007839527107) [10](https://x.com/OpenBMB/status/2119966212176384462) hailports, same box, after the 19 November Splash cut to Qwen3.6-35B-A3B UD-Q2_K_XL 12.29 GB, 64K, vision on: - Author pairing vs the previous MiniCPM setup: 45.9 to 71.9 tok/s median on real traffic - Live board 19 November 9:17 PM CT: 56.9 tok/s median across 549 answers of 100+ tokens, fastest 184.4[2](https://www.hailports.com/gear) [11](https://www.hailports.com/changelog) [12](https://www.hailports.com/) ComputingForGeeks, same chip and RAM (EC2 `mac-m4.metal`, 10-core GPU, 24 GB, macOS 27, headless), Qwen3.5 9B, 400 generated tokens, median of three runs, November 2026: - Ollama default `qwen3.5:9b` (NVFP4, MLX runner, MTP draft): 27.3 tok/s short, 26.6 long - mlx-lm 0.32.2, same 5.98 GB 4-bit MLX file as LM Studio: 21.3 / 21.1 - LM Studio MLX 1.13.1: 20.1 / 20.7 - LM Studio llama.cpp 2.66.0, GGUF Q4_K_M: 17.5 / 17.3 - Ollama `qwen3.5:9b-q4_K_M` llama.cpp: 17.1 / 17.1 - Dense 27B MLX after raising `iogpu.wired_limit_mb` to 22528: loaded, 5.71 tok/s, 18.73 GiB peak, 2,389 MiB swap. They call it a demo, not a daily driver.[3](https://computingforgeeks.com/ollama-lm-studio-mlx-mac/) scott-crenshaw, Mac mini M4 24 GB with a normal workstation load (VM, browser, editor, mail, two displays, about 12 to 13 GB committed before the model): - Llama 3.2 3B Ollama Q4_K_M: 42.0 tok/s - Qwen 3 14B MLX 4-bit: 11.5 tok/s, 8.4 GB peak, no swap - Qwen 3 30B-A3B MLX 4-bit: 44.8 tok/s, 16.3 GB peak, 2.74 GB swap - Qwen 3.5 35B-A3B MLX 4-bit: Metal OOM at 20.4 GB - Dense DeepSeek-R1 32B: 0.28 tok/s once it spilled to SSD[17](https://github.com/scott-crenshaw/local-llm-feasibility-study) GPUBattle, MiniCPM-V 4.7 35B-A3B official Q4_K_M GGUF, llama.cpp, all layers on GPU (not a Mac): - RTX 5090 32 GB: 317.2 tok/s - RTX 4090 24 GB: 224.8 tok/s - RTX 3090 24 GB: 193.1 tok/s - File needs about 23 GB at Q4_K_M. That is a 24 GB card load, not a 24 GB unified-memory Mac load.[18](https://gpubattle.com/guides/minicpm-v-4-7-35b-a3b-gpu-benchmarks) Bitwidth, one DGX Spark, Qwen3.8-Flash-Next FP4-Local, 19 October 2026, one short thinking-off completion: about 34 tok/s wall-clock (112 completion tokens in 3.33 s, prefill included). That is a 125B-class MoE on 128 GB unified, not a 35B on 24 GB. There is no published Bitwidth 35B-A3B Spark decode for this piece.[16](https://bitwidth.ai/guides/qwen3-8-flash-next-fp4-on-home-iron) What the 24 GB M4 actually holds, from those sources together: - Daily driver with other apps open: a 9B dense 4-bit, about 17 to 27 tok/s. ComputingForGeeks' default Ollama tag is the top of that range because of MTP. LM Studio llama.cpp sits near 17. - Dedicated inference, apps closed, experts on the GPU: a 30B to 35B MoE at IQ3 or Unsloth Q2, about 12 to 16 GB of weights. hailports' MiniCPM medians sit in the 30s to low 50s. scott-crenshaw's 30B-A3B MLX 4-bit hit 44.8 tok/s and paid for it in swap. - 4-bit 35B-A3B MLX (about 19 to 20 GB) does not fit 24 GB. scott-crenshaw OOM'd. OpenBMB says Q4_K_M wants about 32 GB unified. - Dense 27B on this chip is a wall: 5.71 tok/s and a swapped Mac. Do not paste M4 Pro, M4 32 GB, M5 Ultra, or Splash-on-M5-Pro numbers onto this box. Bandwidth is 120 GB/s here, 273 GB/s on M4 Pro. ComputingForGeeks says that ratio is why a dense 9B is already near the M4 ceiling at about 20 tok/s without a draft.[1](https://support.apple.com/en-us/121555) [3](https://computingforgeeks.com/ollama-lm-studio-mlx-mac/) ## Local setup The Mac path is llama.cpp or LM Studio. vLLM is the NVIDIA recipe for the same Qwen checkpoint, not a Metal runtime. ### vLLM Qwen's published vLLM line for `Qwen/Qwen3.6-35B-A3B` is `vllm>=0.19.0`, native 262,144 context, tensor parallel 8. That is an 8-GPU default, not a 24 GB Mac and not a single 5090. One GPU uses `--tensor-parallel-size 1` and a shorter `--max-model-len`. The hub recipe shape is the official Docker image. Engine args go after the tag. The image entrypoint is already `vllm serve`.[14](https://huggingface.co/Qwen/Qwen3.6-35B-A3B) ```bash docker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3.6-35B-A3B \ --tensor-parallel-size 1 \ --max-model-len 8192 \ --reasoning-parser qwen3 ``` On a Spark that only exposes CDI, replace `--runtime nvidia --gpus all` with `--device nvidia.com/gpu=all`. Dedicated `vllm/vllm-openai:` tags are extra, not a replacement for `:latest`. Add `--language-model-only` if you want the extra KV from skipping the vision tower. Qwen's own 8-way, 262K line is the published default for a cluster, not this command. MiniCPM-V 4.7 35B-A3B also lists vLLM on the card. The 24 GB Mac still does not run that image. Keep vLLM for a 24 GB or 32 GB NVIDIA card at Q4, or for Spark. ### LM Studio / llama.cpp This is the 24 GB M4 path. Pull the official IQ3_XS GGUF and the matching DSpark draft from `openbmb/MiniCPM-V-4.7-35B-A3B-gguf` (dspark-prefixed files in that repo). Raise the Metal wired cap, then serve with every expert on the GPU and a small draft window. Hailports' launch line, host and port flags removed, operator paths stripped:[7](https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B-gguf) [9](https://x.com/svbrother211/status/2117434007839527107) ```bash sudo sysctl iogpu.wired_limit_mb=23040 llama-server -m MiniCPM-V-4_7-35B-A3B-IQ3_XS.gguf \ -c 16384 -ngl 99 -np 1 -fa on --jinja --metrics \ -ctk q8_0 -ctv q8_0 --n-cpu-moe 0 --cache-ram 512 --prio 2 \ --spec-type draft-dspark \ -md dspark-MiniCPM-V-4_7-35B-A3B-Q4_K_M.gguf \ -ngld 99 --spec-draft-n-max 4 --spec-draft-p-min 0.5 \ --spec-draft-sampling greedy ``` `--n-cpu-moe 0` is the flag hailports says moved the median from 22.2 to 31.3. Parking experts on the CPU felt like buying RAM. It was the slow path. A draft window of 15 was the other miss: 18.8 tok/s over 9 answers. Window 4, p-min 0.5, greedy is the line that held.[9](https://x.com/svbrother211/status/2117434007839527107) LM Studio can load the same GGUF through its llama.cpp engine. Match GPU offload to all layers, keep one slot, and turn flash attention on. ComputingForGeeks' LM Studio llama.cpp Q4_K_M 9B number (17.5 tok/s) is the wrapper you get if you stay on a dense 9B instead of the 35B MoE. For Qwen3.6-35B-A3B on this RAM, Unsloth UD-Q2_K_XL (12.3 GB) is the file that fits with room for context. UD-Q4_K_M is 22.1 GB and will fight the 22.5 GiB wired cap. Hailports' later production stack is Splash on that Q2 file. Splash is Inco's Apple-silicon engine, not llama.cpp. There is no public hailports Splash launch line. If you want a one-command rollback, stay on the llama.cpp recipe above.[13](https://huggingface.co/unsloth/Qwen3.6-35B-A3B-GGUF) [2](https://www.hailports.com/gear) Put the sysctl back to 0 when you are done if you share the Mac with a desktop session. ComputingForGeeks did that after the 27B demo.[3](https://computingforgeeks.com/ollama-lm-studio-mlx-mac/) ### One DGX Spark One Spark is 128 GB unified. A 12 to 15 GB 35B-A3B GGUF is spare capacity on that box. The Spark job that is actually published here is NVIDIA's Qwen3.8-Flash-Next FP4-Local, about 96 GB on disk, 71.19 GiB resident, one stream about 34 tok/s on a short thinking-off completion. Use that guide for the machine. Do not invent a 35B-A3B Spark decode from these Mac numbers.[16](https://bitwidth.ai/guides/qwen3-8-flash-next-fp4-on-home-iron) [19](https://bitwidth.ai/guides/setting-up-local-ai-on-the-nvidia-dgx-spark) ### Two DGX Sparks A 35B/3B GGUF is a one-GPU job. Two Sparks are unused capacity at this size. Keep tensor parallel for the 100B-class checkpoints the pair already serves. ### Desktop GPU (5090 and below) A 32 GB 5090 holds MiniCPM-V 4.7 35B-A3B at official Q4_K_M (21.2 GB file, about 23 GB in VRAM). GPUBattle measured 317.2 tok/s on llama.cpp with all layers on the GPU. The 4090 (24 GB) is 224.8. Those are discrete-VRAM numbers at Q4, not unified-memory IQ3.[18](https://gpubattle.com/guides/minicpm-v-4-7-35b-a3b-gpu-benchmarks) [7](https://huggingface.co/openbmb/MiniCPM-V-4.7-35B-A3B-gguf) A 24 GB 4090 can take the Q4_K_M MiniCPM file. A 16 GB card cannot. Unsloth UD-Q2_K_XL Qwen3.6-35B-A3B (12.3 GB) is the 16 GB-class file if you must stay that small; quality is the trade. Who should stay on the mini: anyone who wants a silent always-on 35B MoE at IQ3 or Unsloth Q2, one user, 16k to 64k context, and is willing to pin the Metal wired cap and keep experts on the GPU. Who should buy a 5090: anyone who wants Q4 of the same class at 200-plus tok/s. Who should buy a Spark: the 100B-class FP4 path, not this 24 GB problem. Credit: hailports for the production timings, the launch line, and the 19 November Splash cut. OpenBMB for MiniCPM-V 4.7 35B-A3B, the GGUF ladder, and the DSpark draft. Qwen and Unsloth for Qwen3.6-35B-A3B and the 12.3 GB UD-Q2_K_XL file. ComputingForGeeks and scott-crenshaw for independent 24 GB M4 benches. GPUBattle for the 5090 Q4_K_M MiniCPM number. Apple for the 120 GB/s M4 spec. How this piece was created This guide was drafted by an agent and published by a person. --- title: "DFlash 2 drafter on RTX 5090 and DGX Spark" description: "9 November lab comparison: 5090 LM Studio next to Spark vLLM DFlash 2, on different engines and quants." canonical: "https://bitwidth.ai/guides/dflash-2-drafter-on-rtx-5090-and-dgx-spark" published_time: "2026-11-09T22:44:45.516Z" modified_time: "2026-11-12T00:32:58.618Z" --- Guide # DFlash 2 drafter on RTX 5090 and DGX Spark 9 November lab comparison: 5090 LM Studio next to Spark vLLM DFlash 2, on different engines and quants. **Bitwidth.AI** Last updated Nov 11, 2026 · 28 min ![DFlash 2 drafter on RTX 5090 and DGX Spark. One-pass spec-decode for Qwen3.8-27B.](/backend/uploads/8b24c348eb0ca922f180e38ed28140fc.png) ## TL;DR - 9 November lab comparison: 5090 LM Studio next to Spark vLLM DFlash 2, on different engines and quants. - Inco's DFlash 2 drafter drafts a whole block in one pass for Qwen3.8-27B. - The weights are open. Inco's DFlash 2 drafter drafts a whole block in one pass for Qwen3.8-27B. The weights are open. You download a target and a matching drafter, then run them on your own GPU. On a 32 GB RTX 5090 the cited path is NVFP4 weights plus the BF16 draft. On one DGX Spark the cited memory pin is 0.80. An independent SGLang grid on a 5090 reports spec-decode time per output token of 4.92 ms, against 14.40 ms with speculative decoding off.[7](https://github.com/sgl-project/sglang/pull/35825) This lab ran the work on a 32 GB RTX 5090 and a NVIDIA [DGX Spark](https://www.amazon.com/dp/B0FWJ16CCH?tag=bitwidthlabs-20). ![DFlash 2 drafter on RTX 5090 and DGX Spark. One-pass spec-decode for Qwen3.8-27B.](/backend/uploads/8b24c348eb0ca922f180e38ed28140fc.png) ## What's new DFlash 2 shipped on 18 August 2026 from Inco AI (z-lab / UC San Diego). The launch post is "DFlash 2: Keep Drafting Parallel."[1](https://inco.ai/blog/dflash2/) There is no separate DFlash 2 paper on arXiv. The authors cite that blog, plus the earlier DFlash paper. This Hugging Face repo is a drafter. It is not a chat model. The card says it runs inside a speculative-decoding server and proposes tokens for a named target to verify.[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) The config architecture is `DFlash2DraftModel`. The checkpoint is BF16 safetensors. `is_causal` is false. The author non-GGUF repos do not ship FP8, NVFP4, or GGUF files. Community quants exist outside those repos. The prior method is DFlash, arXiv:2602.06036, presented at ICML 2026. That paper is one-pass block diffusion, with a project-page block size of 16 and one denoising step. Its "over 6x" claim, and the "up to 6.1x on Qwen3-8B" figure, belong to DFlash. They are not DFlash 2 results.[3](https://arxiv.org/abs/2602.06036) DFlash 2 keeps the one-pass block. It adds two modules. A path selector keeps the top 16 candidates and scores adjacent pairs with a rank-256 match. A two-tap grouped dynamic convolution, kernel 2 and group 16, sits before and after each attention block and each feed-forward block. On the authors' Qwen3.5-4B run, mean accepted tokens move from 4.92 with DFlash to 5.97 with DFlash 2. That is 1.05 more tokens, about 21 percent, for 1.3 percent more cycle latency.[1](https://inco.ai/blog/dflash2/) On Qwen3.8-27B, block size 8, mean accept length is 4.80 for DFlash 2, 4.28 for the built-in MTP head, and 3.62 for DSpark.[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) The 4.92 in that Qwen3.5-4B sentence is an acceptance length. Later in this piece, 4.92 ms is a 5090 time-per-token. Same digits. Different unit. Different machine. Canonical weights live at `incoai/Qwen3.8-27B-DFlash2`. The Hub API sha is `015e795645c74b1a0eeef3b570031fb62e769bc5`. The repo was created on 18 August 2026. The download counter on 9 November 2026 read 437,556.[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) The mirror `z-lab/Qwen3.8-27B-DFlash2` stores the same `model.safetensors` object, LFS oid `67fc76d68dc5a9415511a4f394ef744d67510cd20e93b37cc2cc7d28e4bab65c`, 3,848,817,896 bytes, about 3.85 GB, 1,924,404,480 parameters. The collection `incoai/dflash-2` holds 11 models. There is no author repo whose id is literally `DFlash2` or `DFlash-2`.[4](https://huggingface.co/collections/incoai/dflash-2-6a8432273c9998ce1685d4c5) Launch day covered two drafters: Qwen3.8-27B and Muse-Glimmer-30B. Later first-party drafters exist for Qwen3.8-Flash-Next, Qwen3.6-35B-A3B, GLM-5.3, GLM-5.3-Flash, Flint, Ornith-1.5-122B, and MiniMax-M3.1-Flash. This guide stays on Qwen3.8-27B. That is the pair the 5090 and Spark cookbook actually pins. Author speed tables for this Qwen drafter were measured on one H200. Later model cards use a GB300. Neither table is a 5090. Neither table is a Spark. Lossless, on the card, means greedy text matches the target, and sampling keeps the target's distribution, when the drafter was built for that target. A mismatched fine-tune can accept nothing. vLLM issue 61072 records a pairing whose acceptance hit 0 percent.[15](https://github.com/vllm-project/vllm/issues/61072) Load the drafter next to the target named on its card. ### Supported targets Each line is one drafter, one target, and the draft-token integer the authors printed. SGLang's integer and vLLM's integer differ on purpose. Block size 8 is 7 draft tokens per verify step on the Qwen card. vLLM's `num_speculative_tokens` must be block size minus 1. Leave both integers as printed. - `incoai/Qwen3.8-27B-DFlash2` drafts for `Qwen/Qwen3.8-27B`. Block size 8. Target layers 5, 19, 33, 47, and 61. SGLang `--speculative-num-draft-tokens` is 8. vLLM `num_speculative_tokens` is 7. The GGUF example target is `ggml-org/Qwen3.8-27B-GGUF:Q4_K_M`, with `--spec-draft-n-max` 7.[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) - `incoai/Qwen3.8-Flash-Next-DFlash2` drafts for `Qwen/Qwen3.8-Flash-Next` (the card's eval is FP8). Block size 8. The card serves 4 draft tokens because of Qwen sparse attention. The BF16 file is about 1.21 GB. Apache-2.0. - `incoai/Muse-Glimmer-30B-DFlash2` drafts for `meta-models/Muse-Glimmer-30B`. Block size 16. SGLang uses 16. vLLM uses 15. About 5.54 GB BF16. It is a finetune of Meta's official DFlash drafter. Apache-2.0. - `incoai/Qwen3.6-35B-A3B-DFlash2` drafts for `Qwen/Qwen3.6-35B-A3B`. Block size 8. Apache-2.0. - `incoai/GLM-5.3-DFlash2` drafts for `zai-org/GLM-5.3`. Block size 8. License is CC BY-NC-ND 4.0. - `incoai/GLM-5.3-Flash-DFlash2` drafts for `zai-org/GLM-5.3-Flash`. Block size 8. About 1 billion parameters. The card says benches are being re-measured. License is CC BY-NC-ND 4.0. No author GGUF.[13](https://huggingface.co/incoai/GLM-5.3-Flash-DFlash2) - `incoai/Flint-DFlash2` drafts for `RecursiveSI/flint`. Apache-2.0. It is outside the 11-item collection. - `incoai/Ornith-1.5-122B-DFlash2` drafts for `ornith-ai/Ornith-1.5-122B`. Block size 16. Apache-2.0. An extra `mask_embedding.safetensors` is 6,432 bytes. Inco's eval is two GB300 GPUs at tensor parallel 2. That eval is not a Spark result. - `incoai/MiniMax-M3.1-Flash-DFlash2` drafts for `MiniMaxAI/MiniMax-M3.1-Flash`. Block size 8. Apache-2.0. ### Licensing The Qwen3.8-27B drafter is Apache-2.0 and ungated. The same Apache-2.0 tag is on the Qwen, Muse, Flint, Ornith, MiniMax, and Qwen3.6 drafters, including the official GGUFs.[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) `incoai/GLM-5.3-DFlash2` and `incoai/GLM-5.3-Flash-DFlash2` are CC BY-NC-ND 4.0. That license is research and evaluation. Commercial terms go through contact@inco.ai.[13](https://huggingface.co/incoai/GLM-5.3-Flash-DFlash2)[17](https://creativecommons.org/licenses/by-nc-nd/4.0/) The two-Spark GLM recipe later in this piece sits under that license. The Qwen drafter does not. The `z-lab/dflash` code repository is MIT. That is a code license. It does not relicense the GLM weights.[16](https://github.com/z-lab/dflash) For llama.cpp text, prefer the `z-lab` GGUF mirror. A llama.cpp collaborator, ngxson, reported that many `incoai` GGUFs were broken. The blog's llama.cpp tab still points `-hfd` at `incoai`. GGUFs built before 27 August 2026 break vision. Even on a later file, image acceptance can fall below 0.03. This guide covers text. It does not promise vision.[10](https://github.com/ggml-org/llama.cpp/pull/27342) ## Performance Every figure below is speculative decoding. The label on each block names the GPU, the engine, and whether the source is the author or an independent run. A spec-decode speed is not a stock GGUF decode speed. Author, one H200, SGLang, FlashAttention 3, block size 8, concurrency 1. Throughput is output tokens per second against autoregressive decoding at about 69. This is not a 5090. This is not a Spark.[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) - GSM8K: autoregressive 68.9, DFlash 2 236.1 (3.43x). - MATH-500: 69.0 and 230.7 (3.34x). - HumanEval: 69.0 and 214.6 (3.11x). - MBPP: 69.0 and 226.9 (3.29x). - MT-Bench: 68.9 and 184.0 (2.67x). ![Author H200 spec-decode speedup for DFlash 2 at concurrency 1. GSM8K 3.43x, MATH-500 3.34x, HumanEval 3.11x, MBPP 3.29x, MT-Bench 2.67x. Not a 5090 or Spark.](/backend/uploads/d6e94380cc0ed8447e788e25a5afa46f.png) Author, one H200, SGLang, spec-decode, concurrency 1. The bars are those five tasks. This is not a desktop GPU. On that same model card, concurrency 32 cuts DFlash 2 to 1.01x through 1.45x. MTP and DSpark drop under 1x on some tasks. A batch-1 speedup is the wrong number for a busy server. Acceptance length on that model card is completion tokens divided by verification steps. GSM8K 5.46. MATH-500 5.28. HumanEval 4.39. MBPP 4.79. MT-Bench 4.10. The means across methods are MTP 4.28, DSpark 3.62, DFlash 2 4.80. Independent, RTX 5090, SGLang pull request 35825. Image `lmsysorg/sglang:dev-qwen38-27b-dflash2`, commit `1cf2b8c`. Workload is 8192 input tokens and 1024 output tokens, concurrency 1. The published figure is time per output token, in milliseconds. The pull request does not convert that into tokens per second. This guide does not either.[7](https://github.com/sgl-project/sglang/pull/35825) - DFlash 2 bf16, memory fraction 0.91, chunk 1024: 4.92 ms, accept length 4.29. - Speculative decoding off, bf16, same box: 14.40 ms. - EAGLE bf16: 8.07 ms, accept length 3.02. - DSpark bf16: 7.41 ms, accept length 2.59. - DFlash 2 float32 on that 5090: greyed out. Memory fraction 0.86 through 0.96 never reached the slot count. ![Independent SGLang PR 35825 RTX 5090 spec-decode TPOT. DFlash 2 bf16 4.92 ms vs no-spec 14.40 ms. Float32 greyed out. Do not convert TPOT to tok/s.](/backend/uploads/c2c521e313256271545c9409ed75549b.png) Independent SGLang pull request 35825, RTX 5090. The figure is spec-decode time per output token. Float32 is greyed out. Independent, RTX PRO 6000, same pull request, different GPU. Pin 0.85 and chunk 2048. BF16 plus DFlash 2, low latency, float32: 8.19 ms, accept length 5.42. NVFP4 with a BF16 language-model head plus DFlash 2, low latency, float32: 5.36 ms, accept length 4.19. That GPU is 96 GB. It is not the 5090 pin. Independent, one RTX 3090, 24 GB, llama.cpp, one user on the official discussion. Target Q4, DFlash 2 Q8 draft, context 163840, `n_max` 4, about 23.08 GB resident. Sustained generation is 59.88 tokens per second, spec-decode. The same post's Q4 run with speculative decoding off is 33.16 tokens per second at 128K. The contexts differ, so the ratio is the poster's arithmetic, not a matched pair. On that thread, `n_max` 8 clamped to 7 and then ran out of GPU memory near 176K context.[12](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2/discussions/9) A second 3090 note, from @treo on the llama.cpp pull request, used a Q4 draft, context 32000, and `n_max` 4. Spec-decode speed was 62.21 tokens per second. MTP on that note, at `n_max` 3, was 57.79. They used 4 because 7 was slower.[10](https://github.com/ggml-org/llama.cpp/pull/27342) Independent, two DGX Sparks, GLM-5.3-Flash, not Qwen3.8-27B. A forum SGLang run at tensor parallel 2 reports code at 29.4 tokens per second and prose at 23.4, against 14.7 with speculative decoding off.[19](https://forums.developer.nvidia.com/t/glm-5-3-flash-dflash2-on-sglang-2x-dgx-spark-first-sglang-path-recipe-4-gb10-fixes-honest-numbers-concurrency-curve/381703) A separate vLLM overlay, warm concurrency 1, reports code at 46.9 tokens per second against MTP-4 at 21.8.[14](https://github.com/tonyd2wild/GLM-5.3-Flash-NVFP4-2x-DGX-Spark/blob/main/docs/DFLASH2-SPECULATIVE-DECODING.md) The drafter license is CC BY-NC-ND 4.0.[13](https://huggingface.co/incoai/GLM-5.3-Flash-DFlash2) These two posts stay separate. Neither one is a Qwen3.8-27B speed. ### Bitwidth lab, 9 November 2026 The H200 rows, the SGLang time-per-token cells, the 3090 notes, and the two-Spark GLM notes above are other people's measurements. This block is Bitwidth's own lab on 9 November 2026. The RTX 5090 server is LM Studio, GGUF Q4_K_M, model id `qwen/qwen3.8-27b`. The bench JSON does not record draft method or draft width. Wes described the server as MTP with 3 draft tokens. This run is not DFlash 2. It is not the 4.92 ms cell. The DGX Spark server is vLLM on one GB10. BF16 `Qwen/Qwen3.8-27B` plus `incoai/Qwen3.8-27B-DFlash2` at 7 draft tokens for the 15:30 benches. FP8 `Qwen/Qwen3.8-27B-FP8` plus the same drafter at 3 draft tokens for the 16:42 arena. The measured container was `ghcr.io/spark-arena/dgx-vllm-eugr-nightly`, a vLLM nightly, not `vllm/vllm-openai:latest`. The engines and the quants do not match the 5090 run, so this is not a same-checkpoint speedup. Perf is a short prompt, concurrency 1, 2, and 4, three requests, 128 max tokens. Arena is concurrency 1, 2, 5, and 10, three requests, about 2048 prompt tokens and 128 generated tokens. Both sample at temperature 0.7. Aggregate tok/s is output tokens divided by wall clock. It rises with concurrency. It is not one stream's decode speed. Every level finished with 3 ok requests and 0 errors. No FP8 perf run was stored. 5090 LM Studio perf, 14:35, id `0a9a9a22cf44`: - Concurrency 1: 54.9 aggregate tok/s, per-request p50 76.8, TTFT p50 536.6 ms, wall 6.99 s. - Concurrency 2: 81.2 aggregate tok/s, per-request p50 73.5, TTFT p50 318.1 ms, wall 4.73 s. - Concurrency 4: 126.2 aggregate tok/s, per-request p50 55.4, TTFT p50 358.1 ms, wall 3.04 s. Spark vLLM, BF16, DFlash 2, 7 draft tokens, perf, 15:30, id `bfbbb73c2e73`: - Concurrency 1: 11.0 aggregate tok/s, per-request p50 12.4, TTFT p50 859.2 ms, wall 27.87 s. - Concurrency 2: 15.7 aggregate tok/s, per-request p50 12.1, TTFT p50 878.3 ms, wall 17.67 s. - Concurrency 4: 26.1 aggregate tok/s, per-request p50 11.1, TTFT p50 1237.5 ms, wall 10.49 s. 5090 LM Studio arena, 14:35, id `f0bdbb9a3b8c`: - Concurrency 1: 72.0 aggregate tok/s, per-request p50 114.6, prefill p50 15810.4, TTFT p50 123.4 ms, wall 5.33 s. - Concurrency 2: 113.0 aggregate tok/s, per-request p50 102.2, prefill p50 13817.3, TTFT p50 141.2 ms, wall 3.40 s. - Concurrency 5: 146.2 aggregate tok/s, per-request p50 74.4, prefill p50 3315.2, TTFT p50 588.5 ms, wall 2.63 s. - Concurrency 10: 161.0 aggregate tok/s, per-request p50 107.0, prefill p50 2536.4, TTFT p50 769.2 ms, wall 2.39 s. Spark vLLM, BF16, DFlash 2, 7 draft tokens, arena, 15:31, id `f8ebddfb128e`: - Concurrency 1: 12.8 aggregate tok/s, per-request p50 13.5, prefill p50 2044.2, TTFT p50 967.6 ms, wall 30.11 s. - Concurrency 2: 18.5 aggregate tok/s, per-request p50 12.9, prefill p50 1998.2, TTFT p50 989.9 ms, wall 20.75 s. - Concurrency 5: 27.6 aggregate tok/s, per-request p50 12.4, prefill p50 1168.7, TTFT p50 1692.5 ms, wall 13.92 s. - Concurrency 10: 26.5 aggregate tok/s, per-request p50 10.8, prefill p50 1172.1, TTFT p50 1687.5 ms, wall 14.51 s. Spark vLLM, FP8, DFlash 2, 3 draft tokens, arena, 16:42, id `ed88999295b3`: - Concurrency 1: 18.2 aggregate tok/s, per-request p50 19.7, prefill p50 5128.3, TTFT p50 385.7 ms, wall 21.07 s. - Concurrency 2: 27.3 aggregate tok/s, per-request p50 19.0, prefill p50 3602.3, TTFT p50 549.1 ms, wall 14.06 s. - Concurrency 5: 43.5 aggregate tok/s, per-request p50 17.3, prefill p50 2512.4, TTFT p50 787.3 ms, wall 8.82 s. - Concurrency 10: 42.1 aggregate tok/s, per-request p50 17.4, prefill p50 3102.7, TTFT p50 637.5 ms, wall 9.13 s. ![Arena aggregate tok/s, 9 Nov 2026. 5090 LM Studio c1 72.0 c10 161.0; Spark BF16 DFlash 2 c1 12.8 c10 26.5; Spark FP8 DFlash 2 c1 18.2 c10 42.1. Different stacks.](/backend/uploads/f9386cbe0638dc5079c91bd5f13ee4e6.png) Arena aggregate tokens per second on 9 November 2026. The 5090 series is LM Studio. The Spark series are vLLM with DFlash 2. The stacks differ. FP8 at 3 draft tokens is faster than BF16 at 7 draft tokens on this harness, and still far below the 5090 LM Studio server. A times-faster slogan would pretend the weights match. Same-day operator smokes, temperature 0, a count-to-forty prompt, are not in the lists above: BF16 at 7 draft tokens was about 24.7 tok/s wall, BF16 at 3 draft tokens was 15.8 tok/s decode (249 of 252 draft tokens accepted), and FP8 at 3 draft tokens was 25.9 tok/s decode. As of 9 November 2026, pull request 35825 and the Qwen3.8-27B cookbook publish no tokens-per-second figure for Qwen3.8-27B plus DFlash 2 on one DGX Spark. The checkpoints fit. Public sources still show no tok/s. The lists above are this lab's measurements.[7](https://github.com/sgl-project/sglang/pull/35825)[8](https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-27B) Older DFlash demos, and community overlays on custom vLLM images, are a different checkpoint or a different container. They are not the author H200 table. They are not the 5090 time-per-token cells above. ## Local setup Download the target and the drafter before you pick an engine. For the Qwen pair the target is `Qwen/Qwen3.8-27B`, or an NVFP4 export on a 32 GB 5090. The drafter is `incoai/Qwen3.8-27B-DFlash2`. For llama.cpp, use `z-lab/Qwen3.8-27B-DFlash2-GGUF`. Three paths are documented. vLLM has a current Docker image that accepts method `dflash`. llama.cpp has a GGUF server command. The measured 5090 and Spark grid used an SGLang image, and that image is not `vllm/vllm-openai:latest`. ### vLLM The floor is vLLM v0.28.0, tagged 26 August 2026, which contains pull request 52816.[5](https://github.com/vllm-project/vllm/releases/tag/v0.28.0) The model card still shows a pip install of that pull-request head. That pin is older than the release. Method `dflash` is a documented speculative-decoding method.[18](https://docs.vllm.ai/en/latest/features/speculative_decoding/) Docker Hub tag `vllm/vllm-openai:latest`, read on 9 November 2026, has manifest digest `sha256:d825baf9ce4b1b6bfc5ecc7b79880c7e6748c65a72d697ce3d47607aafa84c6e`. It was pushed on 2 November 2026. It lists linux/amd64 and linux/arm64. CUDA 13 images want host driver R580 or newer.[6](https://docs.vllm.ai/en/latest/deployment/docker/) The block below is a BF16 assembly. The Docker skeleton is the official vLLM page. The speculative JSON is the Qwen card. It was not measured on a 5090. It was not measured on a Spark. BF16 `Qwen/Qwen3.8-27B` plus this drafter does not fit in 32 GB. The image entrypoint is already `vllm serve`, so the engine arguments follow the image tag. Desktop, NVIDIA runtime: ```bash docker run --runtime nvidia --gpus all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=$HF_TOKEN" \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3.8-27B \ --speculative-config '{"method":"dflash","model":"incoai/Qwen3.8-27B-DFlash2","num_speculative_tokens":7}' ``` Spark, when the box is CDI-only. Same engine arguments. Still not a measured GB10 run: ```bash docker run --device nvidia.com/gpu=all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=$HF_TOKEN" \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model Qwen/Qwen3.8-27B \ --speculative-config '{"method":"dflash","model":"incoai/Qwen3.8-27B-DFlash2","num_speculative_tokens":7}' ``` Leave tensor parallel off both commands. Leave `enforce_eager` out of the JSON. vLLM 0.31 enables async scheduling for DFlash.[20](https://github.com/vllm-project/vllm/releases/tag/v0.31.0) The same notes capture the draft pass in a CUDA graph. A dedicated tag such as `v0.28.0` is an extra image. It does not replace `:latest` in this section. When that server is up, port 8000 speaks the OpenAI API. The models list is the first check: ```bash curl http://127.0.0.1:8000/v1/models ``` That curl is the standard OpenAI models route on the port the Docker page publishes. It is not a benchmark. ### LM Studio / llama.cpp The LM Studio speculative-decoding page, fetched 9 November 2026, describes a smaller draft model that shares the target vocabulary. It does not name DFlash, DFlash 2, `draft-dflash`, or a GGUF drafter repo.[11](https://lmstudio.ai/docs/app/advanced/speculative-decoding) A community post says LM Studio 0.4.22, with llama.cpp runtime 2.29.1 or newer, added DFlash assistant models. Confirm the picker in the app you have. This guide does not invent a menu path. The documented local path is `llama-server`. Build a tree that contains llama.cpp pull request 27342, merged on 27 August 2026. The first tagged master build named for that flag is `b10658`.[10](https://github.com/ggml-org/llama.cpp/pull/27342) An older build fails a DFlash 2 GGUF with the wrong tensor count. The serve command below follows the GGUF card, with `-hfd` pointed at the z-lab mirror. The card itself prints `incoai` in that slot. Prefer z-lab for text.[9](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2-GGUF) ```bash ./build/bin/llama-server \ -hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M \ -hfd z-lab/Qwen3.8-27B-DFlash2-GGUF:Q4_K_M \ --spec-type draft-dflash \ --spec-draft-n-max 7 ``` Official GGUF sizes, same byte counts on the incoai repo and the z-lab mirror: Q4_K_M is 1,143,006,816 bytes (the card rounds to 1.1 GB). Q8_0 is 2,056,414,816 bytes (2.0 GB). BF16 is 3,860,293,216 bytes (3.8 GB).[9](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2-GGUF) The card's own check, first eight GSM8K examples, reports acceptance length 5.28 at BF16, 5.13 at Q8_0, and 5.39 at Q4_K_M. That is acceptance length. It is not tokens per second. The llama.cpp docs convert example is DFlash v1, model `z-lab/Qwen3-4B-DFlash`, with `--spec-draft-n-max` 15. Leave 15 on that older draft. The 27B GGUF card already ships converted files. On one 3090 at long context, `n_max` 4 beat `n_max` 7. Keep 7 next to the card command. Keep 4 next to that thread. The flags that user printed, with their own file paths:[12](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2/discussions/9) ```bash -m /models/Qwen3.8-27B-UD-Q4_K_XL.gguf --model-draft /models/Qwen3.8-27B-DFlash2-Q8_0.gguf --n-gpu-layers all --n-gpu-layers-draft all --threads 20 --cache-type-k q4_0 --cache-type-v q4_0 --flash-attn on --ctx-size 163840 --parallel 1 --reasoning off --spec-type draft-dflash --spec-draft-n-max 4 --jinja ``` ### One DGX Spark One Spark is a GB10, SM121, with 128 GB of unified memory. The Qwen3.8-27B cookbook says the BF16, FP8, and NVFP4 checkpoints fit in that pool.[8](https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-27B) The measured DFlash 2 cells serve at `--mem-fraction-static 0.80`. At 0.85, DGX OS earlyoom sent SIGTERM to 15 of 48 cells, exit -15, with about 8 GB left for the OS.[7](https://github.com/sgl-project/sglang/pull/35825) Attention on SM121 is `flashinfer`. `trtllm_mha` is SM100 only. The image next to "it served" is `lmsysorg/sglang:dev-qwen38-27b-dflash2`, from pull request 35825, commit `1cf2b8c`. A generic `lmsysorg/sglang:latest` pull is a different tag. ```bash docker pull lmsysorg/sglang:dev-qwen38-27b-dflash2 ``` The card's H200 quick start is a host launcher, not the Spark pin. It is copied here so the flag names are the ones on the card:[2](https://huggingface.co/incoai/Qwen3.8-27B-DFlash2) ```bash python -m sglang.launch_server \ --model-path Qwen/Qwen3.8-27B \ --speculative-algorithm DFLASH \ --speculative-draft-model-path incoai/Qwen3.8-27B-DFlash2 \ --speculative-num-draft-tokens 8 ``` On one Spark, add the cookbook pins. The draft token count stays 8: ```bash --attention-backend flashinfer \ --mem-fraction-static 0.80 \ --speculative-algorithm DFLASH \ --speculative-draft-model-path incoai/Qwen3.8-27B-DFlash2 \ --speculative-num-draft-tokens 8 ``` The cookbook generator builds `docker run --gpus all` with `--shm-size 32g` and `--ipc=host`, then substitutes the panel flags. On a CDI-only Spark the device flag is `--device nvidia.com/gpu=all`. The DGX Spark user guide still shows `--gpus=all` for a CUDA sample. Use the flag that box accepts inside a container. Pull request 35825 and the cookbook publish no tokens-per-second figure for Qwen3.8-27B plus DFlash 2 on one Spark. Bitwidth's 9 November lab, under Performance, measured that pair on a different vLLM image. The `:latest` block above is not that measurement. ### Two DGX Sparks The official Qwen3.8-27B cookbook runs this model on a single Spark GPU. It does not publish a Qwen tensor-parallel DFlash 2 recipe. Leave `--tensor-parallel-size 2` off `vllm/vllm-openai:latest` for this target.[8](https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-27B) A community recipe uses a different model and a different license. GLM-5.3-Flash NVFP4, drafter `incoai/GLM-5.3-Flash-DFlash2`, two Sparks, tensor parallel 2. The image in that fork predates the DFlash 2 merge, so the authors bind-mount an overlay. It is not `vllm/vllm-openai:latest`. The flags they add:[14](https://github.com/tonyd2wild/GLM-5.3-Flash-NVFP4-2x-DGX-Spark/blob/main/docs/DFLASH2-SPECULATIVE-DECODING.md) ```bash -v /var/tmp/models/GLM-5.3-Flash-DFlash2:/models/dflash2-draft:ro --speculative-config '{"method":"dflash","model":"/models/dflash2-draft","num_speculative_tokens":7}' ``` Warm concurrency-1 code on that page is 46.9 tokens per second, spec-decode, against MTP-4 at 21.8. Acceptance on that sample is 74.1 percent (420 of 567).[14](https://github.com/tonyd2wild/GLM-5.3-Flash-NVFP4-2x-DGX-Spark/blob/main/docs/DFLASH2-SPECULATIVE-DECODING.md) The license on the drafter is CC BY-NC-ND 4.0.[13](https://huggingface.co/incoai/GLM-5.3-Flash-DFlash2) The forum SGLang numbers, 29.4 and 23.4, are the other two-Spark GLM cite. They are not a command for Qwen3.8-27B. ### Desktop GPU (5090 and below) **RTX 5090 (32 GB, SM120).** The working cited stack is SGLang. The BF16 vLLM assembly in the vLLM section does not fit this GPU. NVFP4 target weights plus the BF16 drafter `incoai/Qwen3.8-27B-DFlash2` are the fit. The cookbook disables DFlash 2 on a 5090 unless the quant id starts with `nvfp4`, because the draft only fits on top of the NVFP4 weights. BF16 `Qwen/Qwen3.8-27B` plus this drafter is the no-fit case.[8](https://docs.sglang.io/cookbook/autoregressive/Qwen/Qwen3.8-27B) Pull request 35825 names `RadixArk/Qwen3.8-27B-NVFP4` as the export that keeps a BF16 language-model head, about 1.7 GB extra. A packed head blocks the selector path.[7](https://github.com/sgl-project/sglang/pull/35825) The published 5090 cell in that pull request is labeled DFlash 2 bf16. Its spec-decode time per output token is 4.92 ms, accept length 4.29, against 14.40 ms with speculative decoding off. Pins for that 5090: `flashinfer`, memory fraction 0.91, chunked prefill 1024. A 2048-token chunk's activations do not fit at 0.91. Draft tokens stay at 8. The image for the published timing is `lmsysorg/sglang:dev-qwen38-27b-dflash2`. ```bash docker pull lmsysorg/sglang:dev-qwen38-27b-dflash2 ``` Flags cited for the 5090 NVFP4 path. They are the cookbook pins plus the pull request's repo id. They are not one copied container line: ```bash --model-path RadixArk/Qwen3.8-27B-NVFP4 \ --speculative-algorithm DFLASH \ --speculative-draft-model-path incoai/Qwen3.8-27B-DFlash2 \ --speculative-num-draft-tokens 8 \ --attention-backend flashinfer \ --mem-fraction-static 0.91 \ --chunked-prefill-size 1024 ``` Float32 DFlash 2 on the BF16-head export is greyed out on this 5090. **RTX PRO 6000 (96 GB).** Same pull request. Memory fraction 0.85 and chunk 2048. No 5090 pin. BF16 plus DFlash 2, low latency, float32: 8.19 ms, accept length 5.42. NVFP4 with a BF16 language-model head plus DFlash 2, low latency, float32: 5.36 ms, accept length 4.19. `trtllm_mha` is still the wrong backend. This GPU is SM120. **RTX 3090 (24 GB).** llama.cpp fits. Q4 target, Q8 draft, context 163840, `n_max` 4, about 23.08 GB, 59.88 tokens per second spec-decode. The command fragment is in the llama.cpp section. `n_max` 7 was slower on that thread. `n_max` 8 clamped, then ran out of memory.[12](https://huggingface.co/z-lab/Qwen3.8-27B-DFlash2/discussions/9) **16 GB.** Treat the 27B pair as no-fit. The published desktop floor for SGLang DFlash 2 is a 32 GB card plus NVFP4 target weights. ![Hardware-fit for Qwen3.8-27B plus DFlash 2. 5090 NVFP4 FIT, 5090 BF16 NO-FIT, one Spark FIT with Bitwidth lab tok/s, two Sparks no official Qwen TP, 24 GB llama.cpp FIT, 16 GB NO-FIT.](/backend/uploads/b3cdfe4bad9c86777769da3c912628c7.png) Hardware fit for Qwen3.8-27B plus DFlash 2. The two-Spark GLM overlay is a different model, so this chart does not mark two Sparks as a Qwen fit. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Ornith-1.5-122B on one DGX Spark" description: "Official NVFP4 vs Mia TensorFold EXL3 on one 128 GB Spark, measured 2026-10-21." canonical: "https://bitwidth.ai/guides/ornith-1-5-122b-on-one-dgx-spark" published_time: "2026-10-21T16:01:34.499Z" modified_time: "2026-11-12T00:32:58.974Z" --- Guide # Ornith-1.5-122B on one DGX Spark Official NVFP4 vs Mia TensorFold EXL3 on one 128 GB Spark, measured 2026-10-21. **Bitwidth.AI** Last updated Nov 11, 2026 · 14 min ![Ornith-1.5-122B on one DGX Spark. TensorFold EXL3 vs official NVFP4.](/backend/uploads/4cef96581f3cf43c145bce3d390ca8f1.png) ## TL;DR - Official NVFP4 vs Mia TensorFold EXL3 on one 128 GB Spark, measured 2026-10-21. - Ornith-1.5-122B is serving on one DGX Spark from a pinned TensorFold image. - This lab measured official NVFP4 on Spark nightly vLLM first. Ornith-1.5-122B is serving on one DGX Spark from a pinned TensorFold image. This lab measured official NVFP4 on Spark nightly vLLM first. The faster EXL3 plus DFlash2 stack is what stayed up. ## What's new Ornith-1.5-122B shipped on 2026-10-20.[13](https://x.com/ornith_/status/2112553477457268799) The official card is on Hugging Face.[1](https://huggingface.co/ornith-ai/Ornith-1.5-122B) Ollama lists the same date.[16](https://ollama.com/library/ornith-1.5) The Hub family is BF16, FP8, NVFP4, GGUF, and MLX. Day-one runtimes named in the announcement include Ollama, Hermes Agent, AtomicChat, Unsloth, RunInfra, OpenCode, Command Code, Inco DFlash2, and SGLang.[14](https://x.com/ornith_/status/2112554084691558411) BF16 `usedStorage` is 250.19 GB. That does not fit 128 GB of unified memory. The Hub Quickstart line about a single 80 GB GPU is Hub copy. It is not a BF16 VRAM number. Official NVFP4 does fit.[2](https://huggingface.co/ornith-ai/Ornith-1.5-122B-NVFP4) Hub reports 77.665 GB, which is 72.332 GiB. This lab downloaded 77.7 GB and saw 72.37 GiB on device. We served that checkpoint first. The standing serve is Mia TensorFold EXL3 plus DFlash2.[3](https://huggingface.co/Mia-AiLab/Ornith-1.5-122B-EXL3-EAQv1-4-bpw)[4](https://huggingface.co/incoai/Ornith-1.5-122B-DFlash2)[5](https://github.com/MiaAI-Lab/Ornith-1.5-122B-TensorFold) The image is pinned to `ghcr.io/miaai-lab/ornith-1.5-122b-tensorfold:zig-d1018b3-f5683f4c5651`. Manifest digest is `sha256:56c064d22327a6d0ce09d0de3930084b11841918072e9467a2dd9039b3d92b82`. One Spark is enough. A second Spark in the same lab was left on a different model. The [NVIDIA DGX Spark](https://www.amazon.com/dp/B0FWJ16CCH?tag=bitwidthlabs-20) used in this lab is listed on Amazon. The checkpoint `config.json` architecture is `Qwen3_5MoeForConditionalGeneration`, model_type `qwen3_5_moe`: 48 layers, 256 experts, 8 experts per token, native context 262144, one MTP layer, and a vision encoder. That is the same shape Qwen publishes for Qwen3.5-122B-A10B. Ornith describes the 1.5 family as continued training on top of Qwen3.5 and Gemma 4.[12](https://ornith.ai/ornith_1_5.html) ## Performance HUB quality, from the official card.[1](https://huggingface.co/ornith-ai/Ornith-1.5-122B) This lab did not re-run these scores. - TerminalBench 2.1: 81.2 - CyberGym: 80.0 - NL2Repo: 51.2 - SWE-bench Pro (no-hack): 76.9 - SWE-bench Verified (non-hack): 84.5 - SWE-bench Multilingual (non-hack): 76.4 - HLE (with tools): 48.0 - HLE (without tools): 37.68 - SciCode: 53.8 - WideSearch: 75.2 - BrowseComp: 78.5 - MCP-Atlas: 74.6 - Toolathlon-Verified: 70.8 - ClawEval: 79.4 Independent GPQA, MMLU, LiveCodeBench, and Arena numbers for this 122B were not published as of 2026-10-21. BenchLM reprints the Hub rows, unranked.[17](https://benchlm.ai/models/ornith-1-5-122b) GPQA 92.8 is the 397B figure from the August 2026 blog. It is not a 122B score. LAB, one DGX Spark, 2026-10-21, thinking off, temperature 0. Standing engine: TensorFold EXL3 plus DFlash2. Image tag `zig-d1018b3-f5683f4c5651`. EXL3 revision `9c5c913b3de1eef901520d6fedaf450044ea0423`, 4.049 bpw, 62 GB on disk, 69.45 GiB on device with the drafter. DFlash2 revision `a5ed7396f5f9e5b1abf7ff50b7899a3186961432`. CONTEXT 262144. KV fp8. PARALLEL=8. The engine log showed 8 streams at once, 4.23 GiB each at a 262144-token window, and 36.4 GiB left after a 10 GiB reserve. Load was 112 s on the earlier 4-stream boot. First load is about two minutes. The start script wants about 90 GB MemAvailable before launch. Thinking is on by default. Callers turn it off with `chat_template_kwargs.enable_thinking` set to false. Server sampling is 0.6 / 20 / 0.95. Speed runs set temperature to 0. - One-word check: "What is the capital of France?" answered Paris. Time to first token 0.15 s. - Prose, 180 completion tokens: 44.1 tok/s decode, TTFT 0.19 s. Engine accepted 106 of 315 drafted tokens. - Code, fib(n), 200 completion tokens, after the PARALLEL=8 restart: 109 tok/s decode, TTFT 0.21 s. Earlier 4-stream boot, same prompt: 103.5 tok/s. - Four concurrent short paragraphs, 473 completion tokens in 6.3 s: 75 tok/s aggregate, about 19 to 22 tok/s on each stream. Official NVFP4 first try, same Spark. Image `ghcr.io/spark-arena/dgx-vllm-eugr-nightly`, vLLM 0.32.0rc1.dev301 from 2026-10-16. Download 77.7 GB. 72.37 GiB on device. Loaded in 27 s. Flags: quantization modelopt_mixed, Marlin MoE, FlashInfer, FP8 KV, MTP 3 draft tokens, max_model_len 262144, max_num_seqs 4, gpu_memory_utilization 0.85. KV pool 1,428,684 tokens (5.45 times 262144). vLLM warned this path used weight-only FP4 Marlin rather than native FP4. - Code: 46.7 tok/s, TTFT 0.17 s - Prose: 33.9 tok/s, TTFT 0.20 s - Four streams: 61 tok/s aggregate - MTP accepted 312 of 567 draft tokens TensorFold stayed because code decode was about 2.2 times faster (109 / 46.7) and prose was faster, while eight full 262144-token windows still fit. ![Bitwidth lab, one Spark, 2026-10-21: TensorFold vs official NVFP4. Code 109 vs 46.7 tok/s, prose 44.1 vs 33.9, four-stream aggregate 75 vs 61](/backend/uploads/face6fab4b61465ac3cc02f9ad33875c.png) Bitwidth lab, one Spark, 2026-10-21. TensorFold versus official NVFP4. Code 109 vs 46.7 tok/s. Prose 44.1 vs 33.9 tok/s. Four-stream aggregate 75 vs 61 tok/s. MIA published speeds. These are Mia's numbers. They are not this lab. Mia's X post on 2026-10-21 listed about 52 tok/s prose single stream, about 103 tok/s code, and about 90 tok/s prose at four streams.[6](https://x.com/MiaAI_lab/status/2112822741208314258) This lab's code figure of 109 tok/s at PARALLEL=8 landed next to Mia's posted ~103 tok/s on code. This lab's four-stream aggregate of 75 tok/s was under Mia's 90 tok/s prose figure. Mia's TensorFold README table is also Mia's, default PARALLEL=4: prose 52.6 single stream / 90.4 at four streams; code 83.3 single stream / 103.4 at two streams / 111.0 at four streams.[5](https://github.com/MiaAI-Lab/Ornith-1.5-122B-TensorFold) The X post figure of about 103 tok/s code as a single stream is the README's two-stream aggregate of 103.4, not the single-stream 83.3. INDEPENDENT one-Spark runs used different recipes. They are not this lab. 0xBakeer used TandemLLM 0.13.0 on his 4-bit EXL3 pack. Plain decode about 38 tok/s. MTP plus lookup: prose 85.3, code 114.2, copying 124.8 tok/s.[10](https://x.com/0xBakeer/status/2112866828967879040) anubhavgupta ran official NVFP4 plus DFlash2 on stock SGLang. One client mixed 39.9 / code 49.1. Four clients mixed 61.4 / code 93.3.[11](https://github.com/anubhavgupta/Tensorfold-recipies-single-dgx-spark) The same author also posted TensorFold 1.1.1 MLX 4-bit (not Mia's EXL3): 46 / 72 tok/s single stream (mixed / code) and 74 / 98 at four streams. ## Local setup ### vLLM The official card's vLLM recipe is a `docker run` of `vllm/vllm-openai:latest`. The image entrypoint is `vllm serve`, so engine args follow the tag. On Spark CDI the device flag is `--device nvidia.com/gpu=all`. ```bash docker run --device nvidia.com/gpu=all \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -p 8000:8000 \ --ipc=host \ vllm/vllm-openai:latest \ --model ornith-ai/Ornith-1.5-122B \ --served-model-name Ornith-1.5-122B \ --max-model-len 262144 \ --gpu-memory-utilization 0.90 \ --enable-prefix-caching \ --enable-auto-tool-choice \ --tool-call-parser qwen3_xml \ --reasoning-parser qwen3 \ --trust-remote-code \ --tensor-parallel-size 1 ``` That official-card line is for BF16 `ornith-ai/Ornith-1.5-122B`. `usedStorage` is 250.19 GB. It does not fit 128 GB. It was not the serve this lab measured. The measured official-weights serve was `ornith-ai/Ornith-1.5-122B-NVFP4` in `ghcr.io/spark-arena/dgx-vllm-eugr-nightly`. The standing, faster serve is TensorFold `./start.sh` with pinned `ghcr.io/miaai-lab/ornith-1.5-122b-tensorfold:zig-d1018b3-f5683f4c5651`. The card requires Transformers 5.8.1 or newer, vLLM 0.19.1 or newer, and SGLang 0.5.9 or newer. The NVFP4 card reprints the same BF16 one-liner. There is no NVFP4-specific vLLM command on that card. The card documents YaRN to about 1M tokens. This lab served the native 262144 window. ### LM Studio / llama.cpp Official GGUF and MLX files exist. This lab did not serve either path. Official GGUF: Q4_K_M is 75.844 GB, the official GGUF that can sit in 128 GB with KV headroom. Q5_K_M is 88.710 GB (tight). Q6_K is 102.380 GB. Q8_0 is 132.556 GB. BF16 GGUF is 249.363 GB.[7](https://huggingface.co/ornith-ai/Ornith-1.5-122B-GGUF) The card llama.cpp line is `llama-server -hf hf.co/ornith-ai/Ornith-1.5-122B-GGUF --port 8000 -c 262144`. Unsloth Dynamic 3 runs from UD-IQ1_M at 40.4 GB up through Q8_0 at 133 GB and BF16 at 249 GB.[8](https://huggingface.co/unsloth/Ornith-1.5-122B-GGUF) AtomicChat's ladder runs from 132.6 GB (Q8_0) down to 35.0 GB (`AD-IQ2_XXS-IQ1_M`).[9](https://huggingface.co/AtomicChat/Ornith-1.5-122B-GGUF) Their 64 GB Mac recommendation is `AD-IQ3_XXS-IQ2_S` at 47.6 GB, top-1 86.0% versus BF16. That last figure is quant fidelity, not GPQA. On 128 GB RAM, mid GGUF fits (official Q4_K_M 75.8 GB; Unsloth UD-Q3_K_XL 59.8 GB). AtomicChat Q8_0 at 132.6 GB is tight. Their 128 GiB row cuts context to about 144k. On 32 GB VRAM GPU-only, none of these fit. The smallest published files are AtomicChat 35.0 GB and Unsloth 40.4 GB. Both are over 32 GB. Official MLX-4bit is 64.02 GiB, the official MLX that can sit in 128 GB. Official MLX BF16-class is about 227.5 GB and does not fit. That path is Apple Silicon. It is not this Spark. This lab served neither. Point LM Studio at the official GGUF files. No separate LM Studio recipe was measured here. ### One DGX Spark One Spark (GB10, 128 GB unified) is enough. This lab ran the measured serve on one box. A second Spark in the same lab was left on a different model. What fits: - Official NVFP4: 77.7 GB download, 72.37 GiB on device. Fits. Tried first. Slower. - EXL3 4.049 bpw TensorFold: 62 GB disk, 69.45 GiB on device with the drafter. Fits. Standing serve. - BF16 `ornith-ai/Ornith-1.5-122B`: does not fit 128 GB. - Official FP8 at about 133 GB: does not fit with useful KV. - Official GGUF Q4_K_M at 75.8 GB would fit in RAM. This lab did not serve it. VRAM floor for the measured GPU paths is about 128 GB unified. Stop the previous model first. The start script wants about 90 GB MemAvailable. Download the pinned weights and drafter, then pull the image: ```bash hf download Mia-AiLab/Ornith-1.5-122B-EXL3-EAQv1-4-bpw --revision 9c5c913b3de1eef901520d6fedaf450044ea0423 hf download incoai/Ornith-1.5-122B-DFlash2 --revision a5ed7396f5f9e5b1abf7ff50b7899a3186961432 docker pull ghcr.io/miaai-lab/ornith-1.5-122b-tensorfold:zig-d1018b3-f5683f4c5651 ``` Working measured command. On a first run, leave `PREPARE=auto` so the script pulls the image and weights. After they are cached: ```bash git clone https://github.com/MiaAI-Lab/Ornith-1.5-122B-TensorFold.git cd Ornith-1.5-122B-TensorFold PREPARE=0 \ PORT=8000 \ CONTEXT=262144 \ PARALLEL=8 \ KV_DTYPE=fp8 \ DRAFTS=1 \ DRAFTER=dflash2 \ CONTAINER_NAME=sparkrun-ornith-mia \ ./start.sh ``` Pin the image tag. The measured serve is that tag, not `latest`. The tag this lab ran is `ghcr.io/miaai-lab/ornith-1.5-122b-tensorfold:zig-d1018b3-f5683f4c5651`. Weights revision `9c5c913b3de1eef901520d6fedaf450044ea0423`. Drafter revision `a5ed7396f5f9e5b1abf7ff50b7899a3186961432`. GHCR is public. Manifest digest is `sha256:56c064d22327a6d0ce09d0de3930084b11841918072e9467a2dd9039b3d92b82`. `start.sh` launches `docker run` with `--gpus all`. On a Spark that only exposes CDI, a raw `docker run` would use `--device nvidia.com/gpu=all`. The measured serve is `./start.sh`, not a handwritten docker line. Smoke on localhost: ```bash curl -s http://127.0.0.1:8000/v1/models curl -s http://127.0.0.1:8000/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{ "model": "Ornith-1.5-122B", "messages": [{"role": "user", "content": "What is the capital of France?"}], "max_tokens": 32, "temperature": 0, "chat_template_kwargs": {"enable_thinking": false} }' ``` The one-word check answered Paris. Time to first token 0.15 s. ### Two DGX Sparks This lab did not use a second Spark. There is no measured tensor-parallel recipe here. Mia's TensorFold README says tensor parallel on two Sparks (TP2) is untested. A second Spark would copy the one-box TensorFold command. It would not split the model. The official card `--tensor-parallel-size` flag is for BF16 vLLM or SGLang across more GPUs. It is not a measured two-Spark serve of this checkpoint. Inco DFlash2 eval numbers on two NVIDIA GB300 at TP=2 are a different box. They are not Spark.[15](https://inco.ai/blog/dflash2/) ### Desktop GPU (5090 and below) 62 GB EXL3 and 72 GiB NVFP4 do not fit 32 GB. - TensorFold EXL3: 62 GB disk, 69.45 GiB on device with the drafter. - Official NVFP4: 72.37 GiB on device. - RTX 5090 is 32 GB. Weights alone exceed the card. GGUF on CPU plus RAM is a different path. GPU-only on 32 GB: even the smallest published GGUF (AtomicChat 35.0 GB, Unsloth 40.4 GB) does not fit VRAM. A 5090 might offload layers to system RAM via llama.cpp `-ngl`. This lab did not measure that. There is no 5090 tok/s figure here. ![Hardware-fit: one Spark FIT, two Sparks not used, 5090 and below NO-FIT](/backend/uploads/3d8b483ef62e1f0ab594c141c61901ba.png) Hardware fit for Ornith-1.5-122B. One 128 GB Spark: FIT (EXL3 62 GB disk / 69.45 GiB with drafter; NVFP4 72.37 GiB). BF16 250.19 GB: no fit. Two Sparks: not used. Desktop GPU 5090 and below (32 GB): no fit. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Qwen3.8-Flash-Next FP4 on home iron" description: "One Spark serves NVIDIA's Qwen3.8-Flash-Next FP4-Local at 1,048,576 tokens from a pinned b12x container." canonical: "https://bitwidth.ai/guides/qwen3-8-flash-next-fp4-on-home-iron" published_time: "2026-10-19T16:29:04.171Z" modified_time: "2026-10-19T16:29:04.171Z" --- Guide # Qwen3.8-Flash-Next FP4 on home iron One Spark serves NVIDIA's Qwen3.8-Flash-Next FP4-Local at 1,048,576 tokens from a pinned b12x container. **Bitwidth.AI** Last updated Oct 19, 2026 · 10 min ![Qwen3.8-Flash-Next FP4 on home iron. One Spark, 1,048,576 tokens.](/backend/uploads/47044ba634cdaf492e31ba592b60d8d9.png) ## TL;DR - One Spark serves NVIDIA's Qwen3.8-Flash-Next FP4-Local at 1,048,576 tokens from a pinned b12x container. - NVIDIA's FP4-Local cut of Qwen3.8-Flash-Next is serving on one DGX Spark at a measured 1,048,576-token window. - It runs from a digest-pinned b12x container. NVIDIA's FP4-Local cut of Qwen3.8-Flash-Next is serving on one DGX Spark at a measured 1,048,576-token window. It runs from a digest-pinned b12x container. Upstream vLLM cannot load the checkpoint. ## What's new NVIDIA released nvidia/Qwen3.8-Flash-Next-FP4-Local on Hugging Face on 2026-10-05. The checkpoint is about 96 GB on disk. The lab used snapshot b9ce18a6887e18c089fdea8509a33e63429a3300. The model card is at Hugging Face [1](https://huggingface.co/nvidia/Qwen3.8-Flash-Next-FP4-Local). The lab download was 33 files. It took about 15 minutes. The Spark was already logged in to Hugging Face. The base is Qwen3.8-Flash-Next from Alibaba Qwen Team. Release date is 2026-08-26. Architecture preview is qwen4_exp. It uses hybrid attention. Gated DeltaNet is on three of four layers. Qwen Sparse Attention is on the fourth. It is a Mixture of Experts. Total is about 125B. Active is about 6B. It has a 51B n-gram PLE embedding table. It has a 4B MTP head. Vision encoder is present. Quantization is NVFP4 via Quantization Aware Distillation. NVIDIA Model Optimizer v0.47.0 is used [4](https://github.com/NVIDIA/Model-Optimizer). Routed experts are QAD NVFP4. Attention is MXFP8 FP8. PLE table is FP8. MTP head is BF16. License is NVIDIA Open Model Agreement [2](https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-agreement/). It governs download terms. Qwen Community License 1.0 applies to the base model [3](https://huggingface.co/Qwen/Qwen3.8-Flash-Next). Commercial and non commercial use is permitted. Upstream vLLM cannot load this checkpoint. NVFP4 expert scales use a new lossless compression format. The model card says you must use a provided container. vllm/vllm-openai:latest cannot load nvidia/Qwen3.8-Flash-Next-FP4-Local. The working server is a digest-pinned community image [10](https://forums.developer.nvidia.com/t/psa-state-of-fp4-nvfp4-support-for-dgx-spark-in-vllm/353069). Native context is 262,144. YaRN factor 4 extends it. 262144 times 4 equals 1,048,576. That is the window left running in the lab. One Spark is enough. A second Spark was not used. ## Performance NVIDIA reported these scores. This lab did not re-run them. NVIDIA reported for FP4-Local GPQA Diamond 91.5 percent. ToolEvalBench is 88.7 percent [1](https://huggingface.co/nvidia/Qwen3.8-Flash-Next-FP4-Local). BF16 baseline for Qwen3.8-Flash-Next is GPQA Diamond 92.2 percent. ToolEvalBench is 89.4 percent. Delta is minus 0.7 percentage points on both. ![NVIDIA-reported FP4-Local vs BF16: GPQA Diamond 91.5 vs 92.2, ToolEvalBench 88.7 vs 89.4](/backend/uploads/612547ad7c4adc9613dc6708a4b9820d.png) NVIDIA-reported scores, not this lab. Bitwidth lab, one DGX Spark, 2026-10-19. Engine log shows FP8 KV cache 1,612,385 tokens. Maximum concurrency at 1,048,576 is 1.54x. Weights are 71.19 GiB. About 12 GiB of 121 GiB remains for the OS after load. KV reservation is 23.5 GiB. Card claim versus lab. NVIDIA card says 1M tokens of FP8 KV with PLE offload on a Spark. Lab allocation was 1,612,385 tokens at max_model_len 1,048,576. Short completion thinking-off pong in 0.31 s. Finish reason is stop. Short decode is 112 completion tokens in 3.33 s wall. That is about 34 tok/s. Thinking is off. Client wall clock includes prefill. One short prompt was used. This is not a concurrency sweep. 40,046 token needle exact code returned in 16.2 s. 300,046 token needle exact code 7F-Qwen-Spark-19 returned in 131.5 s. This is past the native 262,144 window. A full 1,048,576 token prompt was not run. The cache is large enough for one request of that length. The long test actually run is 300,046 tokens. Bring up is about 5 minutes once weights are on disk. First boot is about 8 minutes. N-gram table is about 26 GB. It is paged from disk. VLLM_PLE_TABLE_MEMORY=disk is set. B12X_DISK_BACKEND=io_uring is set. That leaves room for the KV cache. MTP is configured with 4 speculative tokens. Log said no KV cache group was identified as the draft model. Acceptance rate was not measured. Transformers warned that mrope_interleaved and mrope_section are unrecognized under rope_type yarn. The 300,046 token retrieval still matched. Vision flags were left on with mm-encoder-tp-mode data. No image request was sent. ![Bitwidth lab, one Spark, one run: pong 0.31 s, 40k needle 16.2 s, 300k needle 131.5 s. 1,048,576-token prompt not run](/backend/uploads/b0c13b3c5073e527d50447734a86f311.png) Bitwidth lab, one Spark, one run. Independent community runs used different recipes. They are not this lab. luisiam posted on NVIDIA forums. Recipe is official NVIDIA. One Spark. Image is eugr/spark-vllm-b12x:latest. Llama benchy shows 48.88 tok/s short. 32.86 tok/s at 32K. Tool eval bench is 100/100 short. 89/100 hard [6](https://forums.developer.nvidia.com/t/nvidia-official-qwen3-8-flash-next-checkpoint-for-single-dgx-spark/385994). ai-muninn used tonyd2wild recipe. It uses stock nightly vLLM plus overlays. It is not the b12x pin this lab used. Median is 41.7 tok/s. Prose is 27.4. Aggregate at 4 streams is 47.2 [7](https://ai-muninn.com/en/blog/qwen38-flash-next-nvfp4-dgx-spark-vllm-recipe). tsarihan tested 2x Spark TP=2. NVFP4 vs FP8. NVFP4 is 28 to 52 percent faster across concurrency 1 to 64 [8](https://forums.developer.nvidia.com/t/qwen3-8-flash-next-nvfp4-on-2x-dgx-spark-recipe-benchmarks-and-the-patch-it-needs-to-load/382634). This lab did not run two Sparks. CrucibleMark posted 81.02 total. Output is 41.18 tok/s. Coverage is 100 percent [9](https://www.cruciblemark.com/reports/qwen3-8-flash-next-nvfp4-thinking/). That score is community. The checkpoint recipe may differ from this lab's pin. ## Local setup ### vLLM vllm/vllm-openai:latest cannot load nvidia/Qwen3.8-Flash-Next-FP4-Local. The working server is the digest-pinned community image. Download first: ```bash hf download nvidia/Qwen3.8-Flash-Next-FP4-Local ``` The lab pull was 33 files. It took about 15 minutes. Pin the image digest before docker run. ```bash docker run --device nvidia.com/gpu=all \ --ipc=host \ --shm-size=16g \ -v ~/.cache/huggingface:/root/.cache/huggingface \ -p 8000:8000 \ -e VLLM_PLE_TABLE_MEMORY=disk \ -e B12X_DISK_BACKEND=io_uring \ -e CUTE_DSL_ARCH=sm_121a \ -e SAFETENSORS_FAST_GPU=1 \ -e VLLM_WORKER_MULTIPROC_METHOD=spawn \ -e VLLM_SSM_CONV_STATE_LAYOUT=DS \ -e VLLM_USE_AOT_COMPILE=1 \ -e VLLM_USE_MEGA_AOT_ARTIFACT=1 \ -e VLLM_USE_V2_MODEL_RUNNER=1 \ -e B12X_POLICY_MODE=auto \ -e VLLM_MXFP8_LM_HEAD=1 \ -e VLLM_B12X_MOE_FP4_LAYER_MAX_INPUT_SCALE=w13 \ -e VLLM_B12X_MOE_FP4_FORCE_A16=1 \ -e B12X_W4A16_A4_PREFILL=1 \ -e B12X_COMPILE_WORKERS=1 \ -e B12X_AUTOTUNE=0 \ -e VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 \ eugr/spark-vllm-b12x:latest@sha256:03a956544e9f9b4b7ba91690469fbe7848bdbef29a7d2e0f5788368467bb3595 \ nvidia/Qwen3.8-Flash-Next-FP4-Local \ --host 0.0.0.0 --port 8000 \ --tensor-parallel-size 1 --pipeline-parallel-size 1 \ --mamba-cache-mode align \ --enable-prefix-caching --enable-chunked-prefill \ --dtype bfloat16 --kv-cache-dtype fp8 \ --quantization modelopt_mixed --block-size 16 \ --load-format b12x \ --max-model-len 1048576 \ --max-num-seqs 8 --max-num-batched-tokens 4096 \ --gpu-memory-utilization 0.85 \ --gdn-decode-kernel b12x --linear-backend b12x --moe-backend b12x \ --no-enable-flashinfer-autotune \ --mm-encoder-tp-mode data \ --reasoning-parser qwen3 --tool-call-parser qwen3_xml --enable-auto-tool-choice \ --compilation-config '{"pass_config":{"fuse_act_quant":true}}' \ --hf-overrides '{"text_config":{"rope_parameters":{"mrope_interleaved":true,"mrope_section":[11,11,10],"rope_type":"yarn","rope_theta":10000000,"partial_rotary_factor":0.25,"factor":4.0,"original_max_position_embeddings":262144}}}' \ --speculative-config '{"method":"mtp","num_speculative_tokens":4,"max_model_len":1048576}' ``` Ready check: ```bash curl -s http://127.0.0.1:8000/v1/models ``` Short thinking-off chat: ```bash curl http://127.0.0.1:8000/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{ "model": "nvidia/Qwen3.8-Flash-Next-FP4-Local", "messages": [{"role": "user", "content": "ping"}], "chat_template_kwargs": {"enable_thinking": false}, "max_tokens": 16 }' ``` Thinking-off for a client is top-level JSON chat_template_kwargs.enable_thinking set to false. A short prompt with that field returned content pong. Zero reasoning tokens were produced. B12X_AUTOTUNE=0 prevents hours of kernel autotune. B12X_COMPILE_WORKERS=1 avoids OOM on 128 GB Spark. VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 is required above 262,144. Community note. PLE weight_scale load failure on stock vLLM vllm#54765 [5](https://github.com/vllm-project/vllm/issues/54765) is fixed in nightly 0.31.1rc1. It still fails on the old qwen38-flash-next tagged image. This guide's working path is the digest-pinned b12x container. It is not that tagged image. ### LM Studio / llama.cpp No official GGUF from NVIDIA for this FP4-Local checkpoint. A community Strata split exists at hardhant/Qwen3.8-Flash-Next-FP4-Local-Strata. It includes mmproj, PLE, dense, token embd files. It is a split. It is not a single unified GGUF. The working path for this checkpoint remains the b12x container. ### One DGX Spark One Spark with GB10, 128 GB unified is enough. This lab ran the measured window on one box. Weights are 71.19 GiB. After load about 12 GiB of 121 GiB remains for OS at gpu-memory-utilization 0.85. N-gram table is paged from SSD. It is not in unified memory. Use the docker run above with --device nvidia.com/gpu=all. Bring up is about 5 minutes warm. First boot is about 8 minutes. ### Two DGX Sparks This lab did not use a second Spark. Community. tsarihan published a 2x Spark TP=2 NVFP4 vs FP8 sweep on NVIDIA forums [8](https://forums.developer.nvidia.com/t/qwen3-8-flash-next-nvfp4-on-2x-dgx-spark-recipe-benchmarks-and-the-patch-it-needs-to-load/382634). ### Desktop GPU (5090 and below) 32 GB card cannot serve this checkpoint. Weights alone are 71.19 GiB. That is larger than 32 GB VRAM. Million token KV needs still more. Practical floor is about 128 GB unified memory DGX Spark class. Multi GPU tensor parallel is an option. This lab did not run it. ![Hardware-fit: one Spark FIT, two Sparks not used, 5090 and below NO-FIT](/backend/uploads/9efb993e6f92b0882d530eed1d17b057.png) How this piece was created This guide was drafted by an agent and published by a person. --- title: "Harnessing: What Is It?" description: "The scaffolding that turns a text-predicting model into an agent that can act." canonical: "https://bitwidth.ai/guides/harnessing-what-it-is" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:54.563Z" --- Guide # Harnessing: What Is It? The scaffolding that turns a text-predicting model into an agent that can act. **Bitwidth.AI** Last updated Sep 12, 2026 · 4 min ![Harnessing — the loop around the model](/backend/uploads/53a2c88c317f9d36b788851a2313c8f0.png) ## TL;DR - The scaffolding that turns a text-predicting model into an agent that can act. - Earlier guides showed how to run a model. - But a model on its own can only read text and write text back — it has no memory between calls, cannot use tools, and stops after one reply. Earlier guides showed how to run a model. But a model on its own can only read text and write text back — it has no memory between calls, cannot use tools, and stops after one reply. To make it do things, you wrap it in software called a harness (also called scaffolding). This guide explains what a harness is and why it matters. ## Agent = model + harness A widely used shorthand captures the whole idea: an agent is a model plus a harness. [1](https://en.wikipedia.org/wiki/Agent_harness) The model supplies the reasoning; the harness supplies everything the model cannot do by itself — the loop, tools, memory, context management, and guardrails that turn raw text prediction into goal-directed action. [4](https://datanorth.ai/blog/harness-engineering-the-complete-guide-to-ai-agent-scaffolding) ![Figure 1 — The model reasons; the harness lets it act. Together they form an agent.](/backend/uploads/f24e2e89969cfa8fb5649b4b1f290b2e.png) Figure 1 — The model reasons; the harness lets it act. Together they form an agent. ## The core loop: reason, act, observe At the heart of every agent is a repeating cycle. The model reasons about what to do next; the harness acts by carrying out that decision (running a tool, executing code, calling an API); and the result is fed back so the model can observe and decide again. [2](https://www.databricks.com/blog/ai-harness) The loop continues until the task is finished. ![Figure 2 — The reason–act–observe loop is what lets an agent complete multi-step tasks.](/backend/uploads/6e48bce7d17e83c6591c8d1dd34d1223.png) Figure 2 — The reason–act–observe loop is what lets an agent complete multi-step tasks. ## What a harness provides Because a language model is stateless and only emits text, the harness fills every practical gap around it: - The loop. Runs the model repeatedly instead of stopping after one answer, with a turn limit to prevent runaway behaviour. - Tool dispatch. The model requests a tool; the harness actually executes it and returns the result — the model can only express intent, not act. [5](https://huggingface.co/blog/agent-glossary) - Memory. Stores information across steps and sessions so the agent has continuity a bare model lacks. - Context management. Decides what to put in the model's limited context window each turn, and compacts it as work grows. - Guardrails and a sandbox. Constrain what the agent is allowed to do and isolate risky actions — the subject of a later guide. ## Inner vs. outer harness It helps to distinguish two layers. An inner harness ships with a product — for example a coding agent like Claude Code or Codex, which its own documentation calls “the agentic harness around” the model. An outer harness is what you assemble on top: instruction files, MCP servers, and custom skills that tailor the agent to your work. [1](https://en.wikipedia.org/wiki/Agent_harness) The next guides in this series build exactly that outer layer. ## Why the harness matters more than you'd think The model weights stay fixed, yet much of the real-world improvement in agent performance over the last few years has come from better harnesses, not bigger models — sometimes a larger jump than swapping in a stronger model. [3](https://www.mindstudio.ai/blog/ai-agent-harnesses-explained) Two agents built on the same model can behave very differently depending on how their harness handles tools, memory, and failure. [5](https://huggingface.co/blog/agent-glossary) In short, reliability is won in the harness. ## Key takeaways - A harness (scaffolding) is the software around a model that turns it into an agent: agent = model + harness. [1](https://en.wikipedia.org/wiki/Agent_harness) - It runs a reason–act–observe loop and supplies tools, memory, context management, and guardrails. [2](https://www.databricks.com/blog/ai-harness) - An inner harness ships with a product; an outer harness is what you add — instruction files, MCP servers, skills. - Much of an agent's capability and reliability comes from the harness, not the model alone. [3](https://www.mindstudio.ai/blog/ai-agent-harnesses-explained) How this piece was created This guide was drafted by an agent and published by a person. --- title: "Setting Up Local AI on the NVIDIA DGX Spark" description: "A compact 128 GB “personal AI supercomputer” — what it does, when to use it, and how to set one up." canonical: "https://bitwidth.ai/guides/setting-up-local-ai-on-the-nvidia-dgx-spark" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-11-12T00:32:58.014Z" --- Guide # Setting Up Local AI on the NVIDIA DGX Spark A compact 128 GB “personal AI supercomputer” — what it does, when to use it, and how to set one up. **Bitwidth.AI** Last updated Nov 11, 2026 · 5 min ![NVIDIA DGX Spark — local AI on unified memory](/backend/uploads/2587eb1ab4e7c86a70f9ad4e414b969b.png) ## TL;DR - A compact 128 GB “personal AI supercomputer” — what it does, when to use it, and how to set one up. - The NVIDIA DGX Spark is a compact desktop “personal AI supercomputer” built around the GB10 Grace Blackwell Superchip. - Its defining feature is 128 GB of unified memory, which lets a single small box run models far larger than any consumer GPU can hold — up to about 200 billion parameters, locally. The NVIDIA DGX Spark is a compact desktop “personal AI supercomputer” built around the GB10 Grace Blackwell Superchip. Its defining feature is 128 GB of unified memory, which lets a single small box run models far larger than any consumer GPU can hold — up to about 200 billion parameters, locally. [1](https://www.nvidia.com/en-us/products/workstations/dgx-spark/) [3](https://www.intelligentliving.co/nvidia-dgx-spark-128gb-mini-supercomputer/) This guide covers what it is, when it makes sense, and how to set one up. ## Specifications at a glance Chip NVIDIA GB10 Grace Blackwell Superchip CPU 20-core Arm (10× Cortex-X925 + 10× Cortex-A725) GPU Blackwell, 6,144 CUDA cores, 5th-gen Tensor Cores Memory 128 GB unified LPDDR5x, ~273 GB/s bandwidth AI compute Up to 1 petaFLOP (FP4, sparse) Model capacity Up to ~200B parameters locally at 4-bit; ~405B with two units linked Storage 1–4 TB NVMe SSD OS & software DGX OS (Ubuntu 24.04-based), CUDA 13, NVIDIA AI stack preinstalled Networking ConnectX-7 (200 Gbps QSFP), Wi-Fi 7 Size & price 150 × 150 mm, 1.2 kg; ~$3,999–$4,699 (Sept 2026) Prices and availability vary by retailer and OEM (ASUS, Dell, HP, Lenovo, Acer ship equivalent GB10 systems). Verify before purchase. The NVIDIA DGX Spark is listed on [Amazon](https://www.amazon.com/dp/B0FWJ16CCH?tag=bitwidthlabs-20). ## What it's good at — and what it isn't The Spark trades speed for capacity. Its unified LPDDR5x memory has modest bandwidth (~273 GB/s) compared with a discrete GPU like the RTX 5090 (~1,792 GB/s), so a 5090 is several times faster on models that fit in its 32 GB. [5](https://ifactoryapp.com/sap-integration/on-prem-ai/nvidia-dgx-spark-review-enterprise) The Spark's advantage is that it can load models a 5090 simply cannot — and it is CUDA-native with NVIDIA's full software stack preinstalled. ![Figure 1 — 128 GB of unified memory comfortably holds models up to ~200B parameters at 4-bit.](/backend/uploads/7911d633932397b96ccdaefedd369a41.png) Figure 1 — 128 GB of unified memory comfortably holds models up to ~200B parameters at 4-bit. Note Think of the DGX Spark as a developer prototyping appliance: a CUDA-native, 128 GB sandbox for large models at low concurrency — not a high-throughput production inference server. ![Figure 2 — Two units linked over ConnectX networking extend capacity to models around 405B parameters.](/backend/uploads/952b4d928aaf5912d82499a59e114328.png) Figure 2 — Two units linked over ConnectX networking extend capacity to models around 405B parameters. ## Project — Set up your DGX Spark and run a large model - Connect it. Attach power and a network connection (Ethernet or Wi-Fi 7). For first-time setup, connect a monitor, keyboard, and mouse, or plan to complete setup headless over the network. - Complete first boot. DGX OS (an Ubuntu 24.04-based Linux) guides you through creating a user, joining the network, and applying initial updates. - Update the system. Open a terminal and bring everything current, then reboot: ``` sudo apt update && sudo apt full-upgrade -y sudo reboot ``` - Verify the GPU and CUDA. Confirm the Blackwell GPU and driver are visible, and that CUDA is present: nvidia-smi # shows the GB10 / Blackwell GPU and memory nvcc --version # confirms the CUDA toolkit (13.x) - Install a runtime. Ollama detects CUDA automatically, which is the quickest way to start: ``` curl -fsSL https://ollama.com/install.sh | sh ``` - Run a large model. With 128 GB available you can load models that need dozens of gigabytes. Start with a 70B model, then try larger: ``` ollama run llama3.1:70b # ~42 GB at 4-bit — fits with room to spare ``` - Optional — use NVIDIA's stack. For optimized or containerized workloads, NVIDIA's preloaded stack and NGC catalog provide ready-made containers and setup playbooks for inference and fine-tuning. Note Everything runs on-premises, which is the other reason teams choose it: inputs never leave the device — useful for sensitive code, records, or unreleased model weights. ## Is a DGX Spark right for you? - Good fit: prototyping with 70B–200B models locally, CUDA development, and privacy-sensitive work that must stay on-device. - Poor fit: maximum tokens/second on smaller models (a discrete GPU wins), or high-concurrency production serving. ## Key takeaways - The DGX Spark's 128 GB unified memory runs models up to ~200B locally — its main advantage over consumer GPUs. [3](https://www.intelligentliving.co/nvidia-dgx-spark-128gb-mini-supercomputer/) - It favours capacity over bandwidth, so it's ideal for large-model prototyping at low concurrency, not high-throughput serving. [5](https://ifactoryapp.com/sap-integration/on-prem-ai/nvidia-dgx-spark-review-enterprise) - Setup is standard Linux: update, verify with nvidia-smi, install a CUDA-aware runtime, and run. - Two units linked over ConnectX reach ~405B-parameter models — see the Level 3 cluster guide. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Harnessing: How It Works (with a Hermes Agent Project)" description: "Inside the agent loop — then build a working local harness with Hermes Agent." canonical: "https://bitwidth.ai/guides/harnessing-how-it-works-with-hermes-agent" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:54.813Z" --- Guide # Harnessing: How It Works (with a Hermes Agent Project) Inside the agent loop — then build a working local harness with Hermes Agent. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Harnessing with Hermes Agent](/backend/uploads/dda4575652f436523103bf62c229264d.png) ## TL;DR - Inside the agent loop — then build a working local harness with Hermes Agent. - The previous guide introduced the harness. - This one looks at how it actually runs, then walks you through setting up a real one — Hermes Agent, an open-source framework that works with the local model you set up earlier. The previous guide introduced the harness. This one looks at how it actually runs, then walks you through setting up a real one — Hermes Agent, an open-source framework that works with the local model you set up earlier. ## Inside the loop Each turn, the harness does the same four things: - Assemble the context. It builds the prompt the model will see this turn — the task, relevant memory, and the results of previous actions — while staying within the model's context window. [2](https://github.com/ai-boost/awesome-harness-engineering) - Let the model decide. The model responds with either a final answer or a request to use a tool, expressed in a structured format the harness can parse. - Dispatch the action. If a tool was requested, the harness runs it — a search, a file read, an API call — and captures the result. The model can only ask; the harness executes. [1](https://www.databricks.com/blog/ai-harness) - Observe and repeat. The result is added back into context and the loop runs again, until the model produces a final answer or a turn limit is reached. ![Figure 1 — One turn of the loop: assemble context, decide, run a tool, feed the result back.](/backend/uploads/72842ac64ecbda33ae33cf41284be151.png) Figure 1 — One turn of the loop: assemble context, decide, run a tool, feed the result back. Two supporting systems run alongside the loop. Memory persists useful information across turns and sessions, and context management compacts older material so the window doesn't overflow as work grows. [2](https://github.com/ai-boost/awesome-harness-engineering) Guardrails decide which actions are permitted. ## Meet Hermes Agent Hermes Agent is an open-source (MIT) agent framework from Nous Research that runs in your terminal and is provider-agnostic — it can drive a cloud model or a local one. It defaults to a local model served by LM Studio and keeps persistent memory across sessions. [3](https://github.com/NousResearch/hermes-agent) [4](https://github.com/network-tocoder/Hermes-Agent-Local-AI-Setup-Guide) Its behaviour is shaped by a plain-text persona file called SOUL.md, plus skills and tools you add. ![Figure 2 — Hermes is the harness: persona, skills, memory, and tools wrapped around a local model.](/backend/uploads/405082c215a37e8a3680c7ba2eca7754.png) Figure 2 — Hermes is the harness: persona, skills, memory, and tools wrapped around a local model. ## Project — Set up Hermes Agent with your local model Prerequisite This project builds on the LM Studio setup from “Setting Up Local AI on Your Home Computer.” Have LM Studio installed before you start. - Start LM Studio's local server. Load a capable instruction-tuned model, then enable the local server (default port 1234) so Hermes can reach it at http://localhost:1234. - Install Hermes Agent. Run the official install script in a terminal: ``` curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash ``` Windows On Windows, run Hermes inside WSL2 and enable “mirrored” networking so WSL can reach LM Studio on localhost:1234; otherwise WSL sits on its own isolated network and can't connect. - Point Hermes at your local model. In the Hermes config (created under ~/.hermes/), set the provider to LM Studio's OpenAI-compatible endpoint. Match the exact keys to your version's config template: ## ~/.hermes/config.yaml (representative — check your version's template) ``` provider: openai-compatible base_url: http://localhost:1234/v1 model: ``` - Give it a personality. Copy a SOUL.md preset (persona + operating rules) into place. Community presets exist for different roles: ``` cp templates/soul/engineer.md ~/.hermes/SOUL.md ``` - Add a skill or two. Skills are self-contained folders the agent can use. Copy the ones you want: ``` cp -r skills/recall ~/.hermes/skills/ ``` - Start a session and give it a task. Launch Hermes and type an instruction; watch it reason, call tools, and report back: ``` hermes ``` - Optional — verify the setup. A read-only check confirms Hermes is installed, SOUL.md loaded, and skills copied completely: ./scripts/verify_setup.sh Note Everything — model, memory, and tool calls — runs on your machine. Nothing is sent to a provider unless you deliberately configure a cloud model. ## What you've built You now have a working outer harness: a local model wrapped in a loop, a persona, memory, and skills. The next guides add two more pieces — MCP servers to connect it to your tools and data, and skills to package repeatable know-how. ## Key takeaways - Each turn the harness assembles context, lets the model decide, dispatches any tool call, and feeds the result back. [1](https://www.databricks.com/blog/ai-harness) - Memory, context management, and guardrails run alongside the loop. [2](https://github.com/ai-boost/awesome-harness-engineering) - Hermes Agent is an open-source, provider-agnostic harness that runs locally with LM Studio and is shaped by a SOUL.md persona. [3](https://github.com/NousResearch/hermes-agent) - Setup is: serve a local model, install Hermes, point it at localhost:1234, add a persona and skills, then run. How this piece was created This guide was drafted by an agent and published by a person. --- title: "RunPod: Renting Cloud GPU Compute" description: "Rent anything from an RTX 4090 to an H200 by the second — what it costs, and when to rent instead of buy." canonical: "https://bitwidth.ai/guides/runpod-renting-cloud-gpu-compute" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T12:57:53.536Z" --- Guide # RunPod: Renting Cloud GPU Compute Rent anything from an RTX 4090 to an H200 by the second — what it costs, and when to rent instead of buy. **Bitwidth.AI** Last updated Sep 12, 2026 · 4 min ![RunPod Pods stay on; Serverless scales to zero.](/backend/uploads/7f6f9a431d99f5da107100fec450d2ce.png) The image above is a RunPod referral link. bitwidth.ai gets RunPod credit if you sign up through it. ## TL;DR - Rent anything from an RTX 4090 to an H200 by the second — what it costs, and when to rent instead of buy. - Buying hardware isn't the only path. - RunPod is a GPU cloud that rents you anything from a consumer RTX 4090 to a data-center H200 by the second, so you can run a big job without owning the card. Buying hardware isn't the only path. RunPod is a GPU cloud that rents you anything from a consumer RTX 4090 to a data-center H200 by the second, so you can run a big job without owning the card. This guide explains its two products, what they cost, and when renting beats buying. Prices below are a September 2026 snapshot and change often — confirm live rates on RunPod's pricing page before budgeting. ## Two ways to rent: Pods and Serverless A Pod is a GPU you rent and keep running — you control the whole environment, ideal for training and long sessions. Serverless spins workers up on demand and scales to zero between requests, billing only for active compute — ideal for bursty inference. [2](https://www.layer3labs.io/guides/is-runpod-worth-it) ![Figure 1 — Pods are always-on rentals; Serverless scales to zero and bills only while running.](/backend/uploads/0f2a58a8ec252641b98d6b98a36dc042.png) Figure 1 — Pods are always-on rentals; Serverless scales to zero and bills only while running. Pods come in two tiers: Community Cloud (third-party hosts, cheapest, less predictable) and Secure Cloud (RunPod's own data centers, higher price, uptime guarantees). [5](https://www.spheron.network/blog/runpod-h100-pricing-2026/) ## What it costs GPU VRAM Secure Pod ($/hr) Serverless ($/active hr) RTX 4090 24 GB $0.69 ~$1.10 A100 80 GB $1.39 ~$2.72 H100 PCIe 80 GB $2.89 ~$4.55 H200 141 GB $4.39 ~$5.93 Community Cloud pods are cheaper still — e.g. an RTX 4090 at ~$0.34/hr and an H100 at ~$1.99/hr. Billing is per second. Network storage is ~$0.07/GB-month; there are no data ingress/egress fees, and a default spend cap of $80/hr applies. ![Figure 2 — Serverless costs more per active hour but charges nothing while idle.](/backend/uploads/3df643f700792b17286780c8e852926d.png) Figure 2 — Serverless costs more per active hour but charges nothing while idle. ## Worked examples - Fine-tune for an afternoon. Three hours on a Secure H100 ≈ 3 × $2.89 ≈ $8.70. - A weekend of experiments. ~20 active hours on a Community RTX 4090 ≈ 20 × $0.34 ≈ $6.80. - Always-on vs on-demand. Above ~370 active GPU-hours/month, a dedicated Pod is cheaper than Serverless; below that, Serverless wins because idle time is free. [3](https://markaicode.com/pricing/runpod-pricing/) ## Launching a pod — the basic workflow - [Create an account](https://runpod.io?ref=hk1z8ixv) and add credit. Load a small balance to start.Referral link: bitwidth.ai gets RunPod credit if you sign up through it. - Pick a tier and GPU. Choose Community or Secure Cloud, then a GPU sized to your model (don't default to an H100 if a 4090 fits). - Choose a template and deploy. Select a ready-made image (e.g. PyTorch or a vLLM template) and start the pod. - Connect. Use the web terminal, SSH, or a Jupyter link to reach the machine. - Run your job. Pull your model or code and train or serve as you would locally. - Terminate when done. Stop or delete the pod immediately — this is the single biggest cost lever. [3](https://markaicode.com/pricing/runpod-pricing/) Tip Billing is per second and there's no egress fee, but persistent volumes keep charging while idle. Terminate pods you're not using and right-size the GPU to the model. ## Rent or buy? - Rent when: you need a big GPU occasionally, want to train or fine-tune in bursts, or must run a model larger than your own hardware can hold. - Buy when: you use AI heavily every day (the flat cost of owning wins), or your data must never leave your premises — see the Level 1 pricing and Level 2 hardware guides. ## Key takeaways - RunPod rents GPUs by the second as Pods (persistent) or Serverless (scale-to-zero). [2](https://www.layer3labs.io/guides/is-runpod-worth-it) - Community Cloud is cheapest; Secure Cloud adds reliability; representative Secure rates run ~$0.69/hr (4090) to ~$4.39/hr (H200). [1](https://www.usagepricing.com/blueprint/runpod) - Serverless wins for bursty inference; a dedicated Pod wins above ~370 active hours/month. [3](https://markaicode.com/pricing/runpod-pricing/) - Terminate pods when idle and right-size the GPU — cost discipline matters more than the card you pick. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Skills: Teaching an Agent Once" description: "Reusable SKILL.md packages that give agents specialized capabilities — loaded only when needed." canonical: "https://bitwidth.ai/guides/skills-teaching-an-agent-once" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:55.347Z" --- Guide # Skills: Teaching an Agent Once Reusable SKILL.md packages that give agents specialized capabilities — loaded only when needed. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Skills — teaching an agent once](/backend/uploads/69d20471737dfba1cc2f3a09e580110b.png) ## TL;DR - Reusable SKILL.md packages that give agents specialized capabilities — loaded only when needed. - A skill is a reusable package of instructions that gives an agent a specialized capability on demand. - Skills follow an open format built around a single file, SKILL.md, and were introduced by Anthropic in late 2025. A skill is a reusable package of instructions that gives an agent a specialized capability on demand. Skills follow an open format built around a single file, SKILL.md, and were introduced by Anthropic in late 2025. [1](https://anthropic.skilljar.com/introduction-to-agent-skills) [3](https://dev.to/miaoshuyo/understanding-anthropic-agent-skills-from-skillmd-to-real-file-generation-31ck) Where the previous guide's MCP servers connect an agent to tools and data, skills teach an agent how to do a task well — captured once and reused. ## How skills work: progressive disclosure The clever part is how skills are loaded. Rather than stuffing every instruction into the context window, skills reveal themselves in three layers, a pattern called progressive disclosure: - Discovery. Only each skill's name and one-line description sit in the system prompt — roughly 80 tokens each — so an agent can hold many skills cheaply. [2](https://www.newsletter.swirlai.com/p/agent-skills-progressive-disclosure) - Activation. When the agent judges a skill relevant to the task, it loads the full SKILL.md instructions into context. - Execution. Only if the task needs more does it pull in supplementary files — scripts, references, assets. [5](https://docs.sim.ai/agents/skills) ![Figure 1 — Skills load in layers, so the context window stays lean no matter how many are installed.](/backend/uploads/6a26ed9c28d882eb22d927c18a792381.png) Figure 1 — Skills load in layers, so the context window stays lean no matter how many are installed. ## Anatomy of a skill A skill is a folder whose entry point is a Markdown file with a small YAML header: ``` --- name: pdf-filler description: Fills PDF forms from a data file. Use when a user ``` provides a PDF form and values to enter. ``` --- ``` ## Instructions 1. Read the form's fields. 2. Map the provided values to those fields. 3. Write the completed PDF to the output folder. A minimal SKILL.md — plain-English instructions with a name and a triggering description. ![Figure 2 — The frontmatter is always visible for discovery; the body and extra files load on demand.](/backend/uploads/d12b892fb184d62de5ad8de335b36cb2.png) Figure 2 — The frontmatter is always visible for discovery; the body and extra files load on demand. The description matters most: it is what the agent matches against to decide whether to activate the skill, so it should state plainly what the skill does and when to use it. [1](https://anthropic.skilljar.com/introduction-to-agent-skills) Skills can also bundle scripts that run without consuming context, and can restrict which tools they're allowed to use. ## Why skills help - Leaner context, better results. Loading only what's needed keeps the window focused; measured setups report meaningful token savings and accuracy gains versus one giant prompt. [3](https://dev.to/miaoshuyo/understanding-anthropic-agent-skills-from-skillmd-to-real-file-generation-31ck) - Written in plain English. A domain expert can read, edit, or create a skill without coding — or have an AI draft one with a skill-creator. [2](https://www.newsletter.swirlai.com/p/agent-skills-progressive-disclosure) - Reusable and shareable. Version a skill like any file, commit it to a repository, or distribute it across a team or organization. [1](https://anthropic.skilljar.com/introduction-to-agent-skills) ## Skills, MCP, and memory — how they differ - MCP servers connect the agent to tools and data (what it can reach). - Skills package know-how for a task (how to do it well). - Memory persists facts and context across sessions (what it remembers). They compose: a skill might instruct the agent to call an MCP tool and record the result in memory. ## Getting started Coding agents like Claude Code and Cursor already support skills, and the local Hermes setup from the harness guide reads skills from a folder. To make your own, write a short SKILL.md with a clear description, drop it in the skills directory, and let the agent discover it. [1](https://anthropic.skilljar.com/introduction-to-agent-skills) ## Key takeaways - A skill is a reusable SKILL.md package that gives an agent a specialized capability on demand. [1](https://anthropic.skilljar.com/introduction-to-agent-skills) - Progressive disclosure loads skills in three layers (discovery → activation → execution) to keep context lean. [2](https://www.newsletter.swirlai.com/p/agent-skills-progressive-disclosure) - A strong description is what makes a skill trigger reliably. - Skills package know-how; MCP connects tools; memory persists facts — and they work together. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Guardrails, and Why They Matter" description: "The runtime controls that keep a capable agent safe — governing what it can do, not just what it says." canonical: "https://bitwidth.ai/guides/guardrails-and-why-they-matter" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:55.542Z" --- Guide # Guardrails, and Why They Matter The runtime controls that keep a capable agent safe — governing what it can do, not just what it says. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Guardrails — runtime controls that matter](/backend/uploads/063818b06287c7f07706212405986975.png) ## TL;DR - The runtime controls that keep a capable agent safe — governing what it can do, not just what it says. - The earlier guides gave an agent real power: tools, data access, and the ability to act in a loop. - That power is exactly why guardrails matter. The earlier guides gave an agent real power: tools, data access, and the ability to act in a loop. That power is exactly why guardrails matter. Guardrails are the runtime controls that decide what an agent is actually allowed to do — they can allow, reject, modify, pause, or escalate an action based on set conditions. [1](https://www.softude.com/blog/ai-agent-guardrails) They govern an agent's authority, not just its words. ## Why they're important An agent that can read your files and call APIs can also leak data, reach beyond its scope, or take an irreversible action if it's tricked or misconfigured. [2](https://www.sweet.security/agent-security/guardrails-for-ai-agents) The defining threat is prompt injection: an attacker plants instructions inside content the agent will process — a web page, an email, a document — to redirect it toward actions it was never asked to take. It is the number-one vulnerability in deployed LLM systems on the OWASP Top 10. [5](https://www.mend.io/blog/deploying-gen-ai-guardrails-for-compliance-security-and-trust/) A key principle follows: content the agent reads is data, not commands. ## The five kinds of guardrail ![Figure 1 — Effective systems combine several guardrail types rather than relying on any one.](/backend/uploads/fe3642da31988079e4ded1c7138c77f4.png) Figure 1 — Effective systems combine several guardrail types rather than relying on any one. - Input guardrails inspect prompts and retrieved data to catch injection and jailbreak attempts before the model acts on them. [2](https://www.sweet.security/agent-security/guardrails-for-ai-agents) - Output guardrails scan responses to prevent data leaks, exposure of secrets or PII, and off-policy content. - Tool and permission controls enforce allowlists, least-privilege scopes, and per-parameter validation — a tool that was never registered simply can't be called, whatever the prompt says. [4](https://vercel.com/i/five-ai-agent-guardrails-production) - Human-in-the-loop approval requires explicit sign-off for high-impact or irreversible actions, applied only where it earns its cost. [1](https://www.softude.com/blog/ai-agent-guardrails) - Runtime limits cap loops, spending, and tool calls to contain runaway behaviour — enforced before the next model call, not reported after. ## Layer them along the whole path No single control is enough. Guardrails are enforced at several points: wherever untrusted content enters the context, before each tool call, at each step boundary, and after the final response. [4](https://vercel.com/i/five-ai-agent-guardrails-production) An injected instruction that slips past the input filter can still be stopped later when it tries to trigger an unauthorized tool call — which is exactly why the controls are layered. ![Figure 2 — Checks sit at every stage; a threat that evades one layer can be caught by the next.](/backend/uploads/e0e44b9bb33edc37ff8d2342cde15ffe.png) Figure 2 — Checks sit at every stage; a threat that evades one layer can be caught by the next. ## Principles that hold up in production - Least privilege. Give the agent only the tools and access it needs, scoped to the task. - Authorize per action. Decide access at the moment of each tool call using identity and context, not static settings trusted up front. [2](https://www.sweet.security/agent-security/guardrails-for-ai-agents) - Gate the irreversible. Require human approval for actions that can't be undone. - Watch MCP connections. Because agents reach tools through MCP, the servers you connect are part of the control surface — trust and scope them carefully. [5](https://www.mend.io/blog/deploying-gen-ai-guardrails-for-compliance-security-and-trust/) - Monitor and audit. Log actions and test against failure cases (injection, invalid parameters, runaway loops) after every significant change. [1](https://www.softude.com/blog/ai-agent-guardrails) ## An important limit Guardrails cannot guarantee correct reasoning; they contain the consequences of incorrect decisions by limiting permissions, validating actions, and requiring approval. [1](https://www.softude.com/blog/ai-agent-guardrails) And while frontier models include their own safety training, that never removes your responsibility for the wrapper around them — the tools, permissions, and data the agent can reach. [5](https://www.mend.io/blog/deploying-gen-ai-guardrails-for-compliance-security-and-trust/) Open-source layers such as LLM Guard, NeMo Guardrails, and Guardrails AI can help implement these checks. ## Key takeaways - Guardrails constrain what an agent can do at runtime — allow, reject, modify, pause, or escalate — not just what it says. [1](https://www.softude.com/blog/ai-agent-guardrails) - Prompt injection is the top threat; treat all content the agent reads as data, not instructions. [5](https://www.mend.io/blog/deploying-gen-ai-guardrails-for-compliance-security-and-trust/) - Combine input, output, tool-permission, human-approval, and runtime-limit guardrails, layered along the request path. [4](https://vercel.com/i/five-ai-agent-guardrails-production) - Least privilege and per-action authorization do the heavy lifting; guardrails contain bad decisions but don't prevent them. How this piece was created This guide was drafted by an agent and published by a person. --- title: "AI Inferencing: What Happens When You Hit “Send”" description: "How a trained model turns your prompt into an answer — and what makes it fast or slow." canonical: "https://bitwidth.ai/guides/ai-inferencing-what-happens-when-you-hit-send" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:53.298Z" --- Guide # AI Inferencing: What Happens When You Hit “Send” How a trained model turns your prompt into an answer — and what makes it fast or slow. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![AI inferencing — from prompt to tokens](/backend/uploads/5b314741359b82de1cf587f698ca697a.png) ## TL;DR - How a trained model turns your prompt into an answer — and what makes it fast or slow. - When you type a question into an AI assistant and it writes back, that live process is called inference. - It is different from training, the one-time process of building the model. When you type a question into an AI assistant and it writes back, that live process is called inference. It is different from training, the one-time process of building the model. This guide explains what happens the moment you hit send — and what makes an answer feel fast, slow, or expensive. ## Training vs. inference: two very different jobs Training is how a model learns: it repeatedly guesses the next token, checks the guess against real text using a loss function, and nudges its internal parameters to do better — over millions of examples. [1](https://www.ibm.com/think/topics/large-language-models) It is done once, on large hardware, and is very costly. Inference is what happens afterward, every time someone uses the model. The parameters are now fixed; no learning takes place. The model simply takes your prompt and produces output tokens. ![Figure 1 — Training builds the model once; inference runs the finished model every time you use it.](/backend/uploads/14fad71430206ef854b5ed1c6d1467e0.png) Figure 1 — Training builds the model once; inference runs the finished model every time you use it. ## What happens when you send a prompt Inference runs in two phases with very different characteristics. - Prefill. The model reads your entire prompt at once and processes it in parallel to produce the very first output token. How long this takes is called Time to First Token (TTFT) — the wait before anything appears on screen. [4](https://redis.io/blog/prefill-vs-decode/) - Decode. The model then generates the rest of the answer one token at a time, each new token depending on all the previous ones. The gap between tokens is the Time Per Output Token (TPOT); it is what you see as text streaming out. [4](https://redis.io/blog/prefill-vs-decode/) ![Figure 2 — Prefill produces the first token; decode streams the rest sequentially.](/backend/uploads/1eb55c31be5cf1705019426815ab3834.png) Figure 2 — Prefill produces the first token; decode streams the rest sequentially. Because prefill handles many input tokens together but decode must run step by step, decode is the slower, sequential bottleneck. [2](https://sebastianraschka.com/faq/docs/next-token-prediction.html) This split also explains a billing detail you will see later in this series: providers charge much less for input (prefill) tokens than for output (decode) tokens. [3](https://huggingface.co/blog/tngtech/llm-performance-prefill-decode-concurrent-requests) ## Latency vs. throughput Two words describe inference performance. Latency is how quickly one user gets a result. Throughput is how much total work the system handles across many users at once. [3](https://huggingface.co/blog/tngtech/llm-performance-prefill-decode-concurrent-requests) They pull against each other: grouping many requests together (batching) raises throughput and lowers cost per user, but can add a little waiting for any single request. ## What makes inference fast, slow, or costly ![Figure 3 — The main levers that determine how fast and how expensive an answer is.](/backend/uploads/3b3c59498e80435d5dbe7ed36474b4fd.png) Figure 3 — The main levers that determine how fast and how expensive an answer is. A few factors dominate. Larger models (more parameters) are smarter but slower and pricier to run. Longer prompts make prefill take longer. Faster hardware (a capable GPU) produces tokens more quickly. Serving many requests together (batching) improves efficiency. And quantization — storing the model's numbers at lower precision — shrinks memory use and speeds things up, at a small accuracy cost. These trade-offs return throughout this series. ## Where inference runs The same model can be served in different places: a cloud provider's API, a company's own servers, or even your own computer. Each choice changes speed, cost, privacy, and control — the subjects of the next two guides in this series. ## Key takeaways - Inference is running a finished model to answer a prompt; training is the separate, one-time process of building it. - Answering has two phases: prefill (produces the first token, measured by TTFT) and decode (streams the rest, measured by TPOT). [4](https://redis.io/blog/prefill-vs-decode/) - Decode is the slow, sequential part — which is why output tokens cost more than input tokens. [3](https://huggingface.co/blog/tngtech/llm-performance-prefill-decode-concurrent-requests) - Model size, prompt length, hardware, batching, and quantization are the biggest levers on speed and cost. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Local AI Lab: Multi-DGX and Mac Clusters" description: "Linking nodes into a cluster for frontier-scale models — following NVIDIA's runbooks, plus the Mac path." canonical: "https://bitwidth.ai/guides/local-ai-lab-multi-dgx-and-mac-clusters" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-11-12T00:32:58.314Z" --- Guide # Local AI Lab: Multi-DGX and Mac Clusters Linking nodes into a cluster for frontier-scale models — following NVIDIA's runbooks, plus the Mac path. **Bitwidth.AI** Last updated Nov 11, 2026 · 5 min ![Multi-DGX and Mac clusters](/backend/uploads/8c9e4e10f53a86f00b7331f9f86a9e84.png) ## TL;DR - Linking nodes into a cluster for frontier-scale models — following NVIDIA's runbooks, plus the Mac path. - A single DGX Spark holds models up to ~200B parameters. - To go further — a 405B model that needs ~200 GB, or distributed training — you link nodes into a cluster. A single DGX Spark holds models up to ~200B parameters. To go further — a 405B model that needs ~200 GB, or distributed training — you link nodes into a cluster. NVIDIA publishes official step-by-step playbooks for exactly this, and this guide follows them to build a two-node cluster. [1](https://github.com/NVIDIA/dgx-spark-playbooks) This lab uses two NVIDIA DGX Spark units. The [NVIDIA DGX Spark](https://www.amazon.com/dp/B0FWJ16CCH?tag=bitwidthlabs-20) is listed on Amazon. ## Why cluster Two reasons. First, capacity: a model larger than one node's 128 GB is sharded across nodes. Second, distributed training: splitting a training job across nodes shortens it — community benchmarks report ~1.87× speedup on two nodes at ~93.5% scaling efficiency. [5](https://github.com/ArgentAIOS/dgx-spark-cluster) ![Figure 1 — A 405B model is split across two Sparks, joined by a 200 Gb/s link.](/backend/uploads/20e78447cec53a51f769af54747cf962.png) Figure 1 — A 405B model is split across two Sparks, joined by a 200 Gb/s link. ## The topologies NVIDIA supports NVIDIA's playbooks cover several layouts: two nodes connected directly, three nodes in a ring, and four or more nodes through a switch. [1](https://github.com/NVIDIA/dgx-spark-playbooks) Two-node direct is the simplest and needs no switch at all. ![Figure 2 — Cluster topologies from the NVIDIA DGX Spark playbooks.](/backend/uploads/54a6005cf8dbad2bf92dddf82586de5d.png) Figure 2 — Cluster topologies from the NVIDIA DGX Spark playbooks. ## Project — Build a two-node DGX Spark cluster Prerequisite This project follows NVIDIA's official “Connect Two Sparks” and multi-node vLLM playbooks. Have both Sparks on the same, up-to-date DGX OS image. - Cable the two units. Connect a single 200G QSFP56 passive DAC cable (e.g. Amphenol NJAAKK0006, 0.5 m) between the ConnectX-7 ports — the same port number on both units, or the link won't come up. No switch is needed for two nodes. [3](https://docs.nvidia.com/dgx/dgx-spark/spark-clustering.html) - Update firmware and drivers. Bring the ConnectX-7 / mlx5 firmware and the dgx-spark-mlnx-hotplug package current on both nodes before configuring the link. [3](https://docs.nvidia.com/dgx/dgx-spark/spark-clustering.html) - Configure the cluster network. Apply NVIDIA's netplan file for the CX-7 interface on both nodes (or assign static IPs manually): ``` sudo wget -O /etc/netplan/40-cx7.yaml \ https://github.com/NVIDIA/dgx-spark-playbooks/raw/main/nvidia/connect-two-sparks/assets/cx7-netplan.yaml sudo chmod 600 /etc/netplan/40-cx7.yaml sudo netplan apply ``` - Set up passwordless SSH. Exchange SSH keys so the head node can reach the worker without a password — required for distributed launches. - Serve a large model — option A: EXO. EXO shards a model across both nodes automatically and exposes an OpenAI-compatible API. Run it on both nodes: ## On BOTH nodes ``` cd /opt/exo && uv run exo ``` ## Then query the cluster from anywhere on the network ``` curl http://:52415/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{"model":"llama-3.1-405b-4bit","messages":[{"role":"user","content":"Hello"}]}' ``` - Serve a large model — option B: vLLM Ray cluster. For production-style serving, NVIDIA's “Stacked Sparks” playbook starts a Ray cluster from an NGC container and runs vLLM across both nodes with tensor/pipeline parallelism: ## On both nodes: pull the NGC vLLM image ``` docker pull nvcr.io/nvidia/vllm:25.11-py3 ``` ## Download NVIDIA's Ray cluster launcher, then start head (node 1) / worker (node 2) ``` wget https://raw.githubusercontent.com/vllm-project/vllm/refs/heads/main/examples/ray_serving/run_cluster.sh chmod +x run_cluster.sh ``` Follow the playbook for the exact head/worker arguments and the vLLM serve command with tensor- and pipeline-parallel sizes. How it works Under the hood, multi-node work uses MPI for CPU coordination and NCCL (tuned for Grace Blackwell) for GPU-to-GPU collectives across the 200 Gb/s link. ## The Mac alternative Apple Silicon Macs can also be clustered. Tools like EXO pool several Macs' unified memory over Thunderbolt or Ethernet, using the MLX runtime, to run a model larger than any one machine — the same sharding idea without CUDA. It's a flexible, heterogeneous option, though bandwidth between machines is lower than a Spark's dedicated 200 Gb/s fabric. ## Scaling beyond two nodes The same playbooks extend to a three-node ring (efficient for the all-reduce operations in distributed training) and to four or more nodes through a switch, configured with NVIDIA's spark_cluster_setup script. [1](https://github.com/NVIDIA/dgx-spark-playbooks) [3](https://docs.nvidia.com/dgx/dgx-spark/spark-clustering.html) ## Key takeaways - Cluster nodes to exceed one node's memory (e.g. 405B across two Sparks) or to speed up training. [5](https://github.com/ArgentAIOS/dgx-spark-cluster) - Two Sparks link directly with one 200G QSFP DAC cable — no switch — following NVIDIA's official playbooks. [2](https://build.nvidia.com/spark/connect-two-sparks) - Serve big models with EXO (simple, auto-sharding) or a vLLM Ray cluster (production); NCCL handles GPU collectives. [4](https://build.nvidia.com/rtx/vllm/stacked-sparks) - Apple Silicon Macs can be clustered with EXO/MLX over Thunderbolt as a CUDA-free alternative. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Large Language Models: What Are They and How Do They Work?" description: "A plain-language introduction to the technology behind modern AI chat assistants." canonical: "https://bitwidth.ai/guides/large-language-models-what-they-are-and-how-they-work" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:53.034Z" --- Guide # Large Language Models: What Are They and How Do They Work? A plain-language introduction to the technology behind modern AI chat assistants. **Bitwidth.AI** Last updated Sep 12, 2026 · 6 min ![Large language models — next-token prediction and transformers](/backend/uploads/8f56b85b422810de632ad6b8d66380ff.png) ## TL;DR - A plain-language introduction to the technology behind modern AI chat assistants. - Large language models (LLMs) are the engines behind tools like ChatGPT, Claude, and Gemini. - In plain terms, an LLM is a deep-learning model trained on enormous amounts of text so that it can understand and generate natural language and other content across a wide range of tasks. Large language models (LLMs) are the engines behind tools like ChatGPT, Claude, and Gemini. In plain terms, an LLM is a deep-learning model trained on enormous amounts of text so that it can understand and generate natural language and other content across a wide range of tasks. [1](https://www.ibm.com/think/topics/large-language-models) This guide explains what they are, how they turn your words into an answer, and why they occasionally get things wrong — no math required. ## The one-sentence version An LLM is a very sophisticated next-word predictor. Given some text, it estimates the probability of every possible next piece of text and picks a likely one — then repeats. [3](https://sebastianraschka.com/faq/docs/next-token-prediction.html) Everything else is scale and refinement layered on top of that single idea. ![Figure 1 — For each step, the model produces a probability for every candidate next word.](/backend/uploads/d433219bcfab368ffb4c5b057cdd8c49.png) Figure 1 — For each step, the model produces a probability for every candidate next word. ## What “large” and “language model” actually mean A language model is any system that assigns probabilities to sequences of words. The “large” refers to two things: the vast text corpora these models train on, and the huge number of internal settings — called parameters — that they learn. [5](https://www.britannica.com/topic/large-language-model) A parameter is simply a numerical value (a weight) the model adjusts during training to control how it processes input and makes predictions; modern LLMs can hold billions or even trillions of them. [4](https://www.ibm.com/think/topics/llm-parameters) More parameters and more data generally let a model capture more nuanced patterns. ![Figure 2 — “Large” has grown by orders of magnitude. Parameter counts are approximate and illustrative.](/backend/uploads/5456f989f5847ceea26da62dfb5b6ac1.png) Figure 2 — “Large” has grown by orders of magnitude. Parameter counts are approximate and illustrative. ## How they work: tokens, embeddings, and attention When you send a prompt, the model does not read letters or words the way people do. It works in four broad stages: - Tokenize. Your text is split into small pieces called tokens — whole words, parts of words, or punctuation. - Embed. Each token is converted into a list of numbers (a vector) that captures aspects of its meaning and role. - Process with a transformer. The numbers pass through a neural-network architecture called a transformer, introduced in 2017. Its key mechanism, self-attention, lets the model weigh how strongly every token relates to every other token, so it can use context efficiently. [2](https://arxiv.org/abs/1706.03762) - Predict the next token. The model outputs a probability for each possible next token, selects one, appends it to the text, and runs the loop again to produce the following token. ![Figure 3 — Text is generated one token at a time; each new token feeds back in to produce the next.](/backend/uploads/d2feaf8cd3596212ac108e124bed059c.png) Figure 3 — Text is generated one token at a time; each new token feeds back in to produce the next. Because attention compares all tokens in parallel rather than reading strictly left to right, transformers can be trained on very large datasets far more efficiently than the older approaches they replaced. [1](https://www.ibm.com/think/topics/large-language-models) ## How an LLM learns Training is mostly self-supervised: the text itself provides the answers. The model is shown a passage with the next token hidden, it guesses, and a loss function measures how far off the guess was. That error is used to nudge the parameters in a better direction, and the process repeats across millions of examples. [3](https://sebastianraschka.com/faq/docs/next-token-prediction.html) No human has to label the data, which is what makes training at internet scale possible. After this broad pretraining, models are usually fine-tuned on smaller, higher-quality datasets to specialize their behaviour, tone, and safety — for example, learning to follow instructions helpfully. [5](https://www.britannica.com/topic/large-language-model) ## Why they seem smart — and why they still make mistakes By predicting the next token across huge amounts of text, a model implicitly picks up grammar, facts, writing styles, and reasoning-like patterns. [3](https://sebastianraschka.com/faq/docs/next-token-prediction.html) That is why one system can draft an email, summarize a report, and explain code. But the same mechanism has limits. An LLM optimizes for text that is plausible, not text that is verified true. When it lacks the right information, it can produce confident but incorrect statements — commonly called hallucinations. It can also reflect biases present in its training data. [5](https://www.britannica.com/topic/large-language-model) Treat outputs as a capable draft to check, not a source of guaranteed fact. ## Key takeaways - An LLM is a deep-learning model that predicts the most likely next token, over and over, to generate text. [1](https://www.ibm.com/think/topics/large-language-models) - “Large” refers to the scale of training data and the billions–trillions of learned parameters. [4](https://www.ibm.com/think/topics/llm-parameters) - The transformer architecture and its self-attention mechanism are what make modern LLMs work. - Training is self-supervised, then refined with fine-tuning. - Outputs are optimized to be plausible, so always verify important facts. How this piece was created This guide was drafted by an agent and published by a person. --- title: "MCP Servers: What They Are and How They Help" description: "The open standard that connects your agent to tools and data — build once, reuse everywhere." canonical: "https://bitwidth.ai/guides/mcp-servers-what-they-are-and-how-they-help" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:55.100Z" --- Guide # MCP Servers: What They Are and How They Help The open standard that connects your agent to tools and data — build once, reuse everywhere. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![MCP servers — one standard for tools and data](/backend/uploads/235e992384d3510b9a3b8f1f368870f7.png) ## TL;DR - The open standard that connects your agent to tools and data — build once, reuse everywhere. - The harness guides showed that an agent's power comes from the tools and data it can reach. - The Model Context Protocol (MCP) is the open standard that makes those connections consistent. The harness guides showed that an agent's power comes from the tools and data it can reach. The Model Context Protocol (MCP) is the open standard that makes those connections consistent. It was introduced by Anthropic in November 2024 and later placed under independent governance (the Agentic AI Foundation). [1](https://www.ibm.com/think/topics/model-context-protocol) [5](https://datanorth.ai/blog/harness-engineering-the-complete-guide-to-ai-agent-scaffolding) This guide explains what it is, how it works, and why it helps you. ## The problem MCP solves Before MCP, every pairing of an AI app with an external system needed its own custom integration. With N apps and M tools, that's N×M pieces of bespoke glue to build and maintain. MCP replaces that with a single standard interface: build a connector once, and any MCP-capable app can use it. [2](https://www.descope.com/learn/post/mcp) ![Figure 1 — MCP turns a tangle of custom integrations into one reusable standard (often likened to “USB-C for AI”).](/backend/uploads/d9658a8ef63b5c9ded70e9c35c567c41.png) Figure 1 — MCP turns a tangle of custom integrations into one reusable standard (often likened to “USB-C for AI”). ## How it works: host, client, server MCP uses a client–server architecture with three roles: - Host. The application you interact with — Claude Desktop, an IDE like Cursor, or your own agent. [3](https://www.philschmid.de/mcp-introduction) - Client. Lives inside the host and manages a one-to-one connection to a single server; a host creates one client per server it connects to. [2](https://www.descope.com/learn/post/mcp) - Server. An external program that exposes capabilities to the model through the standard protocol. ![Figure 2 — A host runs one client per server; each server exposes tools, resources, and prompts.](/backend/uploads/100ff51da7be2ff2e6396d6ebbc4d288.png) Figure 2 — A host runs one client per server; each server exposes tools, resources, and prompts. ## What a server exposes Every MCP server can offer three kinds of capability: - Tools (model-controlled). Actions the model can call to do something — query an API, run a search, write a file. This is function-calling, standardized. [3](https://www.philschmid.de/mcp-introduction) - Resources (application-controlled). Read-only data the model can reference by address, such as files, documents, or database rows — like GET endpoints, without side effects. - Prompts (user-controlled). Predefined templates that package a common task so it runs the same way each time. ## A request, step by step - Connect. The host's client connects to a configured MCP server. - Discover. The client asks the server what tools, resources, and prompts it offers, and gets back a described list. [2](https://www.descope.com/learn/post/mcp) - Invoke. When the model decides it needs a capability, the client sends a structured (JSON-RPC) request to the server. - Execute & return. The server performs the work — e.g. calling a calendar API — and returns the result. - Integrate. The host adds the result to the model's context so it can answer with fresh, real data. [4](https://www.databricks.com/blog/what-is-model-context-protocol) Servers can run locally and talk over standard input/output (stdio), or run remotely over streaming HTTP — so the same protocol covers a script on your laptop and a service across the internet. [3](https://www.philschmid.de/mcp-introduction) ## How MCP helps you - Connect your agent to your world: files, notes (e.g. an Obsidian vault), databases, and SaaS APIs through ready-made or custom servers. - Reuse across apps: one server works with any MCP-capable host, so effort isn't locked to a single tool. [2](https://www.descope.com/learn/post/mcp) - Grow a local setup safely: add capabilities to a local agent without hard-coding integrations, keeping clear boundaries between components. [4](https://www.databricks.com/blog/what-is-model-context-protocol) ## A word on safety Because servers can take real actions and reach real data, they must be treated with care — trust the servers you connect, limit their permissions, and confirm consequential actions. That is exactly what the next guide, on guardrails, addresses. ## Key takeaways - MCP is an open standard (Anthropic, Nov 2024) for connecting AI apps to external tools and data. [1](https://www.ibm.com/think/topics/model-context-protocol) [5](https://datanorth.ai/blog/harness-engineering-the-complete-guide-to-ai-agent-scaffolding) - It uses host → client → server, with each client holding a 1:1 connection to one server. [2](https://www.descope.com/learn/post/mcp) - Servers expose tools (actions), resources (data), and prompts (templates) over JSON-RPC, via stdio or HTTP. [3](https://www.philschmid.de/mcp-introduction) - Build a connector once and reuse it everywhere — and mind permissions, since servers can act for real. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Containerization & Cloud Hosting for AI Workflows" description: "Package a model once with Docker, then run it reliably anywhere — from a laptop to Kubernetes." canonical: "https://bitwidth.ai/guides/containerization-and-cloud-hosting-for-ai-workflows" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:56.265Z" --- Guide # Containerization & Cloud Hosting for AI Workflows Package a model once with Docker, then run it reliably anywhere — from a laptop to Kubernetes. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Containerization for AI workflows](/backend/uploads/6db82a63e90bcd4fa9475ca016adc537.png) ## TL;DR - Package a model once with Docker, then run it reliably anywhere — from a laptop to Kubernetes. - A model that runs on your machine still has to run reliably somewhere else — a server, a teammate's box, a cloud GPU. - Containers package a model and everything it needs into one portable unit, and cloud hosting runs that unit at scale. A model that runs on your machine still has to run reliably somewhere else — a server, a teammate's box, a cloud GPU. Containers package a model and everything it needs into one portable unit, and cloud hosting runs that unit at scale. This guide covers both. ## Why containerize AI workflows A container bundles the model, the CUDA libraries, and every dependency into a single image. That solves the problems that make AI setups fragile: - Consistency. The same image runs identically across development, staging, and production — no “works on my machine.” [1](https://inference.net/content/vllm-docker-deployment/) - Dependency isolation. CUDA, Python, and system libraries are bundled together, ending version conflicts. - Reproducibility. Pin an image tag and the deployment stays identical over time. - Orchestration-ready. Containers integrate natively with Kubernetes and Docker Compose, with fine-grained CPU/GPU allocation. ![Figure 1 — One image, built once, runs the same on a laptop, a server, or a rented cloud GPU.](/backend/uploads/714d04906a36f35293a67d05fd3f77e7.png) Figure 1 — One image, built once, runs the same on a laptop, a server, or a rented cloud GPU. ## The GPU piece: NVIDIA Container Toolkit For a container to use the GPU, the host needs the NVIDIA Container Toolkit, which exposes the GPU to Docker via the --gpus flag. [3](https://www.sitepoint.com/vllm-production-deployment-guide-2026/) With it in place, the whole serving stack is a clean set of layers: ![Figure 2 — The container holds the server and model; the toolkit connects it to the host GPU.](/backend/uploads/97ebf235289e4d7bee52e96f9f6e0cec.png) Figure 2 — The container holds the server and model; the toolkit connects it to the host GPU. ## Containerizing a model server vLLM publishes an official image, vllm/vllm-openai, that serves an OpenAI-compatible API. Starting it is one command: ``` docker run --rm --gpus all --ipc=host -p 8000:8000 \ -v ~/models:/model \ vllm/vllm-openai:latest --model /model ``` ## OpenAI-compatible API now at http://localhost:8000/v1 --gpus all grants GPU access; --ipc=host is needed for vLLM's shared memory; -v mounts your model. Note Ollama also ships a container image, and Docker Model Runner (docker model pull/run) offers a Docker-native local workflow. vLLM is the choice when you need production throughput. ## Managing complexity with Compose As flags multiply, move the configuration into a Docker Compose file so the setup is version-controlled and repeatable: ``` services: vllm: image: vllm/vllm-openai:latest ports: ["8000:8000"] ipc: host command: --model meta-llama/Llama-3.1-8B-Instruct deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: [gpu] ``` docker compose up starts the same service every time; add Prometheus and Grafana for monitoring. ## Scaling with Kubernetes For production traffic, Kubernetes runs containers across many machines with autoscaling and GPU device plugins. vLLM's stateless, container-friendly design fits this well; the main gotcha is setting generous startup/health-probe timeouts because loading a large model takes time. [3](https://www.sitepoint.com/vllm-production-deployment-guide-2026/) Smaller teams often stop at Compose on a single GPU host — Kubernetes earns its complexity only at scale. ## Cloud hosting options - Rented GPU clouds. Run your container on a RunPod pod or similar (see the previous guide) — full control, pay by the hour. - Managed model microservices. NVIDIA NIM and NGC containers provide pre-optimized, ready-to-deploy model services. - Serverless containers & hyperscalers. Scale-to-zero container platforms and the big clouds (AWS, GCP, Azure) run the same image with managed autoscaling. ## A minimal path to production - Install the NVIDIA Container Toolkit on the GPU host. - Pull or build your image (start from vllm/vllm-openai; pin the tag). - Run it locally with --gpus all and confirm the API responds. - Move the config into Compose and add monitoring. - Deploy the same image to the cloud or Kubernetes when you need scale. ## Key takeaways - Containers make AI workflows consistent, isolated, reproducible, and ready to orchestrate. [1](https://inference.net/content/vllm-docker-deployment/) - The NVIDIA Container Toolkit (--gpus all) gives containers GPU access; vllm/vllm-openai serves an OpenAI API in one command. [2](https://docs.vllm.ai/en/stable/deployment/docker/) - Use Docker Compose for single-host setups; Kubernetes for scaled production (mind model-load probe timeouts). - The same image runs on your machine, a rented GPU, or a managed cloud service — that portability is the whole point. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Fine-Tuning & Training Models with Unsloth" description: "Adapt an open model to your own data on a single GPU — LoRA, QLoRA, and an end-to-end project." canonical: "https://bitwidth.ai/guides/fine-tuning-and-training-models-with-unsloth" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:56.513Z" --- Guide # Fine-Tuning & Training Models with Unsloth Adapt an open model to your own data on a single GPU — LoRA, QLoRA, and an end-to-end project. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Fine-tuning with Unsloth — LoRA and QLoRA](/backend/uploads/19ee466bf1f69efdfe7053a22846edbc.png) ## TL;DR - Adapt an open model to your own data on a single GPU — LoRA, QLoRA, and an end-to-end project. - Fine-tuning adapts a general base model to your own task and data — a support bot on your docs, a classifier, a house-style writer. - Done the old way it needs a cluster; with LoRA/QLoRA and Unsloth it fits on one consumer GPU. Fine-tuning adapts a general base model to your own task and data — a support bot on your docs, a classifier, a house-style writer. Done the old way it needs a cluster; with LoRA/QLoRA and Unsloth it fits on one consumer GPU. This guide explains how, then walks through a fine-tune end to end. ## Full fine-tuning vs. LoRA vs. QLoRA Full fine-tuning updates every parameter, holding weights, gradients, and optimizer state in memory at once — north of 60 GB for an 8B model. LoRA freezes the base and trains small low-rank adapter matrices, so you update a few million parameters instead of billions. QLoRA goes further and loads the frozen base in 4-bit, which is what gets an 8B model onto a 24 GB card. [2](https://computingforgeeks.com/fine-tune-llm-unsloth-qlora/) [6](https://arxiv.org/abs/2305.14314) ![Figure 1 — LoRA and especially QLoRA bring fine-tuning within reach of a single GPU.](/backend/uploads/a47ecd1938dc045fbd61168023e3c51a.png) Figure 1 — LoRA and especially QLoRA bring fine-tuning within reach of a single GPU. ## What Unsloth adds Unsloth is an open-source library that makes LoRA/QLoRA training roughly 2× faster with up to ~70% less VRAM. It's a drop-in wrapper around the Hugging Face stack (Transformers, TRL, PEFT) that swaps in hand-written Triton kernels for the heavy operations and a memory-efficient gradient-checkpointing path — so your training code stays the same. [3](https://machinelearningplus.com/gen-ai/unsloth-fine-tuning/) It supports 500+ models and exports to GGUF, merged 16-bit, or Hugging Face. [1](https://github.com/unslothai/unsloth) ![Figure 2 — Load a 4-bit base, attach adapters, train on your data, then export for Ollama, vLLM, or the Hub.](/backend/uploads/66c8b986aae6a08cb03766486833213d.png) Figure 2 — Load a 4-bit base, attach adapters, train on your data, then export for Ollama, vLLM, or the Hub. ## Project — Fine-tune a model with Unsloth (QLoRA) Prerequisite You need one GPU with ~8 GB (3B model) or ~24 GB (8B model). No GPU? Use Unsloth's free Colab/Kaggle notebooks, or rent a pod (see the RunPod guide). - Install Unsloth. ``` pip install unsloth ``` - Load a 4-bit base model and attach LoRA adapters. ``` from unsloth import FastLanguageModel ``` ``` model, tokenizer = FastLanguageModel.from_pretrained( model_name = "unsloth/llama-3.1-8b-bnb-4bit", max_seq_length = 2048, load_in_4bit = True, # QLoRA: 4-bit frozen base ) ``` ``` model = FastLanguageModel.get_peft_model( model, r = 16, lora_alpha = 16, # the LoRA adapters ) ``` - Prepare your dataset in an instruction/response format (a JSON or CSV of examples that teach the behaviour you want). - Train with TRL's SFTTrainer. Unsloth plugs straight into the trainer you may already know: ``` from trl import SFTTrainer from transformers import TrainingArguments ``` ``` trainer = SFTTrainer( model = model, tokenizer = tokenizer, train_dataset = dataset, args = TrainingArguments( per_device_train_batch_size = 2, gradient_accumulation_steps = 8, # effective batch ~16 learning_rate = 2e-4, num_train_epochs = 2, output_dir = "outputs", ), ) trainer.train() ``` - Test it. Switch to fast inference and try a prompt: ``` FastLanguageModel.for_inference(model) # ...then generate as usual with model.generate(...) ``` - Export for deployment. Save straight to GGUF for Ollama, or merged 16-bit for vLLM: ## GGUF for Ollama / llama.cpp / LM Studio ``` model.save_pretrained_gguf("my-model", tokenizer, quantization_method = "q4_k_m") ``` ## ...or merged 16-bit weights for vLLM ``` model.save_pretrained_merged("my-model-16bit", tokenizer, save_method = "merged_16bit") ``` Hyperparameters Four knobs matter most: LoRA rank 16–32 (set lora_alpha equal to it or double), learning rate ~2e-4, an effective batch near 16 (raise gradient_accumulation_steps, not batch size, to avoid out-of-memory), and 1–3 epochs. A healthy training loss lands around 0.5–1.0; below ~0.2 you're memorizing the data, not learning from it. ## When to fine-tune Fine-tuning is the right tool for teaching a durable behaviour, format, or style. If you mainly need the model to know new facts, retrieval (RAG) or a bigger prompt is often cheaper and easier to keep current. Many production systems combine a light fine-tune for style with retrieval for knowledge. ## Key takeaways - LoRA trains small adapters instead of all weights; QLoRA adds a 4-bit base so an 8B model fine-tunes on a 24 GB GPU. [2](https://computingforgeeks.com/fine-tune-llm-unsloth-qlora/) [6](https://arxiv.org/abs/2305.14314) - Unsloth makes this ~2× faster with ~70% less VRAM as a drop-in wrapper over Transformers/TRL/PEFT. [3](https://machinelearningplus.com/gen-ai/unsloth-fine-tuning/) - The flow is: load 4-bit base → attach adapters → train with SFTTrainer → export to GGUF or 16-bit. [1](https://github.com/unslothai/unsloth) - Fine-tune for behaviour and style; use retrieval for facts — and start from a free notebook if you have no GPU. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Local AI Lab: The Multi-GPU Workbench" description: "Pooling two or more GPUs to run bigger models at home — how it works, and what to buy." canonical: "https://bitwidth.ai/guides/local-ai-lab-the-multi-gpu-workbench" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:55.831Z" --- Guide # Local AI Lab: The Multi-GPU Workbench Pooling two or more GPUs to run bigger models at home — how it works, and what to buy. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Multi-GPU workbench — tensor parallelism](/backend/uploads/b3251c341bdcefea963b61d3d52a8900.png) ## TL;DR - Pooling two or more GPUs to run bigger models at home — how it works, and what to buy. - When one GPU can't hold the model you want — or can't serve enough users — the answer is a multi-GPU workbench: two or more cards in one machine, pooling their memory. - This guide covers how it works, the interconnect question that trips people up, and what to buy. When one GPU can't hold the model you want — or can't serve enough users — the answer is a multi-GPU workbench: two or more cards in one machine, pooling their memory. This guide covers how it works, the interconnect question that trips people up, and what to buy. ## How it works: splitting a model across GPUs The main technique is tensor parallelism: each layer of the model is split across the GPUs, which work on every token together and exchange a small amount of data at each step. The payoff is a combined memory pool — two 24 GB cards act as ~48 GB, enough for a 70B model at 4-bit (~40–42 GB) that no single consumer GPU can hold. [4](https://opensourcesai.com/hardware/dual-rtx-3090-local-llm/) ![Figure 1 — Tensor parallelism pools VRAM across cards so a large model fits and runs.](/backend/uploads/71f1c04ede044b1245e2b257136d9898.png) Figure 1 — Tensor parallelism pools VRAM across cards so a large model fits and runs. A related technique, pipeline parallelism, assigns whole layers to different GPUs (or machines) in sequence; it's how clusters scale across nodes, covered in the next guide. [2](https://willitrunai.com/blog/vllm-multi-gpu-setup-guide) ## The interconnect question: NVLink vs PCIe How fast the GPUs talk to each other matters, but less than people assume for inference. NVLink is far faster than PCIe, yet each token only needs to exchange a few megabytes, so a PCIe 4.0 x16 link is generally sufficient. [3](https://canitrun.dev/guides/multi-gpu-setups/) ![Figure 2 — NVLink is fastest, but PCIe is usually enough for inference. NVLink is gone from the 4090/5090.](/backend/uploads/06380761389ff248d09446f823fdfdbb.png) Figure 2 — NVLink is fastest, but PCIe is usually enough for inference. NVLink is gone from the 4090/5090. Note NVLink mainly helps two cases: training/fine-tuning (gradients sync every batch) and very large 405B+ models. It exists on the RTX 3090 but was removed from the 4090 and 5090, which use PCIe only. ## The reality of scaling Two GPUs do not give double the speed. On consumer cards over PCIe, expect roughly a 1.5× speedup, with about 5–10% overhead from GPU-to-GPU communication. [5](https://localai.computer/multi-gpu-methodology) The point of multi-GPU is usually capacity (running a model that wouldn't otherwise fit) and higher concurrency, not raw single-request speed. A well-tuned dual-4090 rig can serve Llama 70B at around 100 tokens/second. [1](https://www.promptquorum.com/local-llms/multi-gpu-local-llms) ## What you need - Matching GPUs. vLLM requires identical cards for tensor parallelism (same VRAM and compute). For mismatched cards, llama.cpp's --tensor-split is more flexible but runs at the slower card's pace. [2](https://willitrunai.com/blog/vllm-multi-gpu-setup-guide) [3](https://canitrun.dev/guides/multi-gpu-setups/) - Motherboard & lanes. Room and PCIe lanes for two or more full-size cards; PCIe 5.0 is nice-to-have, not essential for two GPUs. - Power. Budget ~350 W per card — a dual-GPU build needs a PSU rated for ~700 W of GPU draw alone, plus the rest of the system. [4](https://opensourcesai.com/hardware/dual-rtx-3090-local-llm/) - Cooling & case. Adequate airflow for cards packed together; blower-style or spaced slots help. ## Software: vLLM is the standard vLLM provides continuous batching, PagedAttention, and native tensor parallelism behind a single flag. Serving a 70B model across two GPUs is one command: ## Serve a 70B model across 2 GPUs with tensor parallelism ``` vllm serve meta-llama/Llama-3.1-70B \ --tensor-parallel-size 2 \ --gpu-memory-utilization 0.95 \ --port 8000 ``` ## OpenAI-compatible API is now at http://localhost:8000/v1 Set --tensor-parallel-size to the number of GPUs. llama.cpp offers --tensor-split for mixed cards; Ollama's multi-GPU support is weaker. Note vLLM scales efficiently to ~8 GPUs per node over NVLink; PCIe setups see diminishing returns beyond ~4 cards. ## Build tiers - 2 × 24 GB (48 GB pool). Used RTX 3090s (NVLink-capable) or RTX 4090s (PCIe) — the sweet spot for running 70B locally. [4](https://opensourcesai.com/hardware/dual-rtx-3090-local-llm/) - 4 × GPU (96 GB+). For serving several 70B models at once, or long-context high-batch workloads. Significantly more cost, power, and cooling. - Data-center card (A100 80GB / H100). A single 80 GB card holds a 70B model with no multi-GPU coordination — simpler software, far higher price. ## Key takeaways - Tensor parallelism pools VRAM across GPUs so large models fit; two 24 GB cards run a 70B model. [4](https://opensourcesai.com/hardware/dual-rtx-3090-local-llm/) - For inference, PCIe is usually enough; NVLink mainly helps training and 405B+ models — and is absent on the 4090/5090. [3](https://canitrun.dev/guides/multi-gpu-setups/) - Expect ~1.5× (not 2×) from two GPUs; the real win is capacity and concurrency. [5](https://localai.computer/multi-gpu-methodology) - Use identical cards with vLLM (--tensor-parallel-size N); plan power (~350 W/card) and cooling. [2](https://willitrunai.com/blog/vllm-multi-gpu-setup-guide) How this piece was created This guide was drafted by an agent and published by a person. --- title: "Cloud Providers: Subscriptions vs. API Pricing" description: "How OpenAI, Anthropic, and Google charge for AI — with real prices and worked examples." canonical: "https://bitwidth.ai/guides/cloud-providers-subscriptions-vs-api-pricing" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T14:08:54.392Z" --- Guide # Cloud Providers: Subscriptions vs. API Pricing How OpenAI, Anthropic, and Google charge for AI — with real prices and worked examples. **Bitwidth.AI** Last updated Sep 12, 2026 · 7 min ![Cloud AI pricing — subscriptions and API usage](/backend/uploads/3e7a39e53d72a5a4212289eab9de3fe5.png) ## TL;DR - How OpenAI, Anthropic, and Google charge for AI — with real prices and worked examples. - There are two ways to pay for cloud AI. - A subscription is a flat monthly fee for a chat or coding assistant. There are two ways to pay for cloud AI. A **subscription** is a flat monthly fee for a chat or coding assistant. An **API** lets your own software call a model and bills you per token. This guide covers both — consumer chat apps, coding assistants (Cursor, GitHub Copilot, and others), and developer APIs — with prices verified against official pages in the browser as of September 12, 2026. Prices change often. Confirm on each provider’s pricing page before you budget. ## How API billing works APIs charge by the **token** (a chunk of text, often roughly three-quarters of a word). You pay separately for **input** (your prompt) and **output** (the model’s reply), usually quoted **per million tokens**. Output is almost always several times more expensive than input. Many providers also list a cheaper **cached input** rate when a prompt prefix is reused. ![Figure 1 — Representative API rates per million tokens (input / output). Snapshot 2026-09-12.](/backend/uploads/5c7ec71d8ea8187e8bf487761052238a.png) Figure 1 — Representative API rates per million tokens (input / output). Snapshot 2026-09-12. ### Representative API rates (per 1M tokens) For Kimi rows, **Input** is the cache-miss rate (cache-hit is cheaper). - **OpenAI GPT-5.6 Luna** — $0.20 in / $1.20 out — [openai.com/api/pricing](https://openai.com/api/pricing) - **OpenAI GPT-5.6 Terra** — $2.00 in / $12.00 out — same - **OpenAI GPT-5.6 Sol** — $4.00 in / $20.00 out — same - **OpenAI GPT-6 Astra** — $10.00 in / $50.00 out — same - **xAI grok-4.6** — $2.00 in / $6.00 out — [docs.x.ai/docs/models](https://docs.x.ai/docs/models) - **Kimi kimi-k2.7-code** — $0.95 in / $4.00 out — [platform.kimi.ai](https://platform.kimi.ai/) - **Kimi kimi-k3** — $3.00 in / $15.00 out — same - **Z.ai GLM-5** — $1.00 in / $3.20 out — [docs.z.ai pricing](https://docs.z.ai/guides/overview/pricing) - **Z.ai GLM-5.1** — $1.40 in / $4.40 out — same Cached-input rates differ by model (for example OpenAI Luna cached input $0.02 / 1M, Kimi kimi-k3 cache hit $0.30 / 1M, Z.ai GLM-5.1 cached input $0.26 / 1M). Anthropic Claude and Google Gemini **API** dollar amounts are not listed in this snapshot’s browser captures — check [anthropic.com/pricing](https://www.anthropic.com/pricing) and [ai.google.dev](https://ai.google.dev/gemini-api/docs/pricing) for live API tables. ## What a task actually costs Everyday API calls are still fractions of a cent: - **One chat question** (500 in / 400 out) — ~$0.0006 on Luna; ~$0.006 on Terra - **Summarize a 5-page report** (4,000 in / 800 out) — ~$0.002 on Luna; ~$0.018 on Terra - **Draft from a long brief** (20,000 in / 2,000 out) — ~$0.006 on Luna; ~$0.064 on Terra Math: (input_tokens/1e6)×input_rate + (output_tokens/1e6)×output_rate. Rounded. Cheap = GPT-5.6 Luna; Mid = GPT-5.6 Terra. ## Subscriptions: chat apps If you mainly chat in a browser or app, a subscription is simpler than wiring an API. ### OpenAI ChatGPT From OpenAI’s ChatGPT pricing page: [1](https://openai.com/chatgpt/pricing) - **Free** — $0/mo — limited - **Go** — $8/mo — expanded Instant access - **Plus** — $20/mo — higher limits - **Pro** — from $100/mo — highest ChatGPT tier in this capture ### Anthropic Claude From Anthropic’s pricing page: [2](https://www.anthropic.com/pricing) - **Free** — $0 - **Pro** — $20/mo monthly; $17/mo ($200 billed up front) annual — more usage - **Max** — from $100/mo — higher usage options ### Google AI / Gemini From Google One AI (US monthly): [3](https://one.google.com/ai) - **Google AI Plus** — $4.99/mo after promo ($1.29/mo for first 3 months) — mid tier - **Google AI Pro** — $19.99/mo after promo ($4.99/mo for first 3 months) — higher Gemini limits - **Google AI Ultra** — starting at $99.99/mo — highest limits ### Grok / xAI (consumer) From [x.ai/pricing](https://x.ai/pricing): - **Free** — $0 — limits - **SuperGrok** — $30/mo — higher limits - **SuperGrok Plus** — $100/mo — higher usage Lite and Heavy appear in the comparison UI, but no dollar amounts were visible in this capture — confirm on the live page before budgeting those tiers. ### Kimi membership From Kimi membership pricing: [4](https://www.kimi.com/membership/pricing) - **Moderato** — $19/mo — billed monthly - **Allegretto** — $39/mo — billed monthly - **Allegro** — $99/mo — billed monthly - **Vivace** — $199/mo — billed monthly ## Subscriptions: coding assistants ### Cursor From Cursor pricing: [5](https://cursor.com/pricing) - **Hobby** — Free — limited Agent - **Pro** — $20/mo - **Pro+** — $60/mo - **Ultra** — $200/mo - **Teams Standard** — $40/user/mo - **Teams Premium** — $120/user/mo - **Enterprise** — custom Plan details and included model pools are also summarized on [Cursor models and pricing docs](https://cursor.com/docs/models-and-pricing). ### GitHub Copilot From GitHub Copilot pricing / plans docs: [6](https://github.com/features/copilot#pricing)[7](https://docs.github.com/en/copilot/get-started/plans) - **Free** — $0 — limited - **Pro** — $10/user/mo - **Pro+** — $39/user/mo - **Max** — $100/user/mo - **Business** — $19/seat/mo — org - **Enterprise** — $39/seat/mo — enterprise ### Z.ai Coding Plan The Z.ai Coding Plan overview documents Lite / Pro / Max features and usage. Confirm Lite/Pro/Max dollar amounts on the live page — see [docs.z.ai/devpack/overview](https://docs.z.ai/devpack/overview) rather than assuming a monthly price. ![Figure 2 — Subscription comparison (selected plans, USD/mo). Snapshot 2026-09-12.](/backend/uploads/62ffb9daa1850108ba9432ef8b532f69.png) Figure 2 — Subscription comparison (selected plans, USD/mo). Snapshot 2026-09-12. ## Subscription or API — which to choose? A subscription is a predictable flat fee and needs no code — good for interactive chat and IDE assistants. An API is pay-for-what-you-use — good for products and automation. Light API use stays cheap; heavy daily chatting is often cheaper on a flat plan. ![Figure 3 — Illustrative break-even: at low volume the API stays cheaper; past a usage threshold a flat subscription wins. Labeled illustrative.](/backend/uploads/17db498f8a9609fcf577393959dbe036.png) Figure 3 — Illustrative break-even: at low volume the API stays cheaper; past a usage threshold a flat subscription wins. Labeled illustrative. ## How to estimate an API bill - Estimate average input and output tokens per request. - Multiply by requests per month. - Divide each total by 1,000,000 and multiply by that model’s input and output rates. - Add them, then check the provider’s usage dashboard after a week of real traffic. ## Key takeaways - Subscriptions are flat monthly fees; APIs bill per token for software you build. - Coding tools (Cursor, Copilot) and chat apps (ChatGPT, Claude, Gemini, Grok, Kimi) have different plan grids — use official pages, not rough “~$20 / ~$100 / ~$200” shortcuts. - API catalogs in this snapshot include OpenAI, xAI, Kimi, and Z.ai; re-check Anthropic and Google API pages for live token rates. - Output tokens cost more than input; caching matters at scale. - Always re-check official pricing before you commit spend. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Open-Source Models & Local Inferencing" description: "Running capable AI on your own computer — what it is, why people do it, and how easy it has become." canonical: "https://bitwidth.ai/guides/open-source-models-and-local-inferencing" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:53.865Z" --- Guide # Open-Source Models & Local Inferencing Running capable AI on your own computer — what it is, why people do it, and how easy it has become. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Open-source models and local inferencing](/backend/uploads/22dc2b5d9576244160014e7d23038bea.png) ## TL;DR - Running capable AI on your own computer — what it is, why people do it, and how easy it has become. - The first three guides looked at models running on someone else's servers. - But many capable models are open-weight — you can download them and run them on your own computer. The first three guides looked at models running on someone else's servers. But many capable models are open-weight — you can download them and run them on your own computer. This is called local inferencing. This guide explains what that means, why people do it, and how approachable it has become. [1](https://www.mindstudio.ai/blog/run-open-weight-ai-models-locally-ollama-lm-studio) ## “Open source,” “open-weight,” and closed models Models like GPT-6 and Claude are closed: you can use them only through the provider. Open-weight models publish their trained parameters so anyone can download and run them — for example Meta's Llama, Mistral AI's models, Alibaba's Qwen, and Google's Gemma. [2](https://huggingface.co/blog/daya-shankar/open-source-llm-models-to-run-locally) Licenses vary: several (such as Mistral and Qwen releases) use the permissive Apache 2.0 license, while others carry their own community terms, so it is worth checking before commercial use. ## Cloud vs. local: the trade-offs ![Figure 1 — Local inferencing trades some convenience and top-end quality for privacy, offline use, and no per-token cost.](/backend/uploads/1e7f46596f81ba71400656226d352cc2.png) Figure 1 — Local inferencing trades some convenience and top-end quality for privacy, offline use, and no per-token cost. The headline reasons to run locally are privacy (your data never leaves your machine), no per-token bills, offline access, and full control. The trade-offs are that you need capable hardware, the very largest frontier models remain out of reach on a home PC, and you maintain it yourself. [2](https://huggingface.co/blog/daya-shankar/open-source-llm-models-to-run-locally) ## Quantization: how big models fit on small machines A model's parameters are numbers, and storing them at lower precision — called quantization — dramatically reduces the memory needed to run it, for a small accuracy cost. [1](https://www.mindstudio.ai/blog/run-open-weight-ai-models-locally-ollama-lm-studio) The common local format, GGUF, packages a quantized model into a single file. [3](https://github.com/ggml-org/llama.cpp) ![Figure 2 — The same 7B model at different precisions. A 4-bit (Q4) version often runs on a mid-range GPU.](/backend/uploads/f20e9c1bff66bfc55b55389a6cb936a1.png) Figure 2 — The same 7B model at different precisions. A 4-bit (Q4) version often runs on a mid-range GPU. ## The local stack You do not need to assemble this by hand. A model file sits on top of an inference engine (most local tools use llama.cpp under the hood), wrapped in a friendly app. ![Figure 3 — The layers of a local setup. Apps like Ollama and LM Studio hide the technical parts.](/backend/uploads/8e54022716239c3dd36b6ba976884275.png) Figure 3 — The layers of a local setup. Apps like Ollama and LM Studio hide the technical parts. ## How simple it can be With a tool like Ollama, downloading and chatting with an open-weight model is a single command — it fetches the model and starts a chat: ## Download and run an open-weight model locally ``` ollama run llama3 ``` ## ...then just type your prompt at the prompt that appears Example — running a local model with Ollama. LM Studio offers the same thing through a graphical interface. Beginners usually start with LM Studio (point-and-click) or Ollama (one command). Both run on Windows, macOS, and Linux, and both are powered by llama.cpp underneath. [1](https://www.mindstudio.ai/blog/run-open-weight-ai-models-locally-ollama-lm-studio) ## What you can realistically run As a rough guide, small models (about 3B parameters) need ~8 GB of memory, 7–8B models about 16 GB, and larger ones more. [1](https://www.mindstudio.ai/blog/run-open-weight-ai-models-locally-ollama-lm-studio) A recent GPU with 8–16 GB of memory comfortably runs quantized 7–14B models at speeds comparable to cloud APIs — enough for chat, drafting, summarizing, and coding help. The detailed hardware picture is the subject of the Level 2 guides. ## Key takeaways - Open-weight models (Llama, Mistral, Qwen, Gemma) can be downloaded and run on your own hardware. [2](https://huggingface.co/blog/daya-shankar/open-source-llm-models-to-run-locally) - Local inferencing offers privacy, offline use, and no per-token cost, in exchange for hardware and some setup. - Quantization (via the GGUF format) shrinks models so they fit on consumer machines with minor accuracy loss. [3](https://github.com/ggml-org/llama.cpp) - LM Studio and Ollama make getting started genuinely easy on Windows, macOS, and Linux. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Local AI Lab: Requirements & Options" description: "What to budget for when running models yourself — and the realistic hardware paths in 2026." canonical: "https://bitwidth.ai/guides/local-ai-lab-requirements-and-options" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:54.062Z" --- Guide # Local AI Lab: Requirements & Options What to budget for when running models yourself — and the realistic hardware paths in 2026. **Bitwidth.AI** Last updated Sep 12, 2026 · 6 min ![Local AI lab — requirements and hardware options](/backend/uploads/4ed970061ae5e723226eeaaf980c3f41.png) ## TL;DR - What to budget for when running models yourself — and the realistic hardware paths in 2026. - A “local AI lab” is simply your own hardware for running models yourself. - You do not need a server room — but you do need to understand the one number that decides everything: how much fast memory you have. A “local AI lab” is simply your own hardware for running models yourself. You do not need a server room — but you do need to understand the one number that decides everything: how much fast memory you have. This guide covers what to budget for and the realistic hardware paths, so you can match a setup to the models you actually want to run. ## The one constraint that matters: memory A model only runs if its weights fit in memory the processor can reach quickly — VRAM on an NVIDIA/AMD GPU, or unified memory on Apple Silicon and systems like DGX Spark. [1](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) A useful rule of thumb at 4-bit (Q4) precision is roughly 0.5–0.6 GB per billion parameters, plus a small buffer for the context window. [2](https://llmconfigurator.com/en/guides/vram-requirements-guide) ![Figure 1 — Memory needed by model size at 4-bit. VRAM is the hard ceiling on what you can load.](/backend/uploads/8a017d6dc2151ac387a448cfde26ef03.png) Figure 1 — Memory needed by model size at 4-bit. VRAM is the hard ceiling on what you can load. One extra cost is the KV cache: as the context window fills, the model stores attention state for every token in memory alongside the weights. For long prompts, budget an extra 10–20% on top of the model size. [1](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) ## What you are actually budgeting for - Fast memory (VRAM / unified). Sets the largest model you can run. The single most important spec. - Memory bandwidth. How fast that memory can be read — the main driver of tokens per second once a model fits. [5](https://www.intelligentliving.co/nvidia-dgx-spark-128gb-mini-supercomputer/) - System RAM. 16 GB minimum, 32 GB+ comfortable; used to load models and to offload layers that don't fit in VRAM (much slower). [1](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) - Storage. Model files are large (a 70B Q4 model is ~40 GB); an NVMe SSD keeps load times reasonable. ## The core trade-off: capacity vs. speed Every hardware choice trades memory capacity (how big a model fits) against memory bandwidth (how fast it runs). Discrete GPUs have very fast but limited memory; unified-memory systems offer huge capacity at lower bandwidth. [5](https://www.intelligentliving.co/nvidia-dgx-spark-128gb-mini-supercomputer/) ![Figure 2 — GPUs deliver speed; unified-memory systems deliver capacity. Few options give both.](/backend/uploads/890bcbc0ddc0feac4480451357ac3a7c.png) Figure 2 — GPUs deliver speed; unified-memory systems deliver capacity. Few options give both. ## Your hardware options - NVIDIA GPU (Windows or Linux). The best-supported path via CUDA. A used RTX 3090 (24 GB) is the value sweet spot; the RTX 5090 (32 GB) is the fastest consumer card. [3](https://www.newegg.com/insider/best-ai-pc-builds-for-running-local-llms-in-2026/) [4](https://www.modemguides.com/blogs/ai-infrastructure/best-hardware-running-local-ai-models-2026) - Apple Silicon (macOS). Unified memory doubles as VRAM, so an M-series Max/Ultra with 64–128 GB runs models that would otherwise need a data-center GPU; the MLX runtime is fastest here. [1](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) - AMD GPU (Linux). Supported through ROCm; strongest on Linux and useful for multi-GPU inference boxes. [1](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) - Unified-memory appliances. NVIDIA DGX Spark and similar GB10 systems pack 128 GB and can run 70B–200B models locally, trading raw speed for capacity — covered in its own guide. [5](https://www.intelligentliving.co/nvidia-dgx-spark-128gb-mini-supercomputer/) - Cloud rental. Renting a GPU by the hour avoids buying anything and suits occasional heavy jobs; see the Level 3 guide on cloud GPUs. ## Build tiers at a glance Tier Example GPU / system Memory Runs comfortably Rough cost* Entry RTX 4060 8 GB (or 16 GB Mac) 8–16 GB 3B–8B models; chat, coding help ~$300 GPU Mid Used RTX 3090 / 4090 24 GB Up to ~32B; 70B is tight ~$1,000 used High — speed RTX 5090 32 GB Up to ~45B on-GPU, fastest tokens ~$2,000+ High — capacity Apple M-series Max/Ultra or DGX Spark 64–128 GB unified 70B–200B, slower per token ~$4,000 Cloud Rented GPU (see Level 3) Per hour Anything, temporarily ~$0.30–3/hr *Rough street prices as of September 2026. A 2026 memory shortage has made VRAM and RAM unusually expensive, so verify current pricing and favour machines with memory pre-installed. ## How to choose: right-size to your models Work backwards. Decide the largest model you realistically want to run, use the rule of thumb to get its memory need, then pick the cheapest option that clears it with room for context. [2](https://llmconfigurator.com/en/guides/vram-requirements-guide) Most people are best served by a 24 GB GPU or a 64 GB+ unified-memory machine. Buy for the models you will actually use, not the largest that exists — and if your need is occasional, rent instead of buy. ## Key takeaways - Fast memory (VRAM or unified) is the hard limit; budget ~0.5–0.6 GB per billion parameters at Q4, plus 10–20% for context. [2](https://llmconfigurator.com/en/guides/vram-requirements-guide) - Capacity and speed trade off: GPUs are fast but small; unified-memory systems are large but slower. [5](https://www.intelligentliving.co/nvidia-dgx-spark-128gb-mini-supercomputer/) - A used RTX 3090 (24 GB) or a 64–128 GB Apple/GB10 machine covers most needs. [3](https://www.newegg.com/insider/best-ai-pc-builds-for-running-local-llms-in-2026/) - Right-size to the models you'll run, and rent cloud GPUs for occasional heavy work. How this piece was created This guide was drafted by an agent and published by a person. --- title: "Setting Up Local AI on Your Home Computer" description: "A hands-on project to run your first model on Windows, Linux, or macOS — fully offline." canonical: "https://bitwidth.ai/guides/setting-up-local-ai-on-your-home-computer" published_time: "2026-09-12T11:58:34.605Z" modified_time: "2026-09-12T13:24:54.329Z" --- Guide # Setting Up Local AI on Your Home Computer A hands-on project to run your first model on Windows, Linux, or macOS — fully offline. **Bitwidth.AI** Last updated Sep 12, 2026 · 5 min ![Setting up local AI on your home computer](/backend/uploads/bf80e3ad91732dd90a267ca7e19a1ab5.png) ## TL;DR - A hands-on project to run your first model on Windows, Linux, or macOS — fully offline. - This guide gets a real model running on your own computer — Windows, Linux, or macOS — in a few minutes. - You will pick one of two beginner-friendly tools, install it, download a model sized to your hardware, and chat with it entirely offline. This guide gets a real model running on your own computer — Windows, Linux, or macOS — in a few minutes. You will pick one of two beginner-friendly tools, install it, download a model sized to your hardware, and chat with it entirely offline. ## Two easy paths Both tools below run on all three operating systems and use llama.cpp underneath, so results are similar. Pick by how you like to work. ![Figure 1 — Ollama is a single command; LM Studio is a full graphical app. You only need one.](/backend/uploads/d72c6256b404c017971046d49fcb6d8f.png) Figure 1 — Ollama is a single command; LM Studio is a full graphical app. You only need one. ## Before you start Confirm your machine can hold the model you want. As a rule of thumb, a 7–8B model at 4-bit needs about 6 GB of VRAM or unified memory, a 14B needs ~10 GB, and a 32B needs ~20 GB. [5](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) If in doubt, start small (a 3B model) and work up. The Level 2 requirements guide covers sizing in detail. ## Project A — Run a model with Ollama (command line) - Install Ollama. On macOS and Windows, download the installer from ollama.com and run it. On Linux, open a terminal and run the official install script: ## Linux — install Ollama ``` curl -fsSL https://ollama.com/install.sh | sh ``` On Windows, use PowerShell only if you prefer the CLI installer; most users just run the downloaded .exe. - Pick a model that fits your memory. Good starting points are llama3.2 (3B, tiny), llama3.1:8b (needs ~6 GB), or qwen2.5:14b (needs ~10 GB). - Download and run it with one command. Ollama fetches the model the first time, then drops you into a chat prompt: ## Downloads on first run, then starts an interactive chat ``` ollama run llama3.1:8b ``` - Chat, then exit. Type a message and press Enter. To leave the chat, type /bye (or press Ctrl+D). - Optional — call it like an API. Ollama also serves a local endpoint other programs can use. From another terminal: ``` curl http://localhost:11434/api/generate -d '{ "model": "llama3.1:8b", "prompt": "Explain what a token is in one sentence.", "stream": false ``` }' The response comes back as JSON — this is how you wire a local model into your own scripts and apps. Note The model and all prompts stay on your machine. Nothing is sent to any provider, and it works with your network disconnected. ## Project B — Run a model with LM Studio (graphical app) - Download and install LM Studio. Get the installer for your operating system from lmstudio.ai and open the app. - Find a model. Use the search (magnifying-glass) tab and search for a model such as “Llama 3.1 8B Instruct.” LM Studio shows which quantized versions fit your hardware. - Download a quantized version. Choose a Q4_K_M build (the community-standard balance of size and quality) and click Download. - Load it and chat. Open the chat tab, select the downloaded model at the top, wait for it to load into memory, then type a message. - Optional — start the local server. The “Developer” / “Local Server” tab exposes the same kind of local API as Ollama, so your own tools can connect to it. ## What you now have ![Figure 2 — A running local model behaves like a private API on your own machine.](/backend/uploads/68558923012334950fee1738256326e2.png) Figure 2 — A running local model behaves like a private API on your own machine. Either path leaves you with a model you can chat with and a local endpoint you can build on — the foundation for the harnessing, MCP, and skills guides later in this series. ## Choosing the right model for your hardware - 8 GB memory: 3B–8B models (e.g. Llama 3.1 8B, Qwen 2.5 7B) at Q4. - 12–16 GB: up to ~14B models comfortably. - 24 GB: up to ~32B; a 70B model will be tight or need offloading. [5](https://www.promptquorum.com/local-llms/local-llm-hardware-guide-2026) - 64–128 GB unified (Mac / GB10): 70B and larger. ## If something goes wrong - Model won't load or is very slow: it's too big for your memory — choose a smaller model or a lower quantization (e.g. Q4 instead of Q8). - No GPU being used: on Windows/Linux confirm your NVIDIA drivers and CUDA are installed; on Mac, Apple Silicon is used automatically. - First run is slow: the initial download of the model file is large; later runs load from disk. ## Key takeaways - Ollama (one command) and LM Studio (graphical) both run local models on Windows, macOS, and Linux. - Downloading and running a model is a single step: ollama run , or search-and-download in LM Studio. - Both expose a local API, so anything on your machine can build on the model — with no data leaving your computer. - Match the model size to your memory, and start small if unsure. How this piece was created This guide was drafted by an agent and published by a person.