MAX-9B-AWQ / README.md
Maxenith's picture
Upload README.md with huggingface_hub
28f81b4 verified
|
Raw History Blame Contribute Delete
6.2 kB
---
library_name: transformers
base_model: Qwen/Qwen3.5-9B
pipeline_tag: text-generation
tags:
- reasoning
- math
---
> **🔥 FP16/BF16 Base Version:** [Maxenith/MAX-9B](https://huggingface.co/Maxenith/MAX-9B) (Full precision)
> ⚠️ **Note:** This is the AWQ 4-bit quantized version. Use the base version if you need full precision.
# MAX-9B
Apache License 2.0
MAX-9B is a reasoning-focused language model developed by Maxenith. It is fine-tuned from [Qwen/Qwen3.5-9B](https://huggingface.co/Qwen/Qwen3.5-9B) on Open Thoughts reasoning data.
On GSM8K it reaches higher accuracy than its base model while using about **54% fewer generated tokens**.
## Evaluation: GSM8K (full test set)
MAX-9B was compared against its base model on the complete GSM8K test set (1,319 questions) under identical conditions.
| Model | Accuracy | 95% margin | Avg. generated tokens | Unfinished reasoning |
|---|---|---|---|---|
| **MAX-9B** | **94.3%** | ±1.2 | **982** | 34 |
| Qwen3.5-9B (base) | 89.1% | ±1.7 | 2,141 | 88 |
- Accuracy difference: **+5.2 points** (combined noise about ±2.1).
- MAX-9B generated about **54% fewer tokens** on average.
- On the 1,215 questions where **both** models finished reasoning: MAX-9B **98.0%** vs base **95.9%**. This is the more conservative comparison, since it removes the effect of answers cut off by the token limit.
### Setup (identical for both models)
- Dataset: `openai/gsm8k`, `main`, `test` split, all 1,319 questions
- Thinking mode enabled, greedy decoding, bf16
- Same system prompt for both: `You are a helpful assistant.`
- User prompt: question + `Solve this step by step and put the final answer after the word 'Answer:'.`
- Token limit: 2,048 new tokens first; questions whose reasoning was cut off were re-run with 8,192 new tokens
- Answer extraction: number after `Answer:` in the text following `</think>`; unfinished reasoning counts as incorrect
### Reproduce
Run [`gsm8k_full_final.py`](gsm8k_full_final.py). Per-question outputs of both models are in [`results_MAX-9B.json`](results_MAX-9B.json) and [`results_Original.json`](results_Original.json).
## Evaluation: MATH-500
MAX-9B on all 500 problems of MATH-500 (`HuggingFaceH4/MATH-500`). Per-question outputs are in `evals/`.
| Setting | Accuracy | Unfinished reasoning |
|---|---|---|
| Token limit 10,000 | 435/500 = 87.0% | 55 |
| Unfinished questions re-run with limit 16,000 | 461/500 = 92.2% (95% margin about ±2.4) | 27 |
- On questions where reasoning finished: 435/445 = 97.8% (first run), 461/473 = 97.5% (after re-run). This excludes unfinished answers, which tend to be the hardest, so it overstates overall accuracy.
- Average generated tokens in the first run: 3126.
| Level | Correct | Accuracy |
|---|---|---|
| 1 | 42/43 | 97.7% |
| 2 | 89/90 | 98.9% |
| 3 | 98/105 | 93.3% |
| 4 | 117/128 | 91.4% |
| 5 | 115/134 | 85.8% |
Setup: thinking mode enabled, greedy decoding, bf16, single run. System prompt: `You are a helpful assistant.`. User prompt: problem followed by `Please reason step by step, and put your final answer within \boxed{}.`. Answer = last `\boxed{}` after `</think>`, compared with `math-verify`; unfinished reasoning counts as incorrect.
Caveats: no base-model comparison under the same settings was run. No decontamination check against MATH-500 was performed (Open Thoughts contains math data). Greedy decoding can cause repetition loops; 27 questions remained unfinished even at 16,000 tokens.
Files: `evals/math500_max9b.json` (first run), `evals/math500_rerun16k.json` (re-run of unfinished questions).
## Usage
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Maxenith/MAX-9B"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype="auto", device_map="auto")
messages = [{"role": "user", "content": "If 3 pens cost 12 dollars, how much do 7 pens cost?"}]
text = tok.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True, enable_thinking=True
)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=2048)
print(tok.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
```
## Training data
MAX-9B was fine-tuned on Open Thoughts reasoning data. GSM8K was not intentionally used for training. A formal decontamination check against the GSM8K test set has not been performed.
## Limitations
-
- **Greedy decoding** can cause repetition loops in reasoning models, which may inflate the number of unfinished answers for either model. Results with the recommended sampling settings and multiple seeds have not been run yet.
- Differences of a few points are within noise on benchmarks of this size.
<!-- MAX9B_CONTAMINATION_AUDIT_START -->
## Data Contamination Audit
MAX-9B was evaluated for normalized exact question-text overlap
against its three declared fine-tuning source repositories.
**Audit summary**
- Benchmark: GSM8K (1,319 test questions)
- Benchmark: MATH-500 (500 test questions)
- Training-source records scanned: 557,007
- Normalized exact question-text matches: 2
| Training source | Records scanned | Matches |
|---|---:|---:|
| OpenR1-Math-220k | 93,733 | 1 |
| Mixture-of-Thoughts | 349,317 | 1 |
| OpenThoughts-114k | 113,957 | 0 |
The matching process applied Unicode NFKC normalization,
lowercasing, whitespace normalization, and punctuation removal.
**Important limitations**
- Full source repositories were scanned, not necessarily the exact
selected 5,000 samples used from each source.
- Matches are not automatically confirmed training contamination.
- This audit does not cover base-model pretraining data.
- Semantic paraphrases and near-duplicates were not evaluated.
- Identity Adapter v5 was not independently audited.
The detailed report and match records are available in `evals/`.
This audit reports observed overlap within the examined datasets;
it does not establish that MAX-9B is entirely contamination-free.
**Detailed report:** [Contamination Audit](evals/contamination_audit_report.md)
**Machine-readable results:** [Audit JSON](evals/contamination_audit_summary.json)
{END}