Skip to navigation

Qwen 3.8 27B context window: 262K native vs 1M, uncensored

In short: Qwen 3.8 27B context window for uncensored builds: 262,144 native vs the 1M YaRN setting, cache cost, what degrades, and a token calculator. 27 Nov 2026.

Published 22 min read
On this page

Qwen 3.8 27B has two context windows, and a page that quotes only one is selling you something. The model card says 262,144 tokens natively and “extensible up to 1,000,000”, and the second number depends on a rope-scaling setting that the card itself warns can hurt shorter prompts. This post is about that gap for uncensored builds: the exact YaRN recipe and its arithmetic, what each window costs in memory, what the cited long-context studies found, and what hosts really serve. It also does something no listing does: a token calculator for your own manuscript or codebase. One AI API Key publishes this and sells a Qwen id, so we state what we do and do not list.

What does 262,144 native actually mean?

It means the window the model was built and, by the card’s own account, evaluated for. The config file sets max_position_embeddings to 262144 with a plain default rope type and a rope theta of 10,000,000. The model card repeats it: “262,144 natively and extensible up to 1,000,000 tokens”. Community GGUF files inherit it: the Hugging Face API reports a context length of 262144 for the mradermacher set, and the JonathanColetti card lists context 262144 in its overview table.

Look at what the card’s benchmark footnotes say. SWE-bench Pro, DeepSWE 1.1 and the in-house QwenSWEBench are all described as evaluated “with the Claude Code harness” and a 256K context window. Those are the long-context claims with a stated setting, and 256K is 262,144 rounded, not a million. We found no benchmark in the card text that reports a score at 1M. So the honest reading is: the quality claims are for the native window, and 1M is a capability you switch on, not one the numbers cover.

The architecture matters for what native costs. The same config lists 64 layers in a repeating block of three Gated DeltaNet (linear attention) layers and one full-attention layer. Only the 16 full-attention layers store a key and a value for every token, so the cache costs 16 x 2 x 4 x 256 x 2 = 65,536 bytes per token, 64 KB, with 4 KV heads of size 256 and 2-byte values. The other 48 layers keep a fixed-size state. That is why this model’s cache is small next to a conventional 27B. It is also why the cost of a long window here is entirely the 16 layers: at the native maximum, 262,144 x 65,536 = 17,179,869,184 bytes, 17.18 GB.

What is the 1M extension, and what does it change?

It is YaRN, a published method for stretching rotary position embeddings past the length a model was trained on. The YaRN paper describes it as a compute-efficient way to extend a context window that needs 10 times fewer tokens and 2.5 times fewer training steps than earlier methods, shown on LLaMA models. Qwen’s card does not retrain anything for 1M. It gives a configuration change: set rope_type to yarn, factor to 4.0 and original_max_position_embeddings to 262144, either in config.json or through each engine’s override flag.

The card's rope_parameters for 1M (text_config in config.json)
{
  "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
}

The arithmetic is simple, and worth writing down because hosts quote the result in different ways. The extended window is the factor times the original: 4.0 x 262,144 = 1,048,576. A round million is 1,000,000 / 262,144 = 3.81, which is why the card uses 4.0 and not 3.8. The card’s own example for a shorter need is a typical length of 524,288, where it suggests a factor of 2.0.

YaRN factorWindow (tokens)f16 cache (GB)q8_0 cache (GB)Total with Q4_K_M, f16 (GB)
1.0262,14417.28.634.9
1.5393,21625.812.943.5
2.0524,28834.417.252.1
3.0786,43251.525.869.3
4.01,048,57668.734.486.5

How to read it: the total is 16.6 GB for Q4_K_M weights plus the cache plus about 0.15 GB for the fixed state (our estimate from the config, labelled as such in the sibling guide) plus 1.0 GB of assumed overhead. The 8-bit column applies the Ollama FAQ’s statement that a q8_0 cache uses about half the memory of f16; we have not measured its quality effect on this model. The general 1M context post shows the same cache arithmetic for a hypothetical million on this architecture, and this table adds the steps in between.

