| --- |
| license: apache-2.0 |
| language: |
| - zh |
| - en |
| tags: |
| - math |
| - fine-tuned |
| - 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)) |