Video summary

What It Actually Costs to Run Qwen 4 Locally?

Main summary

Key takeaways

Technology

Summary

The video argues that the main question when running Qwen 4 35B-A3B locally isn’t whether it fits on your hardware, but how quickly your system can read a prompt. This matters especially for AI agents, which repeatedly process long conversations, codebases, and tool outputs.

Model size and local deployment

  • Qwen 4 is a mixture-of-experts model: about 3 billion of its 35 billion parameters are active per token.
  • Its full download is larger than the headline parameter count suggests. It includes a 2-billion-parameter draft head for speculative decoding and a 20-billion-parameter “engram” lookup table. The video cites the total as roughly 57 billion parameters.
  • In Unsloth’s 4-bit files, the model itself is about 24.7 GB, with an additional 11.5 GB engram file. The engram can be kept in system RAM or read from an SSD rather than loaded into GPU memory.
  • The video reports that reading the engram from SSD reduced speed by about 1.5% in one test while allowing substantially more context. At 4-bit, using the larger engram version was judged unlikely to justify its extra disk space.
  • The model’s conversation cache is relatively modest: roughly 2.5 GB for 128,000 tokens, according to the video’s estimate.

Why reading speed can matter more than writing speed

The video distinguishes two workload stages:

  • Prefill (“reading”) processes the prompt, typically in parallel. It determines how long it takes to get the first response, especially with long inputs.
  • Decode (“writing”) generates the response one token at a time and is more constrained by memory bandwidth.

In Artificial Analysis’s benchmark, the model read 16.4 billion tokens and wrote 175 million—about 94 tokens read for every token written. The presenter says that this makes prefill speed a major factor in agent workloads, even though hardware reviews usually emphasize decode speed.

Reported day-one results show a much wider spread in reading than writing speed: approximately 28–278 tokens per second for writing, versus about 103 to over 10,000 tokens per second for reading. These figures come from different machines and tests, so the video cautions against treating them as directly comparable guarantees.

Hardware and cost comparisons

  • An RTX 3060 12 GB with 64 GB of system RAM reportedly wrote at 28.2 tokens/s and read at 102.8 tokens/s. A 64,000-token prompt would take about 10 minutes to process. At the video’s electricity-rate assumption, reading a million tokens cost about 8.3 cents in GPU electricity, compared with Alibaba’s listed 6-cent rate.
  • A 24 GB RX 7900 XTX reportedly read at over 3,200 tokens/s, and an RTX 3090 24 GB at around 3,759 tokens/s on a short prompt. The video estimates that these cards can process the same 64,000-token example in roughly 20 seconds.
  • A 64 GB M4 Pro Mac mini reportedly read at around 1,000 tokens/s. A larger Mac’s unified memory can keep the model, engram, and conversation in one memory pool, avoiding transfers between GPU memory and system RAM.
  • The RTX 5090 was the fastest card discussed, but its high purchase price and power use did not make it the most economical choice per token in the presenter’s comparison.

The video compares local electricity costs with Alibaba’s listed API rates: $0.06 per million tokens read and $0.36 per million written. It estimates a benchmark task at about $0.55 hosted, mostly because of reading. However, it notes that the API was not publicly available at the time, so those rates are a paper comparison.

For an RTX 3090, the presenter estimates that a local agent workload could cost about 3–5 cents in electricity per task, versus the hosted estimate of 55 cents, under specific assumptions about how much context is genuinely new. This produces a possible hardware payback in 7–9 months of eight-hour workdays. A writing-only calculation gives a much longer payback, illustrating why the presenter considers reading costs essential to include. These are estimates, not guaranteed outcomes.

Guides and practical recommendations

  1. Start with a 4-bit quantization on 24 GB cards or Macs; a 3-bit option is available for tighter memory limits.
  2. Move the engram to SSD if memory is limited, using a fast internal drive rather than a slow USB stick.
  3. If using a smaller GPU with model weights offloaded to system RAM, increase the prompt micro-batch size. A reported RTX 3080 test improved reading speed from the default batch size of 512 to about 740 tokens/s after increasing it to 2,048.
  4. Enable an expert cache where supported. The video cites Unsloth’s guide and an experimental Strata setup on an RTX 4080 Super as examples of caching frequently used experts in GPU memory to improve speed.
  5. For agent workloads, prioritize a system that can keep the model in one memory pool. The presenter’s practical options include a 24 GB GPU such as an RX 7900 XTX or RTX 3090, or a Mac with 64 GB of unified memory.
  6. Owners of 10–16 GB GPUs are advised to try batch-size and expert-cache settings before buying more hardware. The video discourages buying expensive system RAM solely to offload the model for agent use.

Caveats and overall conclusion

The benchmark’s token ratio came from a high thinking-effort setting and may not reflect default use or every workload. Short chats can have little prefill overhead, while agent tasks that repeatedly process large contexts can be dominated by reading speed. The hardware figures are early owner reports, and some rely on experimental software.

For ordinary chat, the presenter says that hardware already capable of running the model may be sufficient. Local use can also be worthwhile for privacy, control, and avoiding dependence on a hosted service, even if electricity costs do not beat the API comparison. For long-context agent work, the central recommendation is to optimize for fast reading and keeping the model’s working data close to the processor.

Main speakers and sources

  • Kai, the video’s narrator and analyst
  • Artificial Analysis, for model evaluations, benchmark usage, and listed API pricing
  • Unsloth, for quantized model files, configuration guidance, and expert-cache information
  • Community hardware owners, whose day-one speed tests are cited
  • Llama.cpp and Strata contributors, for inference support and experimental optimization results

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