Qwen2.5-Coder-1.5B-DEEP-LoRA
This model is a Fine-Tuned version of Qwen2.5-Coder-1.5B-Instruct using LoRA (Low-Rank Adaptation). It was trained as part of a Competitive Code Reasoning project.
๐ฏ Model Description
- Model Type: LoRA Adapter
- Base Model: Qwen/Qwen2.5-Coder-1.5B-Instruct
- Focus: This specific adapter was trained on the DEEP dataset (containing deeper reasoning traces) to enhance code reasoning capabilities.
๐ Dataset
The model was fine-tuned on the CodeGen-Deep-5K dataset.
- Training Field: Sadece
solution(code-only) alanฤฑ kullanฤฑlarak eฤitilmiลtir. - System Prompt: Training sฤฑrasฤฑnda ลu prompt zorunlu tutulmuลtur:
"You are an expert Python programmer. Please read the problem carefully before writing any Python code."
โ๏ธ Hyperparameters
The following hyperparameters were used during training (as per project specifications):
| Parameter | Value |
|---|---|
| Learning Rate | 2e-4 |
| Batch Size | 8 (Effective: 16 via Gradient Accumulation) |
| Context Length | 1024 |
| LoRA Rank (r) | 64 |
| LoRA Alpha | 128 |
| LoRA Dropout | 0.05 |
| Target Modules | All Linear Layers (q, k, v, o, gate, up, down) |
| Optimizer | AdamW |
| Precision | bf16 (BFloat16) |
๐ Training Results
Training loss logs demonstrating the model's convergence:
๐ป How to Use
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
# 1. Load Base Model
base_model_id = "Qwen/Qwen2.5-Coder-1.5B-Instruct"
model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
# 2. Load This LoRA Adapter
adapter_id = "colak46/Qwen2.5-Coder-1.5B-DEEP-LoRA"
model = PeftModel.from_pretrained(model, adapter_id)
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
# 3. Inference
prompt = "Write a Python function to solve the Valid Parentheses problem."
messages = [
{"role": "system", "content": "You are an expert Python programmer. Please read the problem carefully before writing any Python code."},
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 31
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
๐
Ask for provider support
Model tree for colak46/Qwen2.5-Coder-1.5B-DEEP-LoRA
Base model
Qwen/Qwen2.5-1.5B
Finetuned
Qwen/Qwen2.5-Coder-1.5B
Finetuned
Qwen/Qwen2.5-Coder-1.5B-Instruct
