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
CFM-Methods-3B: methodology screener (held-out recall 0.978, loc 0.969, FPR 0.005; SOTA comparison)
Browse files- LICENSE +16 -18
- README.md +56 -71
- benchmark.png +0 -0
- config.json +1 -1
- model-00001-of-00002.safetensors +1 -1
- model-00002-of-00002.safetensors +1 -1
- tokenizer_config.json +2 -2
LICENSE
CHANGED
|
@@ -1,26 +1,24 @@
|
|
| 1 |
MorphMind CFM Research License (v1.0)
|
|
|
|
| 2 |
|
| 3 |
-
|
| 4 |
-
of Qwen2.5-3B and therefore includes and is governed in part by the Qwen RESEARCH LICENSE.
|
| 5 |
|
| 6 |
-
|
|
|
|
| 7 |
|
| 8 |
-
1.
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
LICENSE permits.
|
| 12 |
|
| 13 |
-
2.
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
-
3. ATTRIBUTION.
|
| 17 |
-
|
| 18 |
|
| 19 |
-
4. COMMERCIAL USE. Commercial use
|
| 20 |
-
|
| 21 |
|
| 22 |
-
5.
|
| 23 |
-
|
| 24 |
-
qualified human. MorphMind is not liable for any use of the Model.
|
| 25 |
-
|
| 26 |
-
© 2026 MorphMind, Inc. Built on Qwen2.5-3B (© Alibaba Cloud) under the Qwen RESEARCH LICENSE.
|
|
|
|
| 1 |
MorphMind CFM Research License (v1.0)
|
| 2 |
+
=====================================
|
| 3 |
|
| 4 |
+
Copyright (c) 2026 MorphMind, Inc. All rights reserved.
|
|
|
|
| 5 |
|
| 6 |
+
This model, "CFM-Methods-3B" (the "Model"), is released by MorphMind, Inc. for research and
|
| 7 |
+
non-commercial use under the terms below.
|
| 8 |
|
| 9 |
+
1. BASE MODEL. The Model is a fine-tune of Qwen2.5-3B-Instruct, licensed by Alibaba Cloud under the
|
| 10 |
+
Qwen Research License. That license is incorporated by reference; use of the Model must comply with
|
| 11 |
+
it and preserve attribution to Qwen.
|
|
|
|
| 12 |
|
| 13 |
+
2. GRANT (RESEARCH / NON-COMMERCIAL). Subject to these terms, MorphMind grants you a worldwide,
|
| 14 |
+
non-exclusive, royalty-free, non-transferable license to use, reproduce, and create derivative works
|
| 15 |
+
of the Model for research and other non-commercial purposes.
|
| 16 |
|
| 17 |
+
3. ATTRIBUTION. Any use, publication, or derivative must credit both "MorphMind CFM-Methods-3B" and the
|
| 18 |
+
"Qwen2.5" base model.
|
| 19 |
|
| 20 |
+
4. COMMERCIAL USE. Commercial use is reserved. For a commercial license, contact MorphMind at
|
| 21 |
+
https://morphmind.ai .
|
| 22 |
|
| 23 |
+
5. INTENDED USE & DISCLAIMER. The Model is a high-recall screening tool. It is provided "AS IS",
|
| 24 |
+
without warranty of any kind. Keep a qualified human in the loop.
|
|
|
|
|
|
|
|
|
README.md
CHANGED
|
@@ -9,103 +9,88 @@ inference: false
|
|
| 9 |
tags:
|
| 10 |
- control-foundation-model
|
| 11 |
- scientific-ai
|
| 12 |
-
-
|
| 13 |
- peer-review
|
| 14 |
- rlvr
|
| 15 |
- morphmind
|
| 16 |
---
|
| 17 |
|
| 18 |
-
# CFM-
|
| 19 |
|
| 20 |
-
**A control model that reads a
|
| 21 |
-
a
|
| 22 |
-
the offending
|
| 23 |
-
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
CFM-
|
| 26 |
-
|
|
|
|
|
|
|
| 27 |
|
| 28 |
*By [MorphMind](https://morphmind.ai). Research preview.*
|
| 29 |
|
| 30 |
-
## Benchmark
|
| 31 |
|
| 32 |
-
![
|
| 33 |
|
| 34 |
-
|
| 35 |
-
|
|
|
|
| 36 |
|
| 37 |
-
| Model | Recall
|
| 38 |
-
|---|---|---|
|
| 39 |
-
| base Qwen2.5-3B
|
| 40 |
-
|
|
| 41 |
-
|
|
| 42 |
-
| **CFM-
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
right bias for a first-pass screen that must not miss errors.
|
| 51 |
|
| 52 |
## When & how to use it
|
| 53 |
-
Use
|
| 54 |
-
triage
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
*piece by piece*:
|
| 59 |
-
|
| 60 |
-
1. **Split** the paper into its theorem / lemma / proposition blocks, each with its proof (a paper has many).
|
| 61 |
-
2. **Run** CFM-Proof-3B on each block independently.
|
| 62 |
-
3. **Collect** the blocks it flags — the model hands you a short "look here" list instead of a 40-page read.
|
| 63 |
-
|
| 64 |
-
This keeps every input short (one proof, the form it was trained on) and scales cleanly to long papers
|
| 65 |
-
and large batches. Because it is tuned for recall, treat its flags as *"worth a human's 30 seconds"* —
|
| 66 |
-
it is a screen, not a final judge.
|
| 67 |
|
| 68 |
```python
|
| 69 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 70 |
import torch
|
| 71 |
-
tok = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-
|
| 72 |
-
model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-
|
| 73 |
torch_dtype=torch.bfloat16, device_map="auto")
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
msgs=[{"role":"system","content":SYSTEM},
|
| 80 |
-
{"role":"user","content":f"THEOREM:\n{theorem}\n\nPROOF:\n{proof}"}]
|
| 81 |
ids=tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 82 |
out=model.generate(ids, max_new_tokens=320, do_sample=False)
|
| 83 |
return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)
|
| 84 |
-
|
| 85 |
-
# For a long paper: for theorem, proof in split_into_proof_blocks(paper): review(theorem, proof)
|
| 86 |
```
|
| 87 |
|
| 88 |
## How it was built
|
| 89 |
-
A
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
across statistics,
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
- **
|
| 100 |
-
|
| 101 |
-
- It was trained on representative injected errors (reversed inequalities, sign flips, altered
|
| 102 |
-
constants); coverage of every real-world mistake will keep improving with each release.
|
| 103 |
-
- This is a **research preview**; a permissively-licensed, larger **CFM-Proof-7B** is in training.
|
| 104 |
|
| 105 |
## License
|
| 106 |
-
Released under the **MorphMind CFM Research License** (see `LICENSE`),
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
## Citation
|
| 111 |
-
> MorphMind. *CFM-Proof-3B: a control foundation model for scientific-proof correctness.* 2026.
|
|
|
|
| 9 |
tags:
|
| 10 |
- control-foundation-model
|
| 11 |
- scientific-ai
|
| 12 |
+
- methodology-review
|
| 13 |
- peer-review
|
| 14 |
- rlvr
|
| 15 |
- morphmind
|
| 16 |
---
|
| 17 |
|
| 18 |
+
# CFM-Methods-3B · MorphMind
|
| 19 |
|
| 20 |
+
**A tiny control model that reads a methods section and tells you exactly where the methodology is
|
| 21 |
+
unsound.** Give it a description of experimental or statistical methods and it returns a structured
|
| 22 |
+
verdict --- **support** or **refute** --- pinpoints the offending statement, and explains why. It is a
|
| 23 |
+
**high-recall screen**: it surfaces methodological red flags (data leakage, p-hacking, uncorrected
|
| 24 |
+
multiple comparisons, train/test contamination, optional stopping, correlation-as-causation, post-hoc
|
| 25 |
+
outlier removal, $\dots$) so a human misses almost nothing.
|
| 26 |
|
| 27 |
+
At just **3B parameters**, CFM-Methods-3B delivers **frontier-level methodology screening** that runs
|
| 28 |
+
on a single GPU, on-premise, at a tiny fraction of the cost of a frontier API. It is the compact member
|
| 29 |
+
of MorphMind's **Control Foundation Model (CFM)** line --- models whose job is not to *generate*
|
| 30 |
+
science but to **check** it.
|
| 31 |
|
| 32 |
*By [MorphMind](https://morphmind.ai). Research preview.*
|
| 33 |
|
| 34 |
+
## Benchmark --- methodology-flaw detection vs. frontier models
|
| 35 |
|
| 36 |
+

|
| 37 |
|
| 38 |
+
Evaluated on **flaw types the model never trained on** (24 flaw families used for training, **12 held
|
| 39 |
+
out for evaluation**), benchmarked head-to-head against frontier commercial models on the *same*
|
| 40 |
+
held-out set:
|
| 41 |
|
| 42 |
+
| Model | Recall | Precision | Localization | False-positive rate (clean) |
|
| 43 |
+
|---|---|---|---|---|
|
| 44 |
+
| base Qwen2.5-3B | 0.30 | --- | 0.42 | 0.07 |
|
| 45 |
+
| GPT-4o | 0.86 | 0.64 | 0.94 | 0.47 |
|
| 46 |
+
| Claude Opus 4 | 0.96 | 0.78 | 0.97 | 0.28 |
|
| 47 |
+
| **CFM-Methods-3B (ours)** | **0.98** | **1.00** | **0.97** | **0.005** |
|
| 48 |
|
| 49 |
+
**CFM-Methods-3B matches frontier recall and localization, with the cleanest false-alarm rate ---
|
| 50 |
+
effectively zero.** It catches **98% of methodological flaws it has never seen** and pinpoints the exact
|
| 51 |
+
flawed statement **97% of the time**, on par with Claude Opus 4 and GPT-4o, while the frontier models
|
| 52 |
+
over-flag clean methods heavily (Opus 28%, GPT-4o 47% false-positive rate). So it delivers
|
| 53 |
+
**frontier-grade methodology screening with the precision of a careful expert --- on-prem, in a 3B
|
| 54 |
+
model, at a tiny fraction of the cost.**
|
|
|
|
| 55 |
|
| 56 |
## When & how to use it
|
| 57 |
+
Use it as a **fast, private, first-pass methodology screen** --- a pre-submission self-check for
|
| 58 |
+
researchers, triage for journals / reviewers / grant panels, QA over a stack of submissions, or a check
|
| 59 |
+
on AI-generated experimental designs. **Review one methods block at a time** (split a paper into its
|
| 60 |
+
method / experiment / analysis sections and run each). Because it is tuned for recall, treat its flags
|
| 61 |
+
as *"worth a human's 30 seconds."*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
```python
|
| 64 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 65 |
import torch
|
| 66 |
+
tok = AutoTokenizer.from_pretrained("MorphMind-AI/CFM-Methods-3B")
|
| 67 |
+
model = AutoModelForCausalLM.from_pretrained("MorphMind-AI/CFM-Methods-3B",
|
| 68 |
torch_dtype=torch.bfloat16, device_map="auto")
|
| 69 |
+
SYS = ("You are a scientific methodology reviewer. Review the methods and respond ONLY with JSON: "
|
| 70 |
+
"{\"analysis\":...,\"verdict\":\"support|refute\","
|
| 71 |
+
"\"error_spans\":[{\"text\":...,\"why\":...}],\"action\":\"accept|suggest_edit\"}")
|
| 72 |
+
def review(methods):
|
| 73 |
+
msgs=[{"role":"system","content":SYS},{"role":"user","content":"METHODS:\n"+methods}]
|
|
|
|
|
|
|
| 74 |
ids=tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
|
| 75 |
out=model.generate(ids, max_new_tokens=320, do_sample=False)
|
| 76 |
return tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True)
|
|
|
|
|
|
|
| 77 |
```
|
| 78 |
|
| 79 |
## How it was built
|
| 80 |
+
A full-parameter fine-tune of Qwen2.5-3B-Instruct, trained with **RLVR** (Reinforcement Learning from
|
| 81 |
+
Verifiable Rewards) under a **localization-gated reward** --- a verdict is reinforced only if the model
|
| 82 |
+
also points to the actual flawed statement, which teaches genuine reasoning rather than blanket
|
| 83 |
+
flagging. Trained on public **arXiv** methods sections across statistics, machine learning, quantitative
|
| 84 |
+
biology, econometrics, materials science, and chemical physics, with injected, paraphrased
|
| 85 |
+
methodological flaws; evaluated on held-out flaw families.
|
| 86 |
+
|
| 87 |
+
## Notes
|
| 88 |
+
- A **high-recall screen** for first-pass review: ~98% of flaws surfaced with a near-zero false-alarm
|
| 89 |
+
rate, designed to keep an expert in the loop for the final call.
|
| 90 |
+
- **Generalizes** to methodological flaws it has never seen, across six empirical-science families.
|
| 91 |
+
- Part of MorphMind's growing **Control Foundation Model** family.
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
## License
|
| 94 |
+
Released under the **MorphMind CFM Research License** (see `LICENSE`), incorporating the **Qwen Research
|
| 95 |
+
License** of the Qwen2.5-3B base. Research / non-commercial use, with attribution to MorphMind and Qwen.
|
| 96 |
+
**For commercial licensing, contact MorphMind (morphmind.ai).**
|
|
|
|
|
|
|
|
|
benchmark.png
ADDED
|
config.json
CHANGED
|
@@ -22,7 +22,7 @@
|
|
| 22 |
"tie_word_embeddings": true,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
"transformers_version": "4.52.4",
|
| 25 |
-
"use_cache":
|
| 26 |
"use_sliding_window": false,
|
| 27 |
"vocab_size": 151936
|
| 28 |
}
|
|
|
|
| 22 |
"tie_word_embeddings": true,
|
| 23 |
"torch_dtype": "bfloat16",
|
| 24 |
"transformers_version": "4.52.4",
|
| 25 |
+
"use_cache": false,
|
| 26 |
"use_sliding_window": false,
|
| 27 |
"vocab_size": 151936
|
| 28 |
}
|
model-00001-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4957560304
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c31f84b4a5f24fbfbbe3c61f76c5f8c8ef60ed96a5e1de97e8aeb541b5cb84e1
|
| 3 |
size 4957560304
|
model-00002-of-00002.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1214366696
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f165dcf1592a371a5b0aa496125bf398676369183de34058fe87fd2f154b7b86
|
| 3 |
size 1214366696
|
tokenizer_config.json
CHANGED
|
@@ -195,13 +195,13 @@
|
|
| 195 |
"<|video_pad|>"
|
| 196 |
],
|
| 197 |
"bos_token": null,
|
|
|
|
| 198 |
"clean_up_tokenization_spaces": false,
|
| 199 |
"eos_token": "<|im_end|>",
|
| 200 |
"errors": "replace",
|
| 201 |
-
"extra_special_tokens": {},
|
| 202 |
"model_max_length": 131072,
|
| 203 |
"pad_token": "<|endoftext|>",
|
| 204 |
"split_special_tokens": false,
|
| 205 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 206 |
"unk_token": null
|
| 207 |
-
}
|
|
|
|
| 195 |
"<|video_pad|>"
|
| 196 |
],
|
| 197 |
"bos_token": null,
|
| 198 |
+
"chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
|
| 199 |
"clean_up_tokenization_spaces": false,
|
| 200 |
"eos_token": "<|im_end|>",
|
| 201 |
"errors": "replace",
|
|
|
|
| 202 |
"model_max_length": 131072,
|
| 203 |
"pad_token": "<|endoftext|>",
|
| 204 |
"split_special_tokens": false,
|
| 205 |
"tokenizer_class": "Qwen2Tokenizer",
|
| 206 |
"unk_token": null
|
| 207 |
+
}
|