@AdinaYakup: Open source summer party is not over yet https://huggingface.co/Qwen/Qwen3.8-27B…
摘要
Qwen3.8-27B, a compact 27B dense vision-language model with flexible thinking control and long-context support, is released as the most capable Qwen open model to date, available soon via Hugging Face and Qwen Cloud.
查看缓存全文
缓存时间: 2026/08/14 09:33
Open source summer party is not over yet ⌛️
https://t.co/n5BzKRaWaJ https://t.co/sGF9e8XIZs
Qwen/Qwen3.8-27B · Upcoming release · Hugging Face
Source: https://huggingface.co/Qwen/Qwen3.8-27B
https://huggingface.co/Qwen/Qwen3.8-27B#qwen38-27bQwen3.8-27B
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.
For users seeking managed, scalable inference without infrastructure maintenance, the official Qwen API service is provided byQwen Cloud. In particular,Qwen3.8-27Bwill be available as a hosted version with more production features, e.g., 1M context length by default, official built-in tools. For more information, please refer to theQwen3.8-27B Overview. The service is coming soon. Stay tuned for updates.
Following the widespread community adoption of the Qwen3.5 and Qwen3.6 series, we are pleased to introduce Qwen3.8, the most capable generation in the Qwen open-model family to date.
Built on the architectural foundation of Qwen3.5, Qwen3.8 delivers substantial gains across coding, professional work, research, and long-horizon agentic tasks. Qwen3.8-27B brings these advances to a compact, deployment-friendly dense model: a native vision-language model that understands images and videos, with flexible thinking control, designed to carry complex, multi-step tasks through to completion with greater reliability.
https://huggingface.co/Qwen/Qwen3.8-27B#qwen38-highlightsQwen3.8 Highlights
Qwen3.8-27B features the following enhancements:
- Core Capabilities: Comprehensive improvements across coding, professional work, research, and long-horizon agentic tasks.
- Agent Execution: Stronger autonomous planning and better handling of environment feedback, leading to more reliable end-to-end task completion.
- Downstream Compatibility: Broader support for popular harnesses and development tools, making it easier to integrate into your existing stack.
- Flexible Thinking Control: Thinking mode is on by default and can be disabled per request; reasoning depth can be tuned with
reasoning\_effort, and reasoning context from historical messages is retained viapreserve\_thinking. - Vision-Language Understanding: Native support for image and video understanding, from STEM diagrams and documents to hour-scale videos.
https://huggingface.co/Qwen/Qwen3.8-27B#model-overviewModel Overview
- Type: Causal Language Model with Vision Encoder
- Training Stage: Pre-training & Post-training
- Language Model- Number of Parameters: 27B - Hidden Dimension: 5120 - Token Embedding: 248,320 (Padded) - Number of Layers: 64 - Hidden Layout: 16 × (3 × (Gated DeltaNet → FFN) → 1 × (Gated Attention → FFN)) - Gated DeltaNet:- Number of Linear Attention Heads: 48 for V and 16 for QK - Head Dimension: 128 - Gated Attention:- Number of Attention Heads: 24 for Q and 4 for KV - Head Dimension: 256 - Rotary Position Embedding Dimension: 64 - Feed Forward Network:- Intermediate Dimension: 17,408 - LM Output: 248,320 (Padded) - MTP (Multi-Token Prediction): trained with multiple steps
- Context Length: 262,144 natively and extensible up to 1,000,000 tokens.
https://huggingface.co/Qwen/Qwen3.8-27B#quickstartQuickstart
For streamlined integration, we recommend using Qwen3.8 via APIs.
https://huggingface.co/Qwen/Qwen3.8-27B#serving-qwen38Serving Qwen3.8
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, vLLM, or TokenSpeed are recommended.
Qwen3.8 can be deployed with popular inference frameworks, e.g.:
https://huggingface.co/Qwen/Qwen3.8-27B#api-usageAPI Usage
Qwen3.8 models operate in thinking mode by default, generating thinking content signified by
<think\>\\n\.\.\.</think\>\\n\\nbefore producing the final response. To disable thinking content and obtain a direct response, refer to the exampleshere.
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\.0Please note that the support for sampling parameters varies according to inference frameworks.
Qwen3.8 comes with official support forreasoning\_effort, which can be used to adjust reasoning depth and control cost:
xhigh(default): for complex tasks demanding thorough analysismedium: balancing accuracy and speedlow: efficient reasoning optimizing for speed and cost
In addition,preserve\_thinkingis enabled by default for all workloads for the best out-of-the-box experience. To disable preserved thinking, refer to the exampleshere.
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.
https://huggingface.co/Qwen/Qwen3.8-27B#chat-completions-apiChat Completions API
The Chat Completions API can be used with most inference frameworks, as well asQwen Cloud. Before starting, make sure the OpenAI Python SDK is installed and the API key and the API base URL are configured, e.g.:
pip install -U openai
# Set the following accordingly
export OPENAI_BASE_URL='your-base-url'
export OPENAI_API_KEY='your-api-key'
https://huggingface.co/Qwen/Qwen3.8-27B#text-only-inputText-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-27B",
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
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
https://huggingface.co/Qwen/Qwen3.8-27B#image-inputImage 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-27B",
messages=messages,
)
print("Chat response:", chat_response)
https://huggingface.co/Qwen/Qwen3.8-27B#video-inputVideo 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?"
}
]
}
]
# 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-27B",
messages=messages,
extra_body={
"mm_processor_kwargs": {"fps": 2, "do_sample_frames": True},
},
)
print("Chat response:", chat_response)
https://huggingface.co/Qwen/Qwen3.8-27B#instruct-or-non-thinking-modeInstruct (or Non-Thinking) Mode
Qwen3.8-27B 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.6/demo/RealWorld/RealWorld-04.png"
}
},
{
"type": "text",
"text": "Where is this?"
}
]
}
]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.8-27B",
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)
If you are using APIs from Qwen Cloud, in addition to changing
model, please use"enable\_thinking": Falseinstead of"chat\_template\_kwargs": \{"enable\_thinking": False\}.
https://huggingface.co/Qwen/Qwen3.8-27B#disable-preserved-thinkingDisable Preserved Thinking
By default, Qwen3.8 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 settingpreserve\_thinkingtoFalse:
from openai import OpenAI
# Configured by environment variables
client = OpenAI()
messages = [...]
chat_response = client.chat.completions.create(
model="Qwen/Qwen3.8-27B",
messages=messages,
extra_body={
"chat_template_kwargs": {"preserve_thinking": False},
},
)
print("Chat response:", chat_response)
If you are using APIs from Qwen Cloud, in addition to changing
model, please use"preserve\_thinking": Falsedirectly instead of wrapping it inchat\_template\_kwargs.
https://huggingface.co/Qwen/Qwen3.8-27B#best-practicesBest Practices
To achieve optimal performance, we recommend the following settings:
- 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\.0For supported frameworks, you can adjust thepresence\_penaltyparameter 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. - 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.
- Processing Ultra-Long Texts: Qwen3.8-27B 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\.jsonfile, change therope\_parametersfields intext\_configto:{ "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 useVLLM_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 1000000For SGLang, you can useSGLANG_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 1000000For TokenSpeed, you can useTOKENSPEED_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> 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 therope\_parametersconfiguration only when processing long contexts is required. It is also recommended to modify thefactoras needed. For example, if the typical context length for your application is 524,288 tokens, it would be better to setfactoras 2.0. - Long Video Understanding: To optimize inference efficiency for plain text and images, the
sizeparameter in the releasedvideo\_preprocessor\_config\.jsonis conservatively configured. It is recommended to set thelongest\_edgeparameter 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.
https://huggingface.co/Qwen/Qwen3.8-27B#citationCitation
If you find our work helpful, feel free to give us a cite.
@misc{qwen38,
title = {{Qwen3.8-Max}: A New Bar for Coding and Cowork},
url = {https://qwen.ai/blog?id=qwen3.8},
author = {{Qwen Team}},
month = {August},
year = {2026}
}
Waiting for the release5,314
![]()
Expected releaseAugust 14, 2026## Planned artifacts1
Latest from Qwen
Qwen/Qwen3.8-2.4T-A95BQwen/Qwen3.8-2.4T-A95B-FP8Qwen/Qwen3-ForcedAligner-0.6B-hf
Victor M (@victormustar): We are in an insane run of open-weight drops.
Every modality, open source is winning. This is what an open source AI summer ☀️ looks like:
🧠 LLMs & Reasoning
→ DeepSeek-V4-Flash-0731 (my king 👑): 304B MoE refresh, Terminal-Bench 2.1 jumps 61.8→82.7 over the preview,
相似文章
Qwen 3.8 27B 发布:开放权重,目前最好的本地稠密模型
Qwen 发布了 Qwen3.8-27B,这是一个开放权重的 27B 稠密视觉语言模型,在编程、专业工作和长周期智能体任务上取得了重大进展,提供 FP8 版本并支持灵活的思考控制。
Qwen/Qwen3.6-27B
Qwen 在 Hugging Face 上发布了开源权重模型 Qwen3.6-27B,该模型具备更高的稳定性、强大的智能体编程能力以及思维链保留特性,有助于提升开发者的工作效率。
@AdinaYakup: 是的 https://huggingface.co/collections/Qwen/qwen38-flash-next…
Qwen3.8-Flash-Next-FP8这一新的多模态AI模型已在Hugging Face发布,具备1800亿参数,支持图文转文本任务,属于Qwen系列的一部分。
Qwen/Qwen3.6-27B-FP8
阿里巴巴发布 Qwen3.6-27B-FP8,一款 27B 参数的 FP8 量化模型,在代理式编码与推理基准上表现强劲,现已上架 Hugging Face。
Qwen3.8-27B
Qwen 发布了 Qwen3.8-27B 的开源权重,这是一个原生多模态稠密模型,拥有 27B 参数,整体性能超越 Qwen3.7-Plus,支持 262K 原生上下文并可扩展至 1M,采用 Apache 2.0 许可。