Code Reviewer LoRA β€” Llama 3.2 3B

A LoRA adapter fine-tuned with QLoRA on Llama 3.2 3B Instruct to review Python code with severity levels (Critical, Warning, Info).

πŸ“Š Training Summary

Metric Value
Base model Llama 3.2 3B Instruct
Method QLoRA (rank 16, alpha 16)
Training examples 500
Training time 2.5 min (Colab T4)
Final loss 0.11
Adapter size 88 MB

πŸš€ Usage

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="unsloth/Llama-3.2-3B-Instruct-bnb-4bit",
    max_seq_length=2048,
    load_in_4bit=True,
)
model.load_adapter("rahilfahim/code-reviewer-lora")
FastLanguageModel.for_inference(model)

prompt = """### Instruction:
You are a Python code reviewer. Review the following code and identify bugs, style issues, and improvements.

### Input:
def add(a,b): return a+b

### Response:
"""

inputs = tokenizer([prompt], return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.3)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])

πŸ“¦ Links

πŸ™ Acknowledgments

Trained using Unsloth on Google Colab.

Downloads last month
24
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for rahilfahim/code-reviewer-lora

Space using rahilfahim/code-reviewer-lora 1