Vezora/Tested-22k-Python-Alpaca
Viewer β’ Updated β’ 22.6k β’ 1.81k β’ 67
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.
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% |
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]))
Base model
meta-llama/Llama-3.2-1B