Azmainadeeb commited on
Commit
a52da4d
·
verified ·
1 Parent(s): d539efa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -26
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 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]))
 
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]))