lyk2586 commited on
Commit
9b916db
·
verified ·
1 Parent(s): a89ef42

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +123 -0
README.md ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ ---
4
+ # JT-Math-8B-Instruct
5
+
6
+
7
+
8
+ <p align="center">
9
+ <a href="<PAPER_LINK_PLACEHOLDER>" target="_blank">
10
+ <img src="https://img.shields.io/badge/Paper-ArXiv-red">
11
+ </a>
12
+ <a href="https://huggingface.co/JT-LM/JT-Math-8B-Instruct" target="_blank">
13
+ <img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Models-blue">
14
+ </a>
15
+ <a href="./LICENSE" target="_blank">
16
+ <img alt="License" src="https://img.shields.io/badge/License-Apache%202.0-yellow.svg">
17
+ </a>
18
+ </p>
19
+
20
+
21
+
22
+ We are excited to introduce JT-Math-8B-Instruct, a powerful 8-billion parameter model specialized for mathematical reasoning. It achieves state-of-the-art performance on major math benchmarks among models of its size.
23
+
24
+ JT-Math-8B-Instruct is fine-tuned from Jiutian-Math-8B-Base and has been optimized through a comprehensive process involving Supervised Fine-Tuning (SFT) and Reinforcement Learning (RL) to enhance its mathematical problem-solving abilities and instruction-following capabilities.
25
+
26
+ For full transparency and reproducibility, please refer to our technical report which details our training recipe and pipeline.
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+ **Figure 1: Performance of JT-Math-8B-Instruct on math reasoning benchmarks.**
35
+
36
+
37
+
38
+ ## Model Details
39
+
40
+
41
+
42
+ 🚀 The **JT-Math-8B-Instruct** is an 8-billion parameter language model built on the **Jiutian LLM architecture** with a **context length of 32,768 tokens**. Its development involved two key stages: initial pre-training of the **JT-Math-8B-Base** model on a diverse corpus of text and mathematical data, followed by a two-stage instruction tuning process. This tuning began with **Supervised Fine-Tuning (SFT)**, where the model was trained on a high-quality, multilingual dataset of mathematical problems and solutions in both English and Chinese to grasp problem-solving patterns. Subsequently, **Reinforcement Learning (RL)** was applied within an 8K context window to enhance reasoning accuracy, minimize logical fallacies, and align the model more closely with human preferences for clear and correct mathematical solutions.
43
+
44
+
45
+
46
+
47
+
48
+ ## Model Downloads
49
+
50
+ We release the following model to support a wide range of applications:
51
+
52
+ | Model Name | Length | Download | Notes |
53
+ | ------------------- | ------ | ----------------------------------------------------- | ------------------------------------------------------- |
54
+ | JT-Math-8B-Instruct | 32K | [🤗](https://huggingface.co/JT-LM/JT-Math-8B-Instruct) | The instruction-tuned model, optimized with SFT and RL. |
55
+
56
+
57
+
58
+
59
+
60
+ ## Evaluation Results
61
+
62
+ JT-Math-8B-Instruct demonstrates state-of-the-art performance on key mathematical benchmarks, outperforming other open-source models in the ~8B parameter class.
63
+
64
+ Below is a summary of our evaluation results:
65
+
66
+
67
+
68
+ ## How to Get Started
69
+
70
+ This example shows how to use the `JT-Math-8B-Instruct model to solve math problems.
71
+
72
+ ```python
73
+ from transformers import AutoModelForCausalLM, AutoTokenizer
74
+
75
+ model_name = "Jiutian/JT-Math-8B-Instruct"
76
+
77
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
78
+ model = AutoModelForCausalLM.from_pretrained(
79
+ model_name,
80
+ torch_dtype="auto",
81
+ device_map="auto",
82
+ trust_remote_code=True,
83
+ )
84
+
85
+ prompt = "Janet’s ducks lay 16 eggs per day. She eats three for breakfast every morning and bakes muffins for her friends every day with four. She sells the remainder at the farmers' market daily for $2 per fresh duck egg. How much in dollars does she make every day at the farmers' market?"
86
+ messages = [
87
+ {"role": "user", "content": prompt}
88
+ ]
89
+ text = tokenizer.apply_chat_template(
90
+ messages,
91
+ tokenize=False,
92
+ add_generation_prompt=True,
93
+ )
94
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
95
+
96
+ gen_kwargs = {
97
+ "do_sample": False,
98
+ "max_new_tokens": 8192,
99
+ }
100
+ generated_ids = model.generate(
101
+ **model_inputs,
102
+ **gen_kwargs
103
+ )
104
+ output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()
105
+
106
+ response = tokenizer.decode(output_ids, skip_special_tokens=True)
107
+ print("response:", response)
108
+ ```
109
+
110
+
111
+
112
+ ## Citation
113
+
114
+ If you find our work useful, please consider citing our paper:
115
+
116
+ ```latex
117
+ @article{jiutian-math2025,
118
+ title={JIUTIAN MATH: A MULTI-STAGE FRAMEWORK FOR ADVANCED MATHEMATICAL REASONING IN LARGE LANGUAGE MODELS},
119
+ author={Authors},
120
+ journal={arXiv preprint arXiv:xxxx.xxxxx},
121
+ year={2025}
122
+ }
123
+ ```