Now the warning the card prints itself. Every notable open-source framework, it says, implements static YaRN, “which means the scaling factor remains constant regardless of input length, potentially impacting performance on shorter texts”, and it advises modifying the rope settings only when long contexts are required. The practical rule is to keep two configurations: native for everyday use and a scaled one for the rare long job, not one scaled server for everything. The card names vLLM, SGLang and TokenSpeed as the engines with documented YaRN support. For llama.cpp, the server README documents --rope-scaling yarn, --rope-scale and --yarn-orig-ctx, so a factor of 2 looks like the command below. We have not run it on this model, and Ollama and LM Studio pages we read document no rope-scaling switch, so we do not claim they reproduce the card’s recipe.

llama.cpp: a factor-2 window (flags from the README, untested by us on Qwen3.8)
# llama.cpp flags from its server README. We have NOT run this on Qwen3.8; the card documents YaRN for vLLM, SGLang and TokenSpeed.
llama-server -m Qwen3.8-27B-Uncensored-noMTP-Q4_K_M.gguf \
  -c 524288 --rope-scaling yarn --rope-scale 2 --yarn-orig-ctx 262144 \
  -ngl 99

What do hosts say they serve?

Different things, and sometimes one number that changed. On 27 November 2026 we opened each host page for a Qwen3.8 27B uncensored build and wrote down the context line. They are the host’s claims, not our measurements.

HostContext (tokens)As the page puts it
Kitani1,010,000native 262,144 extended with YaRN, quality may vary
Phala1,000,000SGLang, attested enclave, max output 262,144
Unlid, Fast variant524,000524k, speed-tuned variant
Darkwoods262,144native window
unrestricted.sh262,144native window
Inferway256,000listed as 256K
Brutal AI128,000128K, 32K max output, invitation access

Context window claimed for Qwen3.8 27B uncensored, by host (tokens)

  • Kitani1,010,000
  • Phala1,000,000
  • Unlid, Fast variant524,000
  • Darkwoods262,144
  • unrestricted.sh262,144
  • Model native window262,144config.json
  • Inferway256,000
  • Brutal AI128,000
Host pages read on 27 November 2026. Bars above the native window need rope scaling. Darkwoods listed 1,000,000 when we wrote our earlier price survey and showed 262,144 today, which is why we date every claim.

Three points. First, only Kitani says outright how it reaches its number: native 262,144, extended to 1,010,000 with YaRN, and “extended-context quality may vary”. That is 1,010,000 / 262,144 = 3.85, a factor under the card’s 4.0. Second, Phala lists 1M and a maximum output of 262,144, which is a whole native window of output. If that maximum were used in full, a 1M window would have 1,048,576 - 262,144 = 786,432 tokens left for input. Third, most hosts sit at the native number, and the lowest-priced row is not the one with the longest window. Prices for all of these are in our Qwen API price survey, and the uncensored API price comparison puts them beside other families.

One caution on every row: the id you send does not prove which window or which weights answer. The checks in our post on verifying what an API serves apply, and one of them is simply to send a prompt near the advertised length and read the billed prompt tokens.

How should you split a window between input, thinking and answer?

By budgeting the output first, because the window is shared. The card has a recommendation for this “within the 1M context length”: set the maximum for reasoning content to 262,144 tokens and for the final response to 131,072. Together that is 393,216 tokens reserved for output, which leaves 1,048,576 - 262,144 - 131,072 = 655,360 tokens of input at the full 1M setting.

One 1M-token request, split as the card recommends (tokens)

  • Input left over655,3601,048,576 minus both output budgets
  • Reasoning budget262,144
  • Final answer budget131,072
The two output numbers are the card's recommended maximums for agentic work, not requirements. For a summary you would set far lower caps and keep more input.

On the native window the same budget does not fit at all: a reasoning cap of 262,144 alone is the whole window. So on native, set your own caps. For a 200-word summary a few thousand tokens of reasoning and a 500-token answer is plenty, and a small max_tokens can truncate a reasoning trace and leave an empty visible reply, as we note in the Ollama guide. On our API, max_tokens is the cap you control, and on the free ids it also protects the 3,000,000-token daily allowance, since completion tokens count.

