File size: 3,409 Bytes
db2a9b9
 
 
 
 
 
 
d539efa
 
 
 
db2a9b9
 
 
d539efa
 
 
 
 
db2a9b9
 
d539efa
db2a9b9
d539efa
db2a9b9
d539efa
 
 
 
db2a9b9
 
d539efa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
base_model: unsloth/gpt-oss-120b-unsloth-bnb-4bit
tags:
- text-generation-inference
- transformers
- unsloth
- gpt_oss
- mathematics
- olympiad-math
- reasoning
- chain-of-thought
license: apache-2.0
language:
- en
datasets:
- HuggingFaceH4/Multilingual-Thinking
- brando/olympiad-bench-imo-math-boxed-825-v2-21-08-2024
- Goedel-LM/MathOlympiadBench
- hf-imo-colab/olympiads-ref-base-math-word
---

# GPT-OSS-120B Olympiad Reasoning

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.

- **Developed by:** Azmainadeeb
- **Base Model:** unsloth/gpt-oss-120b-unsloth-bnb-4bit
- **Architecture:** Mixture-of-Experts (MoE) with 117B total and 5.1B active parameters.
- **License:** Apache-2.0

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)

## 🌟 Model Highlights
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.

### Capabilities:
* **Deep Reasoning:** Leverages the `Multilingual-Thinking` dataset to maintain a coherent chain-of-thought.
* **Competition Math:** Optimized for International Mathematical Olympiad (IMO) and AIME-style problems.
* **Variable Effort:** Supports the `reasoning_effort` parameter (low, medium, high) to balance speed and accuracy.



## 📊 Training Data
The model was trained on a high-diversity mixture of reasoning and mathematical datasets:

1. **[HuggingFaceH4/Multilingual-Thinking](https://huggingface.co/datasets/HuggingFaceH4/Multilingual-Thinking):** Provides the foundational "thinking" behavior and internal monologue.
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.
3. **[Goedel-LM/MathOlympiadBench](https://huggingface.co/datasets/Goedel-LM/MathOlympiadBench):** Challenging math benchmark problems.
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.
5. **Kaggle External Math Data:** Curated datasets from AoPS, AIMO, and OlympiadBench for extra-domain coverage.

## 🛠 Usage Instructions
This model is optimized for use with the **Unsloth** library and Hugging Face's `transformers`. 

### Quick Inference Example
```python
from unsloth import FastLanguageModel
import torch

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "Azmainadeeb/gpt-oss-120b-olympiad", # Replace with your repo ID
    max_seq_length = 2048,
    load_in_4bit = True,
)

messages = [
    {"role": "user", "content": "Let n be a positive integer such that n^2 + 3n + 2 is a perfect square. Find all such n."}
]

input_ids = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt = True,
    reasoning_effort = "medium", # Options: low, medium, high
    return_tensors = "pt"
).to("cuda")

outputs = model.generate(input_ids, max_new_tokens = 1024)
print(tokenizer.decode(outputs[0]))