๐ About
This project fine-tunes Llama 3.2 3B using QLoRA to produce structured Python code reviews. The model identifies bugs, style issues, and improvements, and formats every response with severity levels: Critical, Warning, or Info.
Training was performed on a free Google Colab T4 GPU in 2.5 minutes using Unsloth. The final LoRA adapter is only 88 MB โ a 70x reduction compared to the full base model.
๐ Training Metrics
โก Benchmark: Base vs. Fine-Tuned
The fine-tuned model produces concise, structured reviews with severity levels, while the base Llama 3.2 outputs generic, verbose explanations.
Test case: Off-by-one error
def calculate_average(numbers):
total = 0
for i in range(len(numbers) + 1):
total += numbers[i]
return total / len(numbers)
โ Base Llama 3.2 3B
#### Critical The function `calculate_average` has a bug. It does not handle the case when the input list `numbers` is empty. In such a case, the function will raise a `ZeroDivisionError`... #### Warning The variable name `total` is not very descriptive... #### Warning The function uses a for loop with an index that goes up to `len(numbers) + 1`...
โ Fine-Tuned Code Reviewer
**Critical: Off-by-one error** - `range(len(numbers) + 1)` goes one past the end, causing `IndexError`. - **Fix:** Use `range(len(numbers))` or iterate directly.
๐ ๏ธ Tech Stack
๐ Links
โ ๏ธ This is a static showcase page. The model runs on Google Colab or locally via the FastAPI service in the GitHub repo.