rahilfahim/code-reviewer-lora
039
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
๐ 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
- Full project: GitHub Repo
- Live demo: HF Space
- Benchmark: docs/benchmark_results.json
๐ Acknowledgments
Trained using Unsloth on Google Colab.
