Skip to content

Commit 62098e0

Browse files
Model Guide rework + doc fixes (#6)
* Rework Model Guide to reflect eval findings; fix README model reference - Lead with Ministral-8B Reasoning as the honest top recommendation - Reframe 8B > 14B as a core finding, not an exception - Add backend comparison using Mistral Nemo (7%–83% swing from paper) - Align key findings with ACM paper (5 findings) - Note model availability differences across backends (GGUF > Ollama > Llamafile) - README llama-server snippet now uses Reasoning instead of Instruct Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add venv activation step to README install instructions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Fix smoke test CLI flags in BACKEND_SETUP (--scenario, add --model) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Add IEEE preprint PDF to docs for timestamp provenance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cd076f2 commit 62098e0

4 files changed

Lines changed: 59 additions & 37 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ Supports Ollama, llama-server (llama.cpp), Llamafile, and Anthropic as backends,
1919
git clone https://github.com/antoinezambelli/forge.git
2020
cd forge
2121
python -m venv .venv
22+
.venv\Scripts\activate # Windows
23+
# source .venv/bin/activate # macOS/Linux
2224
pip install -e . # core only
2325
pip install -e ".[anthropic]" # + Anthropic client
2426
pip install -e ".[dev]" # + test/eval dependencies
@@ -35,7 +37,7 @@ ollama pull ministral-3:8b-instruct-2512-q4_K_M
3537
**llama-server** (best performance):
3638
```bash
3739
# Install from https://github.com/ggml-org/llama.cpp/releases
38-
llama-server -m path/to/Ministral-3-8B-Instruct-2512-Q4_K_M.gguf --jinja -ngl 999 --port 8080
40+
llama-server -m path/to/Ministral-3-8B-Reasoning-2512-Q4_K_M.gguf --jinja -ngl 999 --port 8080
3941
```
4042

4143
**Anthropic** (API, no local GPU needed):

docs/BACKEND_SETUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,10 +315,10 @@ After setting up any backend, verify forge can talk to it end-to-end:
315315

316316
```bash
317317
# Run the two simplest eval scenarios (no batch, fast feedback)
318-
python -m tests.eval.eval_runner --backend ollama --model "ministral-3:8b-instruct-2512-q4_K_M" --runs 1 --tags plumbing --scenarios basic_2step
318+
python -m tests.eval.eval_runner --backend ollama --model "ministral-3:8b-instruct-2512-q4_K_M" --runs 1 --tags plumbing --scenario basic_2step
319319

320320
# For llama-server / llamafile (start the server first)
321-
python -m tests.eval.eval_runner --backend llamafile --llamafile-mode native --runs 1 --tags plumbing --scenarios basic_2step
321+
python -m tests.eval.eval_runner --backend llamafile --llamafile-mode native --model ministral-8b-reasoning --runs 1 --tags plumbing --scenario basic_2step
322322
```
323323

324324
If the scenario passes, your backend is wired correctly and ready for full eval runs.

docs/MODEL_GUIDE.md

Lines changed: 54 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,17 @@
22

33
Which model and backend to use with forge, based on your hardware and goals.
44

5-
All numbers from forge's eval harness: 29 scenarios × 50 runs per config, measured 2026-03-12. Full guardrail stack ("reforged") unless noted. See [EVAL_GUIDE.md](EVAL_GUIDE.md) for methodology.
5+
All numbers from forge's eval harness: 9 scenarios × 50 runs per config, measured 2026-03-12. Full guardrail stack ("reforged") unless noted. See [EVAL_GUIDE.md](EVAL_GUIDE.md) for methodology and the [paper](https://doi.org/XXXXXXX.XXXXXXX) for full analysis.
6+
7+
---
8+
9+
## The Short Answer
10+
11+
**Ministral-8B Reasoning Q4_K_M on llama-server (native FC)** — 99.3% score, 3.7s per workflow, 4.8 GB weights, runs on any 8GB+ GPU.
12+
13+
This is an 8-billion-parameter model running on consumer hardware, scoring within 1 percentage point of frontier APIs (Claude Sonnet/Opus at 100%). It outperforms every 14B model tested, and it outperforms frontier APIs *without* forge guardrails (the best a consumer can achieve through API alone).
14+
15+
If you want the simplest possible setup and don't need the absolute best score, **Ministral-8B Instruct Q4_K_M on Ollama** gets you 91–95% with zero server management.
616

717
---
818

@@ -12,50 +22,45 @@ All numbers from forge's eval harness: 29 scenarios × 50 runs per config, measu
1222
|------|-------|---------|-------|-------|
1323
| **Maximum reliability** | Claude Sonnet 4.6 | Anthropic API | 100.0% | 6.5s |
1424
| **Best self-hosted** | Ministral-8B Reasoning Q4_K_M | llama-server (native) | 99.3% | 3.7s |
15-
| **Best 16GB VRAM** | Ministral-14B Instruct Q4_K_M | llama-server (native) | 98.8% | 3.5s |
16-
| **Easiest setup** | Qwen3-14B Q4_K_M | Ollama | 96.3% | 19.6s |
17-
| **Budget 8GB VRAM** | Ministral-8B Instruct Q4_K_M | Ollama | 91.2% | 4.2s |
25+
| **Easiest setup** | Ministral-8B Instruct Q4_K_M | Ollama | 91.2% | 4.2s |
26+
| **No local GPU** | Claude Haiku 4.5 | Anthropic API | 99.6% | 4.0s |
1827
| **Single binary, no deps** | Mistral Nemo 12B Q4_K_M | Llamafile | 82.6% | 4.2s |
1928

2029
---
2130

2231
## By VRAM Budget
2332

24-
### 8GB VRAM
33+
### 8GB VRAM (recommended)
2534

26-
You can run 8B-class models at Q4_K_M, or 8B at Q8_0 if VRAM is fully available.
35+
8B-class models at Q4_K_M are the sweet spot — they fit comfortably in 8GB VRAM and deliver the best scores in the eval suite. Having more VRAM doesn't mean you should use a bigger model (see [Key Findings](#key-findings)).
2736

2837
| Model | Backend | Mode | Score | Notes |
2938
|-------|---------|------|-------|-------|
30-
| Ministral-8B Reasoning Q4_K_M | llama-server | Native | 99.3% | Best overall value |
31-
| Ministral-8B Reasoning Q8_0 | llama-server | Native | 99.2% | Slightly higher precision, ~same score |
39+
| Ministral-8B Reasoning Q4_K_M | llama-server | Native | 99.3% | **Best overall** |
40+
| Ministral-8B Reasoning Q8_0 | llama-server | Native | 99.2% | Higher precision, ~same score |
41+
| Qwen3-8B Q8_0 | llama-server | Prompt | 95.7% | Good alternative, slower (17.8s) |
3242
| Ministral-8B Instruct Q8_0 | Ollama | Native | 94.6% | Simpler setup |
3343
| Ministral-8B Instruct Q4_K_M | Ollama | Native | 91.2% | Smallest footprint |
34-
| Qwen3-8B Q8_0 | llama-server | Prompt | 95.7% | Good alternative, slower (17.8s) |
35-
36-
**Recommendation:** Ministral-8B Reasoning on llama-server native. At 99.3% it rivals frontier models.
3744

3845
### 12–16GB VRAM
3946

40-
Room for 14B-class models at Q4_K_M (~8.2GB weights + KV cache headroom).
47+
You *can* run 14B models, but the data shows 8B Reasoning outperforms 14B variants of the same family. The extra VRAM is better spent on larger context windows (via `-c` flag) than bigger models.
4148

4249
| Model | Backend | Mode | Score | Notes |
4350
|-------|---------|------|-------|-------|
44-
| Ministral-14B Instruct Q4_K_M | llama-server | Native | 98.8% | Fastest 14B option (3.5s) |
45-
| Qwen3-14B Q4_K_M | Ollama | Native | 96.3% | Easiest setup, slower (19.6s) |
46-
| Ministral-14B Instruct Q4_K_M | Ollama | Native | 96.1% | Good middle ground (4.5s) |
47-
48-
**Recommendation:** Ministral-14B Instruct on llama-server native for speed and accuracy. Qwen3-14B on Ollama if you want zero-config setup.
51+
| Ministral-8B Reasoning Q4_K_M | llama-server | Native | 99.3% | Still the best choice |
52+
| Ministral-14B Instruct Q4_K_M | llama-server | Native | 98.8% | Marginal, slower to load |
53+
| Qwen3-14B Q4_K_M | Ollama | Native | 96.3% | Below 8B Reasoning, 5× slower |
4954

5055
### API (no local GPU)
5156

5257
| Model | Score | Speed | Notes |
5358
|-------|-------|-------|-------|
54-
| Claude Sonnet 4.6 | 100.0% | 6.5s | Perfect score, best choice |
59+
| Claude Sonnet 4.6 | 100.0% | 6.5s | Perfect score |
5560
| Claude Opus 4.6 | 100.0% | 8.5s | Same score, slower |
5661
| Claude Haiku 4.5 | 99.6% | 4.0s | Fastest, near-perfect |
5762

58-
**Recommendation:** Haiku for cost-sensitive workloads (99.6% at 4.0s). Sonnet or Opus if you need the last 0.4%.
63+
Haiku for cost-sensitive workloads. Sonnet or Opus if you need the last 0.4%.
5964

6065
---
6166

@@ -70,30 +75,45 @@ These models work but fail too often for production-grade agentic workflows.
7075

7176
---
7277

73-
## Backend Comparison
78+
## The Backend Matters More Than You Think
79+
80+
The same model weights can produce dramatically different results depending on the serving backend. This is a hidden variable that no published benchmark we are aware of controls for.
7481

75-
Same model, different backends — how much does the backend matter?
82+
| Model | Backend/Mode | Score | Notes |
83+
|-------|-------------|-------|-------|
84+
| Mistral Nemo 12B | Llamafile (prompt) | 82.6% | Best result for this model |
85+
| Mistral Nemo 12B | llama-server (prompt) | 75.0% | Same weights, different backend |
86+
| Mistral Nemo 12B | Ollama (native) | 44.6% | Same weights, 38% lower |
87+
| Mistral Nemo 12B | llama-server (native) | 7.2% | Same weights, near-zero |
7688

77-
| Model | llama-server (native) | Ollama (native) | Llamafile (prompt) | Delta |
78-
|-------|-----------------------|-----------------|--------------------|-------|
79-
| Ministral-14B Instruct | 98.8% | 96.1% || 2.7% |
80-
| Ministral-8B Instruct Q8_0 | 97.4% | 94.6% || 2.8% |
81-
| Mistral Nemo 12B ||| 82.6% ||
89+
The same pattern appears across model families:
90+
91+
| Model | llama-server (native) | llama-server (prompt) | Ollama (native) |
92+
|-------|-----------------------|----------------------|-----------------|
93+
| Ministral-8B Reasoning Q4_K_M | 99.3% | 98.1% ||
94+
| Qwen3-14B Q4_K_M | 88.4% | 93.3% | 96.3% |
8295

8396
**Takeaways:**
84-
- **llama-server vs Ollama:** 2–4% gap on the same model. llama-server wins on raw performance; Ollama wins on ease of use.
85-
- **Native vs prompt-injected FC:** ~1–2% gap. Smaller than expected — forge's prompt-injection fallback is effective.
86-
- **Llamafile:** Viable for portability but limited to prompt-injected mode. Best with Mistral Nemo.
97+
- **llama-server native is the best backend for most models** — but not all. Qwen3 and Nemo perform *worse* with native FC on llama-server than with prompt-injected or Ollama.
98+
- **Always test your specific model/backend combination.** Don't assume native FC is better than prompt-injected — it depends on the model's training and the backend's template handling.
99+
- **Forge's prompt-injection fallback is effective.** The gap between native and prompt-injected is often small (1–2%), and sometimes prompt wins.
100+
- **Model availability varies by backend.** llama-server (via GGUF files from HuggingFace) has the widest model selection — any model with a GGUF release works, at any quantization. Ollama's registry is convenient but lags behind and is missing key models (including Ministral-8B Reasoning, the top self-hosted pick). Llamafile has the most limited selection and tends to trail further behind new releases. If you want access to the latest models, start with llama-server + GGUF.
87101

88102
---
89103

90104
## Key Findings
91105

92-
1. **Forge guardrails matter.** The full guardrail stack adds 10–55% accuracy depending on the model. Claude Haiku drops from 99.6% → 43.8% without them.
93-
2. **Ministral is the sweet spot.** The 8B Reasoning variant at 99.3% rivals frontier API models while running on consumer hardware.
94-
3. **Backend choice is secondary.** The model matters far more than the backend — the same model scores within 2–4% across backends.
95-
4. **Speed varies widely.** Ministral models cluster at 2.5–4.6s per workflow. Qwen3 is 4–5× slower (14–20s) despite competitive accuracy.
96-
5. **Quantization impact is minimal.** Q4_K_M vs Q8_0 on the same model: <1% score difference in most cases.
106+
1. **Guardrails matter more than model size.** Forge's guardrail stack adds 10–55% accuracy depending on the model. Claude Haiku drops from 99.6% → 43.8% without them. An 8B model *with* forge outperforms frontier APIs *without* forge.
107+
108+
2. **Bigger is not better.** Ministral-8B Reasoning (99.3%) outperforms Ministral-14B Reasoning (95.7%) and Ministral-14B Instruct (98.8%). Qwen3-8B outperforms Qwen3-14B by up to 5.5% depending on backend. Reasoning-oriented fine-tuning at 8B produces better tool-calling discipline than scale alone at 14B.
109+
110+
3. **The serving backend is a hidden variable.** The same weights produce 7% on one backend and 83% on another. Backend choice can swing accuracy more than model choice. Any evaluation that doesn't specify the backend may be producing misleading results.
111+
112+
4. **Error recovery is an architectural gap, not a capability gap.** Error recovery scores 0% for *every* model tested — local and frontier — without forge's retry mechanism. No model can self-correct from tool errors without a framework feeding errors back.
113+
114+
5. **Quantization impact is minimal.** Q4_K_M vs Q8_0 on the same model: <1% score difference in most cases. Use Q4_K_M.
115+
116+
6. **Speed varies widely.** Ministral models cluster at 2.5–4.6s per workflow. Qwen3 is 4–5× slower (14–20s) despite competitive accuracy.
97117

98118
---
99119

docs/forge_ieee_preprint.pdf

147 KB
Binary file not shown.

0 commit comments

Comments
 (0)