The second Qwen-specific cost is preserved thinking. The card says that by default Qwen3.8 retains thinking blocks from all historical messages, that this is on out of the box, and that setting preserve_thinking to false keeps only the blocks of the latest user message. It argues the default helps agents and cache reuse. For window arithmetic, it means every turn of a long chat carries its old reasoning forward.

With our assumed sizes, a message of 200 tokens, 1500 tokens of reasoning and a 400-token answer, history grows by 2100 tokens a turn with preserved thinking and 600 without. Native 262,144 divided by 2100 is 124 turns; divided by 600 it is 436. The sizes are ours and your model’s reasoning may be far longer or shorter, but the ratio, 3.50 to 1, is what to remember. It is also why a request count is a poor guide on a free key: a chat that reaches turn 124 has long since hit the 100-request cap. The free chat guide works through that arithmetic in more detail.

What degrades at long context, and what do the sources say?

Quality falls with length, in ways the studies describe and nobody has measured for these uncensored edits. We cite what we can open and label our own reading.

Source What it tested Relevant finding
Chroma, Context Rot (July 2025) 18 models, including Qwen3 models, with simple tasks at growing input length Performance “grows increasingly unreliable as input length grows”; for Qwen it applied YaRN to go from 32,768 to 131,072 tokens
Same report, repeated-words task Replicating a word sequence Non-attempts only for Qwen3-8B, 4.21% of tasks, with random outputs starting from around 5,000 words
Same report, LongMemEval Focused against full prompts A gap between the two input lengths held across GPT, Gemini and Qwen families, and thinking narrowed but did not close it
RULER (Hsieh et al., 2024) 17 long-context models, 13 tasks Only about half held up at 32K despite claiming 32K or more
Lost in the Middle (Liu et al., 2023) Where the answer sits in the input Highest accuracy at the start or end of the input, lower in the middle
Qwen3.8-27B card Its own note on static YaRN Scaling factor constant regardless of input length, potentially impacting shorter texts

The Chroma row is the closest thing to evidence about Qwen with YaRN applied, and it is about older Qwen3 models, not Qwen3.8, and it ran Qwen without thinking mode except where it says so. The repeated-words finding is a reminder of what failure looks like: not a polite “I do not know” but random output. We would not extrapolate any percentage from it to a 27B model.

A second, structural point is our reading, not a measured result. The Gated Delta Networks paper says linear transformers’ “performance in retrieval and long-context tasks has been limited”, and motivates its design as a fix. Qwen3.8 uses 48 linear layers and 16 full-attention ones. That mix is built to keep memory low at length, and it means exact retrieval across a very long prompt leans on a quarter of the layers. Whether that matters for your prompts is an empirical question, which is why the next section ends in a test.

Then the uncensored edit. A weight edit like abliteration changes specific projections. The JonathanColetti card says its edit touches attn.o_proj and mlp.down_proj, reports a 0.5-point mean drop across four short benchmarks, and says no generative, math, code, multilingual or vision measurement was run. The Heretic guide explains the method, and the card comparison lists what each card did not measure. None of them ran a long-context test, so for an uncensored build at 262,144 tokens, and more so at 1M with YaRN on top, the claim “same as stock” is unmeasured both ways. Refusals are a separate matter: the card measured them in non-thinking mode on 100 short prompts, and how refusals behave at long length is not covered either.

How many tokens is your manuscript or codebase?

Count before you choose a window, because the answer decides whether you need YaRN at all. The calculator takes words for prose and characters for code, converts both to tokens with stated assumptions, adds your reply and reasoning budgets, and tells you what the total needs. The prose rule is OpenAI’s: 1 token is about three quarters of an English word, so 100 tokens are 75 words. Code is denser, and 3 characters per token is our assumption, which you can change. Every tokenizer counts differently, so treat the output as a planning figure and take the exact one from the usage field.

Which Qwen3.8 window does my material need?

