



const { OpenAI } = require('openai');
const api = new OpenAI({
baseURL: 'https://api.ai.cc/v1',
apiKey: '',
});
const main = async () => {
const result = await api.chat.completions.create({
model: 'Qwen/Qwen2.5-Coder-32B-Instruct',
messages: [
{
role: 'system',
content: 'You are SQL code assistant.',
},
{
role: 'user',
content: 'Could you please provide me with an example of a database structure that I could use for a project in MySQL?'
}
],
});
const message = result.choices[0].message.content;
console.log(\`Assistant: \${message}\`);
};
main();
import os
from openai import OpenAI
def main():
client = OpenAI(
api_key="",
base_url="https://api.ai.cc/v1",
)
response = client.chat.completions.create(
model="Qwen/Qwen2.5-Coder-32B-Instruct",
messages=[
{
"role": "system",
"content": "You are SQL code assistant.",
},
{
"role": "user",
"content": "Could you please provide me with an example of a database structure that I could use for a project in MySQL?",
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
if __name__ == "__main__":
main()
-
AI Playground

Test all API models in the sandbox environment before you integrate.
We provide more than 300 models to integrate into your app.


Product Detail
Discover Qwen2.5 Coder 32B Instruct: Your Advanced Code AI
The Qwen2.5 Coder 32B Instruct model, developed by Alibaba Cloud's Qwen Team and released on November 12, 2024, represents a significant leap in open-source code large language models (CodeLLMs). As a key component of the Qwen2.5 series, this causal language model is engineered to elevate developer productivity and facilitate continuous learning in the coding domain.
✨ Model Snapshot:
- • Model Name: Qwen2.5 Coder 32B Instruct
- • Developer: Alibaba Cloud's Qwen Team
- • Version: Qwen2.5
- • Model Type: Causal Language Model
⭐ Key Features & Intended Use
The Qwen2.5 Coder 32B Instruct stands out with its exceptional capabilities, making it an invaluable asset for developers:
- Code Excellence: Excels in code generation, repair, and reasoning.
- Broad Language Support: Supports over 40 programming languages, including mainstream and niche ones like Haskell and Racket.
- Extensive Context: Provides long-context support up to 131,072 tokens, facilitating complex coding tasks.
- Human Alignment: Features human preference alignment for more intuitive and effective interactions.
- Versatile Application: Ideal for instruction-based tasks, code completion, error correction, and integration into code assistants.
⚙️ Technical Deep Dive
Under the hood, Qwen2.5 Coder 32B Instruct is built on a robust architecture ensuring its high performance:
Architecture Highlights:
- • Dense transformer architecture
- • Rotary Position Embedding (RoPE)
- • SwiGLU activation functions
- • RMSNorm normalization & Attention QKV bias
- • 32.5 billion parameters
- • 64 layers
- • Context length: up to 131,072 tokens
- • Attention Heads: 40 for Q, 8 for KV
Training Data: The model was trained on an expansive dataset of 5.5 trillion tokens. This diverse corpus includes source code, text-code grounding data, and synthetic data, enabling its robust performance across a multitude of coding tasks and programming languages.
Knowledge Cutoff: Evaluation questions for LiveCodeBench are sourced from July to November 2024, ensuring up-to-date performance assessment.
🚀 Unmatched Performance & Benchmarking
The Qwen2.5 Coder 32B Instruct model consistently delivers top-tier performance, rivalling even proprietary models like GPT-4o in coding capabilities.
Key Performance Metrics:
- HumanEval: 92.7
- MBPP: 90.2
- LiveCodeBench: 31.4
- Aider: 73.7
- Spider: 85.1
- CodeArena: 68.9
Comparison Highlights:
- Accuracy: Achieves state-of-the-art performance among open-source models, directly competing with proprietary solutions like GPT-4o.
- Speed: Delivers an impressive output speed of 83.2 tokens per second.
- Robustness: Its meticulous data cleaning and balancing strategies ensure exceptional performance across diverse programming languages and efficient error identification.

Comparative performance of Qwen2.5 Coder models.
💡 How to Use Qwen2.5 Coder 32B Instruct
Integrate Qwen2.5 Coder 32B Instruct into your projects seamlessly:
Code Samples:
// Example API call structure (placeholder)
import openai
client = openai.OpenAI(api_key="YOUR_API_KEY")
response = client.chat.completions.create(
model="Qwen/Qwen2.5-Coder-32B-Instruct",
messages=[
{"role": "system", "content": "You are a helpful code assistant."},
{"role": "user", "content": "Write a Python function to reverse a string."}
]
)
print(response.choices[0].message.content)
The model is accessible on the AI/ML API platform under the name "Qwen2.5-Coder-32B-Instruct". Get started here.
API Documentation:
For comprehensive details and integration guides, refer to the official API Documentation.
⚖️ Ethical Guidelines & Licensing
Alibaba Cloud ensures the responsible development and deployment of Qwen2.5 Coder 32B Instruct:
Ethical Alignment: The model's human preference alignment is continuously evaluated using the internal Code Arena benchmark, ensuring generated code solutions meet user expectations responsibly.
Licensing: Qwen Plus operates under specific licensing terms provided by Alibaba Cloud. Users are strongly advised to review the official licensing information to understand the permissions and restrictions associated with its use.
Access the Qwen 2.5 Coder 32B Instruct API and its licensing details here.
❓ Frequently Asked Questions (FAQ)
Q1: What is Qwen2.5 Coder 32B Instruct?
A1: It's a state-of-the-art, open-source code large language model (CodeLLM) by Alibaba Cloud, designed for advanced code generation, repair, and reasoning, supporting over 40 programming languages.
Q2: What programming languages does it support?
A2: Qwen2.5 Coder 32B Instruct is proficient in over 40 programming languages, covering both mainstream and specialized languages like Haskell and Racket.
Q3: How does its performance compare to other models?
A3: It achieves state-of-the-art performance among open-source models and rivals proprietary models like GPT-4o in coding capabilities, with an output speed of 83.2 tokens per second.
Q4: What is the maximum context length it supports?
A4: The model provides extensive long-context support, capable of processing up to 131,072 tokens.
Q5: Where can I access the API for Qwen2.5 Coder 32B Instruct?
A5: You can access the API on the AI/ML API platform, available here, where detailed documentation is also provided.
Learn how you can transformyour company with AICC APIs



Log in