Qwen3-Omni-30B-A3B-Instruct-LongContext
up to 1M token context without fine-tuning
2 min read
The model solves memory loss issues in long dialogues, allowing the language model to maintain the conversational thread even after processing massive amounts of text. Changes were applied directly to the weights of the base Qwen/Qwen3-Omni-30B-A3B-Instruct model without gradients or training, affecting only the projections and layer normalization of the thinker component. This will be useful for developers and hobbyists building local AI companions with long-term memory.
Key features
- Massive context: extended `rope_theta` position scaling to 10M and `max_position_embeddings` to 262,144 tokens.
- Targeted modification: only `q_proj`, `k_proj`, `q_norm`, and `k_norm` weights across 48 layers were modified.
- Base architecture preserved: experts, router, audio/video towers, and the talker module remain unchanged.
- Comparison with original: consistently retains key dialogue details over distances of up to 1 million tokens in top configurations.
What you can do
- Build an AI companion: run a local chatbot that remembers conversation details from the very beginning.
- Analyze long texts: upload large documents or entire books without losing the thread of the conversation.
- Test generation: experiment with sampling settings and Dual Chunk Attention for ultra-long contexts.
Example
out = model.generate(**inputs, return_audio=False, thinker_max_new_tokens=512,
thinker_do_sample=True, thinker_temperature=1.0, thinker_min_p=0.08,
thinker_top_k=0, thinker_top_p=1.0,
thinker_bad_words_ids=[[151644]])Read more
DetailsBenchmarks: successful needle-test retrieval and memory retention in conversations up to 1M tokens.
Hardware requirements: generation speed beyond the GPU KV-window is limited by RAM bandwidth (2–5 tokens per second on the author's server).
Training details: closed-form weight adjustments without gradients (192 tensors out of 28,010, about 1.5% of the thinker parameters).










Comments