Running a 35B LLM Locally on a Budget Mini PC: A Practical Guide
This guide explains how a budget mini PC with an integrated GPU and unified memory can run a 35B mixture-of-experts model locally at about 20 tokens per second. It covers why MoE architectures make this practical, the memory and bandwidth limits involved, how to choose a model and configure the runtime, how to connect the model to an AI agent workflow, and the trade-offs of local deployment.
1. Why Running LLMs on Low-End Hardware Has Become Feasible
For the past two years, local LLM deployment has been limited mainly by VRAM. A dense 35B model needs roughly 18 GB or more for its weights, even when quantized to 4-bit. Consumer GPUs typically have 8 GB to 24 GB of VRAM, so running a model of this size on a low-budget device was almost impossible.
Three technology trends have changed this:
- Wider adoption of Mixture of Experts (MoE) architectures: A model with 35B total parameters and 3B active parameters calls only a small subset of its expert weights for each inference step. Its compute cost and latency are close to those of a much smaller model, while its knowledge capacity stays at large-model level.
- Mature integrated graphics and unified memory: Some processors have integrated GPUs that share system memory. System memory can be configured to 32 GB or more, which leaves plenty of room for model weights.
- Cross-platform graphics API support in lightweight inference frameworks: Open-source inference frameworks use general cross-platform graphics compute interfaces. This lets integrated GPUs, which are not traditional AI accelerators, take part in matrix operations and access large system memory directly.
2. Core Principle: Getting Around the VRAM Bottleneck
The main limit of a traditional discrete GPU setup is VRAM capacity. An integrated GPU with unified memory removes this bottleneck:
- Memory serves as VRAM: An integrated GPU has no separate VRAM pool. It reads and writes system memory directly. A mini PC with 32 GB of RAM can theoretically allocate more than 21 GB for model weights.
- Bandwidth is the new bottleneck: Memory bandwidth, typically around 100 GB/s for dual-channel DDR5, is far below that of high-end GPU VRAM. MoE models activate few parameters and access less memory per token, which suits this low-bandwidth, high-capacity setup. This is the physical basis for generation speeds of about 20 tokens per second.
A simple estimate: generation speed ≈ memory bandwidth ÷ bytes of weights activated per token. For 3B active parameters at 4-bit quantization (about 1.7 GB per token), the theoretical speed is 100 ÷ 1.7 ≈ 58 tok/s. After accounting for scheduling and compute overhead, the measured 20 tok/s is a reasonable result.
3. Hands-On: From Model Selection to Configuration
3.1 Model Selection
Choose an MoE model with roughly 30B-class total parameters and about 3B active parameters, and target a 4-bit or similar quantized version. Quantizing too aggressively, such as to 2-bit, noticeably hurts output quality. Using 8-bit can exceed available memory or slow generation.
3.2 Sample Run Configuration
The following shows the key configuration ideas, using a mainstream lightweight inference framework as an example:
# Start a local inference service (illustrative)llm-server \--model ./model-35b-moe-q4.gguf \--n-gpu-layers 99 \ # Offload as many weights as possible to the integrated GPU--gpu-backend generic \ # Use the generic cross-platform graphics compute backend--ctx-size 8192 \ # Limit context length to keep the KV cache from consuming too much memory--threads 8 # CPU threads that work with the integrated GPU for scheduling
Three details to note:
- Raise the memory limit for the integrated GPU: Some motherboard BIOS settings cap how much system memory the integrated GPU can access. You may need to raise this limit manually.
- Context length and memory use: The KV cache grows linearly with context length. On a 32 GB machine, keep the context around 8K tokens to leave room for the operating system and model weights.
- Operating system overhead: A lightweight Linux distribution saves about 2 GB to 4 GB of memory compared with a desktop Windows system. If you need to push memory use to the limit, consider switching the operating system.
4. Building a Complete AI Agent Workflow
Local deployment does more than chat. Once the inference service exposes an OpenAI-compatible API, mainstream agent orchestration frameworks, such as various open-source agent toolchains, can connect to it directly. This enables:
- Function calling and tool orchestration: The model runs local function calls to handle tasks such as file organization, code search, and data processing.
- RAG-based knowledge base Q&A: With a local vector database, the model answers questions over private documents using retrieval-augmented generation. The data stays on the local machine throughout.
- Multi-step automation: A looping plan-execute-reflect process lets the model complete long task chains locally.
Zero API fees, no network dependency, and private data that never leaves the device are the core advantages of local deployment over cloud solutions. For complex tasks that need stronger reasoning, cloud-hosted LLM services can serve as a supplement, such as the ERNIE series offered through Baidu AI Cloud. Check the official documentation for regional availability. This creates a hybrid architecture in which local hardware handles routine tasks and the cloud handles harder ones.
5. A Realistic Look at Cost and Limitations
A budget mini PC under 750 USD can deliver 35B MoE inference at 20 tokens per second or more, which makes it a strong value. The limitations are real, however:
- Long-context performance is constrained: As context grows, the KV cache takes up more memory and slows generation.
- Dense large models still cannot run: This approach depends on the low activation count of MoE models, so it cannot run dense 70B-class models.
- Bandwidth ceiling: Even with heavy optimization, generation speed cannot exceed the physical limit of memory bandwidth.
Overall, the combination of an integrated GPU, unified memory, and a lightweight inference framework gives individual developers and small teams a low-cost, practical path to local LLM deployment. It is unlikely to replace cloud services. For privacy-sensitive, high-frequency, or budget-constrained use cases, however, it is already practical.
