/ Модель

Характеристики

Контекст
262 144 токена
Размер весов
99,1 ГБ
Лицензия
Своя лицензия
Архитектура
qwen4_exp · dense
Базовая модель
Qwen3.8-Flash-Next
Библиотека
mlx-vlm
Опубликована
26 авг 2026

Qwen3.8-Flash-Next-MXFP4-MLX

Изображение и текст → текст3 профессии

Qwen3.8-Flash-Next-MXFP4-MLX — экспериментальная нативная конверсия модели Qwen/Qwen3.8-Flash-Next для Apple Silicon, подготовленная с использованием oMLX и MLX-VLM.

262скачиваний за 30 дней1лайквеса обновлены27 авг 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Это мультимодальная vision-language модель для сценариев image-text-to-text: она принимает изображения и текст и генерирует текстовые ответы. Полная vision tower сохранена, поэтому это не текстовая модель. Исходная модель содержит около 180 млрд параметров в формате BF16, а итоговый чекпойнт занимает около 92,27 GiB и использует смешанную квантизацию MXFP4, Q4–Q8 и BF16 с приоритетом сохранения наиболее чувствительных компонентов.

Модель построена на архитектуре qwen4_exp и рассчитана на длинный контекст; в README приведены оценки для контекста 256K. Обычные embeddings и LM head, нормы, маршрутизаторы и ряд других компонентов оставлены в BF16, а vision tower полностью сохранена. Для работы требуется MLX-VLM версии 0.6.17 или новее; Trust Remote Code и собственный Python-модуль репозитория не требуются. Модель ориентирована прежде всего на Mac с unified memory: на компьютере с 128 GiB она занимает около 103–107 GiB с учётом кэша и рабочего пространства, поэтому практически требует закрытия ресурсоёмких приложений и уменьшения контекста при ограниченной памяти.

Сильными сторонами являются нативная поддержка Apple Silicon, существенное уменьшение размера по сравнению с BF16, сохранение мультимодальных возможностей и архитектурно управляемая смешанная точность. Ограничения включают экспериментальный статус, отсутствие полноценных тестов качества зрения, длинного контекста и сравнения с BF16, высокие требования к памяти и отсутствие заявленных бенчмарков производительности. Чекпойнт распространяется по лицензии qwen-community-1.0.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Qwen3.8-Flash-Next-MXFP4-MLX

An Apple-Silicon-native, quality-first mixed-precision MXFP4 conversion of Qwen/Qwen3.8-Flash-Next, built from the official BF16 safetensors with oMLX.

The bulk format is native MLX MXFP4/group-32, but this is deliberately not a uniform quant. Its static preservation profile is informed by the tensor-level priorities visible in Unsloth Dynamic IQ1: severe compression belongs in routed expert gate/up tensors, while routed down-projections, attention/GDN, hyper-connections, shared experts, indexing controls, and vocabulary-boundary tensors receive higher precision. This is an independent native-MLX conversion, not a GGUF conversion or a byte-for-byte port of Unsloth's model.

This MLX quant upload

  • 92.2624 GiB of safetensor payload (99,066,033,060 bytes across 14 primary shards and two tiny compatibility sidecars).
  • The complete BF16 vision tower is retained. This is an image-text-to-text model, not a text-only export.
  • The source model's one-layer MTP head is omitted from the resident model, and its declarations are removed from config.json. An optional sidecar may be published separately after runtime validation.
  • The 51.2B-parameter split n-gram table is quantized source-shard by source-shard and retained as 128 logical MXFP4 embedding modules. This matches MLX-VLM's memory-safe runtime layout and avoids materializing the roughly 95.4 GiB BF16 concatenation during conversion or inference.
  • Routed expert gate/up tensors remain MXFP4/group-32. All 48 routed expert down-projections use affine Q4/group-64.
  • Full attention uses affine Q5/group-64. Gated DeltaNet data projections use Q5, its output projections use Q6, and its depthwise convolution uses Q8.
  • Hyper-connection projections and PLE key/value projections use affine Q8/group-64. The tiny gated-residual block_inject_weight controls use Q8/group-128.
  • Shared-expert gate/up tensors use Q5, shared-expert down tensors and scalar gates use Q8, and QSA indexers remain BF16.
  • The ordinary token embedding and LM head remain BF16, following the modules_to_not_convert quality boundary used in the author's earlier gpt-oss MXFP4 conversion. Routers, norms, biases, and incompatible tensors also remain BF16.
  • No sensitivity or activation calibration was used. The profile is architecture-driven and reproducible from tensor names.
  • No model_file is present and Trust Remote Code is not required.

