Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: mit

Model 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

FileDescription
adapter_model.safetensorsLoRA adapter weights
adapter_config.jsonPEFT adapter configuration
tokenizer.jsonTokenizer vocabulary
tokenizer_config.jsonTokenizer configuration

Usage

python

from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
from peft import PeftModel
import torch
from huggingface_hub import snapshot_download
# Download adapter
adapter_dir = snapshot_download(repo_id='devanshty/Code-Autopsy')
# Load base model with 4-bit quantization
bnb_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 adapter
model = PeftModel.from_pretrained(base_model, adapter_dir)
model.eval()
# Review code
code =

Model provider

devanshty

Model tree

Base

Qwen/Qwen2.5-Coder-7B-Instruct

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today