---
title: PromptCoT-DS-7B
canonical_url: "https://www.modelscope.cn/models/zhaoxlpku/PromptCoT-DS-7B"
md_url: "https://www.modelscope.cn/models/zhaoxlpku/PromptCoT-DS-7B.md"
repository: zhaoxlpku/PromptCoT-DS-7B
last_updated: 2025-03-05
license: "Apache License 2.0"
model_type:
  - qwen2
architectures:
  - Qwen2ForCausalLM
parameters: 7.6B
tensor_type:
  - BF16
library_name:
  - transformer
  - safetensors
language:
  - en
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy 0.9.1"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 37
stars: 0
---

# PromptCoT-DS-7B

> PromptCoT-DS-7B - zhaoxlpku 在 ModelScope 开源的模型。PromptCoT: Synthesizing Olympiad-Level Problems for Mathematical Reasoning in Large Language Models

zhaoxlpku/PromptCoT-DS-7B 是 ModelScope 魔搭社区上的 7.6B 参数机器学习模型，采用 Apache License 2.0 许可，可用 deploy_task text/emb、lmdeploy 0.9.1、lmdeploy_turbomind 0.9.1 部署。

- **Repository**: zhaoxlpku/PromptCoT-DS-7B
- **License**: Apache License 2.0
- **Parameters**: 7.6B
- **Inference backends**: deploy_task text/emb, lmdeploy 0.9.1, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 37
- **Stars**: 0
- **Last updated**: 2025-03-05

Source: https://www.modelscope.cn/models/zhaoxlpku/PromptCoT-DS-7B

---

# **PromptCoT: Synthesizing Olympiad-Level Problems for Mathematical Reasoning in Large Language Models** 

[![ArXiv](https://img.shields.io/badge/arXiv-2503.02324-red)](http://arxiv.org/abs/2503.02324)  
[![GitHub](https://img.shields.io/badge/GitHub-PromptCoT-blue)](https://github.com/zhaoxlpku/PromptCoT)  

---

## 🚀 **Overview**  
The **PromptCoT-DS** series models are distilled mathematical reasoning models trained using **more challenging problem sets generated by the PromptCoT pipeline**. These models are derived from **DeepSeek-R1-Distill-Qwen** and benefit from an enhanced training dataset designed to improve mathematical reasoning capabilities.  

✔ **PromptCoT-DS-1.5B** → Distilled from **DeepSeek-R1-Distill-Qwen-7B** (1.5B parameters)  
✔ **PromptCoT-DS-7B** → Distilled from **DeepSeek-R1-Distill-Qwen-7B** (7B parameters)  

For more details, refer to our **paper on ArXiv**: [🔗 PromptCoT: Synthesizing Olympiad-Level Problems for Mathematical Reasoning in Large Language Models](http://arxiv.org/abs/2503.02324).  

---


## 🔥 **Quick Start: Using the Model**  

### **1️⃣ Install Dependencies**  
```bash
pip install transformers vllm torch accelerate
```

### **2️⃣ Load the Model with Hugging Face Transformers**  
You can use **PromptCoT-DS** models to solve **mathematical problems** using Hugging Face’s `generate` API:  

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "zhaoxlpku/PromptCoT-DS-7B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name).to("cuda")

problem_statement = (
    "A robe takes 2 bolts of blue fiber and half that much white fiber.  How many bolts in total does it take?"
)

prompt = (
    "<|begin▁of▁sentence|>Please reason step by step, and put your final answer within \\boxed{{}}."
    "<|User|>" + problem_statement + "<|Assistant|>"
)

inputs = tokenizer(prompt, return_tensors="pt").to("cuda")

with torch.no_grad():
    output = model.generate(**inputs, max_length=32768, temperature=0.6)

generated_solution = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_solution)
```

---

## ⚡ **Using vLLM for Fast Inference**  
For optimized inference, use `vLLM`:  
```python
from vllm import LLM, SamplingParams

model_name = "zhaoxlpku/PromptCoT-DS-7B"
llm = LLM(model=model_name, tensor_parallel_size=1)

problem_statement = (
    "A robe takes 2 bolts of blue fiber and half that much white fiber.  How many bolts in total does it take?"
)

prompt = (
    "<|begin▁of▁sentence|>Please reason step by step, and put your final answer within \\boxed{{}}."
    "<|User|>" + problem_statement + "<|Assistant|>"
)

sampling_params = SamplingParams(temperature=0.6, max_tokens=32768)
outputs = llm.generate([prompt], sampling_params)

print(outputs[0].outputs[0].text)
```

---

## 🔗 **Full Usage & Advanced Options**  
For advanced usage, including batch inference and evaluation on mathematical benchmarks, refer to the **full repository on GitHub**:  
🔹 [GitHub: PromptCoT](https://github.com/zhaoxlpku/PromptCoT)  

---

## 📜 **Citation**  
If you use **PromptCoT**, please consider citing:  
```
@article{zhao2025promptcot,
  author    = {Zhao, Xueliang and Wu, Wei and Guan, Jian and Kong, Lingpeng},
  title     = {PromptCoT: Synthesizing Olympiad-Level Problems for Mathematical Reasoning in Large Language Models},
  year      = {2025},
  journal   = {arXiv preprint arXiv:2503.02324},
  url       = {http://arxiv.org/abs/2503.02324}
}
```
