transformers - 💡(How to fix) Fix [fp8] qwen3-vl-fp8/qwen3.5 moe fp8 support (infer) [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
huggingface/transformers#44230Fetched 2026-04-08 00:29:42
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
0
Participants
Timeline (top)
commented ×1labeled ×1

Error Message

I tested that dense works normally, but moe throws an error.

Code Example

from transformers import Qwen3VLMoeForConditionalGeneration, AutoProcessor

model = Qwen3VLMoeForConditionalGeneration.from_pretrained(
    "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8", dtype="auto", device_map="auto",
)
RAW_BUFFERClick to expand / collapse

Feature request

I tested that dense works normally, but moe throws an error.

<img width="868" height="316" alt="Image" src="https://github.com/user-attachments/assets/b6b916e6-a72c-414b-821d-01cff320c9aa" />
from transformers import Qwen3VLMoeForConditionalGeneration, AutoProcessor

model = Qwen3VLMoeForConditionalGeneration.from_pretrained(
    "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8", dtype="auto", device_map="auto",
)

Motivation

Your contribution

extent analysis

Fix Plan

Fix Name: Update Model Import

The issue is caused by an incorrect model import. The correct model name is Qwen3VLMoeForConditionalGeneration instead of Qwen3VLMoeForConditionalGeneration.

Step-by-Step Solution

1. Update Model Import

Replace the incorrect model import with the correct one:

from transformers import Qwen3VLMoeForConditionalGeneration, AutoProcessor

model = Qwen3VLMoeForConditionalGeneration.from_pretrained(
    "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8", dtype="auto", device_map="auto",
)

2. Verify Model Import

Verify that the model import is correct by checking the model's attributes and methods:

print(model.config)
print(model.device_map)

3. Test Model

Test the model with a sample input to ensure it's working correctly:

input_ids = torch.tensor([[1, 2, 3]])
outputs = model(input_ids)
print(outputs)

Example Use Case

from transformers import Qwen3VLMoeForConditionalGeneration, AutoProcessor

model = Qwen3VLMoeForConditionalGeneration.from_pretrained(
    "Qwen/Qwen3-VL-30B-A3B-Instruct-FP8", dtype="auto", device_map="auto",
)

input_ids = torch.tensor([[1, 2, 3]])
outputs = model(input_ids)
print(outputs)

Verification

Verify that the fix worked by checking the model's output and ensuring it's correct.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING