Views
No views yet
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B, enhanced with instruction-tuned chain-of-thought (CoT) reasoning across three problem domains: math, text-to-SQL, medical-reasoning, and Python programming.eagle0504/qwen-distilled-scout-1.5b-instruct-gen1gretelai/synthetic_text_to_sqleagle0504/openai-gsm8k-enhanced-using-together-ai-deepseek-train8k-test1k-v1eagle0504/augmented_codealpaca-20k-using-together-ai-deepseek-v1FreedomIntelligence/medical-o1-reasoning-SFT1<instruction>This is a [math/SQL/Python/medical] problem.</instruction>
2<question>...</question>
3<think>...</think>
4<response>...</response>deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B was fine-tuned on three different datasets using DeepSpeed across various RunPod infrastructure setups. Below is a consolidated summary of the training configurations and results:| Model ID | Dataset Description | GPUs | vCPUs | RAM (GB) | Disk per GPU | Container Image | Duration | Cost | Total Cost | DeepSpeed Stage | Precision | Mean Token Accuracy |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
eagle0504/openai-gsm8k-enhanced-using-together-ai-deepseek-train8k-test1k-v1 | OpenAI GSM8K Enhanced v2 | 6 × H100 PCIe | 144 | 1132 | 20 GB | runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 | 3 hrs | ~$14 | ~$42 | Stage 1 | FP16 | 98% |
eagle0504/augmented_codealpaca-20k-using-together-ai-deepseek-v1 | GSM8K + CodeAlpaca-20K Enhanced | 4 × A100 SXM | 146 | 1144 | 20 GB | runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 | 3 hrs | ~$7+ | ~$21+ | Stage 1 | FP16 | 98% |
gretelai/synthetic_text_to_sql | Custom CoT + SQL-Reasoning | 6 × A100 SXM | 192 | 1536 | 20 GB | runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 | 2.5 hrs | ~$21 | ~$52.5 | Stage 2 | FP16 | 97% |
FreedomIntelligence/medical-o1-reasoning-SFT | CoT + Medical-Reasoning | 4 x A100 SXM | 146 | 1144 | 20 GB | runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04 | 17 hrs | ~$7+ | ~$119 | Stage 2 | FP16 | 99% |
labels != -100)1from transformers import StoppingCriteria, StoppingCriteriaList
2import torch
3
4class StopOnTokens(StoppingCriteria):
5 def __init__(self, stop_token_ids: list):
6 super().__init__()
7 self.stop_token_ids = stop_token_ids
8
9 def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
10 return any(input_ids[0, -len(token):].tolist() == token for token in self.stop_token_ids)1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("eagle0504/qwen-distilled-scout-1.5b-instruct-gen1")
4tokenizer = AutoTokenizer.from_pretrained("eagle0504/qwen-distilled-scout-1.5b-instruct-gen1")
5
6stop_sequence = "</response>"
7stop_ids = tokenizer.encode(stop_sequence, add_special_tokens=False)
8stopping_criteria = StoppingCriteriaList([StopOnTokens([stop_ids])])
9
10# Choose amongst math, SQL, python, or medical in the instruction.
11prompt = (
12 "<instruction>This is a [math, SQL, python, medical] problem.</instruction>"
13 "<question>Natalia sold clips to 48 of her friends in April, and then she sold half as many clips in May. How many clips did Natalia sell altogether?</question>"
14)
15
16inputs = tokenizer(
17 prompt,
18 return_tensors="pt"
19)
20
21outputs = model.generate(
22 **inputs,
23 max_new_tokens=1024, # use max token limit and this may not be needed because stop word is set up above
24 stopping_criteria=stopping_criteria # stop word is in place so we may not need all 1024 tokens
25)
26
27print(tokenizer.decode(outputs[0], skip_special_tokens=True))1@misc{yin2025instructgen1,
2 title={Instruction-Tuned Qwen 1.5B Fine-tuned on Math + SQL + Python + medical CoT Tasks},
3 author={Yiqiao Yin},
4 year={2025},
5 howpublished={\url{https://huggingface.co/eagle0504/qwen-distilled-scout-1.5b-instruct-gen2}},
6}