Runtime requirement

Qwen3.8-Flash-Next uses the qwen4_exp architecture added in MLX-VLM PR #2032. Use MLX-VLM 0.6.17 or newer. The checkpoint follows that release's native 128-shard PLE layout and zero-centered Qwen4 RMSNorm convention; no repository Python module or Trust Remote Code opt-in is required.

Memory guidance for 128 GiB Macs

The model fits a 128 GiB unified-memory Mac, but it is intentionally close to the practical ceiling:

ComponentApproximate memory
Weights92.27 GiB
Persistent cache at 256K context6.75 GiB
Runtime workspace and transient activations4-8 GiB
Expected model working setabout 103-107 GiB

The model working set is not the machine's entire memory use; macOS and other applications still need headroom. Close memory-heavy applications before a full-context run. Apple's default Metal wired-memory limit may also be too low. The conversion machine used:

sudo sysctl iogpu.wired_limit_mb=124519

That is an aggressive, temporary setting for a 128 GiB machine. It relaxes the Metal allocation ceiling; it does not create additional physical memory. A smaller context is the safer starting point.

Quantization and validation status

  • Source revision: f5d08274bafd880402bd16f5e3e6c514136ec06c.
  • Source weight payload: 359,999,963,128 bytes / 179,999,981,459 BF16 parameters.
  • Output format: native MLX MXFP4/group-32 with the affine and BF16 precision floors described above.
  • Checkpoint index audit: 3,419 tensor entries; zero MTP tensor keys; complete 448,931,056-parameter vision tower retained.
  • Quantized logical-parameter distribution: 131.731B MXFP4/group-32, 40.265B affine Q4/group-64, 2.274B Q5/group-64, 0.566B Q6/group-64, and 0.751B Q8.
  • The 1.271B-parameter ordinary token embedding plus LM head remain BF16.
  • Strict MLX-VLM 0.6.17 architecture resolution and weight loading succeed with Trust Remote Code disabled.
  • A strict eager load on the 128 GiB M4 Max held 92.27 GiB of active MLX memory. A real image-conditioned generation correctly identified an oMLX screenshot, peaking at 96.94 GiB for its 3,536-token multimodal prompt. The smoke test used Unsloth's documented thinking sampler: temperature 1.0, top-p 0.95, top-k 20, min-p 0.0, presence penalty 0.0, and repetition penalty 1.0. These figures are not throughput or vision-quality benchmarks.

This checkpoint is experimental. Structural and runtime loading checks do not substitute for vision benchmarks, long-context evaluation, or comparison with BF16 logits. MXFP4 is elegant and compact, but quality should be measured rather than inferred from nominal bit width.


Original model card

The remainder of this README is the original Qwen model card, included so the architecture, capabilities, intended use, limitations, and citation remain available with the quantized checkpoint.

Qwen3.8-Flash-Next

[!Note] This repository contains model weights and configuration files for the post-trained model in the Hugging Face Transformers format.

These artifacts are compatible with Hugging Face Transformers, vLLM, SGLang, TokenSpeed, etc.

[!Tip] For users seeking managed, scalable inference without infrastructure maintenance, the official Qwen API service is provided by Qwen Cloud.

In particular, Qwen3.8-Flash is the official version based on Qwen3.8-Flash-Next with more production features, e.g., 1M context length by default, official built-in tools. For more information, please refer to the Qwen3.8-Flash Overview.

As the frontier of foundation models pushes toward ever-larger parameter counts and ever-longer context windows, the question is no longer just how much we can scale, but how efficiently we can do so. Sustainable progress toward artificial general intelligence (AGI) that benefits everyone demands architectural innovation. Today, we are sharing a concrete step in that direction: Qwen3.8-Flash-Next.

Qwen3.8-Flash-Next Architecture

This experimental preview of the architecture that will underpin Qwen4 is built around a fundamental rethinking of how the core components of modern large language models (LLMs) interact at scale.

Highlights

The first open-weight release under this architecture is Qwen3.8-Flash-Next, which introduces:

  • Hybrid Attention with QSA: The Gated DeltaNet and Gated Attention pairing has been reworked into Gated DeltaNet and Qwen Sparse Attention (QSA). Rather than selecting individual tokens for processing, QSA operates at the micro-block level. This cuts long-context latency significantly, a critical gain as agentic workloads increasingly dominate real-world usage.
  • Gated Residual: Residual streams with normalization are what make deep LLM training manageable. Gated Residual modulates information flowing through widened residual streams via an element-wise, data-dependent read gate and a per-branch scalar write gate. This brings finer-grained expressiveness across layers while preserving training stability and keeping inference overhead low.
  • N-gram Embedding: Embeddings provide a unique axis for parameter scaling that requires less computation and is more amenable to offloading than Mixture-of-Experts (MoE). By indexing with short n-grams, this approach makes parameter scaling highly efficient for memory-constrained accelerators without sacrificing quality.
  • Tailored Training Recipe: The Muon and AdamW optimizers are applied to specific weight categories to maximize efficiency. Guided by refitted scaling laws, we eliminate traditional batch-size warmups and start directly at the target batch size, substantially reducing total optimizer steps while safely supporting larger learning rates for robust convergence.

For more details, please refer to our blog post Qwen3.8-Flash-Next and the technical report.

We are excited to embark on this next chapter with you and welcome your feedback as we build what comes next.

Model Overview

  • Type: Causal Language Model with Vision Encoder
  • Training Stage: Pre-training & Post-training
  • Language Model
    • Number of Parameters: 125B with 6B activated, plus 51B n-gram embedding and 4B MTP
    • Hidden Dimension: 2560
    • Token Embedding: 248320 (Padded)
    • N-gram Embedding: 20,000,000 (bigrams/trigrams at layer 2)
    • Number of Layers: 48
    • Hidden Layout: 12 × (3 × (Gated DeltaNet → MoE) → 1 × (Qwen Sparse Attention → MoE))
    • Gated DeltaNet:
      • Number of Linear Attention Heads: 48 for V and 16 for QK
      • Head Dimension: 128
    • Qwen Sparse Attention:
      • Number of Attention Heads: 24 for Q and 2 for KV
      • Head Dimension: 256
      • Rotary Position Embedding Dimension: 64
      • Indexer Structure: MQA with 4 Query Heads and 1 Shared Key Head
      • Indexer Head Dimension: 128
      • Budget: 512 blocks or 2048 tokens
    • Mixture Of Experts
      • Number of Experts: 512
      • Number of Activated Experts: 10 Routed + 1 Shared
      • Expert Intermediate Dimension: 640
    • Gated Residual:
      • Number of Branches: 4
      • Bottleneck Rank: 320
    • LM Output: 248320 (Padded)
    • MTP: 1 layer, trained with multi-steps
  • Context Length: 262,144 natively and extensible up to 1,000,000 tokens.

Benchmark Results

Language

Vision Language

Quickstart

For streamlined integration, we recommend using Qwen3.8-Flash-Next via APIs.

Serving Qwen3.8-Flash-Next

[!Important] Inference efficiency and throughput vary significantly across frameworks. We recommend using the latest framework versions to ensure optimal performance and compatibility. For production workloads or high-throughput scenarios, dedicated serving engines such as SGLang, KTransformers or vLLM are strongly recommended.

Qwen3.8-Flash-Next can be deployed with popular inference frameworks, e.g.:

API Usage

[!Important] Qwen3.8-Flash-Next models operate in thinking mode by default, generating thinking content signified by <think>\n...</think>\n\n before producing the final responses. To disable thinking content and obtain direct response, refer to the examples here.

[!Tip] We recommend using the following sets of sampling parameters for generation:

  • Thinking Mode: temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0
  • Instruct (or non-thinking) mode: temperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0

Please note that the support for sampling parameters varies according to inference frameworks.

[!Tip] In multi-turn agentic tasks, lower reasoning effort does not always reduce overall task completion time. Although it may produce faster per-turn responses, it can also lead to insufficient analysis, more failures, and repeated retries, which may increase total latency and token consumption.

Qwen3.8-Flash-Next supports controlling thinking behavior via enable_thinking, preserve_thinking, and reasoning_effort.

Chat Completions API

The Chat Completions API can be used with most inference frameworks, as well as Qwen Cloud. Before starting, make sure it is installed and the API key and the API base URL is configured, e.g.:

pip install -U openai

# Set the following accordingly
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
Text-Only Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {"role": "user", "content": "Write a Python function to merge two sorted linked lists."},
]

completion = client.chat.completions.create(
    model="Qwen/Qwen3.8-Flash-Next",
    messages=messages,
    extra_body={
        "chat_template_kwargs": {
            "enable_thinking": True,  # on by default
            "preserve_thinking": True, # on by default
        },
    },
    reasoning_effort="xhigh",  # xhigh by default; supported levels are xhigh, medium, and low
    stream=True,
    stream_options={"include_usage": True},
)

reasoning_content = ""
answer_content = ""
is_answering = False
print("\n" + "=" * 20 + "Reasoning" + "=" * 20 + "\n")

