Text Generation
Transformers
Safetensors
qwen3_moe
neuralmagic
redhat
llmcompressor
quantized
INT4
conversational
compressed-tensors
Instructions to use RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16") model = AutoModelForCausalLM.from_pretrained("RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16
- SGLang
How to use RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16 with Docker Model Runner:
docker model run hf.co/RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w4a16
updated card errors
Browse files
README.md
CHANGED
|
@@ -20,14 +20,8 @@ tags:
|
|
| 20 |
- **Output:** Text
|
| 21 |
- **Model Optimizations:**
|
| 22 |
- **Weight quantization:** INT4
|
| 23 |
-
- **Intended Use Cases:**
|
| 24 |
-
- Reasoning.
|
| 25 |
-
- Function calling.
|
| 26 |
-
- Subject matter experts via fine-tuning.
|
| 27 |
-
- Multilingual instruction following.
|
| 28 |
-
- Translation.
|
| 29 |
- **Out-of-scope:** Use in any manner that violates applicable laws or regulations (including trade compliance laws).
|
| 30 |
-
- **Release Date:**
|
| 31 |
- **Version:** 1.0
|
| 32 |
- **Model Developers:** RedHat (Neural Magic)
|
| 33 |
|
|
@@ -71,7 +65,7 @@ generated_text = outputs[0].outputs[0].text
|
|
| 71 |
print(generated_text)
|
| 72 |
```
|
| 73 |
|
| 74 |
-
vLLM
|
| 75 |
|
| 76 |
## Creation
|
| 77 |
|
|
@@ -130,36 +124,18 @@ vLLM aslo supports OpenAI-compatible serving. See the [documentation](https://do
|
|
| 130 |
|
| 131 |
## Evaluation
|
| 132 |
|
| 133 |
-
The model was evaluated on the OpenLLM leaderboard tasks versions 2, using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness),
|
| 134 |
[vLLM](https://docs.vllm.ai/en/stable/) was used for all evaluations.
|
| 135 |
|
| 136 |
<details>
|
| 137 |
<summary>Evaluation details</summary>
|
| 138 |
|
| 139 |
**lm-evaluation-harness**
|
|
|
|
| 140 |
```
|
| 141 |
lm_eval \
|
| 142 |
--model vllm \
|
| 143 |
-
--model_args pretrained="RedHatAI/Qwen3-30B-A3B-Instruct-2507.w4a16",dtype=auto,gpu_memory_utilization=0.
|
| 144 |
-
--tasks openllm \
|
| 145 |
-
--apply_chat_template\
|
| 146 |
-
--fewshot_as_multiturn \
|
| 147 |
-
--batch_size auto
|
| 148 |
-
```
|
| 149 |
-
|
| 150 |
-
```
|
| 151 |
-
lm_eval \
|
| 152 |
-
--model vllm \
|
| 153 |
-
--model_args pretrained="RedHatAI/Qwen3-30B-A3B-Instruct-2507.w4a16",dtype=auto,gpu_memory_utilization=0.5,max_model_len=15000,enable_chunk_prefill=True,tensor_parallel_size=1 \
|
| 154 |
-
--tasks mgsm \
|
| 155 |
-
--apply_chat_template\
|
| 156 |
-
--batch_size auto
|
| 157 |
-
```
|
| 158 |
-
|
| 159 |
-
```
|
| 160 |
-
lm_eval \
|
| 161 |
-
--model vllm \
|
| 162 |
-
--model_args pretrained="RedHatAI/Qwen3-30B-A3B-Instruct-2507.w4a16",dtype=auto,gpu_memory_utilization=0.5,max_model_len=15000,enable_chunk_prefill=True,tensor_parallel_size=1 \
|
| 163 |
--tasks leaderboard \
|
| 164 |
--apply_chat_template\
|
| 165 |
--fewshot_as_multiturn \
|
|
@@ -205,13 +181,6 @@ The model was evaluated on the OpenLLM leaderboard tasks versions 2, using [lm-e
|
|
| 205 |
--use_chat_template = true
|
| 206 |
```
|
| 207 |
|
| 208 |
-
```
|
| 209 |
-
lighteval vllm \
|
| 210 |
-
--model_args lighteval_model_arguments.yaml \
|
| 211 |
-
--tasks extended|lcb:codegeneration \
|
| 212 |
-
--use_chat_template = true
|
| 213 |
-
```
|
| 214 |
-
|
| 215 |
</details>
|
| 216 |
|
| 217 |
### Accuracy
|
|
|
|
| 20 |
- **Output:** Text
|
| 21 |
- **Model Optimizations:**
|
| 22 |
- **Weight quantization:** INT4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
- **Out-of-scope:** Use in any manner that violates applicable laws or regulations (including trade compliance laws).
|
| 24 |
+
- **Release Date:** 07/30/2025
|
| 25 |
- **Version:** 1.0
|
| 26 |
- **Model Developers:** RedHat (Neural Magic)
|
| 27 |
|
|
|
|
| 65 |
print(generated_text)
|
| 66 |
```
|
| 67 |
|
| 68 |
+
vLLM also supports OpenAI-compatible serving. See the [documentation](https://docs.vllm.ai/en/latest/) for more details.
|
| 69 |
|
| 70 |
## Creation
|
| 71 |
|
|
|
|
| 124 |
|
| 125 |
## Evaluation
|
| 126 |
|
| 127 |
+
The model was evaluated on the OpenLLM leaderboard tasks versions 2, using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness), on reasoning tasks using [lighteval](https://github.com/neuralmagic/lighteval/tree/reasoning) and on LLM as a judge tasks using [ArenaHard](https://github.com/lmarena/arena-hard-auto).
|
| 128 |
[vLLM](https://docs.vllm.ai/en/stable/) was used for all evaluations.
|
| 129 |
|
| 130 |
<details>
|
| 131 |
<summary>Evaluation details</summary>
|
| 132 |
|
| 133 |
**lm-evaluation-harness**
|
| 134 |
+
|
| 135 |
```
|
| 136 |
lm_eval \
|
| 137 |
--model vllm \
|
| 138 |
+
--model_args pretrained="RedHatAI/Qwen3-30B-A3B-Instruct-2507.w4a16",dtype=auto,gpu_memory_utilization=0.9,max_model_len=40960,enable_chunk_prefill=True,tensor_parallel_size=1 \
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
--tasks leaderboard \
|
| 140 |
--apply_chat_template\
|
| 141 |
--fewshot_as_multiturn \
|
|
|
|
| 181 |
--use_chat_template = true
|
| 182 |
```
|
| 183 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
</details>
|
| 185 |
|
| 186 |
### Accuracy
|