Dedicated Endpoints
Run this model inference on single tenant GPU with unmatched speed and reliability at scale.
Container
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: apache-2.0📊 Benchmark Results
| Metric | Baseline | Fine-tuned | Delta |
|---|---|---|---|
| Compile Rate | 0.0% | 20.0% | +20.0% |
| Pass Rate | 0.0% | 20.0% | +20.0% |
Evaluated on 100 competitive programming problems.
🚀 Usage
python
from transformers import AutoTokenizer, AutoModelForCausalLMfrom peft import PeftModelimport torchbase_model_id = "Qwen/Qwen2.5-Coder-1.5B-Instruct"adapter_id = "Ashura7/cp-gpt-qwen2.5-coder-1.5b-lora"tokenizer = AutoTokenizer.from_pretrained(base_model_id)base = AutoModelForCausalLM.from_pretrained(base_model_id, torch_dtype=torch.float16, device_map="auto")model = PeftModel.from_pretrained(base, adapter_id)problem = "Given an array of integers, find the subarray with maximum sum."messages = [{"role": "system", "content": "You are CP-GPT, an expert competitive programming assistant."},{"role": "user", "content": f"Solve: {problem}"},]text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)inputs = tokenizer(text, return_tensors="pt").to(model.device)with torch.no_grad():output = model.generate(**inputs, max_new_tokens=512, temperature=0.1)print(tokenizer.decode(output[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True))
⚙️ Training Config
| Param | Value |
|---|---|
| Base model | Qwen/Qwen2.5-Coder-1.5B-Instruct |
| LoRA r | 16 |
| LoRA alpha | 32 |
| Training examples | 950 |
| Epochs | 1 |
| Effective batch size | 16 |
| Learning rate | 0.0002 |
| Quantization | 4-bit (NF4) |
📁 Project
Part of CP-GPT — Phase 2 adds RAG (FAISS), FastAPI backend on Render, and Gradio UI on HF Spaces.
Model provider
Ashura7
Model tree
Base
Qwen/Qwen2.5-Coder-1.5B-Instruct
Adapter
this model
Modalities
Input
Text
Output
Text
Pricing
Dedicated Endpoints
View detailsSupported Functionality
Model APIs
Dedicated Endpoints
Container
More information