Downloads · 30 days
25
12% of all-time downloads
MikeKuykendall/phi-3.5-moe-q8-0-cpu-offload-gguf
phi-3.5-moe-q8-0-cpu-offload-gguf is a text generation model from MikeKuykendall. Use it when you need the model to write or continue text. The card lists the license as mit.
This is a Q80 quantization of Microsoft's Phi-3.5-MoE-Instruct model with MoE (Mixture of Experts) CPU offloading capability enabled via Rust bindings for llama.cpp.
Downloads · 30 days
25
12% of all-time downloads
All-time downloads
216
Public
Repo size
44.5 GB
Likes
0
Public
Click a slice to open those files.
.gguf44.5 GB · 100%
From the Hugging Face model README
This is a Q8_0 quantization of Microsoft's Phi-3.5-MoE-Instruct model with MoE (Mixture of Experts) CPU offloading capability enabled via Rust bindings for llama.cpp.
Tested on Lambda Cloud GH200 (96GB VRAM, 480GB RAM, CUDA 12.8) with shimmy v1.6.0:
| Configuration | VRAM Usage | VRAM Saved | Reduction |
|---|---|---|---|
| All GPU (baseline) | 41.91 GB | - | - |
CPU Offload (--cpu-moe) | 2.46 GB | 39.45 GB | 94.1% |
Mixture of Experts models activate only a subset of parameters per token (sparse activation). This quantization includes Rust bindings that expose llama.cpp's MoE CPU offloading feature, allowing inactive experts to reside in system RAM instead of VRAM.
Note: The core MoE CPU offloading algorithm was implemented in llama.cpp (PR #15077, August 2025). This release provides Rust language bindings and production integration for that functionality.
# Download the model
huggingface-cli download MikeKuykendall/phi-3.5-moe-q8-0-cpu-offload-gguf \
phi-3.5-moe-Q8_0.gguf --local-dir ./models
# Run with CPU offloading (uses ~2.5 GB VRAM)
shimmy serve \
--model-dirs ./models \
--cpu-moe \
--bind 127.0.0.1:11435
# Run without offloading (uses ~42 GB VRAM)
shimmy serve \
--model-dirs ./models \
--bind 127.0.0.1:11435
use llama_cpp_2::context::params::LlamaContextParams;
use llama_cpp_2::llama_backend::LlamaBackend;
use llama_cpp_2::model::params::LlamaModelParams;
use llama_cpp_2::model::LlamaModel;
fn main() {
let backend = LlamaBackend::init().unwrap();
// Enable MoE CPU offloading
let model_params = LlamaModelParams::default()
.with_cpu_moe_all(); // Offload all inactive experts to CPU
let model = LlamaModel::load_from_file(
&backend,
"phi-3.5-moe-Q8_0.gguf",
&model_params
).unwrap();
let ctx_params = LlamaContextParams::default()
.with_n_ctx(2048);
let mut ctx = model.new_context(&backend, ctx_params).unwrap();
// ... tokenize and generate as normal
}
# Build llama.cpp with CUDA support
cmake -B build -DGGML_CUDA=ON
cmake --build build --config Release
# Run with CPU offloading
./build/bin/llama-cli \
-m phi-3.5-moe-Q8_0.gguf \
-p "Explain quantum computing" \
--cpu-moe
Phi-3.5-MoE uses a sparse Mixture of Experts architecture where only a subset of experts are activated per token. This allows the model to have high capacity (many parameters) while maintaining efficiency (sparse activation).
The --cpu-moe flag (or with_cpu_moe_all() in Rust) tells llama.cpp to:
This dramatically reduces VRAM usage with a manageable performance trade-off.
Prompt: "Explain quantum computing in simple terms"
Response:
Quantum computing is a type of computing that uses the principles of quantum mechanics, a branch of physics that describes the behavior of particles at the smallest scales. Unlike classical computers that use bits (0s and 1s) to process information...
(High-quality response, near-F16 quality)
If you use this model in your work, please cite the original Phi-3.5 paper and acknowledge the quantization:
@article{phi3.5,
title={Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone},
author={Microsoft Research},
year={2024}
}
License: MIT (inherited from base model)
Quantized by: MikeKuykendall
Date: October 2025