Run this model inference on single tenant GPU with unmatched speed and reliability at scale.
Run this model inference with full control and performance in your environment.
Get help setting up a custom Dedicated Endpoints.
Talk with our engineer to get a quote for reserved GPU instances with discounts.
README
License: mitModel Description
Code Autopsy is a QLoRA adapter fine-tuned on top of Qwen2.5-Coder-7B-Instruct for automated code review. It analyzes code for bugs, security vulnerabilities, style issues, and best practice violations — providing detailed, actionable review comments similar to a senior engineer's review.
Model Architecture
- Base Model:
Qwen/Qwen2.5-Coder-7B-Instruct - Fine-tuning Method: QLoRA (Quantized Low-Rank Adaptation) via PEFT
- Checkpoint:
checkpoint-809(best checkpoint) - Task: Code Review / Code Analysis
Training Details
- Framework: HuggingFace PEFT + Transformers + BitsAndBytes
- Training Steps: 809 (best checkpoint selected)
- Dataset: Curated code review dataset with paired code + review comment examples
- Quantization: 4-bit NF4 quantization during training
Files
| File | Description |
|---|---|
adapter_model.safetensors | LoRA adapter weights |
adapter_config.json | PEFT adapter configuration |
tokenizer.json | Tokenizer vocabulary |
tokenizer_config.json | Tokenizer configuration |
Usage
python
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfigfrom peft import PeftModelimport torchfrom huggingface_hub import snapshot_download# Download adapteradapter_dir = snapshot_download(repo_id='devanshty/Code-Autopsy')# Load base model with 4-bit quantizationbnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.float16)base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct",quantization_config=bnb_config,device_map="auto")tokenizer = AutoTokenizer.from_pretrained(adapter_dir)# Load LoRA adaptermodel = PeftModel.from_pretrained(base_model, adapter_dir)model.eval()# Review codecode =
Model provider
devanshty
Model tree
Base
Qwen/Qwen2.5-Coder-7B-Instruct
Adapter
this model
Modalities
Input
Text
Output
Text
Pricing
Dedicated Endpoints
View detailsSupported Functionality
Model APIs
Dedicated Endpoints
Container
More information