for chunk in completion:
    if not chunk.choices:
        print("\nUsage:")
        print(chunk.usage)
        continue

    delta = chunk.choices[0].delta

    if hasattr(delta, "reasoning_content") and delta.reasoning_content is not None:
        if not is_answering:
            print(delta.reasoning_content, end="", flush=True)
        reasoning_content += delta.reasoning_content
    elif hasattr(delta, "reasoning") and delta.reasoning is not None:
        if not is_answering:
            print(delta.reasoning, end="", flush=True)
        reasoning_content += delta.reasoning

    if hasattr(delta, "content") and delta.content:
        if not is_answering:
            print("\n" + "=" * 20 + "Answer" + "=" * 20 + "\n")
            is_answering = True
        print(delta.content, end="", flush=True)
        answer_content += delta.content

messages.append({
    "role": "assistant",
    "content": answer_content,
    "reasoning_content": reasoning_content,
    "reasoning": reasoning_content,
})
Image Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image_url",
                "image_url": {
                    "url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/CI_Demo/mathv-1327.jpg"
                }
            },
            {
                "type": "text",
                "text": "The centres of the four illustrated circles are in the corners of the square. The two big circles touch each other and also the two little circles. With which factor do you have to multiply the radii of the little circles to obtain the radius of the big circles?\nChoices:\n(A) $\\frac{2}{9}$\n(B) $\\sqrt{5}$\n(C) $0.8 \\cdot \\pi$\n(D) 2.5\n(E) $1+\\sqrt{2}$"
            }
        ]
    }
]

chat_response = client.chat.completions.create(
    model="Qwen/Qwen3.8-Flash-Next",
    messages=messages,
)
print("Chat response:", chat_response)
Video Input
from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "video_url",
                "video_url": {
                    "url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/video/N1cdUjctpG8.mp4"
                }
            },
            {
                "type": "text",
                "text": "How many porcelain jars were discovered in the niches located in the primary chamber of the tomb?"
            }
        ]
    }
]

chat_response = client.chat.completions.create(
    model="Qwen/Qwen3.8-Flash-Next",
    messages=messages,
)

# When vLLM is launched with `--media-io-kwargs '{"video": {"num_frames": -1}}'`,
# video frame sampling can be configured via `extra_body` (e.g., by setting `fps`).
# This feature is currently supported only in vLLM.
#
# By default, `fps=2` and `do_sample_frames=True`.
# With `do_sample_frames=True`, you can customize the `fps` value to set your desired video sampling rate.
# chat_response = client.chat.completions.create(
#     model="Qwen/Qwen3.8-Flash-Next",
#     messages=messages,
#     extra_body={
#         "mm_processor_kwargs": {"fps": 2, "do_sample_frames": True},
#     }, 
# )

print("Chat response:", chat_response)
Instruct (or Non-Thinking) Mode

Qwen3.8-Flash-Next will think by default before responding. You can obtain a direct response from the model without thinking by configuring the API parameters. For example,

from openai import OpenAI
# Configured by environment variables
client = OpenAI()

messages = [
    {
        "role": "user",
        "content": [
            {
                "type": "image_url",
                "image_url": {
                    "url": "https://qianwen-res.oss-accelerate.aliyuncs.com/Qwen3.5/demo/RealWorld/RealWorld-04.png"
                }
            },
            {
                "type": "text",
                "text": "Where is this?"
            }
        ]
    }
]

chat_response = client.chat.completions.create(
    model="Qwen/Qwen3.8-Flash-Next",
    messages=messages,
    temperature=0.7,
    top_p=0.8,
    presence_penalty=1.5,
    extra_body={
        "top_k": 20,
        "chat_template_kwargs": {"enable_thinking": False},
    }, 
)
print("Chat response:", chat_response)

[!Note] If you are using APIs from Qwen Cloud, in addition to changing model, please use "enable_thinking": False instead of "chat_template_kwargs": {"enable_thinking": False}.

Disable Preserved Thinking

By default, Qwen3.8-Flash-Next retains thinking blocks from all historical messages, maintaining a complete reasoning trace across the conversation. This behavior, known as preserved thinking, ensures full context continuity and is especially beneficial for agent scenarios where decision consistency and reduced redundant reasoning are critical. It also improves KV cache utilization, optimizing inference efficiency in both thinking and non-thinking modes.

If you prefer to retain only the thinking blocks from the latest user message, you can disable this behavior by setting preserve_thinking to False:

from openai import OpenAI

