Views
No views yet
deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B, enhanced with chain-of-thought (CoT) reasoning on a hybrid dataset combining GSM8K-style reasoning and structured text-to-SQL generation.deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5Bgretelai/synthetic_text_to_sqleagle0504/openai-gsm8k-enhanced-using-together-ai-deepseek-train8k-test1k-v1eagle0504/augmented_codealpaca-20k-using-together-ai-deepseek-v11<question>...</question>
2<think>...</think>
3<response>...</response>sql_prompt)sql_explanation)sql)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 # Check if the last token matches any of the stop tokens
11 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-gen2")
4tokenizer = AutoTokenizer.from_pretrained("eagle0504/qwen-distilled-scout-1.5b-gen2")
5
6# Example stop sequence
7stop_sequence = "</response>"
8stop_ids = tokenizer.encode(stop_sequence, add_special_tokens=False)
9stopping_criteria = StoppingCriteriaList([StopOnTokens([stop_ids])])
10
11# Run generation with stop sequence
12inputs = tokenizer(
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 in April and May?</question>",
14 return_tensors="pt"
15)
16
17outputs = model.generate(
18 **inputs,
19 max_new_tokens=230,
20 stopping_criteria=stopping_criteria
21)
22
23print(tokenizer.decode(outputs[0], skip_special_tokens=True))1@misc{yin2025enhanceddeepseek,
2 title={Enhanced DeepSeek-R1-Distill-Qwen-1.5B Fine-tuned on GSM8K + CoT SQL},
3 author={Yiqiao Yin},
4 year={2025},
5 howpublished={\url{https://huggingface.co/eagle0504/enhanced-deepseek-r1-distill-qwen-1.5b-finetuned-on-gsm8k-codealpaca20k-text2sql}},
6}