Instructions to use tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8") model = AutoModelForMultimodalLM.from_pretrained("tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8
- SGLang
How to use tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8 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 "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8" \ --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": "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8" \ --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": "tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8 with Docker Model Runner:
docker model run hf.co/tcclaviger/Qwen3.8-Flash-Next-MXFP4-FP8
Can't seem to run recent images?
Hi,
I've been running this quant and its vllm image the past few weeks, from the old DevQwenNextFlash tag (image ID 2cddc788b583), and it worked fine.
But ever since last weekend, trying the latest :dev tags have been met with silent failure.
I'm running the following command:
podman run --rm --init --network host --name vllm-qwen3.8-flash-next -v /home/wim/.cache/huggingface/hub:/models:ro -v /home/wim/.cache/vllm:/cache -e VLLM_CACHE_ROOT=/cache/vllm -e TORCHINDUCTOR_CACHE_DIR=/cache/inductor -e TRITON_CACHE_DIR=/cache/triton -e VLLM_PLE_CPU_OFFLOAD=1 -e VLLM_ROCM_USE_AITER=0 -e ROCR_VISIBLE_DEVICES=0,1,2,3 --device /dev/kfd --device /dev/dri --group-add keep-groups --annotation run.oci.keep_original_groups=1 --security-opt label=disable --security-opt seccomp=unconfined --shm-size 8g docker.io/tcclaviger/vllm:dev /models/models--tcclaviger--Qwen3.8-Flash-Next-MXFP4-FP8/snapshots/ffafcb13710d2f5ca6947f86af3a49555e1be033 --served-model-name qwen3.8-flash-next --tensor-parallel-size 4 --reasoning-parser qwen3 --tool-call-parser qwen3_coder --enable-auto-tool-choice --max-num-seqs 16 --enable-prefix-caching --enable-chunked-prefill --kv-cache-dtype fp8 --max-num-batched-tokens 4096 --gpu-memory-utilization 0.96 --mm-processor-cache-gb 4.0 --override-generation-config {"max_tokens": 65536, "temperature": 1.0, "top_p": 0.95, "top_k": 40, "presence_penalty": 1} --speculative-config {"method": "mtp", "num_speculative_tokens": 4} --compilation-config {"cudagraph_capture_sizes": [5,10,15,20,25,30,35,40], "max_cudagraph_capture_size": 40} --port 10014
Setup is 4xR9700 and 256GB of DDR4 system memory. Container logs don't output anything. There is barely any CPU load and I don't see anything being loaded into memory, either (GPU and system memory allocation stays about the same).
Is anyone else having the same problem, know a solution, or at least some further steps to debug the issue?
If I kill the process with SIGINT, I get the following traceback:
Traceback (most recent call last):
File "/opt/vllm/bin/vllm", line 6, in <module>
sys.exit(main())
~~~~^^
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/cli/main.py", line 20, in main
import vllm.entrypoints.cli.launch
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/cli/launch.py", line 10, in <module>
from vllm.entrypoints.launchers.render.entry import run_launch_fastapi
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/launchers/render/entry.py", line 13, in <module>
from ..app import build_app
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/launchers/app.py", line 9, in <module>
from vllm.entrypoints.serve.exception_handling.register import init_exception_handler
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/serve/exception_handling/register.py", line 24, in <module>
from .handlers.vllm_error import vllm_error_handler
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/serve/exception_handling/handlers/vllm_error.py", line 7, in <module>
from vllm.entrypoints.launchers.launcher import terminate_if_errored
File "/opt/vllm/lib/python3.14/site-packages/vllm/entrypoints/launchers/launcher.py", line 16, in <module>
from vllm.engine.protocol import EngineClient
File "/opt/vllm/lib/python3.14/site-packages/vllm/engine/protocol.py", line 22, in <module>
from vllm.v1.engine.input_processor import InputProcessor
File "/opt/vllm/lib/python3.14/site-packages/vllm/v1/engine/input_processor.py", line 20, in <module>
from vllm.multimodal.encoder_budget import MultiModalBudget
File "/opt/vllm/lib/python3.14/site-packages/vllm/multimodal/encoder_budget.py", line 11, in <module>
from vllm.v1.core.encoder_cache_manager import compute_mm_encoder_budget
File "/opt/vllm/lib/python3.14/site-packages/vllm/v1/core/encoder_cache_manager.py", line 11, in <module>
from vllm.v1.request import Request
File "/opt/vllm/lib/python3.14/site-packages/vllm/v1/request.py", line 24, in <module>
from vllm.v1.structured_output.request import StructuredOutputRequest
File "/opt/vllm/lib/python3.14/site-packages/vllm/v1/structured_output/__init__.py", line 19, in <module>
from vllm.v1.structured_output.backend_xgrammar import XgrammarBackend
File "/opt/vllm/lib/python3.14/site-packages/vllm/v1/structured_output/backend_xgrammar.py", line 140, in <module>
@dataclass
^^^^^^^^^
File "/usr/lib/python3.14/dataclasses.py", line 1442, in dataclass
return wrap(cls)
File "/usr/lib/python3.14/dataclasses.py", line 1432, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
frozen, match_args, kw_only, slots,
weakref_slot)
File "/usr/lib/python3.14/dataclasses.py", line 1041, in _process_class
cls_annotations = annotationlib.get_annotations(
cls, format=annotationlib.Format.FORWARDREF)
File "/usr/lib/python3.14/annotationlib.py", line 974, in get_annotations
ann = _get_dunder_annotations(obj)
File "/usr/lib/python3.14/annotationlib.py", line 1154, in _get_dunder_annotations
ann = _BASE_GET_ANNOTATIONS(obj)
File "/opt/vllm/lib/python3.14/site-packages/vllm/v1/structured_output/backend_xgrammar.py", line 150, in __annotate__
matcher: xgr.GrammarMatcher = field(hash=False)
^^^^^^^^^^^^^^^^^^
File "/opt/vllm/lib/python3.14/site-packages/vllm/utils/import_utils.py", line 383, in __getattr__
self._module = self._load()
~~~~~~~~~~^^
File "/opt/vllm/lib/python3.14/site-packages/vllm/utils/import_utils.py", line 367, in _load
module = importlib.import_module(self.__name__)
File "/usr/lib/python3.14/importlib/__init__.py", line 88, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/vllm/lib/python3.14/site-packages/xgrammar/__init__.py", line 1, in <module>
from . import exception, load_binding, structural_tag, testing
File "/opt/vllm/lib/python3.14/site-packages/xgrammar/exception.py", line 3, in <module>
from tvm_ffi import register_error
File "/opt/vllm/lib/python3.14/site-packages/tvm_ffi/__init__.py", line 90, in <module>
from . import _optional_torch_c_dlpack
File "/opt/vllm/lib/python3.14/site-packages/tvm_ffi/_optional_torch_c_dlpack.py", line 207, in <module>
_LIB = load_torch_c_dlpack_extension() # keep a reference to the loaded shared library
File "/opt/vllm/lib/python3.14/site-packages/tvm_ffi/_optional_torch_c_dlpack.py", line 158, in load_torch_c_dlpack_extension
result = subprocess.run(args, check=False, capture_output=True)
File "/usr/lib/python3.14/subprocess.py", line 557, in run
stdout, stderr = process.communicate(input, timeout=timeout)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/subprocess.py", line 1221, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.14/subprocess.py", line 2153, in _communicate
ready = selector.select(timeout)
File "/usr/lib/python3.14/selectors.py", line 398, in select
fd_event_list = self._selector.poll(timeout)
KeyboardInterrupt