Downloads · 30 days
0
juspay/Qwen2.5-Coder-32B-Instruct-CPT-LoRA-Adapter-HyperSwitch
Qwen2.5-Coder-32B-Instruct-CPT-LoRA-Adapter-HyperSwitch is a text generation model from juspay. Use it when you need the model to write or continue text.
A LoRA fine-tuned model based on Qwen/Qwen2.5-Coder-32B-Instruct specialized for the Hyperswitch Rust codebase. This model excels at understanding payment processing patterns, Hyperswitch architecture, and Rust develo…
Downloads · 30 days
0
Access
Public
Updated Nov 8, 2025
Repo size
1.1 GB
Likes
1
Public
Click a slice to open those files.
.safetensors1.1 GB · 99%
From the Hugging Face model README
A LoRA fine-tuned model based on Qwen/Qwen2.5-Coder-32B-Instruct specialized for the Hyperswitch Rust codebase. This model excels at understanding payment processing patterns, Hyperswitch architecture, and Rust development practices.
This LoRA adapter was trained on 16,731 samples extracted from the Hyperswitch codebase to enhance code understanding, explanation, and generation within the payment processing domain.
r: 64 # LoRA rank
alpha: 128 # LoRA alpha (2*r)
dropout: 0.05 # LoRA dropout
target_modules: # Applied to all linear layers
- q_proj, k_proj, v_proj, o_proj
- gate_proj, up_proj, down_proj
Final Loss: 0.48 (from 1.63)
Perplexity: 1.59 (from 5.12)
Accuracy: 89% (from 61%)
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-32B-Instruct",
dtype=torch.bfloat16,
device_map="auto"
)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-32B-Instruct")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "juspay/Qwen2.5-Coder-32B-Instruct-CPT-LoRA-Adapter-HyperSwitch")
# Generate code
prompt = """// Hyperswitch payment processing
pub fn validate_payment_method("""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=200,
temperature=0.2, # Lower temperature for code generation
do_sample=True,
pad_token_id=tokenizer.eos_token_id
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
@misc{hyperswitch-qwen-lora-2024,
title={Qwen2.5-Coder-32B-Instruct-CPT-LoRA-Adapter-HyperSwitch},
author={Juspay},
year={2024},
publisher={Hugging Face},
url={https://huggingface.co/juspay/Qwen2.5-Coder-32B-Instruct-CPT-LoRA-Adapter-HyperSwitch}
}