Text Generation
MLX
Safetensors
Rust
qwen2
7b
agentic-coding
android
apple-silicon
attested
bash
c
chain-of-custody
chinese
code
code-completion
code-generation
code-infill
compacted
compensation-lora
consumer-gpu
cpp
cryptographically-verified
css
distillation
edge-inference
efficient
embedded
english
forge-alloy
function-calling
general
general-purpose
go
head-pruning
html
iphone
java
javascript
knowledge-distillation
kotlin
llama-cpp
lm-studio
local-inference
lora
macbook
mobile
multilingual
ollama
on-device
optimized
php
pruned
python
qwen
qwen-coder
qwen2.5
qwen2.5-coder
raspberry-pi
reproducible
ruby
sql
swift
teacher-student
typescript
validation-artifact
versatile
conversational
Instructions to use continuum-ai/qwen2.5-coder-7b-compacted with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use continuum-ai/qwen2.5-coder-7b-compacted 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/qwen2.5-coder-7b-compacted") 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
- LM Studio
- Pi
How to use continuum-ai/qwen2.5-coder-7b-compacted with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "continuum-ai/qwen2.5-coder-7b-compacted"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "continuum-ai/qwen2.5-coder-7b-compacted" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use continuum-ai/qwen2.5-coder-7b-compacted 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/qwen2.5-coder-7b-compacted"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "continuum-ai/qwen2.5-coder-7b-compacted" # 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/qwen2.5-coder-7b-compacted", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use continuum-ai/qwen2.5-coder-7b-compacted with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "continuum-ai/qwen2.5-coder-7b-compacted"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default continuum-ai/qwen2.5-coder-7b-compacted
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use continuum-ai/qwen2.5-coder-7b-compacted with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "continuum-ai/qwen2.5-coder-7b-compacted"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "continuum-ai/qwen2.5-coder-7b-compacted" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload v2-7b-coder-compensated.alloy.json with huggingface_hub
Browse files
v2-7b-coder-compensated.alloy.json
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
| 1 |
+
{
|
| 2 |
+
"name": "v2-7b-coder-compensated",
|
| 3 |
+
"version": "1.0.0",
|
| 4 |
+
"description": "Methodology validation artifact for the v2 forge pipeline + KL-distillation compensation LoRA. Demonstrates that aggressive head pruning + activation-metric importance + pad-mode defrag, when paired with output-distribution distillation against the unmodified teacher, recovers near-base HumanEval capability (61.0 vs 62.2 base, within calibration tolerance). This is the empirical anchor for PLASTICITY-COMPACTION \u00a74.1.3.3 and the loss-function ablation that closes the \u00a74.1.3.2 PPL/HumanEval disconnect. NOT a Pareto improvement over the unmodified base 7B at any single VRAM tier \u2014 published as proof that the methodology stack works end-to-end, in preparation for the Qwen3.5-35B-A3B and 397B-A17B forges where the pruning dimension actually wins.",
|
| 5 |
+
"author": "continuum-ai",
|
| 6 |
+
"tags": [
|
| 7 |
+
"code",
|
| 8 |
+
"qwen2.5",
|
| 9 |
+
"7b",
|
| 10 |
+
"validation-artifact",
|
| 11 |
+
"forge-alloy",
|
| 12 |
+
"compensation-lora",
|
| 13 |
+
"distillation"
|
| 14 |
+
],
|
| 15 |
+
"license": "apache-2.0",
|
| 16 |
+
"source": {
|
| 17 |
+
"baseModel": "Qwen/Qwen2.5-Coder-7B",
|
| 18 |
+
"architecture": "qwen2",
|
| 19 |
+
"isMoE": false
|
| 20 |
+
},
|
| 21 |
+
"stages": [
|
| 22 |
+
{
|
| 23 |
+
"type": "prune",
|
| 24 |
+
"strategy": "activation-magnitude",
|
| 25 |
+
"level": 0.125,
|
| 26 |
+
"minHeadsPerLayer": 4,
|
| 27 |
+
"minKvHeadsPerLayer": 2,
|
| 28 |
+
"analysisSteps": 200,
|
| 29 |
+
"perLayerNormalized": true,
|
| 30 |
+
"defragMode": "pad",
|
| 31 |
+
"notes": "Layer-normalized activation-magnitude head importance (PLASTICITY-COMPACTION \u00a74.1.3.1 fix). Pad-mode defrag preserves the q_proj invariant num_q_heads*head_dim==hidden_size so the artifact loads in llama.cpp (Finding 6 fix from VALIDATED-TENSOR-SURGERY)."
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
"type": "lora",
|
| 35 |
+
"domain": "code",
|
| 36 |
+
"dataset": "m-a-p/CodeFeedback-Filtered-Instruction",
|
| 37 |
+
"steps": 500,
|
| 38 |
+
"learningRate": "2e-4",
|
| 39 |
+
"batchSize": 4,
|
| 40 |
+
"gradientAccumulation": 4,
|
| 41 |
+
"scheduler": "cosine",
|
| 42 |
+
"precision": "bf16",
|
| 43 |
+
"sequenceLength": 2048,
|
| 44 |
+
"calibrationSource": "code",
|
| 45 |
+
"notes": "Single-cycle code-domain LoRA fine-tuning on the pruned student. 1-cycle ablation chosen because the 3-cycle multi-cycle test surfaced the \u00a74.1.3.2 PPL/HumanEval disconnect (54.9 \u2192 46.3 across cycles)."
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "lora",
|
| 49 |
+
"name": "compensation-lora",
|
| 50 |
+
"domain": "distillation",
|
| 51 |
+
"lossType": "kl_logits",
|
| 52 |
+
"kdTemperature": 2.0,
|
| 53 |
+
"teacher": "Qwen/Qwen2.5-Coder-7B",
|
| 54 |
+
"calibrationDataset": "heldout_mix.jsonl (50 examples: code/math/science/history/multiple-choice, hand-written, disjoint from any benchmark)",
|
| 55 |
+
"steps": 500,
|
| 56 |
+
"learningRate": "1e-4",
|
| 57 |
+
"loraRank": 16,
|
| 58 |
+
"loraAlpha": 32,
|
| 59 |
+
"targetModules": [
|
| 60 |
+
"q_proj",
|
| 61 |
+
"k_proj",
|
| 62 |
+
"v_proj",
|
| 63 |
+
"o_proj",
|
| 64 |
+
"gate_proj",
|
| 65 |
+
"up_proj",
|
| 66 |
+
"down_proj"
|
| 67 |
+
],
|
| 68 |
+
"trainableParamsPct": 0.527,
|
| 69 |
+
"teacherPrecision": "bnb-8bit",
|
| 70 |
+
"studentPrecision": "fp16-grad-checkpoint",
|
| 71 |
+
"mergedAtSave": true,
|
| 72 |
+
"notes": "PLASTICITY-COMPACTION \u00a74.1.3.3. KL divergence on output logits is the structural fix for the \u00a74.1.3.2 disconnect. Loss-function ablation: MSE-on-hidden-states collapsed the model to 0.0 (degenerate fixed point); KL-on-logits recovered to 61.0. LoRA adapter merged into student weights at save time so inference-time VRAM and tokens/sec are unchanged from the un-compensated student."
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"type": "eval",
|
| 76 |
+
"benchmarks": [
|
| 77 |
+
{
|
| 78 |
+
"name": "humaneval",
|
| 79 |
+
"calibrated": true
|
| 80 |
+
},
|
| 81 |
+
{
|
| 82 |
+
"name": "humaneval_plus",
|
| 83 |
+
"calibrated": true
|
| 84 |
+
}
|
| 85 |
+
],
|
| 86 |
+
"calibrationAnchor": {
|
| 87 |
+
"model": "Qwen/Qwen2.5-Coder-7B",
|
| 88 |
+
"publishedScore": 61.6,
|
| 89 |
+
"publishedSource": "Qwen2.5-Coder Technical Report Table 5, arXiv:2409.12186",
|
| 90 |
+
"measuredScore": 62.2,
|
| 91 |
+
"delta": 0.6,
|
| 92 |
+
"tolerance": 3.0,
|
| 93 |
+
"passed": true
|
| 94 |
+
},
|
| 95 |
+
"notes": "All HumanEval numbers are anchor-calibrated against the unmodified Qwen2.5-Coder-7B base measured on the same hardware/pipeline in the same run. Hard-fail tolerance: \u00b13.0 points. Anchor delta: +0.6/+0.7 vs Qwen-published 61.6/53.0, deterministic across 6+ independent runs."
|
| 96 |
+
}
|
| 97 |
+
],
|
| 98 |
+
"cycles": 1,
|
| 99 |
+
"hardware": {
|
| 100 |
+
"minVramGb": 16,
|
| 101 |
+
"recommendedVramGb": 24,
|
| 102 |
+
"deviceTargets": [
|
| 103 |
+
"rtx3090",
|
| 104 |
+
"rtx4090",
|
| 105 |
+
"rtx5090"
|
| 106 |
+
]
|
| 107 |
+
},
|
| 108 |
+
"results": {
|
| 109 |
+
"baselinePerplexity": null,
|
| 110 |
+
"finalPerplexity": null,
|
| 111 |
+
"improvementPct": null,
|
| 112 |
+
"benchmarks": [
|
| 113 |
+
{
|
| 114 |
+
"name": "humaneval",
|
| 115 |
+
"metric": "pass@1",
|
| 116 |
+
"score": 61.0,
|
| 117 |
+
"baseScore": 62.2,
|
| 118 |
+
"delta": -1.2,
|
| 119 |
+
"calibrated": true,
|
| 120 |
+
"withinCalibrationTolerance": true
|
| 121 |
+
},
|
| 122 |
+
{
|
| 123 |
+
"name": "humaneval_plus",
|
| 124 |
+
"metric": "pass@1",
|
| 125 |
+
"score": 53.0,
|
| 126 |
+
"baseScore": 53.7,
|
| 127 |
+
"delta": -0.7,
|
| 128 |
+
"calibrated": true,
|
| 129 |
+
"withinCalibrationTolerance": true
|
| 130 |
+
}
|
| 131 |
+
],
|
| 132 |
+
"lossFunctionAblation": [
|
| 133 |
+
{
|
| 134 |
+
"lossType": "mse_hidden",
|
| 135 |
+
"humaneval": 0.0,
|
| 136 |
+
"humaneval_plus": 0.0,
|
| 137 |
+
"outcome": "degenerate fixed point \u2014 model collapsed to outputting '0'"
|
| 138 |
+
},
|
| 139 |
+
{
|
| 140 |
+
"lossType": "kl_logits",
|
| 141 |
+
"humaneval": 61.0,
|
| 142 |
+
"humaneval_plus": 53.0,
|
| 143 |
+
"outcome": "near-base recovery within calibration tolerance"
|
| 144 |
+
}
|
| 145 |
+
],
|
| 146 |
+
"fourRunProgression": [
|
| 147 |
+
{
|
| 148 |
+
"run": 1,
|
| 149 |
+
"config": "broken global-flat L2-weight",
|
| 150 |
+
"humaneval": 50.0
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"run": 2,
|
| 154 |
+
"config": "layer-normalized activation, 1-cycle 500-step",
|
| 155 |
+
"humaneval": 54.9
|
| 156 |
+
},
|
| 157 |
+
{
|
| 158 |
+
"run": 3,
|
| 159 |
+
"config": "layer-normalized activation, 3-cycle (ablation)",
|
| 160 |
+
"humaneval": 46.3
|
| 161 |
+
},
|
| 162 |
+
{
|
| 163 |
+
"run": 4,
|
| 164 |
+
"config": "1-cycle + KL compensation LoRA",
|
| 165 |
+
"humaneval": 61.0
|
| 166 |
+
}
|
| 167 |
+
],
|
| 168 |
+
"hardwareVerified": [
|
| 169 |
+
{
|
| 170 |
+
"device": "NVIDIA GeForce RTX 5090",
|
| 171 |
+
"vramGb": 32
|
| 172 |
+
}
|
| 173 |
+
],
|
| 174 |
+
"integrity": {
|
| 175 |
+
"trustLevel": "self-attested"
|
| 176 |
+
}
|
| 177 |
+
},
|
| 178 |
+
"receipt": {
|
| 179 |
+
"publications": [
|
| 180 |
+
{
|
| 181 |
+
"target": "huggingface",
|
| 182 |
+
"url": "https://huggingface.co/continuum-ai/v2-7b-coder-compensated",
|
| 183 |
+
"publishedAt": "2026-04-08T04:41:28.366728+00:00"
|
| 184 |
+
}
|
| 185 |
+
],
|
| 186 |
+
"issuedAt": "2026-04-08T04:41:28.366728+00:00"
|
| 187 |
+
}
|
| 188 |
+
}
|