JT-Math-8B-Base / README.md
lyk2586's picture
Update README.md
6f8a3ed verified
|
raw
history blame
3.87 kB
metadata
license: apache-2.0

JT-Math-8B-Base

License

We are excited to introduce JT-Math-8B-Base: an 8-billion-parameter foundation model engineered for mathematical reasoning and the cornerstone of the JT-Math family. JT-Math-8B-Base was pre-trained on top of JT-Coder-8B-Base using an additional 210 billion tokens of high-quality mathematical and general-domain data. With a native 32,768-token context window, it provides a robust, scalable, and reproducible foundation for downstream fine-tuning—enabling researchers and developers to advance the frontier of math-centric AI applications. Technical details, training recipes, and reproducibility notes are available in our technical report.

Model Downloads

We release the following models to support a wide range of applications.

Model Name Length Download Notes
JT-Math-8B-Base 32K 🤗 The base model. Continually pre-trained from JT-Coder-8B-Base.

Evaluation Results

Model GSM8K Math CMath (zh) Average
Qwen2.5-Base-72B 91.5 62.12 84.5 79.4
Llama-3.1-Base-405B 89.0 53.8 77.4 73.4
DeepSeek-Math-Base-7B 64.2 36.2 71.7 57.4
DeepSeek-Coder-V2-Lite-Base 68.3 38.1 77.8 61.4
InternLM2-Math-Base-20B 68.2 30.4 65.9 54.8
Qwen2.5-Math-7B 91.6 55.4 85.0 77.3
JT-Math-8B-Base 88.0 58.1 90.0 78.7

How to Get Started

We provide a basic example of how to run inference with the JT-Math-8B-Base model.

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Jiutian/JT-Math-8B-Base"

tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto",
    trust_remote_code=True,
)

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?"
text = f"Question:\n{prompt}\nAnswer:\n"
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

gen_kwargs = {
    "do_sample": False,
    "max_new_tokens": 8192,
}
generated_ids = model.generate(
    **model_inputs,
    **gen_kwargs
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist()

response = tokenizer.decode(output_ids, skip_special_tokens=True)
print("response:", response)

Citation

If you find our work useful, please consider citing our paper:

@article{jiutian-math2025,
  title={JIUTIAN MATH: A MULTI-STAGE FRAMEWORK FOR ADVANCED MATHEMATICAL REASONING IN LARGE LANGUAGE MODELS},
  author={Authors},
  journal={arXiv preprint arXiv:xxxx.xxxxx},
  year={2025}
}