Downloads ยท 30 days
139
8% of all-time downloads
MikeKuykendall/gpt-oss-20b-moe-cpu-offload-gguf
gpt-oss-20b-moe-cpu-offload-gguf is a text generation model from MikeKuykendall. Use it when you need the model to write or continue text. It is set up for llama.cpp. The card lists the license as apache-2.0.
๐ First Implementation of MoE CPU Offloading Technology ๐ฏ 99.9% VRAM Reduction (2MB vs 15GB expected) โก 20B Parameters with Revolutionary Memory Efficiency
Downloads ยท 30 days
139
8% of all-time downloads
All-time downloads
1.8K
Public
Repo size
81.5 GB
Likes
3
Public
Click a slice to open those files.
.gguf40.2 GB ยท 49%
From the Hugging Face model README
๐ First Implementation of MoE CPU Offloading Technology
๐ฏ 99.9% VRAM Reduction (2MB vs 15GB expected)
โก 20B Parameters with Revolutionary Memory Efficiency
This repository contains GGUF format model files for WeOpenML's GPT-OSS 20B with groundbreaking CPU expert offloading technology. This is the first production implementation of MoE CPU offloading, achieving unprecedented 99.9% VRAM reduction while maintaining full generation quality.
CPU Expert Offloading is a revolutionary approach that stores MoE expert tensors in system RAM rather than GPU VRAM:
Total Parameters: 20.9B
Active Parameters: ~2.6B (per forward pass)
Expert Configuration: 32 experts per layer, 4 active per token
Layers: 24 transformer layers
Context Window: 131,072 tokens (sliding window)
Vocabulary: 50,257 tokens
Precision: F16 (16-bit floating point)
| Metric | Value |
|---|---|
| VRAM Usage | 2MB (vs 15GB expected) |
| Memory Efficiency | 99.9% VRAM reduction |
| Expert Tensors | 81.5GB in CPU memory |
| Load Time | ~30 seconds |
| Generation Speed | Near-native performance |
| Quality Loss | None (F16 precision maintained) |
# Clone shimmy with MoE CPU offloading support
git clone -b feat/moe-cpu-offload https://github.com/Michael-A-Kuykendall/shimmy.git
cd shimmy
# Set environment variables
export SHIMMY_BASE_GGUF="/path/to/gpt-oss-20b-moe-f16.gguf"
# Run with CPU MoE offloading
cargo run --release --features llama -- probe gpt-oss-20b --cpu-moe
cargo run --release --features llama -- generate gpt-oss-20b \
--prompt "Write a Python function for fibonacci sequence" --max-tokens 100 --cpu-moe
# Compile llama.cpp with CUDA support
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
make LLAMA_CUBLAS=1
# Run with expert offloading
./main -m gpt-oss-20b-moe-f16.gguf -p "Hello, world!" \
--moe-cpu-offload --temp 0.7 -c 2048 -n 50
The model uses ChatML format:
<|im_start|>system
You are a helpful AI assistant.<|im_end|>
<|im_start|>user
Your question here<|im_end|>
<|im_start|>assistant
# Install HuggingFace CLI
pip install huggingface-hub
# Download the model
huggingface-cli download MikeKuykendall/gpt-oss-20b-moe-cpu-offload-gguf \
gpt-oss-20b-moe-f16.gguf --local-dir . --local-dir-use-symlinks False
The model file is large (81.5GB). Consider using a download manager:
| File | Size | Description |
|---|---|---|
gpt-oss-20b-moe-f16.gguf | 81.5GB | F16 precision, optimal quality |
This model pioneered the technique where MoE expert tensors are stored in system RAM:
Loading: tensor blk.0.ffn_gate_exps.weight buffer type overridden to CPU
Loading: tensor blk.0.ffn_down_exps.weight buffer type overridden to CPU
Loading: tensor blk.0.ffn_up_exps.weight buffer type overridden to CPU
... (repeated for all 24 layers ร 32 experts = 768 expert tensors)
This model proved that MoE CPU offloading is viable and opened the door to running massive MoE models on consumer hardware:
GPT-OSS uses sliding window attention for efficient long context processing:
With 32 experts and 4 active per token:
This GGUF conversion is based on WeOpenML's GPT-OSS 20B, a high-quality mixture of experts model trained on diverse datasets.
@software{gpt_oss_20b_cpu_offload,
title={GPT-OSS 20B MoE CPU Offload GGUF},
author={Kuykendall, Mike},
year={2024},
url={https://huggingface.co/MikeKuykendall/gpt-oss-20b-moe-cpu-offload-gguf},
note={First implementation of CPU expert offloading for MoE models}
}
This model conversion follows the license terms of the original GPT-OSS 20B model.
For technical issues or improvements to the CPU offloading implementation, please visit the shimmy repository.
Historical Significance: This model represents the first successful implementation of MoE CPU expert offloading, proving the viability of running 20B+ parameter MoE models with minimal VRAM requirements and paving the way for democratized access to large-scale AI models.