Video summary

Why Your Qwen 3.8 27B Model is Slow? And How to Fix It?

Main summary

Key takeaways

Technology

Key technological concepts (why the model was slow)

  • Model size vs. model speed: Even if a quantized model fits on a 16GB GPU (by file size), inference can still be slow because VRAM must also hold:

    • KV cache (grows with context length)
    • context/work buffers
    • execution/runtime memory
  • Quantization reduces weight memory but can be unevenly applied: Not all tensors tolerate compression equally, so the goal is to reduce size while preserving accuracy where it matters.


Product/model features discussed: GSQ + RCO and heterogeneous quantization

The video focuses on Qwen 27B and a special GGUF release using:

  • GSQ = Gumbel Softmax Quantization

    • Chooses low-bit representations for different tensors based on how accurately they can be represented under quantization.
  • RCO = Riemannian Constrained Optimization

    • Allocates a fixed accuracy budget across tensors (some tensors get more precision than others).

Together, they produce a heterogeneous GGUF, meaning different tensors use different quantization levels, rather than treating everything as the same 3-bit/4-bit precision.


Release builds + accuracy/performance claims

Four main quantized builds are mentioned:

  • IQ2XS: 8.4 GB
  • IQ2S: 9.3 GB
  • IQ3XX: 10.1 GB
  • IQ3S: 11.8 GB (recommended)

Claimed “near BF16” benchmarks for IQ3S

  • AIME 25: BF16 100 vs IQ3S 100
  • LiveCodeBench V6: BF16 87.71 vs IQ3S 87.71
  • GPQA Diamond: BF16 89.90 vs IQ3S 89.39

Compression impact (size)

  • BF16: ~53.8 GB
  • IQ3S GGUF: ~11.8 GB
  • About 4.6× smaller

Tutorial-style tuning guide in LM Studio (step-by-step speed fixes)

The speaker demonstrates how a poor configuration can yield ~10 tokens/sec, and how tuning can reach 60+ tokens/sec, using a chain of optimizations.

  1. Recreate the “slow” setup

    • Load a model with a large context window
    • Use settings that nearly fill VRAM
    • Result (programming task): about ~10 tokens/sec
  2. Fix #1: GPU offload / VRAM placement

    • In LM Studio, keep as many model layers on the GPU as VRAM allows.
    • Uses aggressive GPU layer utilization and keeps KV cache on GPU memory to avoid slow switching between system RAM and VRAM.
    • Example after loading GSQ+RCO IQ3S (~12 GB) with 50,000 tokens context:
      • “Hello” ~37.45 tok/s
      • Calculator task: ~34 tok/s (using ~18,000 context tokens in the run)
  3. Fix #2: KV cache quantization (memory optimization)

    • Important: IQ3S quantizes model weights, but KV cache has separate quantization settings.
    • Change KV cache precision to reduce VRAM usage:
      • KV cache Q8 → Q40
      • GPU usage drops (example shown: VRAM ~13.77 GB)
      • Calculator task improves to about ~38 tok/s
  4. Fix #3: Use MTP (speculative decoding)

    • MTP = Multi-Token Prediction for speculative decoding:
      • the model drafts multiple tokens
      • the main model verifies them
      • generation becomes more efficient
    • Switching to IQ3S MTP:
      • “Hello” ~44 tok/s
      • Calculator task: ~53 tok/s
      • UI indicates token drafts being accepted
  5. Fix #4: KV cache precision lowered further (trade accuracy for speed/headroom)

    • KV cache Q8 → Q4.0
      • More memory headroom
      • Calculator task: ~55 tok/s
    • KV cache Q4.0 → Q4.1
      • Small speed regression in a quick test (~49 tok/s on “hello”)
      • Calculator/programming task reaches about ~63–64 tok/s

Real-world task validation beyond “hello”

  • Calculator app generation task:

    • Final speed: ~63–64 tok/s
  • HTML/JavaScript animation generation task:

    • Generates a ~20-second looping scene (sunrise, walking character, moving clouds, rain effect)
    • Token rate reported around ~50 tok/s
    • Emphasis: it produces useful code, not only fast tokens.

Practical lessons / guidance emphasized

  • Don’t assume “fits on disk” or “fits by model file size” means fast inference.
  • Check:
    • Actual VRAM usage (weights + KV cache + context buffers)
    • Context length (KV cache growth)
    • KV cache quantization
    • GPU offload settings
    • Speculative decoding (MTP) when supported

Main speakers/sources

  • Primary speaker: The YouTube narrator/host (unnamed in subtitles)
  • Software referenced: LM Studio (used for GPU offload, context size, and KV cache settings)

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video