Qwen 3 14B - 64k Extended Context (YaRN RoPE Patched)
This is a customized variant of Qwen 3 (14B) featuring a native context window extended to 65,536 tokens using adjusted Rotary Position Embedding (RoPE) metadata scaling.
The original official registry files for Qwen 3 (14B) strictly clamp the context engine down to a maximum native architecture limit of 40,960 tokens. This repository modifies the underlying GGUF architecture metadata directly to allow full 64k multi-turn instruction parsing without causing silent context truncation or structural output degradation.
Optimization Details
- Base Architecture Target:
qwen3 - Target Context Limit (
llm.context_length): 65,536 tokens - RoPE Scaling Method: Native
llama.cpp/ Ollama dynamic YaRN adjustment via modified GGUF header fields.
Quickstart with Ollama
You can run this extended context version directly within your containerized or local Ollama ecosystem using standard library references.
1. Direct Pull from Hugging Face
Ollama natively parses Hugging Face repository links. To pull and build this custom model automatically, run:
ollama run hf.co/mille535/qwen3-14b-64k-yarn
2. Manual Custom Modelfile Method
If you downloaded the .gguf file manually and want to configure a standalone local instance, create a text file named Modelfile:
FROM ./qwen3-14b-64k.gguf
PARAMETER num_ctx 65536
Then compile and run the configuration pipeline:
ollama create qwen3-14b-64k -f Modelfile
ollama run qwen3-14b-64k
3. Verifying the Allocation
To ensure your hardware environment is respecting the extended bounds, check your resource state in a secondary terminal while processing a query:
ollama ps
The CONTEXT column will explicitly display 65536.
Evaluation: Needle-in-a-Haystack Testing
This model has been validated via an automated script simulating a long-context data extraction task.
- Test parameters: A randomized string payload containing 60,000 baseline tokens.
- The Needle: A target text statement (
"The magic password for the secret bunker is 'CrimsonOnyx99'.") injected precisely 75% deep into the token sequence layout. - The Result: The model successfully executed long-context token-matching, bypassed filler content distraction, and correctly extracted the hidden payload at full structural depth.
Hardware & VRAM Requirements
Be aware that running a 14B parameter architecture with a full 64k active KV cache creates a heavy memory overhead:
- GPU Target: A minimum of 16GB to 24GB VRAM is recommended to process high-context prompt evaluations comfortably.
- If your system experiences out-of-memory errors or severe speed drops, check that your layers aren't being partially offloaded to system CPU RAM.