Text Generation
Transformers
Safetensors
English
qwen2
text-generation-inference
PRM
Code
Math
conversational
Instructions to use prithivMLmods/Deepthink-1.5B-Open-PRM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/Deepthink-1.5B-Open-PRM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="prithivMLmods/Deepthink-1.5B-Open-PRM") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Deepthink-1.5B-Open-PRM") model = AutoModelForCausalLM.from_pretrained("prithivMLmods/Deepthink-1.5B-Open-PRM") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use prithivMLmods/Deepthink-1.5B-Open-PRM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/Deepthink-1.5B-Open-PRM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Deepthink-1.5B-Open-PRM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/prithivMLmods/Deepthink-1.5B-Open-PRM
- SGLang
How to use prithivMLmods/Deepthink-1.5B-Open-PRM with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prithivMLmods/Deepthink-1.5B-Open-PRM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Deepthink-1.5B-Open-PRM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prithivMLmods/Deepthink-1.5B-Open-PRM" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/Deepthink-1.5B-Open-PRM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use prithivMLmods/Deepthink-1.5B-Open-PRM with Docker Model Runner:
docker model run hf.co/prithivMLmods/Deepthink-1.5B-Open-PRM
Improve language tag
#1
by lbourdois - opened
README.md
CHANGED
|
@@ -1,97 +1,109 @@
|
|
| 1 |
-
---
|
| 2 |
-
library_name: transformers
|
| 3 |
-
tags:
|
| 4 |
-
- text-generation-inference
|
| 5 |
-
- PRM
|
| 6 |
-
- Code
|
| 7 |
-
- Math
|
| 8 |
-
license: apache-2.0
|
| 9 |
-
language:
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
1.
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
Well-structured queries yield more accurate and educationally useful outputs.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: transformers
|
| 3 |
+
tags:
|
| 4 |
+
- text-generation-inference
|
| 5 |
+
- PRM
|
| 6 |
+
- Code
|
| 7 |
+
- Math
|
| 8 |
+
license: apache-2.0
|
| 9 |
+
language:
|
| 10 |
+
- zho
|
| 11 |
+
- eng
|
| 12 |
+
- fra
|
| 13 |
+
- spa
|
| 14 |
+
- por
|
| 15 |
+
- deu
|
| 16 |
+
- ita
|
| 17 |
+
- rus
|
| 18 |
+
- jpn
|
| 19 |
+
- kor
|
| 20 |
+
- vie
|
| 21 |
+
- tha
|
| 22 |
+
- ara
|
| 23 |
+
base_model:
|
| 24 |
+
- Qwen/Qwen2.5-1.5B-Instruct
|
| 25 |
+
pipeline_tag: text-generation
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
|
| 30 |
+
# **Deepthink-1.5B-Open-PRM**
|
| 31 |
+
|
| 32 |
+
> **Deepthink-1.5B-Open-PRM** is a **process-supervised reasoning model** fine-tuned from **Qwen2.5 1.5B** using **Process Reward Models (PRM)**. It excels at **step-by-step mathematical problem solving** in both **English** and **Simplified Chinese**, offering interpretable, logically structured responses for use in **education**, **STEM tutoring**, and **lightweight math agents**.
|
| 33 |
+
|
| 34 |
+
## **Key Features**
|
| 35 |
+
|
| 36 |
+
1. **Process Reward Model Supervision (PRM)**
|
| 37 |
+
Fine-tuned with PRMs to reward high-quality intermediate reasoning steps — fostering step-by-step interpretability, accuracy, and educational transparency.
|
| 38 |
+
|
| 39 |
+
2. **Compact Foundation (Qwen2.5 0.5B)**
|
| 40 |
+
Built upon the highly efficient Qwen2.5 1.5B architecture and scaled up through distillation and reward-based alignment to 1.5B parameters, balancing reasoning quality and deployment efficiency.
|
| 41 |
+
|
| 42 |
+
3. **Bilingual Math Capability**
|
| 43 |
+
Fluent in solving and explaining math problems in both **English** and **Simplified Chinese**, making it ideal for multilingual classrooms and tutoring platforms.
|
| 44 |
+
|
| 45 |
+
4. **Process-Supervised Math Reasoning**
|
| 46 |
+
Trained to reason like a teacher — showing each logical step before delivering an answer. Ideal for learners who need to understand the “how” and “why” behind each solution.
|
| 47 |
+
|
| 48 |
+
5. **Long-Context & Word Problem Reasoning**
|
| 49 |
+
Especially proficient with multi-step arithmetic, word problems, logic puzzles, and middle school to early college-level math.
|
| 50 |
+
|
| 51 |
+
## **Quickstart with Transformers**
|
| 52 |
+
|
| 53 |
+
```python
|
| 54 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 55 |
+
|
| 56 |
+
model_name = "prithivMLmods/Deepthink-1.5B-Open-PRM"
|
| 57 |
+
|
| 58 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 59 |
+
model_name,
|
| 60 |
+
torch_dtype="auto",
|
| 61 |
+
device_map="auto"
|
| 62 |
+
)
|
| 63 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
| 64 |
+
|
| 65 |
+
prompt = "Solve: A tank can be filled by one pipe in 6 hours and emptied by another in 9 hours. How long will it take to fill the tank if both pipes are opened together?"
|
| 66 |
+
|
| 67 |
+
messages = [
|
| 68 |
+
{"role": "system", "content": "You are a helpful math tutor who explains each step clearly."},
|
| 69 |
+
{"role": "user", "content": prompt}
|
| 70 |
+
]
|
| 71 |
+
|
| 72 |
+
text = tokenizer.apply_chat_template(
|
| 73 |
+
messages,
|
| 74 |
+
tokenize=False,
|
| 75 |
+
add_generation_prompt=True
|
| 76 |
+
)
|
| 77 |
+
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
|
| 78 |
+
|
| 79 |
+
generated_ids = model.generate(
|
| 80 |
+
**model_inputs,
|
| 81 |
+
max_new_tokens=512
|
| 82 |
+
)
|
| 83 |
+
generated_ids = [
|
| 84 |
+
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
| 85 |
+
]
|
| 86 |
+
|
| 87 |
+
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
## **Intended Use**
|
| 91 |
+
|
| 92 |
+
- **Math Education Agents**: Tutors that explain problems step by step, helping users build understanding through reasoning.
|
| 93 |
+
- **Bilingual Learning Platforms**: Apps that teach math in both Chinese and English.
|
| 94 |
+
- **STEM-Oriented Assistants**: Supports early-stage problem solving in science and engineering contexts.
|
| 95 |
+
- **Lightweight LLM Deployments**: Optimized for low-resource environments, from browsers to mobile devices.
|
| 96 |
+
|
| 97 |
+
## **Limitations**
|
| 98 |
+
|
| 99 |
+
1. **Domain Specificity**
|
| 100 |
+
Primarily tuned for math reasoning — performance may degrade on unrelated tasks like creative writing or open dialogue.
|
| 101 |
+
|
| 102 |
+
2. **Model Size Constraint**
|
| 103 |
+
While efficient, 1.5B parameters may struggle with highly abstract or very long multi-domain tasks.
|
| 104 |
+
|
| 105 |
+
3. **PRM Bias Generalization**
|
| 106 |
+
PRM training can bias toward rewardable structures — results should still be reviewed for correctness and completeness.
|
| 107 |
+
|
| 108 |
+
4. **Prompt Structure Sensitivity**
|
| 109 |
Well-structured queries yield more accurate and educationally useful outputs.
|