Qwen2.5_Coder_14B_CodingModel

Developer: kamranrafi Base model: Qwen/Qwen2.5-Coder-14B-Instruct Objective: Codegeneration with explanations. License: Apache-2.0 Dataset: nvidia/OpenCodeReasoning

Quick Inference

Transformers (PyTorch)

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model_id = "kamranrafi/Qwen2.5_Coder_14B_CodingModel"
tok = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    device_map="cuda:1"
)

def chat(user_msg, max_new_tokens=512, temperature=0.2, top_p=0.9):
    msgs = [
        {"role":"system","content": "You are Qwen2.5 Coder 14B Coding Model, a smart coding assistant.\n"},
        {"role":"user","content": user_msg},
    ]
    prompt = tok.apply_chat_template(msgs, tokenize=False, add_generation_prompt=True)
    inputs = tok(prompt, return_tensors="pt").to(model.device)
    out = model.generate(
        **inputs,
        max_new_tokens=max_new_tokens,
        temperature=temperature,
        top_p=top_p,
        do_sample=temperature > 0
    )
    text = tok.decode(out[0], skip_special_tokens=True)
    # Optional: trim everything before the assistant turn
    return text.split("<|im_start|>assistant")[-1].strip()

print(chat("Create a function to return sorted list."))

🧾 Citation

If you use this model, please cite:

@misc{
  title  = {Qwen2.5_Coder_14B_CodingModel},
  author = {Muhammad Kamran Rafi},
  year   = {2025},
  howpublished = {\url{https://huggingface.co/kamranrafi/Qwen2.5_Coder_14B_CodingModel}},
  note   = {Fine-tuned with Unsloth on nvidia/OpenCodeReasoning}
}

This qwen2 model was trained 2x faster with Unsloth and Huggingface's TRL library.

Downloads last month
29
Safetensors
Model size
15B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train kamranrafi/Qwen2.5_Coder_14B_CodingModel