---
title: "qwen2-7b-instruct"
publisher: "qwen"
type: "endpoint"
updated: "2025-05-22T18:02:41.285Z"
description: "Chinese and English LLM targeting for language, coding, mathematics, reasoning, etc."
canonical: "https://build.nvidia.com/qwen/qwen2-7b-instruct"
---

# Model Overview

## Description

Qwen2 is the new series of Qwen large language models for language understanding, language generation, multilingual capability, coding, mathematics, and reasoning. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the 7B Qwen2 base language model.

Compared with the state-of-the-art open source language models, including the previously released Qwen1.5, Qwen2 has generally surpassed most open source models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, and reasoning tasks, etc.

This model is ready for 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 Qwen's [(Model Card)](https://huggingface.co/Qwen/Qwen2-7B-Instruct).

## License, Acceptable Use, and Research Privacy Policy
By using this model, you are agreeing to the terms and conditions of the [Apache 2.0](https://huggingface.co/Qwen/Qwen2-7B-Instruct/blob/main/LICENSE)

**Model Developer**: Qwen <br>
**Model Update Date**: August 8, 2024 <br>

**Model Architecture** <br>
Architecture Type: Transformer <br>
Network Architecture: Qwen <br>

**Input** <br>
Input Type: Text <br>
Input Format: String <br>
Input Parameters: max_tokens, temperature, top_p, stop, frequency_penalty, presence_penalty, seed <br>

**Output** <br>
Output Type: Text <br>
Output Format: String <br>

## Software Integration
[Preferred/Supported] Operating System(s): Linux

## Model Version(s): 
The instruction-tuned 7B Qwen2 model, Qwen2-7B-Instruct <br>

## Training Dataset:

**Link:** [Unknown]  <br>

**Data Collection Method by dataset** <br>
* [Unknown] <br>

**Labeling Method by dataset** <br>
* [Unknown] <br>

**Properties (Quantity, Dataset Descriptions, Sensor(s)):** Unknown <br>

## Evaluation Dataset:
**Link:** See Evaluation section of the [Hugging Face Qwen2-7B-Instruct Model Card](https://huggingface.co/Qwen/Qwen2-7B-Instruct#evaluation) <br>

**Inference** <br>
Engine: TensorRT-LLM <br>
Test Hardware: L40 <br>

## 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)
```

```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-7b-instruct",
"messages": [{"role":"user","content":""}],
"temperature": ,   
"top_p": ,
"max_tokens": ,
"stream":                 
}'
```