Downloads · 30 days
0
lancejames221b/Muse-Glimmer-30B-UD-Q4_K_XL-262k-patch
Muse-Glimmer-30B-UD-Q4_K_XL-262k-patch is a machine learning model from lancejames221b. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as other.
This repo provides a patch to extend the Muse Glimmer 30B GGUF model's context window from 131072 (131k) to 262144 (262k) tokens.
Downloads · 30 days
0
Access
Public
Updated Aug 21, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py3.7 KB · 42%
From the Hugging Face model README
This repo provides a patch to extend the Muse Glimmer 30B GGUF model's context window from 131072 (131k) to 262144 (262k) tokens.
The patch edits 4 bytes in the GGUF file header (the context_length uint32 field). No model weights are modified.
Muse-Glimmer's architecture supports longer context:
full_attention layers with NoPE (rope_theta=0) — these attend across the entire sequence without positional encoding. No change needed.sliding_attention layers with rope_theta=500000 and sliding_window=2048 — these are self-contained at 2048 tokens and don't grow with context length.Only the GGUF metadata cap needs to be raised. The model's actual behavior is determined by which layer is attending at each position, and only the 13 NoPE layers ever need to see positions beyond 2048 — and they don't use position info at all.
-c 262144 — LM Studio passes them to llama-server but clamps based on the GGUF header before the flag is honored.llm.load.contextLength — same clamp applies.Muse-Glimmer-30B-UD-Q4_K_XL.gguf from unsloth/Muse-Glimmer-30B-GGUF)python3 muse-262k-patch.py /path/to/Muse-Glimmer-30B-UD-Q4_K_XL.gguf
Expected output:
Found muse-glimmer.context_length at offset 281, current=131072
Backed up header to /path/to/Muse-Glimmer-30B-UD-Q4_K_XL.gguf.header.bak
Patched to 262144, verified=262144
lms load muse-glimmer-30b -y
Verify with lms ps — context should show 262144.
Muse-Glimmer-30B Q4_K_XL GGUF (15 GB) on RTX 4090:
Empirical per-token KV cost is much lower than naive calculations because sliding-window layers are capped at 2048 tokens. Only the 13 full-attention layers grow with context length.
Maximum context on RTX 4090 with nothing else loaded: ~500k tokens at f16, up to ~1M if using q4 KV cache (requires llama-server direct).
The patch persists across:
The patch does NOT survive:
If your file gets re-downloaded, simply re-run muse-262k-patch.py on the new file. The script finds the offset dynamically.
The original 4096-byte header is saved to <file>.header.bak next to the GGUF. Restore with:
dd if=original.gguf.header.bak of=original.gguf bs=1 count=4096 conv=notrunc
unsloth/Muse-Glimmer-30B-GGUFmeta-models/Muse-Glimmer-30BInherits from the upstream Muse-Glimmer-30B license. Check meta-models/Muse-Glimmer-30B for terms before use.