Update README.md
Browse files
README.md
CHANGED
|
@@ -5,17 +5,74 @@ tags:
|
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- gpt_oss
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
license: apache-2.0
|
| 9 |
language:
|
| 10 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
-
- **
|
| 16 |
-
- **License:** apache-2.0
|
| 17 |
-
- **Finetuned from model :** unsloth/gpt-oss-120b-unsloth-bnb-4bit
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- gpt_oss
|
| 8 |
+
- mathematics
|
| 9 |
+
- olympiad-math
|
| 10 |
+
- reasoning
|
| 11 |
+
- chain-of-thought
|
| 12 |
license: apache-2.0
|
| 13 |
language:
|
| 14 |
- en
|
| 15 |
+
datasets:
|
| 16 |
+
- HuggingFaceH4/Multilingual-Thinking
|
| 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 Olympiad Reasoning
|
| 23 |
|
| 24 |
+
This model is a specialized fine-tune of **OpenAI's GPT-OSS 120B** (4-bit quantized by Unsloth). It is designed for high-level mathematical reasoning, complex problem solving, and long-form "Thinking" processes.
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
- **Developed by:** Azmainadeeb
|
| 27 |
+
- **Base Model:** unsloth/gpt-oss-120b-unsloth-bnb-4bit
|
| 28 |
+
- **Architecture:** Mixture-of-Experts (MoE) with 117B total and 5.1B active parameters.
|
| 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 |
+
## 🌟 Model Highlights
|
| 34 |
+
This model uses the **Harmony Response Format** natively, allowing for a distinct separation between "internal reasoning" and "final response." By fine-tuning on a mixture of thinking traces and competition-grade math, the model exhibits improved logical consistency and accuracy in STEM domains.
|
| 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 |
+
## 📊 Training Data
|
| 44 |
+
The model was trained on a high-diversity mixture of reasoning and mathematical datasets:
|
| 45 |
+
|
| 46 |
+
1. **[HuggingFaceH4/Multilingual-Thinking](https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking):** Provides the foundational "thinking" behavior and internal monologue.
|
| 47 |
+
2. **[brando/olympiad-bench-imo-math](https://huggingface.co/datasets/brando/olympiad-bench-imo-math-boxed-825-v2-21-08-2024):** High-difficulty math competition problems.
|
| 48 |
+
3. **[Goedel-LM/MathOlympiadBench](https://huggingface.co/datasets/Goedel-LM/MathOlympiadBench):** Challenging math benchmark problems.
|
| 49 |
+
4. **[hf-imo-colab/olympiads-ref-base-math-word](https://huggingface.co/datasets/hf-imo-colab/olympiads-ref-base-math-word):** Diverse word problems and solutions.
|
| 50 |
+
5. **Kaggle External Math Data:** Curated datasets from AoPS, AIMO, and OlympiadBench for extra-domain coverage.
|
| 51 |
+
|
| 52 |
+
## 🛠 Usage Instructions
|
| 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/gpt-oss-120b-olympiad", # Replace with your repo ID
|
| 62 |
+
max_seq_length = 2048,
|
| 63 |
+
load_in_4bit = True,
|
| 64 |
+
)
|
| 65 |
+
|
| 66 |
+
messages = [
|
| 67 |
+
{"role": "user", "content": "Let n be a positive integer such that n^2 + 3n + 2 is a perfect square. Find all such n."}
|
| 68 |
+
]
|
| 69 |
+
|
| 70 |
+
input_ids = tokenizer.apply_chat_template(
|
| 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(input_ids, max_new_tokens = 1024)
|
| 78 |
+
print(tokenizer.decode(outputs[0]))
|