Text Generation
GGUF
English
llama.cpp
qwen3_5
pruning
depth-pruning
distillation
reasoning
conversational
Instructions to use devvexus/marlowe-22b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use devvexus/marlowe-22b 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 devvexus/marlowe-22b # Run inference directly in the terminal: llama cli -hf devvexus/marlowe-22b
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf devvexus/marlowe-22b # Run inference directly in the terminal: llama cli -hf devvexus/marlowe-22b
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 devvexus/marlowe-22b # Run inference directly in the terminal: ./llama-cli -hf devvexus/marlowe-22b
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 devvexus/marlowe-22b # Run inference directly in the terminal: ./build/bin/llama-cli -hf devvexus/marlowe-22b
Use Docker
docker model run hf.co/devvexus/marlowe-22b
- LM Studio
- Jan
- vLLM
How to use devvexus/marlowe-22b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devvexus/marlowe-22b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devvexus/marlowe-22b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/devvexus/marlowe-22b
- Ollama
How to use devvexus/marlowe-22b with Ollama:
ollama run hf.co/devvexus/marlowe-22b
- Unsloth Desktop
- Pi
How to use devvexus/marlowe-22b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devvexus/marlowe-22b
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "devvexus/marlowe-22b" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use devvexus/marlowe-22b with Docker Model Runner:
docker model run hf.co/devvexus/marlowe-22b
- Lemonade
How to use devvexus/marlowe-22b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devvexus/marlowe-22b
Run and chat with the model
lemonade run user.marlowe-22b-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use devvexus/marlowe-22b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devvexus/marlowe-22b
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 devvexus/marlowe-22b
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use devvexus/marlowe-22b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf devvexus/marlowe-22b
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 "devvexus/marlowe-22b" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,4 +1,218 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
base_model: Qwen/Qwen3.8-27B
|
| 4 |
+
library_name: transformers
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- qwen3_5
|
| 10 |
+
- pruning
|
| 11 |
+
- depth-pruning
|
| 12 |
+
- distillation
|
| 13 |
+
- reasoning
|
| 14 |
---
|
| 15 |
+
|
| 16 |
+
# Marlowe-22B (R1.5)
|
| 17 |
+
|
| 18 |
+
**A 27B-class reasoning model compressed to 22.3B so it runs entirely on one 16 GB consumer GPU β
|
| 19 |
+
and measured, domain by domain, against the model it came from.**
|
| 20 |
+
|
| 21 |
+
Marlowe-22B removes 12 layers from **Qwen3.8-27B** and heals the loss by distilling from the 27B
|
| 22 |
+
itself. R1.5 keeps **94.8% of the facts its parent demonstrably knows**, at **81% of the
|
| 23 |
+
parameters**, with the whole model resident in 16 GB at Q4_K_M β no layer offload, no paging.
|
| 24 |
+
|
| 25 |
+
This is round three of a planned seven-round program. R1.7, R1.8 and R2 are scheduled; the
|
| 26 |
+
roadmap is at the bottom, along with what each round is built to move.
|
| 27 |
+
|
| 28 |
+
| | |
|
| 29 |
+
|---|---|
|
| 30 |
+
| parameters | 22.30 B (parent: 27 B) |
|
| 31 |
+
| layers | 52 β 36 linear-attention (DeltaNet) + 16 full-attention (parent: 64 = 48 + 16) |
|
| 32 |
+
| hidden / intermediate | 5120 / 17408 |
|
| 33 |
+
| KV heads Γ head dim | 4 Γ 256, on the 16 full-attention layers only |
|
| 34 |
+
| vocabulary | 248,320 |
|
| 35 |
+
| max position embeddings | 262,144 |
|
| 36 |
+
| modality | text only (the parent's vision tower is not included) |
|
| 37 |
+
| thinking | on by default; `reasoning_effort` xhigh / medium / low |
|
| 38 |
+
| release build | GGUF **Q4_K_M, 13.74 GB** |
|
| 39 |
+
|
| 40 |
+
## Why compress this model in particular
|
| 41 |
+
|
| 42 |
+
The parent is a hybrid: most layers are linear-attention (DeltaNet), and only every fourth is full
|
| 43 |
+
attention. Its KV cache is therefore tiny β **64 KB per token at f16, ~34 KB at q8_0** β so long
|
| 44 |
+
contexts are cheap to hold. What it cannot do is fit in 16 GB at a bit width that leaves its
|
| 45 |
+
answers intact. Marlowe-22B is the same architecture, twelve layers shorter, at the size where a
|
| 46 |
+
4-bit build and a long context fit on one card together.
|
| 47 |
+
|
| 48 |
+
## Method
|
| 49 |
+
|
| 50 |
+
1. **Layer profiling.** Each layer scored by the KL divergence its removal induces on held-out
|
| 51 |
+
text β measured, not assumed from depth heuristics.
|
| 52 |
+
2. **Depth pruning.** The twelve cheapest layers by that measure: indices
|
| 53 |
+
`4, 5, 8, 9, 13, 14, 16, 17, 37, 38, 40, 41` β all linear-attention. Every full-attention layer
|
| 54 |
+
survived, as did the first four and the last ten layers.
|
| 55 |
+
3. **Heal (R1).** LoRA (r=32, Ξ±=64) trained against the parent's **top-64 log-probs** β forward KL
|
| 56 |
+
against a real distribution, not hard labels β over **27.5 M tokens** of a 35 M-token teacher
|
| 57 |
+
cache (arXiv, open-web-math, AlgebraicStack, FineWeb-Edu, PG-19, plus 1,314 reasoning traces
|
| 58 |
+
from the parent). Stopped deliberately when held-out KL flattened, rather than at budget
|
| 59 |
+
exhaustion.
|
| 60 |
+
4. **Targeted repair (R1.5).** Probing located specific facts the pruned model had lost β RMSNorm's
|
| 61 |
+
mean-of-squares, RoPE's exponent, the GELU cubic constant, Adam's bias correction. A 1.5 M-token
|
| 62 |
+
pass on documents carrying exactly those facts closed them.
|
| 63 |
+
|
| 64 |
+
The adapter is merged; these are plain weights.
|
| 65 |
+
|
| 66 |
+
## Results
|
| 67 |
+
|
| 68 |
+
### Knowledge retention against the parent
|
| 69 |
+
|
| 70 |
+
Facts are mined from documents **hash-dropped against the heal corpus**, and **the parent is scored
|
| 71 |
+
first: every item the parent itself fails is discarded** β so only knowledge the 27B demonstrably
|
| 72 |
+
has is counted, and the student is never charged for its teacher's gaps. Denominator: **3,859
|
| 73 |
+
parent-verified facts** (6,002 mined items before gating). Each cell is the share of those facts
|
| 74 |
+
the model also knows.
|
| 75 |
+
|
| 76 |
+
| domain | pruned, unhealed | **R1.5** | recovered by healing |
|
| 77 |
+
|---|---:|---:|---:|
|
| 78 |
+
| chemistry / biology | 90.5% | **96.0%** | +5.5 |
|
| 79 |
+
| physics | 79.8% | **85.3%** | +5.5 |
|
| 80 |
+
| engineering | 88.9% | **91.6%** | +2.7 |
|
| 81 |
+
| statistics | 87.4% | **89.2%** | +1.8 |
|
| 82 |
+
| mathematics | 93.4% | **94.8%** | +1.4 |
|
| 83 |
+
| general | 96.3% | **97.4%** | +1.1 |
|
| 84 |
+
| machine learning | 92.4% | **93.2%** | +0.8 |
|
| 85 |
+
| computer science | 91.2% | **89.9%** | β1.3 |
|
| 86 |
+
| **overall** | **93.3%** | **94.8%** | **+1.5** |
|
| 87 |
+
|
| 88 |
+
Five domains sit above 91%; the program's standard is **90% in every domain, not on average**, and
|
| 89 |
+
physics, statistics and computer science are the remaining targets β see the roadmap.
|
| 90 |
+
|
| 91 |
+
### Derivation, not recall
|
| 92 |
+
|
| 93 |
+
120 generated engineering problems, parameters sampled outside tutorial values and answers computed
|
| 94 |
+
from the defining formula, so a memorised answer scores zero: RoPE frequencies, GELU, Adam updates,
|
| 95 |
+
softmax, cosine schedules, KV-cache sizing, LoRA parameter counts. **R1.5 answers 92 of 120.**
|
| 96 |
+
|
| 97 |
+
The sharper number is the hardest 60 β the families the pruned model failed outright:
|
| 98 |
+
|
| 99 |
+
| | correct |
|
| 100 |
+
|---|---:|
|
| 101 |
+
| pruned, unhealed | 10 / 60 |
|
| 102 |
+
| **R1.5** | **32 / 60** |
|
| 103 |
+
| parent (27B) | 41 / 60 |
|
| 104 |
+
|
| 105 |
+
Healing recovered **71% of the gap** pruning opened on the material it damaged most.
|
| 106 |
+
|
| 107 |
+
### Arithmetic fidelity
|
| 108 |
+
|
| 109 |
+
Teacher-forced on held-out worked computations, the parent predicts the next computed digit with
|
| 110 |
+
**67.9%** top-1 accuracy; R1.5 reaches **64.1%** β a 0.115-nat gap in log-probability. KV-cache and
|
| 111 |
+
attention-scaling arithmetic is already at parent level; rotation- and trigonometry-heavy work
|
| 112 |
+
(RoPE, cosine schedules) is where the remaining distance lives, and it is R1.7's first target.
|
| 113 |
+
|
| 114 |
+
## How it is measured
|
| 115 |
+
|
| 116 |
+
The instruments matter as much as the weights here, and every one of them is built to make a
|
| 117 |
+
flattering result hard to get:
|
| 118 |
+
|
| 119 |
+
- **Parent-gated retention bank** β the teacher is scored first and its own failures are dropped,
|
| 120 |
+
so the headline cannot be inflated by items nobody knows. Sources are hash-dropped against the
|
| 121 |
+
training corpus, and mined from documents rather than hand-written, so the bank cannot grade its
|
| 122 |
+
author's homework.
|
| 123 |
+
- **Generated derivation problems** β computed answers, parameters outside tutorial ranges, plus a
|
| 124 |
+
recorded *recall trap* per family: the exact value a model lands on when it quotes a remembered
|
| 125 |
+
formula with the wrong exponent. Wrong answers say *which* shortcut was taken.
|
| 126 |
+
- **Teacher-forced digit scoring** β separates "can it do the arithmetic" from "can it run its own
|
| 127 |
+
derivation", in five minutes and with no grading ambiguity.
|
| 128 |
+
- **Position-resolved KL** (in progress) β KL against the parent at every position of a full
|
| 129 |
+
reasoning trace, up to 24K tokens, on the parent's traces and the student's own. Every heal so
|
| 130 |
+
far optimised KL on 768-token windows; this measures whether that proxy holds at long horizons.
|
| 131 |
+
- **Pre-registered decision rules.** Each experiment's confirm/refute criteria are written down
|
| 132 |
+
before the data exists, and results are reported against them either way. Several promising
|
| 133 |
+
hypotheses have been refuted by their own tests and recorded as such.
|
| 134 |
+
|
| 135 |
+
## Running it
|
| 136 |
+
|
| 137 |
+
**llama.cpp** β all 52 layers on the GPU, quantised KV:
|
| 138 |
+
|
| 139 |
+
```bash
|
| 140 |
+
llama-server -m marlowe-22b-q4_K_M.gguf -ngl 99 \
|
| 141 |
+
-c 32768 -fa on -ctk q8_0 -ctv q8_0 \
|
| 142 |
+
--temp 1.0 --top-p 0.95 --top-k 20 \
|
| 143 |
+
--reasoning-format deepseek
|
| 144 |
+
```
|
| 145 |
+
|
| 146 |
+
**transformers:**
|
| 147 |
+
|
| 148 |
+
```python
|
| 149 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 150 |
+
|
| 151 |
+
tok = AutoTokenizer.from_pretrained("Marlowe-22B-R1.5")
|
| 152 |
+
model = AutoModelForCausalLM.from_pretrained("Marlowe-22B-R1.5", dtype="bfloat16",
|
| 153 |
+
device_map="auto")
|
| 154 |
+
msgs = [{"role": "user", "content": "Derive the RoPE inverse frequency for head_dim 144, "
|
| 155 |
+
"base 21000, pair index 7."}]
|
| 156 |
+
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt",
|
| 157 |
+
reasoning_effort="xhigh").to(model.device)
|
| 158 |
+
out = model.generate(ids, max_new_tokens=8192, do_sample=True, temperature=1.0,
|
| 159 |
+
top_p=0.95, top_k=20)
|
| 160 |
+
print(tok.decode(out[0][ids.shape[-1]:]))
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
**Sampling β use temperature 1.0, top-p 0.95, top-k 20** (the parent's thinking preset), and do not
|
| 164 |
+
decode greedily: at temperature 0, 24 of 59 traces that used their full thinking budget contained
|
| 165 |
+
verbatim repetition loops. This is a property of the parent's thinking mode, inherited rather than
|
| 166 |
+
introduced by pruning, and sampling is the fix for both models.
|
| 167 |
+
|
| 168 |
+
The chat template defaults to `reasoning_effort="xhigh"`; `medium` and `low` are supported, as is
|
| 169 |
+
`enable_thinking=False`.
|
| 170 |
+
|
| 171 |
+
**Speed and memory.** On a 16 GB RTX 4080 SUPER at Q4_K_M with every layer resident and q8_0 KV:
|
| 172 |
+
**~36 tokens/s per stream with two concurrent streams.** Weights are 13.74 GB; a 32K context adds
|
| 173 |
+
roughly 1.1 GB.
|
| 174 |
+
|
| 175 |
+
## Roadmap β three training rounds scheduled, plus two acceleration variants
|
| 176 |
+
|
| 177 |
+
| round | goal | status |
|
| 178 |
+
|---|---|---|
|
| 179 |
+
| R1 | heal the pruning loss broadly | done β 27.5 M tokens |
|
| 180 |
+
| R1.5 | close specific probed fact losses | **this release** |
|
| 181 |
+
| **R1.7** | match the 27B on long-context, reasoning-heavy work; close the rotation/trig arithmetic gap | measurement built and running |
|
| 182 |
+
| **R1.8** | professional depth across every major engineering field | scheduled |
|
| 183 |
+
| **R2** | tool use and agentic execution on the strengthened base | scheduled |
|
| 184 |
+
|
| 185 |
+
Each round is gated on the full instrument set β retention, derivation, arithmetic fidelity and
|
| 186 |
+
long-horizon KL β with checkpoints scored during training rather than only at the end, so a round
|
| 187 |
+
that trades one capability for another is caught while it runs.
|
| 188 |
+
|
| 189 |
+
Two acceleration variants are planned on the same weights: **-super** (a multi-token-prediction
|
| 190 |
+
draft head, 1.3β1.7Γ on code) and **-turbo** (EAGLE-3, 3β4Γ on supporting runtimes). This release
|
| 191 |
+
is the dense build: `mtp_num_hidden_layers` is 0.
|
| 192 |
+
|
| 193 |
+
The same pipeline then ladders downward β an 18B distilled from this model's successor, and a 9B
|
| 194 |
+
distilled into a native base β reusing the teacher caches and evaluation banks built here.
|
| 195 |
+
|
| 196 |
+
## Scope of this release
|
| 197 |
+
|
| 198 |
+
- **Text only.** Image and video inputs are not supported; the vision tower was dropped to spend
|
| 199 |
+
the budget on reasoning.
|
| 200 |
+
- **No public benchmark scores are claimed.** The held-out benchmark subsets here are too small to
|
| 201 |
+
publish, and none were used in training. Results above are from the project's own instruments,
|
| 202 |
+
all of which are described in full so they can be argued with.
|
| 203 |
+
- **Long-horizon parity against the parent is being measured now** and will be reported with R1.7.
|
| 204 |
+
- It inherits the parent's biases, refusals and knowledge cutoff; no alignment training was added.
|
| 205 |
+
- It thinks at length. On multi-stage engineering calculations it will carry more intermediate
|
| 206 |
+
precision than the answer needs β ask explicitly for the precision you want, and give it room.
|
| 207 |
+
|
| 208 |
+
## Training data and attribution
|
| 209 |
+
|
| 210 |
+
Public data, subsampled: **arXiv, open-web-math, AlgebraicStack** (permissive-licensed subset of
|
| 211 |
+
The Stack) and **FineWeb-Edu** β all **ODC-By**, whose attribution travels with this model β plus
|
| 212 |
+
**PG-19** (public domain). Reasoning traces were generated by the parent model itself. No benchmark
|
| 213 |
+
test sets were included; the corpus was hash-checked against the evaluation banks.
|
| 214 |
+
|
| 215 |
+
## License
|
| 216 |
+
|
| 217 |
+
**Apache 2.0**, inherited from Qwen3.8-27B. This is a derivative work of that model; the parent's
|
| 218 |
+
terms apply to it and to anything derived from it.
|