text-generationtransformersapache-2.0

Qwen/Qwen3-Coder-30B-A3B-Instruct

huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct

1,236Likes
649,793Downloads
2025-12-03Updated
transformerssafetensorsqwen3_moetext-generationconversationalarxiv:2505.09388license:apache-2.0endpoints_compatibleregion:usdeploy:sagemakerdeploy:azure

Model card

Qwen3-Coder-30B-A3B-Instruct

Highlights

Qwen3-Coder is available in multiple sizes. Today, we're excited to introduce Qwen3-Coder-30B-A3B-Instruct. This streamlined model maintains impressive performance and efficiency, featuring the following key enhancements:

!image/jpeg

Model Overview

Qwen3-Coder-30B-A3B-Instruct has the following features: - Type: Causal Language Models - Training Stage: Pretraining & Post-training - Number of Parameters: 30.5B in total and 3.3B activated - Number of Layers: 48 - Number of Attention Heads (GQA): 32 for Q and 4 for KV - Number of Experts: 128 - Number of Activated Experts: 8 - Context Length: 262,144 natively.

NOTE: This model supports only non-thinking mode and does not generate ``` blocks in its output. Meanwhile, specifying enable_thinking=False` is no longer required.

For more details, including benchmark evaluation, hardware requirements, and inference performance, please refer to our blog, GitHub, and Documentation.

Quickstart

We advise you to use the latest version of transformers.

With `transformers dict: return num ** 2

Define Tools

tools=[ { "type":"function", "function":{ "name": "square_the_number", "description": "output the square of the number.", "parameters": { "type": "object", "required": ["input_num"], "properties": { 'input_num': { 'type': 'number', 'description': 'input_num is a number that will be squared' } }, } } } ]

import OpenAI # Define LLM client = OpenAI( # Use a custom endpoint compatible with OpenAI API base_url='http://localhost:8000/v1', # api_base api_key="EMPTY" ) messages = [{'role': 'user', 'content': 'square the number 1024'}]

completion = client.chat.completions.create( messages=messages, model="Qwen3-Coder-30B-A3B-Instruct", max_tokens=65536, tools=tools, )

print(completion.choice[0]) ```

Best Practices

To achieve optimal performance, we recommend the following settings:

1. Sampling Parameters: - We suggest using temperature=0.7, top_p=0.8, top_k=20, repetition_penalty=1.05.

2. Adequate Output Length: We recommend using an output length of 65,536 tokens for most queries, which is adequate for instruct models.

Citation

If you find our work helpful, feel free to give us a cite.

`` @misc{qwen3technicalreport, title={Qwen3 Technical Report}, author={Qwen Team}, year={2025}, eprint={2505.09388}, archivePrefix={arXiv}, primaryClass={cs.CL}, url={https://arxiv.org/abs/2505.09388}, } ``

Mirrored from the Hugging Face Hub and served from the Conceptio Open Knowledge Archive. Read the original card at https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct.