ahmetggg/Luck-Qwen3-4b-Code-FineTune
1311
Luck-Qwen3-4b-Code-FineTune
A QLoRA fine-tune of unsloth/Qwen3-4B-Instruct-2507 specialized in agentic coding, multi-step reasoning, tool use, and calibrated uncertainty.
TL;DR: This model improves output formatting consistency, tool interaction, and knowledge boundary awareness ("I don't know" responses) without increasing the underlying capability ceiling of the base model.
<p align="center"> <img src="training_loss.png" alt="Training Loss Curve" width="100%"> </p> <p align="center"><em>Training loss convergence from ~1.7 to ~0.55 across 1,267 steps.</em></p>
Model Summary
In This Repo
This repository contains:
- QLoRA LoRA Adapter weights
- Merged FP16 safetensors weights
Note: Quantized GGUF files are hosted separately at [`ahmetggg/Luck-Qwen3-4b-Code-FineTune-GGUF`](https://huggingface.co/ahmetggg/Luck-Qwen3-4b-Code-FineTune-GGUF).
Intended Use
- Agentic Coding: Repository-level navigation, issue resolution, and code generation.
- Multi-Step Reasoning: Step-by-step problem-solving in science and math domains.
- Tool Use: Structured multi-turn function and tool calling.
- Calibrated Uncertainty: Refusing to answer ("I don't know") when encountering actual knowledge gaps.
Training Data
Usage
Option 1: Unsloth (LoRA Adapter)
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "ahmetggg/Luck-Qwen3-4b-Code-FineTune",
max_seq_length = 4096,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model)
messages = [{"role": "user", "content": "Write a Python function to reverse a linked list."}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))