Downloads · 30 days
11
2% of all-time downloads
eagle0504/qwen-distilled-scout-1.5b-instruct-gen2
qwen-distilled-scout-1.5b-instruct-gen2 is a text generation model from eagle0504. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model is a fine-tuned version of 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…
Downloads · 30 days
11
2% of all-time downloads
All-time downloads
585
Public
Parameters
1.8B
7.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors7.1 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of 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.
Fine-tuning was conducted using DeepSpeed on a multi-A100 GPU setup via RunPod for efficient training in memory-constrained environments. The training dataset includes CoT-formatted tasks with natural language questions and structured reasoning paths.
✅🔥Inference notebook is publicly available 👉 here.
eagle0504/qwen-distilled-scout-1.5b-instruct-gen1Datasets Used:
gretelai/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-SFTEach example in the dataset follows the structure:
<instruction>This is a [math/SQL/Python/medical] problem.</instruction>
<question>...</question>
<think>...</think>
<response>...</response>
This instruction format ensures that the model understands the task type explicitly and applies step-by-step reasoning across all domains.
The base model 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% |
Training was performed with the following configuration:
The model is evaluated with a custom token-level accuracy metric:
labels != -100)This model is tuned for instruction-driven chain-of-thought generation, and is especially useful in:
from transformers import StoppingCriteria, StoppingCriteriaList
import torch
class StopOnTokens(StoppingCriteria):
def __init__(self, stop_token_ids: list):
super().__init__()
self.stop_token_ids = stop_token_ids
def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor, **kwargs) -> bool:
return any(input_ids[0, -len(token):].tolist() == token for token in self.stop_token_ids)
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("eagle0504/qwen-distilled-scout-1.5b-instruct-gen1")
tokenizer = AutoTokenizer.from_pretrained("eagle0504/qwen-distilled-scout-1.5b-instruct-gen1")
stop_sequence = "</response>"
stop_ids = tokenizer.encode(stop_sequence, add_special_tokens=False)
stopping_criteria = StoppingCriteriaList([StopOnTokens([stop_ids])])
# Choose amongst math, SQL, python, or medical in the instruction.
prompt = (
"<instruction>This is a [math, SQL, python, medical] problem.</instruction>"
"<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>"
)
inputs = tokenizer(
prompt,
return_tensors="pt"
)
outputs = model.generate(
**inputs,
max_new_tokens=1024, # use max token limit and this may not be needed because stop word is set up above
stopping_criteria=stopping_criteria # stop word is in place so we may not need all 1024 tokens
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
@misc{yin2025instructgen1,
title={Instruction-Tuned Qwen 1.5B Fine-tuned on Math + SQL + Python + medical CoT Tasks},
author={Yiqiao Yin},
year={2025},
howpublished={\url{https://huggingface.co/eagle0504/qwen-distilled-scout-1.5b-instruct-gen2}},
}