Text Generation
MLX
GGUF
1b
1b-active
5b
7b
allenai
android
apple-silicon
attested
calibration-aware-pruning
chain-of-custody
chinese
consumer-gpu
cryptographically-verified
edge-inference
embedded
english
expert-pruning
forge-alloy
fully-open
general
general-purpose
ggml
iphone
llama-cpp
lm-studio
local-inference
macbook
mixture-of-experts
mobile
Mixture of Experts
multilingual
ollama
olmoe
on-device
q5-k-m
q5_k_m
quantized
raspberry-pi
reproducible
sparse-moe
versatile
conversational
Instructions to use continuum-ai/olmoe-1b-7b-compacted-5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use continuum-ai/olmoe-1b-7b-compacted-5b with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("continuum-ai/olmoe-1b-7b-compacted-5b") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use continuum-ai/olmoe-1b-7b-compacted-5b with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M # Run inference directly in the terminal: llama cli -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M # Run inference directly in the terminal: llama cli -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
Use Docker
docker model run hf.co/continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
- LM Studio
- Jan
- vLLM
How to use continuum-ai/olmoe-1b-7b-compacted-5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "continuum-ai/olmoe-1b-7b-compacted-5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "continuum-ai/olmoe-1b-7b-compacted-5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
- Ollama
How to use continuum-ai/olmoe-1b-7b-compacted-5b with Ollama:
ollama run hf.co/continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
- Unsloth Studio
How to use continuum-ai/olmoe-1b-7b-compacted-5b with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for continuum-ai/olmoe-1b-7b-compacted-5b to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for continuum-ai/olmoe-1b-7b-compacted-5b to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for continuum-ai/olmoe-1b-7b-compacted-5b to start chatting
- Atomic Chat new
- MLX LM
How to use continuum-ai/olmoe-1b-7b-compacted-5b with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "continuum-ai/olmoe-1b-7b-compacted-5b"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "continuum-ai/olmoe-1b-7b-compacted-5b" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "continuum-ai/olmoe-1b-7b-compacted-5b", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use continuum-ai/olmoe-1b-7b-compacted-5b with Docker Model Runner:
docker model run hf.co/continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
- Lemonade
How to use continuum-ai/olmoe-1b-7b-compacted-5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull continuum-ai/olmoe-1b-7b-compacted-5b:Q5_K_M
Run and chat with the model
lemonade run user.olmoe-1b-7b-compacted-5b-Q5_K_M
List all available models
lemonade list
Upload MODEL_METHODOLOGY.md with huggingface_hub
Browse files- MODEL_METHODOLOGY.md +166 -0
MODEL_METHODOLOGY.md
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- 1b
|
| 4 |
+
- 1b-active
|
| 5 |
+
- 5b
|
| 6 |
+
- 7b
|
| 7 |
+
- allenai
|
| 8 |
+
- android
|
| 9 |
+
- apple-silicon
|
| 10 |
+
- attested
|
| 11 |
+
- calibration-aware-pruning
|
| 12 |
+
- chain-of-custody
|
| 13 |
+
- chinese
|
| 14 |
+
- consumer-gpu
|
| 15 |
+
- cryptographically-verified
|
| 16 |
+
- edge-inference
|
| 17 |
+
- embedded
|
| 18 |
+
- english
|
| 19 |
+
- expert-pruning
|
| 20 |
+
- forge-alloy
|
| 21 |
+
- fully-open
|
| 22 |
+
- general
|
| 23 |
+
- general-purpose
|
| 24 |
+
- ggml
|
| 25 |
+
- gguf
|
| 26 |
+
- iphone
|
| 27 |
+
- llama-cpp
|
| 28 |
+
- lm-studio
|
| 29 |
+
- local-inference
|
| 30 |
+
- macbook
|
| 31 |
+
- mixture-of-experts
|
| 32 |
+
- mlx
|
| 33 |
+
- mobile
|
| 34 |
+
- moe
|
| 35 |
+
- multilingual
|
| 36 |
+
- ollama
|
| 37 |
+
- olmoe
|
| 38 |
+
- on-device
|
| 39 |
+
- q5-k-m
|
| 40 |
+
- q5_k_m
|
| 41 |
+
- quantized
|
| 42 |
+
- raspberry-pi
|
| 43 |
+
- reproducible
|
| 44 |
+
- sparse-moe
|
| 45 |
+
- text-generation
|
| 46 |
+
- versatile
|
| 47 |
+
base_model: allenai/OLMoE-1B-7B-0924-Instruct
|
| 48 |
+
pipeline_tag: text-generation
|
| 49 |
+
license: apache-2.0
|
| 50 |
+
---
|
| 51 |
+
|
| 52 |
+
# 25% Experts Pruned, 36.0 HUMANEVAL (base 40.9)
|
| 53 |
+
|
| 54 |
+
**OLMoE-1B-7B-0924-Instruct** compacted via per-layer-normalized MoE expert pruning against the unmodified teacher.
|
| 55 |
+
|
| 56 |
+
- **HUMANEVAL**: 36.0 (base 40.9, Δ -4.9)
|
| 57 |
+
- **HUMANEVAL+PLUS**: 31.7 (base 36.6, Δ -4.9)
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
<p align="center">
|
| 61 |
+
<a href="https://cambriantech.github.io/forge-alloy/verify/#bba0a92ff0c8bebb">
|
| 62 |
+
<img src="alloy-qr.png" alt="Verify Chain of Custody" width="160"/>
|
| 63 |
+
</a>
|
| 64 |
+
</p>
|
| 65 |
+
|
| 66 |
+
<p align="center">
|
| 67 |
+
<a href="https://cambriantech.github.io/forge-alloy/verify/#bba0a92ff0c8bebb"><b>Every claim on this card is verified</b></a><br>
|
| 68 |
+
<b>Trust: self-attested</b> · 2 benchmarks · 1 device tested<br>
|
| 69 |
+
<a href="https://github.com/CambrianTech/forge-alloy">ForgeAlloy</a> chain of custody · <a href="olmoe-1b-7b-compacted-5b.alloy.json">Download alloy</a> · Merkle-chained
|
| 70 |
+
</p>
|
| 71 |
+
|
| 72 |
+
---
|
| 73 |
+
|
| 74 |
+
## About this model
|
| 75 |
+
|
| 76 |
+
Cross-architecture validation artifact for the §4.1.3.4 calibration-aware expert importance methodology. OLMoE-1B-7B-0924-Instruct (the smallest serious MoE on HuggingFace, fully-open Allen AI release) compacted from 64 experts per layer to 48 via per-layer-normalized activation-count importance ranking on a held-out Python code calibration corpus. Hardware-measured 36.0 HumanEval / 31.7 HumanEval+ vs the unmodified base's 40.9 / 36.6 — within −4.9 / −4.9 of the base anchor. The negative-baseline broad-corpus variant scored 28.0 / 26.2 (Δ −12.9 / −10.4); the +8.0 / +5.5 swing from changing only the calibration corpus is the second empirical anchor for §4.1.3.4 (the first was Qwen3-Coder-30B-A3B with a +9.7 swing). Two architectures (`Qwen3MoeForCausalLM` and `OlmoeForCausalLM`) now empirically validate the cross-architecture invariance claim: the metric is architecture-invariant, the calibration-corpus alignment is the lever.
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
## Benchmarks
|
| 80 |
+
|
| 81 |
+
| Benchmark | Score | Base | Δ | Verified |
|
| 82 |
+
|---|---|---|---|---|
|
| 83 |
+
| **humaneval** | **36.0** | 40.9 | -4.9 | ✅ Result hash |
|
| 84 |
+
| **humaneval_plus** | **31.7** | 36.6 | -4.9 | ✅ Result hash |
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
## What Changed (Base → Forged)
|
| 88 |
+
|
| 89 |
+
| | Base | Forged | Delta |
|
| 90 |
+
|---|---|---|---|
|
| 91 |
+
| **Pipeline** | | expert-activation-profile → expert-prune → quant → eval | 1 cycles |
|
| 92 |
+
|
| 93 |
+
## Runs On
|
| 94 |
+
|
| 95 |
+
| Device | Format | Size | Speed |
|
| 96 |
+
|--------|--------|------|-------|
|
| 97 |
+
| **NVIDIA GeForce RTX 5090** | Q5_K_M | 3.6GB | Verified |
|
| 98 |
+
| MacBook Pro 32GB | fp16 | 3.6GB | Expected |
|
| 99 |
+
| MacBook Air 16GB | Q8_0 | ~1.8GB | Expected |
|
| 100 |
+
| MacBook Air 8GB | Q4_K_M | ~1.1GB | Expected |
|
| 101 |
+
| iPhone / Android | Q4_K_M | ~1.1GB | Expected |
|
| 102 |
+
|
| 103 |
+
## Quick Start
|
| 104 |
+
|
| 105 |
+
```python
|
| 106 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 107 |
+
|
| 108 |
+
model = AutoModelForCausalLM.from_pretrained("continuum-ai/olmoe-1b-7b-compacted-5b",
|
| 109 |
+
torch_dtype="auto", device_map="auto")
|
| 110 |
+
tokenizer = AutoTokenizer.from_pretrained("continuum-ai/olmoe-1b-7b-compacted-5b")
|
| 111 |
+
|
| 112 |
+
inputs = tokenizer("def merge_sort(arr):", return_tensors="pt").to(model.device)
|
| 113 |
+
output = model.generate(**inputs, max_new_tokens=200)
|
| 114 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
## How It Was Made
|
| 119 |
+
|
| 120 |
+
```
|
| 121 |
+
expert-activation-profile → expert-prune → quant → eval (1 cycles)
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
- **expert-activation-profile**
|
| 125 |
+
> Same script unchanged from the Qwen3-Coder-30B-A3B forge — first cross-architecture validation that the activation-count importance metric ports across MoE families. The hooks register on `model.layers.{L}.mlp.gate` for both Qwen3MoE and OlmoeForCausalLM (same module path).
|
| 126 |
+
- **Expert pruning**: 0% of MoE experts removed pre-load
|
| 127 |
+
> Same script unchanged. Identical regex layout (unfused per-expert tensors at `model.layers.{L}.mlp.experts.{K}.{gate,up,down}_proj.weight`). Cross-arch portability confirmed: OlmoeForCausalLM and Qwen3MoeForCausalLM share the same prunable-unit module structure, so the script works without modification.
|
| 128 |
+
- **quant**
|
| 129 |
+
- **Calibrated evaluation**: anchored against `OLMoE-1B-7B-0924-Instruct` (published None, measured 40.9, ±3.0pt tolerance)
|
| 130 |
+
> Self-anchor calibration. HumanEval is not OLMoE's natural benchmark — OLMoE is general-purpose, not coder-specific. The 40.9 base / 36.0 student numbers are methodology validation, not tier-leading absolute quality. The artifact's value is the structural finding (cross-architecture portability + +8.0 swing from calibration alignment), not the absolute number.
|
| 131 |
+
- **Hardware**: NVIDIA GeForce RTX 5090
|
| 132 |
+
- **Forge tool**: [Continuum](https://github.com/CambrianTech/continuum) Factory + [sentinel-ai](https://github.com/CambrianTech/sentinel-ai)
|
| 133 |
+
## Limitations
|
| 134 |
+
|
| 135 |
+
- **HumanEval is not OLMoE's natural benchmark.** OLMoE is general-purpose (Allen AI), not coder-specific. The 40.9 base / 36.0 student numbers are methodology validation, not tier-leading absolute quality. For a tier-leading code model, see [`qwen3-coder-30b-a3b-compacted-19b-256k`](https://huggingface.co/continuum-ai/qwen3-coder-30b-a3b-compacted-19b-256k).
|
| 136 |
+
- **Validates §4.1.3.4 cross-architecture; does NOT compete on absolute numbers.** This is the second empirical anchor for the methodology paper, alongside the Qwen3-Coder-30B-A3B v1. Together they demonstrate that the activation-count importance metric is architecture-invariant across two structurally distinct MoE families.
|
| 137 |
+
- Calibration corpus was 300 Python code examples. For non-code workloads (math/reasoning/general), the methodology will preserve OLMoE's general capability if profiled on a matching corpus — but that's a separate forge run.
|
| 138 |
+
- Single GGUF tier shipped (Q5_K_M, 3.6 GB). Q4_K_M and Q8_0 will be added in v1.1 if there's demand.
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
## Chain of Custody
|
| 142 |
+
|
| 143 |
+
Scan the QR or [verify online](https://cambriantech.github.io/forge-alloy/verify/#bba0a92ff0c8bebb). Download the [alloy file](olmoe-1b-7b-compacted-5b.alloy.json) to verify independently.
|
| 144 |
+
|
| 145 |
+
| What | Proof |
|
| 146 |
+
|------|-------|
|
| 147 |
+
| Forged on | NVIDIA GeForce RTX 5090, ? |
|
| 148 |
+
| Published | [huggingface](https://huggingface.co/continuum-ai/olmoe-1b-7b-compacted-5b) — 2026-04-08T16:36:55.037319+00:00 |
|
| 149 |
+
| Trust level | [`self-attested`](https://github.com/CambrianTech/forge-alloy/blob/main/docs/ATTESTATION.md) |
|
| 150 |
+
| Spec | [ForgeAlloy](https://github.com/CambrianTech/forge-alloy) — Rust/Python/TypeScript |
|
| 151 |
+
|
| 152 |
+
## Make Your Own
|
| 153 |
+
|
| 154 |
+
Forged with [Continuum](https://github.com/CambrianTech/continuum) — a distributed AI world that runs on your hardware.
|
| 155 |
+
|
| 156 |
+
<p align="center">
|
| 157 |
+
<a href="https://github.com/CambrianTech/continuum"><img src="https://raw.githubusercontent.com/CambrianTech/continuum/main/docs/images/factory.png" alt="Continuum Model Factory" width="400"/></a>
|
| 158 |
+
</p>
|
| 159 |
+
|
| 160 |
+
The Factory configurator lets you design and forge custom models visually — context extension, pruning, LoRA, quantization, vision/audio modalities. Pick your target devices, the system figures out what fits.
|
| 161 |
+
|
| 162 |
+
[GitHub](https://github.com/CambrianTech/continuum) · [All Models](https://huggingface.co/continuum-ai) · [Forge-Alloy](https://github.com/CambrianTech/forge-alloy)
|
| 163 |
+
|
| 164 |
+
## License
|
| 165 |
+
|
| 166 |
+
apache-2.0
|