How to use from
llama.cpp
Install from brew
brew install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
# Run inference directly in the terminal:
llama-cli -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama-server -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
# Run inference directly in the terminal:
llama-cli -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from:
# https://github.com/ggerganov/llama.cpp/releases
# Start a local OpenAI-compatible server with a web UI:
./llama-server -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
# Run inference directly in the terminal:
./llama-cli -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-server llama-cli
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama-server -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
# Run inference directly in the terminal:
./build/bin/llama-cli -hf irfanalee/code-review-critic-py-gguf:Q4_K_M
Use Docker
docker model run hf.co/irfanalee/code-review-critic-py-gguf:Q4_K_M
Quick Links

Code Review Critic

A fine-tuned Qwen2.5-Coder-7B-Instruct model for Python code review.

Model Description

This model provides constructive, actionable feedback on Python code. It focuses on:

  • Bug detection
  • Potential issues
  • Code quality improvements

Base Model: Qwen/Qwen2.5-Coder-7B-Instruct Fine-tuning Method: QLoRA (4-bit quantization + LoRA adapters) Training Data: 8,275 real GitHub PR review comments from major Python projects

Training Details

  • LoRA Rank: 64
  • LoRA Alpha: 64
  • Learning Rate: 2e-4
  • Epochs: 2
  • Final Eval Loss: 0.8455

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained("YOUR_USERNAME/code-review-critic")
tokenizer = AutoTokenizer.from_pretrained("YOUR_USERNAME/code-review-critic")

messages = [
    {"role": "system", "content": "You are an expert code reviewer. Analyze the provided Python code and give constructive, specific feedback."},
    {"role": "user", "content": "Review this Python code:\n\n```python\ndef get_user(id):\n    return db.query(f'SELECT * FROM users WHERE id = {id}')\n```"}
]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
14
GGUF
Model size
8B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for irfanalee/code-review-critic-py-gguf

Base model

Qwen/Qwen2.5-7B
Quantized
(192)
this model