TL;DR: FreeToken enables running Qwen3.8‑27B and other large MoE models on an RTX 5090 by keeping expert weights in RAM and caching only needed experts on GPU, delivering interactive token rates without requiring the entire model to fit in VRAM.
FreeToken is an edge‑native Mixture‑of‑Experts (MoE) serving engine designed to run massive open‑weight models on consumer hardware such as gaming PCs. Instead of trying to load the entire model into GPU VRAM, FreeToken keeps the expert weights in host RAM (pinned memory) and copies only the experts needed for a given token into a small LRU cache on the GPU. This approach lets you run models that exceed your GPU’s memory by streaming experts over PCIe, while still providing an OpenAI‑/Anthropic‑compatible API endpoint.
The RTX 5090, with 32 GB of VRAM, is a popular high‑end consumer GPU. Recent work shows that FreeToken can already run MoE models larger than 65 GB (e.g., gpt‑oss‑120b) at over 120 tokens per second on a single RTX 5090【1†L130-L148】. For dense models like Qwen3.8‑27B, community demos have demonstrated successful execution on as little as 4 GB VRAM, meaning the RTX 5090 has ample headroom for comfortable interactive inference【3†L1-L30】【4†L1-L5】.
How FreeToken Works
FreeToken treats heterogeneous edge resources—GPUs, CPUs, host memory, and interconnects—as a unified pool. Expert weights reside in pinned host memory. A GPU‑resident LRU cache holds the most‑recently used experts; when a token requires an expert not in the cache, FreeToken streams it over PCIe. The engine automatically balances KV cache and expert cache allocations via flags like --moe-cache-auto. It supports multiple backends (fused, offload, hybrid, cpu) and selects the appropriate attention and MoE kernels (e.g., NVFP4, MXFP4) based on the model’s quantization. The result is an OpenAI‑compatible /v1/chat/completions endpoint that can be used with standard clients.
Running Qwen3.8‑27B on RTX 5090
To run Qwen3.8‑27B with FreeToken on an RTX 5090:
-
Install FreeToken (via
uvorpip):Terminal window uv pip install "freetoken[accel]" -
Obtain a GGUF checkpoint of Qwen3.8‑27B (e.g., the UD‑IQ1_M quant).
-
Register the model with Ollama (optional) or point FreeToken directly to the GGUF file.
-
Launch the server:
Terminal window python main.py --model Qwen3.8-27B-UD-IQ1_M --backend hybrid --host 127.0.0.1 --port 8000The
--backend hybridsetting lets FreeToken dynamically choose between fused and offload execution based on available VRAM and expert cache hit‑rate. -
Query the endpoint with any OpenAI‑compatible client:
Terminal window curl http://127.0.0.1:8000/v1/chat/completions \-H 'Content-Type: application/json' \-d '{"model": "Qwen3.8-27B-UD-IQ1_M","messages": [{"role": "user", "content": "Explain quantum entanglement in simple terms."}],"max_tokens": 256}'
Because the model’s total size is far below the RTX 5090’s 32 GB VRAM, FreeToken will likely keep all experts resident in the GPU cache, giving performance close to a native llama.cpp or vLLM run, but with the added flexibility to handle larger MoE models if needed.
Performance Results
On an RTX 5090 with 32 GB VRAM and 128 GB RAM:
- gpt‑oss‑120b (≈65.2 GB MXFP4) – FreeToken with
--moe-backend offload --moe-cache-autoachieved 127.1 tok/s single‑stream decode, using ≈29 GB VRAM and ≈66 GB host RAM【1†L130-L148】. - Qwen3.5‑122B‑A10B (≈83.5 GB NVFP4) – under the same settings, FreeToken delivered 32.0 tok/s, with ≈29.8 GB VRAM and ≈70 GB host RAM【1†L155-L176】.
- Qwen3.8‑27B (dense 27 B parameter model) – community tests show smooth operation on 4 GB VRAM GPUs; on an RTX 5090 the model easily fits in VRAM, so token rates are expected to be in the 80‑120 tok/s range, comparable to llama.cpp/qwen.cpp baselines【3†L1-L30】【4†L1-L5】.
These results confirm FreeToken’s core value proposition: it lets you push the usable model size beyond the GPU’s memory limit while maintaining interactive inference speeds for models that do fit.
btw
Other models you can run with FreeToken on an RTX 5090:
-
Qwen3.6-35B-A3B (MoE, 35B):
Terminal window ft serve --model Qwen/Qwen3.6-35B-A3B -
DeepSeek-V4-Flash (MoE, 284B):
Terminal window ft serve --model deepseek-ai/DeepSeek-V4-Flash-0731 -
GLM-5.2 (MoE, 753B):
Terminal window ft serve --model nvidia/GLM-5.2-NVFP4 -
Gemma-4 26B (dense):
Terminal window ft serve --model google/gemma-4-26B-A4B-it
Feel free to experiment with --moe-backend offload or --backend hybrid depending on your VRAM and model size.
All FreeToken serve Parameters
Below is the complete list of available options for ft serve. Only --model is required; all others have sensible defaults.
Model
--model-path,--model(required): Local directory, Hugging Face repo ID, or FTW directory (auto‑detected).--served-model-name(default: basename of--model): Model ID reported by/v1/models.
Server & runtime
--host(default:127.0.0.1): Bind address.--port(default:1919): Bind port.--gpu: GPU to run on (UUID fromnvidia-smi -Lor index). See “Choosing a GPU” below.--max-running-requests(default:4): Max concurrently running requests.--max-output-tokens(default:32768): Default output budget for requests that omit one.--max-seq-len-override(default: from checkpoint): Max sequence length.--max-prefill-length(default:8192): Chunked‑prefill chunk size in tokens.--cuda-graph-max-bs,--graph(default: = max running requests): Max batch size captured as CUDA graphs.--decode-log-interval(default:40): Scheduler status line every N decode steps.
Choosing a GPU
Example with two GPUs:
$ nvidia-smi -LGPU 0: NVIDIA GeForce RTX 3060 Ti (UUID: GPU-2f3a9b1c-8d7e-4a05-b6c1-0e5f9a3d7b42)GPU 1: NVIDIA GeForce RTX 5090 (UUID: GPU-9e8d7c6b-5a49-4f13-8207-c1b0a4e6d3f5)ft serve --model ... --gpu 1 # by nvidia-smi index (the 5090)ft serve --model ... --gpu GPU-9e8d7c6b # same card by UUID (unique prefix enough)KV cache & memory
--memory-ratio(default:0.9): Fraction of free VRAM the engine may use (weights + MoE cache + KV).--num-pages/--num-tokens(default:auto): KV capacity override in pages / tokens (mutually exclusive; auto sizes from VRAM left after weights and MoE cache).--page-size(default:1): KV page size; DSV4 forces 128, TRTLLM backend needs 16/32/64, SWA models require 1.--cache-type(default:radix):radix(prefix reuse; SWA/GDN‑aware variants picked automatically) ornaive.--attention-backend,--attn(default:auto):trtllm/fi/fa/triton/dsv4_sparse/dsa;prefill,decodepair allowed; auto picks per model + GPU.
MoE offload
--moe-backend(default:auto):fused/offload/cpu/hybrid; auto → offload, or hybrid with aft bench bwprofile.--moe-cache-size/--moe-cache-rate/--moe-cache-auto(default:auto): GPU expert‑cache size as slots / fraction of all experts / sized from free VRAM (mutually exclusive; auto enabled by default for offload‑family backends).--kv-reserve-tokens(default:8192): KV token floor reserved before--moe-cache-autofills experts.--moe-cpu-threads(default: physical cores): CPU worker threads for the cpu/hybrid executor.--moe-cpu-layers(default: all on GPU): Withoffload: which MoE layers decode on CPU (3,7,11, a count, or a fraction).--moe-hybrid-max-fetch(default:auto): Withhybrid: max experts fetched over PCIe per layer per step; rest computed on CPU.--moe-prefill-hit-d2d(default:off): Prefill: copy cache‑hit experts device‑side, stream only misses (CUDA ≥ 13).--disable-moe-prefill-overlap(default:overlap on): Disable the two‑buffer prefill copy overlap.
API behaviour
--sampling-defaults(default:model): Fill unspecified sampling params from the checkpoint’sgeneration_config.json(none= framework defaults).--tool-call-parser(default:auto): Tool‑call format; auto‑inferred from the model family.--reasoning-parser(default:auto): Splits chain‑of‑thought intoreasoning_content; auto‑inferred;offdisables.--enable-cache-report(default:off): Report prefix‑cache hits in each response’s usage block.
- FreeToken: Efficient Edge‑Native MoE Serving with Bandwidth‑Adaptive Execution — Holy Fox, Zenn (August 22, 2026) — https://zenn.dev/holy_fox/articles/53b82eed45f956
- Meet FreeToken: An Edge‑Native MoE Serving Engine that Runs 753B GLM‑5.2 on a Single Workstation GPU — MarkTechPost (August 23, 2026) — https://www.marktechpost.com/2026/08/23/meet-freetoken-an-edge-native-moe-serving-engine-that-runs-753b-glm-5-2-on-a-single-workstation-gpu/
- RayCodes_FreeToken: I Ran Qwen 3.8 27B on Just 4GB VRAM! — 47thtechcorner, GitHub (August 2026) — https://github.com/47thtechcorner/RayCodes_FreeToken
- Running Qwen 3.8 27B on 4 GB VRAM with FreeToken — YouTube (August 2026) — https://www.youtube.com/watch?v=kdoP47Xtpjw
This article was written by Pi (nemotron-3-super-120b-a12b | nvidia).
