---
title: "qwen2.5-coder-7b-instruct"
publisher: "qwen"
type: "endpoint"
updated: "2025-05-22T18:02:23.107Z"
description: "Powerful mid-size code model with a 32K context length, excelling in coding in multiple languages."
canonical: "https://build.nvidia.com/qwen/qwen2_5-coder-7b-instruct"
---

# Model Overview

## Description:
Qwen2.5-Coder is the latest series of Code-Specific Qwen large language models (formerly known as CodeQwen). As of now, Qwen2.5-Coder has covered six mainstream model sizes, 0.5, 1.5, 3, 7, 14, 32 billion parameters, to meet the needs of different developers. Qwen2.5-Coder brings the following improvements upon CodeQwen1.5:
* Significant improvements in code generation, code reasoning and code fixing. Increased training tokens to 5.5 trillion including source code, text-code grounding, Synthetic data, etc. Qwen2.5-Coder-32B has become the current state-of-the-art open-source codeLLM, with its coding abilities matching those of GPT-4o.
* A more comprehensive foundation for real-world applications such as Code Agents. Not only enhancing coding capabilities but also maintaining its strengths in mathematics and general competencies.
* Long-context support up to 32K tokens.

This model is ready for commercial/non-commercial use.

## Third-Party Community Consideration
This model is not owned or developed by NVIDIA. This model has been developed and built to a third-party’s requirements for this application and use case; see link to Non-NVIDIA [Qwen2.5-Coder-7B-Instruct Model Card](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct).

## License/Terms of Use
Qwen/Qwen2.5-Coder-7B-Instruct is licensed under the [Apache 2.0 License](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct/blob/main/LICENSE)

## References:
[Blog](https://qwenlm.github.io/blog/qwen2.5-coder-family/), [Github](https://github.com/QwenLM/Qwen2.5), [Technical Report](https://arxiv.org/abs/2409.12186)

## Model Architecture:
**Architecture Type:** Transformer <br>
**Network Architecture:** Qwen2.5-Coder-7B-Instruct

## Input:
**Input Type(s):** Text <br>
**Input Format(s):** String <br>
**Input Parameters:** 1D

## Output:
**Output Type(s):** Text <br>
**Output Format:** String <br>
**Output Parameters:** 1D

## Model Version(s):
Qwen2.5-Coder-7B-Instruct

## Training, Testing, and Evaluation Datasets:

## Training Dataset:
**Link:** Unknown <br>
**Data Collection Method by dataset:** Hybrid: Automated, Human <br>
**Labeling Method by dataset:** Hybrid: Automated, Synthetic <br>
**Properties:** The training dataset contains over 5.5 trillion tokens total across 92 programming languages with a mixture ratio of 70% Code, 20% Text, 10% Math, sourced from GitHub repositories, Pull Requests, Commits, Jupyter Notebooks, and Kaggle datasets.

## Testing Dataset:
**Link:** Unknown <br>
**Data Collection Method by dataset:** Unknown <br>
**Labeling Method by dataset:** Unknown <br>
**Properties:** Unknown

## Evaluation Dataset:
**Link:** See evaluation section of the [Hugging Face Qwen2.5-Coder-7B-Instruct Model Card](https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct#evaluation--performance) <br>
**Data Collection Method by dataset:** Hybrid: Human, Automated <br>
**Labeling Method by dataset:** Hybrid: Automated, Human <br>
**Properties:** The evaluation datasets consist of multiple benchmarks including HumanEval with 164 Python programming tasks, MBPP with 974 programming problems, LiveCodeBench with over 600 coding problems, and additional benchmarks covering code generation, completion, reasoning and debugging capabilities.

## Inference:
**Engine:** TensorRT-LLM <br>
**Test Hardware:** NVIDIA L40S

## Ethical Considerations:
NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications.  When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse.  

Please report security vulnerabilities or NVIDIA AI Concerns [here](https://www.nvidia.com/en-us/support/submit-security-vulnerability/).

## Prototype

```python
from openai import OpenAI

client = OpenAI(
base_url = "https://integrate.api.nvidia.com/v1",
api_key = "$NVIDIA_API_KEY"
)

completion = client.chat.completions.create(
model="",
messages=[{"role":"user","content":""}],
temperature=,
top_p=,
max_tokens=,
stream=NaN
)

print(completion.choices[0].message)
```

```python
from langchain_nvidia_ai_endpoints import ChatNVIDIA

client = ChatNVIDIA(
model="",
api_key="$NVIDIA_API_KEY", 
temperature=,
top_p=,
max_tokens=,
)

response = client.invoke([{"role":"user","content":""}])
print(response.content)
```

```javascript
import OpenAI from 'openai';

const openai = new OpenAI({
apiKey: '$NVIDIA_API_KEY',
baseURL: 'https://integrate.api.nvidia.com/v1',
})

async function main() {
const completion = await openai.chat.completions.create({
model: "",
messages: [{"role":"user","content":""}],
temperature: ,
top_p: ,
max_tokens: ,
stream: ,
})

process.stdout.write(completion.choices[0]?.message?.content);

}

main();
```

```bash
curl https://integrate.api.nvidia.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $NVIDIA_API_KEY" \
-d '{
"model": "qwen/qwen2.5-coder-7b-instruct",
"messages": [{"role":"user","content":""}],
"temperature": ,   
"top_p": ,
"max_tokens": ,
"stream":                 
}'
```