Downloads · 30 days
8
6% of all-time downloads
M-Alkassem/qwen2.5-coder-3b-unsloth-lora
qwen2.5-coder-3b-unsloth-lora is a text generation model from M-Alkassem. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This repository contains a LoRA adapter, not a full standalone model.
Downloads · 30 days
8
6% of all-time downloads
All-time downloads
136
Public
Repo size
131 MB
Likes
1
Public
Click a slice to open those files.
.safetensors120 MB · 91%
From the Hugging Face model README
This repository contains a LoRA adapter, not a full standalone model.
It was created by fine-tuning unsloth/Qwen2.5-Coder-3B-Instruct-bnb-4bit for coding-assistance behavior on Google Colab using T4 GPU.
This adapter is the first-stage coding-focused fine-tune in the project.
Training goal:
This adapter should be loaded on top of the base model:
unsloth/Qwen2.5-Coder-3B-Instruct-bnb-4bitThis adapter was trained on a sampled subset of:
bigcode/self-oss-instruct-sc2-exec-filter-50kProject training setup:
400039931024250This model was trained with supervised fine-tuning (SFT) using LoRA and 4-bit quantization.
Key setup:
161601161e-4adamw_8bitTesla T4Observed result:
0.6130Use this adapter when you want:
This adapter is not a standalone merged model.
It also was not the strongest model in the later direct-answer benchmark on every prompt. It improved some focused coding-task behavior, but it should be understood as a practical low-resource experiment rather than a universally superior model.
import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
BASE_MODEL = "Qwen/Qwen2.5-Coder-3B-Instruct"
ADAPTER_MODEL = "M-Alkassem/qwen2.5-coder-3b-unsloth-lora"
bnb_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype=torch.float16,
bnb_4bit_use_double_quant=True,
)
tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL, use_fast=True)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
base_model = AutoModelForCausalLM.from_pretrained(
BASE_MODEL,
quantization_config=bnb_config,
torch_dtype=torch.float16,
device_map="auto",
)
model = PeftModel.from_pretrained(base_model, ADAPTER_MODEL)
model.eval()
Example Prompt
prompt = "Debug this Python code and explain the bug: def is_even(n): return n % 2 == 1"
Project Context This adapter is part of a larger two-stage project:
coding-focused adapter: this repository agent-oriented continued adapter: M-Alkassem/qwen2.5-coder-3b-agent-v1 The later agent adapter was trained by continuing from this coding adapter.
References