qwen2.5-coder-0.5b

PyTorch

6 versions

The latest series of Code-Specific Qwen models, with significant improvements in code generation, code reasoning, and code fixing.

Run this model

  1. Install our magic package manager:

    curl -ssL https://magic.modular.com/ | bash

    Then run the source command that's printed in your terminal.

  2. Install Max Pipelines in order to run this model.

    magic global install max-pipelines
  3. Start a local endpoint for qwen2.5-coder/0.5b:

    max-serve serve --huggingface-repo-id Qwen/Qwen2.5-Coder-0.5B-Instruct

    The endpoint is ready when you see the URI printed in your terminal:

    Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  4. Now open another terminal to send a request using curl:

    curl -N http://0.0.0.0:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
        "model": "qwen2.5-coder/0.5b",
        "stream": true,
        "messages": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Who won the World Series in 2020?"}
        ]
    }' | grep -o '"content":"[^"]*"' | sed 's/"content":"//g' | sed 's/"//g' | tr -d '
    ' | sed 's/\n/
    /g'
  5. 🎉 Hooray! You’re running Generative AI. Our goal is to make this as easy as possible.

About

Qwen 2.5 Coder models are now available in 6 scalable sizes: 0.5B, 1.5B, 3B, 7B, 14B, and 32B. The flagship 32B model delivers cutting-edge performance in code generation, code reasoning, and code repair, competing with OpenAI's GPT-4o.

Code Performance Highlights

Qwen 2.5 Coder 32B achieves state-of-the-art results on open-source benchmarks like EvalPlus, LiveCodeBench, and BigCodeBench. It excels at code repair, scoring 73.7 on Aider, and demonstrates robust code reasoning abilities. The models further support over 40 programming languages, with a standout McEval score of 65.9 and a top-ranked MdEval score of 75.2 for multi-language code repair.

Comparison benchmarks

Benchmarks

McEval Performance

MdEval Performance

Human Preference Alignment

Using a preference evaluation benchmark (Code Arena), the 32B model demonstrates superior alignment to human preferences when benchmarked against GPT-4o.

human preference

Comprehensive Model Sizes

The Qwen 2.5 Coder series provides a range of models, making it adaptable for varying computational resources.

Model sizes

References

Blog Post

HuggingFace

DETAILS

MODEL CLASS
PyTorch

MODULAR GITHUB

Modular

CREATED BY

Qwen

MODEL

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

TAGS

arxiv:2407.10671
arxiv:2409.12186
autotrain_compatible
base_model:Qwen/Qwen2.5-Coder-0.5B
base_model:finetune:Qwen/Qwen2.5-Coder-0.5B
chat
code
codeqwen
conversational
en
endpoints_compatible
license:apache-2.0
qwen
qwen-coder
qwen2
region:us
safetensors
text-generation
text-generation-inference
transformers

@ Copyright - Modular Inc - 2024