Prompt tokens, estimated
219,700
Total with reasoning and answer
231,700
Share of the native 262,144 window
88.4%
Smallest YaRN factor in 0.5 steps (1.0 means none)
1.00
Verdict
Fits the native window, no rope change
f16 cache for the total, GB (local run)
15.18
Share of the free lane daily tokens
7.7%
applies to free ids, which are not Qwen
One call on Qwen 3.8 27B Abliterated (listed rate, no cache)
$0.14
paid id, set up by email

The defaults are a 90,000-word novel plus 300,000 characters of code. Estimates only. The cost row uses the input and output prices on the uncensored API page. Runs in your browser and sends nothing.

A 90,000-word manuscript at 1.33 tokens a word is about 119,700 tokens, and a 300,000-character repository at 3 characters a token is 100,000, so the defaults give roughly 220,000 prompt tokens and about 232,000 with the reasoning and answer budgets: inside native, at 88% of it. Raise the code to 400,000 characters and the total passes 262,144 and the calculator asks for a factor. Two things stay true whatever you enter. A prompt that fills 88% of the window leaves little slack for a longer-than-planned reasoning trace, so set the caps. And the card says to scale only when needed, so a job that fits native should stay native.

For a no-GPU test of the same material, send the chapter to a free long-window id. The three ids below list 1,048,576 tokens, share 100 requests and 3,000,000 tokens a day with the other 46 ids on the lane, and work right after a Google sign-in with no card. They are DealignAI builds of GLM and DeepSeek, not Qwen, so they tell you about your material and not about Qwen.

Python: send a chapter to a free 1M-listed id and read the billed tokens
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.oneaiapikey.com/v1", api_key=os.environ["ONEAIAPIKEY_API_KEY"])

# Cap the reply yourself: input + reply (+ thinking) must stay inside the window.
reply = client.chat.completions.create(
    model="dealignai-glm-5.3-flash-uncensored-fp8:free",
    max_tokens=2000,
    messages=[{"role": "user", "content": open("chapter.txt").read() + "\n\nSummarise the plot in 200 words."}],
)
print(reply.usage.prompt_tokens, "prompt tokens billed")
print(reply.choices[0].message.content)

What do we list, and what do we not say?

We list a paid Qwen id with no window, a free stock Qwen with 256,000, and three free uncensored ids with 1,048,576 that are not Qwen. The table is generated from our catalogue code, so it cannot drift from the pages it links to.

IdFamilyContext in our cataloguePrice
qwen3.8-27b-abliteratedQwen 3.8 27B, abliteratednot listed$0.51 in, $2.27 out, $0.07 cached per 1M
qwen-qwen3.8-27b:freeQwen 3.8 27B, stock256,000$0 per token, shared daily allowance
dealignai-glm-5.3-flash-uncensored-fp8:freeGLM 5.3 Flash Uncensored1,048,576$0 per token, shared daily allowance
dealignai-deepseek-v4.1-flash-uncensored-fp8:freeDeepSeek V4.1 Flash Uncensored1,048,576$0 per token, shared daily allowance
dealignai-glm-5.3-uncensored-fp8:freeGLM 5.3 Uncensored1,048,576$0 per token, shared daily allowance

The paid row first. Paid models, the Qwen id included, are set up by hand, offline, to stop abuse and card fraud. Pick a model and see the prices on the uncensored API page, then email somdutt777@gmail.com to buy access; the id is enabled after that email, not at sign-up. Ask by email about monthly options. Because our catalogue states no window for it, you should assume the host’s native 262,144 and test anything longer, and we make no claim that this id is scaled to 1M. Our Qwen price survey and pillar guide to uncensored APIs place it beside other hosts.

The stock free id is useful as a control, as the card comparison suggests: send the same long prompt to it and to a build and compare. It lists 256,000, below the native 262,144, so we would not send it more than that. Its page is Qwen3.8 27B. The earlier post on the faster Qwen free lane records how it arrived.

The free 1M ids are the three on the free models page, starting with GLM 5.3 Flash Uncensored. We have not sent a full-window request to them for this post, so 1,048,576 is the listing, not a measurement. The daily arithmetic for what one full-window call does to the 3,000,000-token allowance is in the 1M context post, and the comparison of Qwen with another family on the lane is in Qwen against DeepSeek uncensored. The free uncensored API guide lists the whole lane, and the free chat is the no-code version.

Which window should you pick?

The smallest one that holds your material and your output caps. The picker maps common jobs to a setting and gives the reasoning in each case.

What are you putting in the prompt?

A roleplay or chat log

Native. A hundred turns is tens of thousands of tokens, nowhere near 262,144. If preserved thinking is on, history grows 2100 tokens a turn by our assumed sizes, so you reach the native window around turn 124; setting preserve_thinking to false stretches that to about 436. Settings for the frontend are in the SillyTavern guide.

One novel or long manuscript

Native, usually. A 90,000-word novel is about 120,000 tokens by the 0.75 words-per-token rule, which leaves room for the answer inside 262,144. Longer series need chunking by chapter. See the writers' guide for prompts that keep voice consistent.

A whole repository

Count first. Code tokenizes denser than prose, so use the calculator with your real character count. If the total passes 262,144, a YaRN factor of 1.5 or 2.0 is the smallest step; the card says to avoid a larger factor than you need. For code work, compare with the coding guide.

Many documents, one question

Do not stretch the window. Retrieve the passages that matter and send those. Chroma's report found a gap between focused and full prompts across Qwen, GPT and Gemini models, so a focused 20,000 tokens usually beats a pasted 800,000. The cost guide prices both.

A security log or incident dump

Native if it fits, otherwise split by time range. Exact retrieval across a very long input is the weak spot in the studies above. The cybersecurity guide covers what is in scope and the acceptable use policy covers what is not.

An agent loop with tools

Native, with caps and preserved thinking decided on purpose. The card recommends large output budgets for agentic work, but those only fit inside the 1M setting. Test both on a handful of real tasks before you commit.

Choosing a window for Qwen3.8 27B

Prompt + reply under 262,144?Native window, no rope changeUp to 524,288 tokens in total?YaRN factor 2.0; test before trustingUp to 1,048,576 tokens in total?YaRN factor 4.0; f16 cache alone 68.7 GBLonger, or accuracy matters mostRetrieve or split; do not stretch
The factor steps follow the card's own example of 2.0 for 524,288. Each step down is cheaper in memory and, per the card, safer for short prompts.

How would you test a long window yourself?

With your own material and three positions for a planted fact. The 1M context post has a probe script, and the same idea transfers to Qwen with two changes. First, plant the fact in prose that looks like your data, not repeated filler, because both RULER and Chroma say simple retrieval overstates what a model can do. Second, ask a question that needs two separate facts from different parts of the prompt, which is closer to real use.

A short protocol, and what each result means.

  1. Native baseline. Send a prompt at about half the native window with a fact at the start, middle and end. Record which answers are correct.
  2. Same prompt, scaled server. If you have a YaRN-scaled server or a host that serves one, send the same prompt and compare. A drop at this length is the “shorter text” cost the card warns about.
  3. Longer prompt. Move to the length you need, with the same three positions. A fall in the middle position is the pattern from Lost in the Middle.
  4. Stock control. Send the same prompts to the stock model. If the stock model fails too, the edit is not the cause.
  5. Record the billed tokens. The usage field is the only exact count, so compare it with your estimate.

Be honest about the limits of such a test. It checks retrieval and instruction following at length, not whether the model’s reasoning stays sharp over 400,000 tokens of real documents. It also takes a free-lane allowance or a paid call to run, so budget it: one call at 262,144 tokens is 8.7 percent of the free daily token allowance, which is why we suggest the half-window first. Before you trust any host that claims a long window, our transparency page says what we monitor on our own routes, and the model verification guide gives checks that apply to anyone.

Where does a local run fit, and what does it cost?

At native length a 24 GB card is plausible and at 1M it is not. The Ollama and LM Studio guide works the budget for common cards: Q4_K_M at 16.6 GB plus a native cache of 17.2 GB is 34.9 GB in total at f16 by our assumptions, or 26.3 GB with an 8-bit cache, which is why most people run a context of 32,768 to 65,536 and not the full native window. At 1M, 86.5 GB at f16 and 52.1 GB at q8_0 are server numbers.

