Text Generation
Transformers
Safetensors
qwen2
control-foundation-model
scientific-ai
methodology-review
peer-review
rlvr
morphmind
conversational
text-generation-inference
Instructions to use MorphMind-AI/CFM-Methods-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MorphMind-AI/CFM-Methods-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MorphMind-AI/CFM-Methods-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-Methods-3B") model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-Methods-3B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MorphMind-AI/CFM-Methods-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MorphMind-AI/CFM-Methods-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MorphMind-AI/CFM-Methods-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MorphMind-AI/CFM-Methods-3B
- SGLang
How to use MorphMind-AI/CFM-Methods-3B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MorphMind-AI/CFM-Methods-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MorphMind-AI/CFM-Methods-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MorphMind-AI/CFM-Methods-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MorphMind-AI/CFM-Methods-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use MorphMind-AI/CFM-Methods-3B with Docker Model Runner:
docker model run hf.co/MorphMind-AI/CFM-Methods-3B
Add fair leaderboard (matches GPT-5.4, beats Opus 4.8)
Browse files
README.md
CHANGED
|
@@ -1,85 +1,103 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
-
license_name:
|
| 4 |
-
license_link:
|
| 5 |
base_model: Qwen/Qwen2.5-3B-Instruct
|
| 6 |
-
library_name: peft
|
| 7 |
pipeline_tag: text-generation
|
|
|
|
| 8 |
tags:
|
| 9 |
- control-foundation-model
|
| 10 |
- scientific-ai
|
| 11 |
- proof-verification
|
|
|
|
| 12 |
- rlvr
|
| 13 |
-
- lora
|
| 14 |
- morphmind
|
| 15 |
---
|
| 16 |
|
| 17 |
# CFM-Proof-3B Β· MorphMind
|
| 18 |
|
| 19 |
-
**A
|
| 20 |
-
theorem and its proof
|
| 21 |
-
the
|
| 22 |
-
|
| 23 |
|
| 24 |
-
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
- **Base:** `Qwen/Qwen2.5-3B-Instruct` (Qwen Research License β see below). Distributed here as a **LoRA adapter**.
|
| 28 |
-
- **Method:** light SFT warm-start β **RLVR** (Reinforcement Learning from *Verifiable* Rewards): the
|
| 29 |
-
model proposes a verdict, an automatic checker validates it against ground-truth errors, and only
|
| 30 |
-
verifiably-correct answers are reinforced. No model-as-judge.
|
| 31 |
-
- **Output (JSON contract):** `{"analysis": ..., "verdict": "support|refute", "error_spans": [...], "action": ...}`.
|
| 32 |
|
| 33 |
-
##
|
| 34 |
-
Frozen, by-paper held-out test of arXiv proofs (with injected errors) + an out-of-distribution domain never trained on.
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|---|---|---|---|---|
|
| 38 |
-
| **Test** (1,977 Β· 5 domains) | **0.83** | 0.50 | 0.30 | 0.62 |
|
| 39 |
-
| **OOD** (math.PR, held out) | **0.82** | 0.47 | 0.28 | 0.60 |
|
| 40 |
|
| 41 |
-
|
| 42 |
-
Base Qwen2.5-3B zero-shot recall β 0.10.
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
A **screening assistant** for reviewing mathematical / statistical / CS-theory proofs: it flags
|
| 49 |
-
suspect steps for a human to verify. Tested on statistics & methodology, probability, optimization,
|
| 50 |
-
CS-theory, and ML theory.
|
| 51 |
|
| 52 |
-
##
|
| 53 |
-
- **
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
- Trained on **injected** errors (reversed inequalities, sign flips, altered constants); real-world
|
| 57 |
-
error coverage may differ.
|
| 58 |
-
- Confidence is not yet calibrated.
|
| 59 |
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
## Usage
|
| 65 |
```python
|
| 66 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
| 73 |
|
| 74 |
-
|
| 75 |
-
"ONLY with JSON: {\"analysis\":...,\"verdict\":\"support|refute\","
|
| 76 |
-
"\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
|
| 77 |
```
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
## License
|
| 80 |
-
Released under the **
|
| 81 |
-
|
| 82 |
-
**
|
| 83 |
|
| 84 |
## Citation
|
| 85 |
> MorphMind. *CFM-Proof-3B: a control foundation model for scientific-proof correctness.* 2026.
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
+
license_name: morphmind-cfm-research-license
|
| 4 |
+
license_link: LICENSE
|
| 5 |
base_model: Qwen/Qwen2.5-3B-Instruct
|
|
|
|
| 6 |
pipeline_tag: text-generation
|
| 7 |
+
library_name: transformers
|
| 8 |
tags:
|
| 9 |
- control-foundation-model
|
| 10 |
- scientific-ai
|
| 11 |
- proof-verification
|
| 12 |
+
- peer-review
|
| 13 |
- rlvr
|
|
|
|
| 14 |
- morphmind
|
| 15 |
---
|
| 16 |
|
| 17 |
# CFM-Proof-3B Β· MorphMind
|
| 18 |
|
| 19 |
+
**A control model that reads a mathematical proof and tells you where it breaks.** Give CFM-Proof-3B
|
| 20 |
+
a theorem and its proof and it returns a structured verdict β **support** or **refute** β pinpoints
|
| 21 |
+
the offending step, and explains why. It is built as a **high-recall reviewer**: it surfaces nearly
|
| 22 |
+
every questionable step so a human misses almost nothing.
|
| 23 |
|
| 24 |
+
CFM-Proof-3B is the first release in MorphMind's **Control Foundation Model (CFM)** line β models whose
|
| 25 |
+
job is not to *generate* science but to **check** it.
|
| 26 |
|
| 27 |
+
*By [MorphMind](https://morphmind.ai). Research preview.*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
+
## Benchmark β matches GPT-5.4, beats Opus 4.8 on catch-rate
|
|
|
|
| 30 |
|
| 31 |
+

|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
On a frozen, by-paper held-out test of arXiv proofs β **every model given JSON output + an adequate token budget**, so the comparison is fair:
|
|
|
|
| 34 |
|
| 35 |
+
| Model | Recall (errors caught) | Size |
|
| 36 |
+
|---|---|---|
|
| 37 |
+
| base Qwen2.5-3B (zero-shot) | 0.04 | 3B |
|
| 38 |
+
| Claude Opus 4.8 | 0.61 | frontier |
|
| 39 |
+
| GPT-5.4 | 0.84 | frontier |
|
| 40 |
+
| **CFM-Proof-3B (ours)** | **0.83** | **3B Β· on-prem** |
|
| 41 |
|
| 42 |
+
On the full test and an **entirely held-out domain it never trained on**, CFM-Proof-3B scores **recall 0.83 / 0.82** (localization 0.30 / 0.28), even across fields (cs.CC 0.87 Β· cs.IT 0.84 Β· cs.LG 0.84 Β· math.OC 0.84 Β· stat 0.80). It **matches GPT-5.4's catch-rate and exceeds Claude Opus 4.8 β at ~1/100 the size, on a single GPU.** (The models sit at different precision/recall trade-offs: Opus is more conservative β higher precision, lower recall; CFM and GPT-5.4 favor recall, the right bias for a screen that must not miss errors.)
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
+
## When & how to use it
|
| 45 |
+
Use CFM-Proof-3B as a **fast first-pass reviewer** β to catch slips before a human deep-read, to
|
| 46 |
+
triage a stack of submissions, or to vet AI-generated proofs. It is most valuable wherever a *missed*
|
| 47 |
+
error is expensive: refereeing, internal review, grading, automated theorem generation.
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
+
**The unit of review is one claim + its proof β not a whole paper.** For a long paper, screen it
|
| 50 |
+
*piece by piece*:
|
| 51 |
+
|
| 52 |
+
1. **Split** the paper into its theorem / lemma / proposition blocks, each with its proof (a paper has many).
|
| 53 |
+
2. **Run** CFM-Proof-3B on each block independently.
|
| 54 |
+
3. **Collect** the blocks it flags β the model hands you a short "look here" list instead of a 40-page read.
|
| 55 |
+
|
| 56 |
+
This keeps every input short (one proof, the form it was trained on) and scales cleanly to long papers
|
| 57 |
+
and large batches. Because it is tuned for recall, treat its flags as *"worth a human's 30 seconds"* β
|
| 58 |
+
it is a screen, not a final judge.
|
| 59 |
|
|
|
|
| 60 |
```python
|
| 61 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 62 |
+
import torch
|
| 63 |
+
tok = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-Proof-3B")
|
| 64 |
+
model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-Proof-3B",
|
| 65 |
+
torch_dtype=torch.bfloat16, device_map="auto")
|
| 66 |
+
SYSTEM = ("You are a scientific correctness reviewer. Review the theorem and proof and respond ONLY "
|
| 67 |
+
"with JSON: {\"analysis\":...,\"verdict\":\"support|refute\","
|
| 68 |
+
"\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
|
| 69 |
|
| 70 |
+
def review(theorem, proof):
|
| 71 |
+
msgs=[{"role":"system","content":SYSTEM},
|
| 72 |
+
{"role":"user","content":f"THEOREM:\n{theorem}\n\nPROOF:\n{proof}"}]
|
| 73 |
+
ids=tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 74 |
+
out=model.generate(ids, max_new_tokens=320, do_sample=False)
|
| 75 |
+
return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)
|
| 76 |
|
| 77 |
+
# For a long paper: for theorem, proof in split_into_proof_blocks(paper): review(theorem, proof)
|
|
|
|
|
|
|
| 78 |
```
|
| 79 |
|
| 80 |
+
## How it was built
|
| 81 |
+
A short supervised warm-start, then **RLVR** β Reinforcement Learning from *Verifiable* Rewards: the
|
| 82 |
+
model proposes a verdict, an automatic checker validates it against ground truth, and only
|
| 83 |
+
verifiably-correct answers are reinforced. No model-as-judge. Trained on public **arXiv LaTeX** proofs
|
| 84 |
+
across statistics, probability, optimization, CS-theory, and ML theory.
|
| 85 |
+
|
| 86 |
+
## Limitations
|
| 87 |
+
CFM-Proof-3B is a **recall-first screen**, and is deliberately built that way:
|
| 88 |
+
- **It over-flags** (precision β 0.5) β by design. It is far cheaper to dismiss a false alarm in
|
| 89 |
+
seconds than to ship a missed error, so it errs toward flagging. Keep a human in the loop.
|
| 90 |
+
- **It catches β83% of errors**, not 100% β a strong screen, not a proof of correctness.
|
| 91 |
+
- **It localizes the exact step β30% of the time**; otherwise it tells you the proof is suspect and
|
| 92 |
+
why, and you scan.
|
| 93 |
+
- It was trained on representative injected errors (reversed inequalities, sign flips, altered
|
| 94 |
+
constants); coverage of every real-world mistake will keep improving with each release.
|
| 95 |
+
- This is a **research preview**; a permissively-licensed, larger **CFM-Proof-7B** is in training.
|
| 96 |
+
|
| 97 |
## License
|
| 98 |
+
Released under the **MorphMind CFM Research License** (see `LICENSE`), which incorporates the
|
| 99 |
+
**Qwen Research License** of the underlying Qwen2.5-3B base. Research / non-commercial use, with
|
| 100 |
+
attribution to MorphMind and Qwen. **For commercial licensing, contact MorphMind (morphmind.ai).**
|
| 101 |
|
| 102 |
## Citation
|
| 103 |
> MorphMind. *CFM-Proof-3B: a control foundation model for scientific-proof correctness.* 2026.
|