openai/gsm8k
Benchmark • Updated • 17.6k • 931k • 1.31k
How to use codewithdark/deepmath-7b-m with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="codewithdark/deepmath-7b-m")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("codewithdark/deepmath-7b-m")
model = AutoModelForCausalLM.from_pretrained("codewithdark/deepmath-7b-m")
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]:]))How to use codewithdark/deepmath-7b-m with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "codewithdark/deepmath-7b-m"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "codewithdark/deepmath-7b-m",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/codewithdark/deepmath-7b-m
How to use codewithdark/deepmath-7b-m with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "codewithdark/deepmath-7b-m" \
--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": "codewithdark/deepmath-7b-m",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "codewithdark/deepmath-7b-m" \
--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": "codewithdark/deepmath-7b-m",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use codewithdark/deepmath-7b-m with Docker Model Runner:
docker model run hf.co/codewithdark/deepmath-7b-m
DeepMath-7B-M is a fine-tuned version of DeepSeek-R1-Distill-Qwen-1.5B on the GSM8K dataset. This model is designed for mathematical reasoning and problem-solving, excelling in arithmetic, algebra, and word problems.
DeepMath-7B-M excels in:
You can load and use the model via the Hugging Face transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("codewithdark/deepmath-7b-m")
model = AutoModelForCausalLM.from_pretrained("codewithdark/deepmath-7b-m")
input_text = "A farmer has 5 chickens and each lays 3 eggs a day. How many eggs in total after a week?"
inputs = tokenizer(input_text, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model is released under the mit License.
If you use this model, please cite:
@misc{DeepMath-7B-M,
author = {Ahsan},
title = {DeepMath-7B-M: Fine-Tuned DeepSeek-R1-Distill-Qwen-1.5B on GSM8K},
year = {2025},
url = {https://huggingface.co/codewithdark/deepmath-7b-m}
}
Base model
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B