File size: 1,302 Bytes
55de812
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: apache-2.0  # 或 mit, cc-by-nc-4.0 等,按需修改
language:
- zh
- en
tags:
- math
- fine-tuned
- deepseek  # 如果基座是 deepseek 就写
- sft
widget:
- text: "计算 2+3*4 等于多少?"
  example_title: "数学计算"
- text: "Solve the equation x^2 + 5x + 6 = 0"
  example_title: "方程求解"
---

# math-sft

✨ 基于 [基座模型名称] 微调的数学推理模型。

## 📌 模型简介

- **基础模型**`[deepseek-ai/deepseek-llm-7b-chat]`(或你实际用的基座)
- **微调方法**:全参数 SFT(监督微调)/ LoRA / QLoRA 等
- **训练框架**:Hugging Face Transformers + [DeepSpeed / FSDP / Accelerate]
- **训练数据**:[描述数据集,例如:自定义数学问答数据集,包含XX条中文数学题]
- **训练任务**:数学计算、代数推理、公式求解等

## 🚀 快速使用

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("yelinna/math-sft", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("yelinna/math-sft", trust_remote_code=True)

inputs = tokenizer("计算 2+3*4 等于多少?", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))