Instructions to use Maxenith/MAX-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maxenith/MAX-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Maxenith/MAX-9B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Maxenith/MAX-9B") model = AutoModelForCausalLM.from_pretrained("Maxenith/MAX-9B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Maxenith/MAX-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Maxenith/MAX-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Maxenith/MAX-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Maxenith/MAX-9B
- SGLang
How to use Maxenith/MAX-9B 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 "Maxenith/MAX-9B" \ --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": "Maxenith/MAX-9B", "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 "Maxenith/MAX-9B" \ --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": "Maxenith/MAX-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Maxenith/MAX-9B with Docker Model Runner:
docker model run hf.co/Maxenith/MAX-9B
Add MATH-500 evaluation results
Browse files- README.md +26 -0
- evals/math500_max9b.json +0 -0
- evals/math500_rerun16k.json +0 -0
README.md
CHANGED
|
@@ -40,6 +40,32 @@ MAX-9B was compared against its base model on the complete GSM8K test set (1,319
|
|
| 40 |
|
| 41 |
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).
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
## Usage
|
| 44 |
|
| 45 |
```python
|
|
|
|
| 40 |
|
| 41 |
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).
|
| 42 |
|
| 43 |
+
## Evaluation: MATH-500
|
| 44 |
+
|
| 45 |
+
MAX-9B on all 500 problems of MATH-500 (`HuggingFaceH4/MATH-500`). Per-question outputs are in `evals/`.
|
| 46 |
+
|
| 47 |
+
| Setting | Accuracy | Unfinished reasoning |
|
| 48 |
+
|---|---|---|
|
| 49 |
+
| Token limit 10,000 | 435/500 = 87.0% | 55 |
|
| 50 |
+
| Unfinished questions re-run with limit 16,000 | 461/500 = 92.2% (95% margin about ±2.4) | 27 |
|
| 51 |
+
|
| 52 |
+
- 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.
|
| 53 |
+
- Average generated tokens in the first run: 3126.
|
| 54 |
+
|
| 55 |
+
| Level | Correct | Accuracy |
|
| 56 |
+
|---|---|---|
|
| 57 |
+
| 1 | 42/43 | 97.7% |
|
| 58 |
+
| 2 | 89/90 | 98.9% |
|
| 59 |
+
| 3 | 98/105 | 93.3% |
|
| 60 |
+
| 4 | 117/128 | 91.4% |
|
| 61 |
+
| 5 | 115/134 | 85.8% |
|
| 62 |
+
|
| 63 |
+
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.
|
| 64 |
+
|
| 65 |
+
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.
|
| 66 |
+
|
| 67 |
+
Files: `evals/math500_max9b.json` (first run), `evals/math500_rerun16k.json` (re-run of unfinished questions).
|
| 68 |
+
|
| 69 |
## Usage
|
| 70 |
|
| 71 |
```python
|
evals/math500_max9b.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
evals/math500_rerun16k.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|