How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="dbands/Qwen2.5-Coder-7B-Instruct-reason")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("dbands/Qwen2.5-Coder-7B-Instruct-reason")
model = AutoModelForCausalLM.from_pretrained("dbands/Qwen2.5-Coder-7B-Instruct-reason")
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]:]))
Quick Links

My Reasoning Model

System Prompt Format

Respond in the following format:

<reasoning>
...
</reasoning>
<answer>
...
</answer>

I fine-tuned the model using openai/gsm8k, and to ensure costs do not go insane, I used a single A100.


Enjoy, but please note that this model is experimental and I used it to define my pipeline.

I will be testing fine tuning larger more capable models.  I suspect they would add more value in the short term.


---

# Uploaded  model

- **Developed by:** dbands
- **License:** apache-2.0
- **Finetuned from model :** unsloth/qwen2.5-coder-7b-instruct-bnb-4bit

This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.

[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
Downloads last month
2
Safetensors
Model size
8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for dbands/Qwen2.5-Coder-7B-Instruct-reason

Quantizations
1 model