Whether to buy that hardware or rent it is a cost question we leave to two companion posts: local against API and GPU rental against API cost. The privacy trade is covered in what providers see. If you download a build to run locally, read the safe download guide first, and if you want to understand the legal side of the weights, the legal overview is the start. The prompts you pair with a long window are covered in the system prompt guide.

For families other than Qwen, the long-window story differs and we cover each separately: DeepSeek, GLM and Kimi. For account steps, see getting an uncensored API key and the unfiltered API guide. People who come from character sites will find the equivalent windows in the Janitor AI alternatives and Character.AI alternatives guides. The plans and credit are on the pricing page, and you can try a free id in the chat; the quickstart has the first call. Everything above runs under the acceptable use policy.

Count your tokens, then test on a free id

Sign in with Google, no card: the 47 free ids share 100 requests and 3,000,000 tokens a day. Run the calculator above, then send a chapter to a free 1M-listed id. The paid Qwen id is set up by email: somdutt777@gmail.com.

Frequently asked questions

What is the context window of Qwen 3.8 27B?
The model card says 262,144 tokens natively and extensible up to 1,000,000 tokens, and the config file sets max_position_embeddings to 262144. The 1M figure needs a RoPE scaling change (YaRN with factor 4.0, in the card's recipe) that vLLM, SGLang and TokenSpeed support. 4.0 x 262,144 is exactly 1,048,576.
Is the uncensored version the same length as the stock one?
The builds we read keep the stock architecture and its 262144 setting; the JonathanColetti card lists context 262144 and says it measured nothing about long context. We found no card that tests an edited build past the native window, so treat anything longer as unmeasured for uncensored files.
Do I need YaRN for a 300,000-token prompt?
Yes, because 300,000 is above 262,144, and the card recommends scaling for long-horizon tasks whose total length, input plus output, exceeds the native limit. It also advises choosing the factor to fit your usual length: for 524,288 tokens it suggests 2.0 rather than 4.0, because static YaRN can hurt shorter texts. 300,000 / 262,144 is 1.14, so the smallest sensible step is 1.5.
How much memory does a 1M context need locally?
By the config file's arithmetic, the cache alone is 68.7 GB at f16 (1,048,576 x 65,536 bytes), and half that with an 8-bit cache if your runtime allows it. Add about 16.6 GB for Q4_K_M weights. That is server-class memory. Our Ollama and LM Studio guide has the budget for ordinary cards.
Does your gateway serve Qwen 3.8 27B uncensored at 1M?
We list qwen3.8-27b-abliterated at $0.51 in and $2.27 out per 1M tokens on the uncensored API page with no context window stated, so we state none. Paid models are set up by hand, offline, to stop abuse and card fraud: email somdutt777@gmail.com to buy access, and ask by email about monthly options. The free ids that list 1,048,576 tokens are not Qwen.
What is preserved thinking and why does it fill the window?
Qwen3.8 keeps the reasoning blocks of every earlier message by default, which the card calls preserved thinking, and it is on out of the box. In an agent loop each turn then carries its old reasoning forward. The card shows how to set preserve_thinking to false to keep only the latest turn's reasoning. See the arithmetic table in this post for the effect on turns before the native window fills.
Is a bigger window better for roleplay?
Rarely past a point. A hundred-turn chat is tens of thousands of tokens, far below 262,144, and the studies we cite show accuracy falling as input grows. Summaries plus the last turns usually beat a full log. The SillyTavern guide and the monthly roleplay cost post cover the settings and the bill.
Where can I read about the general 1M context question for uncensored models?
The 1M context window post covers the free and paid ids that list a million tokens, the daily allowance arithmetic and a probe script. This post is only about Qwen3.8 27B, its native and extended windows and its own memory cost.
More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
  • 100requests
    per day
  • 3Mtokens
    per day
  • 47free
    models
  • $0per
    token
  • No card
  • No end date
Claim $10 credit →