What's the context limit on Qwen3.8-27B, and how do you push it to 1M?
Qwen3.8-27B handles 262,144 tokens natively. Qwen's model card says you can stretch that to 1,000,000 by switching rope scaling to YaRN with a factor of 4.0, at a cost on shorter inputs.
Checked against the lab's own pages on September 19, 2026. Limits change often, so the date matters.
Qwen3.8-27B takes 262,144 tokens of context as it ships. Qwen's model card puts a higher ceiling on the page, 1,000,000 tokens, and getting there is a config change you make yourself.
- Native context
- 262,144 tokens
- With YaRN
- Up to 1,000,000 tokens
- Parameters
- 27B across 64 layers
- YaRN example
- factor 4.0, original_max_position_embeddings 262144
- Suggested final-response output
- 131,072 tokens
What you get without touching anything
The card gives context length as "262,144 natively and extensible up to 1,000,000 tokens". Everything past the first number is the extension, and the card lists 27B parameters across 64 layers in a mixed attention pattern.
Turning the extension on
The extension is YaRN, a rope scaling method. Qwen's instructions are to edit rope_parameters in config.json: set rope_type to yarn, with a factor of 4.0 and original_max_position_embeddings of 262144.
Qwen is direct about what that costs. The card calls this static YaRN and spells out the side effect.
means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts
Where the token limit usually bites
Running out partway through a task is often an output setting rather than the context window. For agentic work the card suggests a maximum output length of 262,144 tokens for reasoning content and 131,072 tokens for the final response, inside that 1M window.
Both numbers are recommendations on the same page as the 1,000,000 figure, so which one you raise depends on whether your run dies reading or writing.
Qwen's own advice is to pick the YaRN factor from the context length your application typically handles, which makes the 4.0 in its example a starting point rather than a setting to leave alone.