llama-3.2-1B-ft-v0.1-qlora - Surgical Python Coder
This model is a fine-tuned version of Llama 3.2 1B specialized for clean, surgical Python code generation.
It was trained on 8k high-quality Python examples from the Vezora/Tested-22k-Python-Alpaca dataset.
π Performance (Pass@1)
Using a greedy decoding strategy (temperature 0.1), this model demonstrates a significant reasoning jump:
| Model | Pass@1 (Coding Benchmark) |
|---|---|
| Llama 3.2 1B (Base) | 0.0% |
| llama-3.2-1B-ft-v0.1-qlora (Fine-Tuned) | 66.7% |
π οΈ Key Improvements
- Instruction Following: Unlike the base model, this version correctly triggers the Assistant role.
- Python Syntax: High adherence to PEP8 and clean function structures.
- Surgical Accuracy: Optimized to provide direct code solutions with minimal conversational fluff.
π» Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("NEldin10/llama-3.2-1B-ft-v0.1-qlora-merged")
model = AutoModelForCausalLM.from_pretrained("NEldin10/llama-3.2-1B-ft-v0.1-qlora-merged")
prompt = "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a surgical coding expert.<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWrite a function to find the GCD of two numbers.<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0]))
- Downloads last month
- 16
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support
Model tree for NEldin10/llama-3.2-1B-ft-v0.1-qlora-merged
Base model
meta-llama/Llama-3.2-1B