100B-Parameter On-Device LLMs: Why Offline 80+ Tokens/s Is Possible

    A 100B-class on-device foundation model recently demonstrated 80+ tokens/s generation while fully offline. This article explains the memory math, why MoE matters, what that decode speed actually means, and the core techniques—quantization, KV-cache, inference kernels, and memory offload—developers should focus on when deploying large models locally.

    Why on-device large models suddenly look competitive

    For the past two years, the usual view of local LLMs was that parameter counts stayed small, speed stayed low, and the experience lagged the cloud. A recent milestone changed that picture: an open-source community released a native on-device foundation model in the 100-billion-parameter class. Within days it topped a text-generation leaderboard, and official demos showed fully offline “vibe coding”—iterating a small game without a network—at 80+ tokens per second.

    The implication is that the intelligence ceiling for on-device models is being redefined. When a 100B-class model can run at usable speed on a high-end laptop, the core on-device value props—offline use, privacy, and low latency—become engineering-feasible. Setting products aside, this article looks at how such models fit on-device, what 80+ tokens/s means, and which deployment issues developers should watch.

    The memory bill: theoretical bar for 100B-class local inference

    Memory footprint

    Parameter storage can be estimated as:

    1. memory ≈ parameter count × bytes per parameter

    For a 145B model, for example:

    • FP16 (2 bytes/param): ~290 GB
    • INT8 (1 byte/param): ~145 GB
    • INT4 (0.5 bytes/param): ~72.5 GB
    • more aggressive mixed low-bit (e.g. 2.5–3 bit): ~45–60 GB

    Even at 4-bit, a typical consumer GPU (often ≤24 GB VRAM) cannot hold the full model. A 100B-class on-device stack therefore combines one or more of:

    1. Mixture-of-experts (MoE): large total parameters, but only a small expert subset is active per token, so compute stays closer to tens of billions of parameters.
    2. Layered offload: some layers in VRAM, others in system RAM or even NVMe, with pipelining to hide transfer latency.
    3. Aggressive low-bit quantization and sparsity: shrink per-parameter size while keeping quality loss bounded.
    4. CPU/GPU heterogeneous inference: use a large-memory machine’s CPU for part of the ops.

    Why MoE is central

    On device, total parameters and active parameters are different. Total size sets knowledge capacity (“smarter”); active size sets per-forward compute (“faster”). That matches laptop constraints: RAM can reach 64–128 GB, but compute and bandwidth are limited. “Large capacity, low activation” is the main way to raise the intelligence ceiling on compute-limited hardware.

    What 80+ tokens/s actually means

    User experience

    Generation has two phases:

    • Prefill: process the prompt in one shot; compute-heavy; sets time-to-first-token (TTFT).
    • Decode: generate token by token; memory-bandwidth-heavy; sets streaming speed.

    80+ tokens/s is a decode rate. For context, typical human reading of Chinese is about 5–10 characters per second, and many cloud APIs sit in the 20–60 tokens/s range. At 80+ tokens/s, local output can outpace most reading, so the “one word at a time” stall largely disappears—a qualitative jump on-device.

    Where the bottleneck is

    Decode is usually limited by memory bandwidth, not FLOPs: each new token must reread the active weights. A rough bound:

    1. theoretical decode ceiling ≈ memory bandwidth ÷ active-parameter footprint

    If quantized active weights are ~3 GB and bandwidth is 100 GB/s, the ceiling is on the order of 33 tokens/s. Reaching 80+ tokens/s requires a smaller active footprint (lower bits, fewer experts) or a higher-bandwidth memory path. That is why on-device work concentrates on quantization, expert routing, and cache management.

    Four core techniques for on-device deployment

    Quantization: accuracy vs. size

    Low-bit quantization is the first lever. Common practice:

    • Post-training quantization (PTQ): calibrate activation stats and map FP16 weights to INT4/INT3; lowest cost.
    • Quantization-aware training (QAT): simulate quantization during training; better accuracy, higher cost.
    • Mixed precision: keep sensitive layers (e.g. first/last, attention outputs) at higher bits; compress the rest.

    Do not chase the lowest bit width blindly. Below 4 bits, code generation and long-context quality often drop sharply; regress against your own tasks.

    KV-cache: required for long context

    Each token adds Key/Value cache that grows linearly with context. Typical mitigations:

    • GQA/MQA: share KV heads across query heads to cut cache size.
    • KV quantization/compression: store history at lower precision.
    • Sliding window and prefix reuse: limit the attention span, or reuse cache for fixed system prefixes.

    For local coding assistants with long files, KV-cache work often matters more than weight quantization for real usability.

    Inference engine and kernels

    Framework efficiency turns paper speed into measured speed:

    • operator fusion (e.g. fused QKV, RMSNorm + linear);
    • hand-tuned kernels for local ISAs (e.g. SIMD / matrix-extension INT4 GEMM);
    • dynamic batching and speculative decoding—a small model drafts, a large model verifies—to raise throughput without a large quality drop.

    Hierarchical memory scheduling

    When the model exceeds VRAM, weights must sit across VRAM and system RAM with prefetch:

    • per-layer prefetch pipelines so compute hides copies;
    • PCIe bandwidth as the transfer ceiling—too much offload collapses speed;
    • for MoE, keep hot experts resident in VRAM based on hit rates.

    A simple on-device eval snippet

    At minimum, measure TTFT and decode tokens/s:

    1. import time
    2. def benchmark(model, tokenizer, prompt, max_new_tokens=256):
    3. inputs = tokenizer(prompt, return_tensors="pt")
    4. # Time to first token (prefill)
    5. start = time.perf_counter()
    6. first_token = model.generate(**inputs, max_new_tokens=1)
    7. ttft = time.perf_counter() - start
    8. # Generation speed (decode)
    9. start = time.perf_counter()
    10. output = model.generate(**inputs, max_new_tokens=max_new_tokens)
    11. total = time.perf_counter() - start
    12. decode_tps = (max_new_tokens - 1) / (total - ttft)
    13. return {"ttft_s": round(ttft, 3), "tokens_per_s": round(decode_tps, 1)}

    Also track peak memory, speed vs. context length, generation quality (e.g. code pass rate, factuality), and whole-machine power/thermals—those decide whether a laptop can run at full load for long.

    Limits of fully offline use

    Offline vibe-coding of a small game shows two things:

    1. Enough internalized knowledge to generate and iterate code without retrieval.
    2. A closed on-device loop: generate, preview, edit on one machine, with low latency and data that never leaves the device.

    Boundaries remain: very fresh knowledge, very long documents, and complex multi-step planning still favor top cloud models. A practical pattern is on-device first, cloud fallback—frequent, privacy-sensitive work locally; hard cases to the cloud.

    Practical advice for developers

    1. Pick the scenario first: patch generation, local Q&A, and document summarization need different capability; not every app needs 100B parameters.
    2. Hardware first: memory capacity and bandwidth matter more than peak FLOPs; unified-memory machines are friendlier to offload.
    3. Layered quantization: protect accuracy on critical layers, compress the rest, and set a floor with regression tests.
    4. Keep a cloud path: degrade and route requests the local model cannot handle.
    5. Instrument locally: logs, latency stats, and resource monitors still matter for tuning.

    Closing

    Running a 100B-class model on a laptop at 80+ tokens/s, fully offline, marks a shift from on-device LLMs as toys to tools. The opportunity is not chasing a leaderboard, but applying the engineering stack—MoE, low-bit quantization, KV-cache, and heterogeneous scheduling—in your own product. Hybrid on-device plus cloud AI is likely to become a default application pattern.