Update README.md
Browse files
README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/gpt-oss-120b-unsloth-bnb-4bit
|
|
|
|
| 3 |
tags:
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
|
@@ -17,62 +18,62 @@ datasets:
|
|
| 17 |
- brando/olympiad-bench-imo-math-boxed-825-v2-21-08-2024
|
| 18 |
- Goedel-LM/MathOlympiadBench
|
| 19 |
- hf-imo-colab/olympiads-ref-base-math-word
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
---
|
| 21 |
|
| 22 |
-
# GPT-OSS-120B
|
| 23 |
|
| 24 |
-
|
| 25 |
|
| 26 |
- **Developed by:** Azmainadeeb
|
|
|
|
| 27 |
- **Base Model:** unsloth/gpt-oss-120b-unsloth-bnb-4bit
|
| 28 |
-
- **
|
| 29 |
-
- **License:** Apache-2.0
|
| 30 |
|
| 31 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
| 32 |
|
| 33 |
-
##
|
| 34 |
-
|
| 35 |
|
| 36 |
-
### Capabilities:
|
| 37 |
-
* **Deep Reasoning:** Leverages the `Multilingual-Thinking` dataset to maintain a coherent chain-of-thought.
|
| 38 |
-
* **Competition Math:** Optimized for International Mathematical Olympiad (IMO) and AIME-style problems.
|
| 39 |
-
* **Variable Effort:** Supports the `reasoning_effort` parameter (low, medium, high) to balance speed and accuracy.
|
| 40 |
|
| 41 |
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
|
| 52 |
-
##
|
| 53 |
-
This model is optimized for use with the **Unsloth** library and Hugging Face's `transformers`.
|
| 54 |
|
| 55 |
-
### Quick Inference Example
|
| 56 |
```python
|
| 57 |
from unsloth import FastLanguageModel
|
| 58 |
-
import torch
|
| 59 |
|
| 60 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 61 |
-
model_name = "Azmainadeeb/
|
| 62 |
-
max_seq_length =
|
| 63 |
load_in_4bit = True,
|
| 64 |
)
|
| 65 |
|
| 66 |
messages = [
|
| 67 |
-
{"role": "user", "content": "
|
| 68 |
]
|
| 69 |
|
| 70 |
-
|
|
|
|
| 71 |
messages,
|
| 72 |
add_generation_prompt = True,
|
| 73 |
reasoning_effort = "medium", # Options: low, medium, high
|
| 74 |
return_tensors = "pt"
|
| 75 |
).to("cuda")
|
| 76 |
|
| 77 |
-
outputs = model.generate(
|
| 78 |
print(tokenizer.decode(outputs[0]))
|
|
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/gpt-oss-120b-unsloth-bnb-4bit
|
| 3 |
+
repo_name: Azmainadeeb/MathGPT
|
| 4 |
tags:
|
| 5 |
- text-generation-inference
|
| 6 |
- transformers
|
|
|
|
| 18 |
- brando/olympiad-bench-imo-math-boxed-825-v2-21-08-2024
|
| 19 |
- Goedel-LM/MathOlympiadBench
|
| 20 |
- hf-imo-colab/olympiads-ref-base-math-word
|
| 21 |
+
- alejopaullier/aimo-external-dataset
|
| 22 |
+
- imbishal7/math-olympiad-problems-and-solutions-aops
|
| 23 |
+
- baidalinadilzhan/problems-and-solutions-interantional-phos
|
| 24 |
+
- kishanvavdara/aimo-olympiadbench-math-dataset
|
| 25 |
---
|
| 26 |
|
| 27 |
+
# MathGPT (GPT-OSS-120B-Olympiad)
|
| 28 |
|
| 29 |
+
**MathGPT** is a high-performance reasoning model fine-tuned from **GPT-OSS 120B**. It is engineered specifically for solving complex mathematical theorems, competition-level problems (AIME/IMO), and advanced scientific reasoning.
|
| 30 |
|
| 31 |
- **Developed by:** Azmainadeeb
|
| 32 |
+
- **Model Type:** Causal Language Model (Fine-tuned for Mathematical Reasoning)
|
| 33 |
- **Base Model:** unsloth/gpt-oss-120b-unsloth-bnb-4bit
|
| 34 |
+
- **Training Framework:** Unsloth + TRL
|
|
|
|
| 35 |
|
| 36 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
| 37 |
|
| 38 |
+
## 🧩 Model Architecture
|
| 39 |
+
MathGPT leverages the **Mixture-of-Experts (MoE)** architecture of the GPT-OSS family, utilizing 117B total parameters with 5.1B active parameters per token. This allows the model to maintain state-of-the-art reasoning depth while remaining computationally efficient during inference.
|
| 40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
|
| 43 |
+
## 📚 Training Data
|
| 44 |
+
The model was trained on a massive synthesis of reasoning-dense datasets to ensure "Chain of Thought" consistency:
|
| 45 |
|
| 46 |
+
### Primary Thinking Dataset
|
| 47 |
+
* **[Multilingual-Thinking](https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking):** Instills the core "Thinking" trace and multi-step internal monologue.
|
| 48 |
|
| 49 |
+
### Olympiad & Competition Sets
|
| 50 |
+
* **OlympiadBench & MathOlympiadBench:** High-difficulty benchmark problems.
|
| 51 |
+
* **IMO Math Boxed:** Problems curated from the International Mathematical Olympiad.
|
| 52 |
+
* **AoPS (Art of Problem Solving):** Diverse competition-style math problems.
|
| 53 |
+
* **AIMO External Data:** Specific sets designed for the AI Mathematical Olympiad.
|
| 54 |
|
| 55 |
+
## 🚀 Quickstart Usage
|
|
|
|
| 56 |
|
|
|
|
| 57 |
```python
|
| 58 |
from unsloth import FastLanguageModel
|
|
|
|
| 59 |
|
| 60 |
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 61 |
+
model_name = "Azmainadeeb/MathGPT",
|
| 62 |
+
max_seq_length = 4096,
|
| 63 |
load_in_4bit = True,
|
| 64 |
)
|
| 65 |
|
| 66 |
messages = [
|
| 67 |
+
{"role": "user", "content": "Find all real numbers x such that 8^x + 2^x = 130."}
|
| 68 |
]
|
| 69 |
|
| 70 |
+
# Apply the template with reasoning_effort to trigger the "Thinking" mode
|
| 71 |
+
inputs = tokenizer.apply_chat_template(
|
| 72 |
messages,
|
| 73 |
add_generation_prompt = True,
|
| 74 |
reasoning_effort = "medium", # Options: low, medium, high
|
| 75 |
return_tensors = "pt"
|
| 76 |
).to("cuda")
|
| 77 |
|
| 78 |
+
outputs = model.generate(inputs, max_new_tokens = 1024)
|
| 79 |
print(tokenizer.decode(outputs[0]))
|