# Configured by environment variables
client = OpenAI()
messages = [...]
chat_response = client.chat.completions.create(
    model="Qwen/Qwen3.8-Flash-Next",
    messages=messages,
    extra_body={
        "chat_template_kwargs": {"preserve_thinking": False},
    },
)
print("Chat response:", chat_response)

[!Note] If you are using APIs from Qwen Cloud, in addition to changing model, please use "preserve_thinking": False directly instead of wrapping it in chat_template_kwargs.

Best Practices

To achieve optimal performance, we recommend the following settings:

  1. Sampling Parameters: We suggest using the following sets of sampling parameters:

    • Thinking Mode: temperature=1.0, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0
    • Instruct (or non-thinking) mode: temperature=0.7, top_p=0.80, top_k=20, min_p=0.0, presence_penalty=1.5, repetition_penalty=1.0

    For supported frameworks, you can adjust the presence_penalty parameter between 0 and 2 to reduce endless repetition. However, using a higher value may occasionally result in language mixing and a slight decrease in model performance.

  2. Adequate Output Length: To optimize performance on agentic tasks, we recommend allocating sufficient output length to allow the model to generate detailed and comprehensive responses. For frameworks that support separate token limits for internal reasoning and final outputs, we suggest the following configuration within the 1M context length:

    • Reasoning Content: Set the maximum output length to 262,144 tokens.
    • Final Response: Set the maximum output length to 131,072 tokens.

    These settings provide the necessary capacity for complex reasoning while ensuring ample space for high-quality final deliverables.

  3. Processing Ultra-Long Texts: Qwen3.8-Flash-Next natively supports context lengths of up to 262,144 tokens. For long-horizon tasks where the total length (including both input and output) exceeds this limit, we recommend using RoPE scaling techniques to handle long texts effectively, e.g., YaRN.

    YaRN is currently supported by several inference frameworks, e.g., vLLM, SGLang, and TokenSpeed. In general, there are two approaches to enabling YaRN for supported frameworks:

    • Modifying the model configuration file:

      In the config.json file, change the rope_parameters fields in text_config to:

      {
          "mrope_interleaved": true,
          "mrope_section": [
              11,
              11,
              10
          ],
          "rope_type": "yarn",
          "rope_theta": 10000000,
          "partial_rotary_factor": 0.25,
          "factor": 4.0,
          "original_max_position_embeddings": 262144
      }
      
    • Passing command line arguments:

      For vLLM, you can use

      VLLM_ALLOW_LONG_MAX_MODEL_LEN=1 vllm serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1000000  
      

      For SGLang, you can use

      SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 python -m sglang.launch_server ... --json-model-override-args '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --context-length 1000000
      

      For TokenSpeed, you can use

      TOKENSPEED_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1 tokenspeed serve ... --hf-overrides '{"text_config": {"rope_parameters": {"mrope_interleaved": true, "mrope_section": [11, 11, 10], "rope_type": "yarn", "rope_theta": 10000000, "partial_rotary_factor": 0.25, "factor": 4.0, "original_max_position_embeddings": 262144}}}' --max-model-len 1000000  
      

    [!NOTE] All the notable open-source frameworks implement static YaRN, which means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts. We advise modifying the rope_parameters configuration only when processing long contexts is required. It is also recommended to modify the factor as needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to set factor as 2.0.

  4. Long Video Understanding: To optimize inference efficiency for plain text and images, the size parameter in the released video_preprocessor_config.json is conservatively configured. It is recommended to set the longest_edge parameter in the video_preprocessor_config file to 469,762,048 (corresponding to 224k video tokens) to enable higher frame-rate sampling for hour-scale videos and thereby achieve superior performance. For example,

    {"longest_edge": 469762048, "shortest_edge": 4096}
    

    Alternatively, override the default values via engine startup parameters. For implementation details, refer to: vLLM / SGLang.

Citation

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

@techreport{qwen2026design,
    title       = {On the Design of {Qwen3.8-Next} Architecture: Evaluation, Efficiency, and Training Stability},
    author      = {{Qwen Team}},
    institution = {Alibaba Group},
    month       = {August},
    year        = {2026}
}

@misc{qwen3.8flashnext,
    title  = {{Qwen3.8-Flash-Next}: A New Architecture, Towards Ultimate Cost-Efficiency},
    author = {{Qwen Team}},
    month  = {August},
    year   = {2026},
    url    = {https://qwen.ai/blog?id=qwen3.8-flash-next}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx-vlm

Нельзя запустить

MLX-модели работают только на Apple Silicon, на GPU NVIDIA они не запускаются.

Класс архитектуры
Qwen4ExpForConditionalGeneration
Ревизия весов
016f76a

0 моделей