Repository navigation
Multidirectional Resonant Limiting (MRL): In-place <=5% path-gauge GGUF merging of Qwen2.5-1.5B & Qwen2.5-Coder-1.5B in Termux (0.0000% super-block loss) #31719
slinkzyy
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Quick thank-you and small gift back to the open-source community:
Credits & Thanks
QwenLM/Qwen2.5&QwenLM/Qwen2.5-Coder) for the base and coder models.termux/termux-app) for the Android Linux environment where the analysis,mmapweight surgery, and benchmarks were run.Aarstad/agy-termux-muslandwallentx/antigravity-cli-termuxfor the VA39/faccessat2patches and ~80 MB musl loader that made runninggoogle-antigravity/antigravity-cli(Gemini 4 Argon) natively on Android possible.ggml-org/llama.cppand Ollama for theQ4_K/Q6_KGGUF super-block format and local inference runtime.Technical Summary
When merging
qwen2.5:1.5bandqwen2.5-coder:1.5b(separated by 5.5T code pretraining tokens), naive linear/row-level merges either trigger repetition loops or blur multi-step arithmetic (gcd(1071, 462) = 21).0.3% -> 90.05%): Comparing isolated matrices shows only0.0%–0.3%agreement within 5% because weight decay during Coder pretraining shifted output projections (ffn_down,attn_output) to~0.73xandRMSNormweights to~1.25x. Tracing the composite path (norm -> gate/up -> downandnorm -> V -> O) and normalizing by the layer median gauge reveals that90.05%of the 1,536 residual directions and49.17%of the 8,960 SwiGLU neuron pathways still agree within<= 5%.MRL): Rather than rescaling Frobenius norms (which over-amplifies the principal singular valuesigma_maxby+8%–10%per matrix /+30%per layer and causes repetition loops),MRLonly steps individual coordinates(i, d)that sit on<= 5%compatible paths, agree in sign, and match within<= 5%(+41.4%SNR gain on invariant paths, leaving> 5%specialist weights untouched).0.0000%error on untouched weights): Re-quantizingQ4_K -> FP32 -> Q4_Kfrom scratch via min-max introduces a4.38%L2 error across 85.2% of blocks. Preservingllama.cpp's originalQ4_K(144B) andQ6_K(210B) block scale headers (d,dmin,scales) viammapand updating only matched 4-bit/6-bit bins keeps all untouched coordinates and super-blocks 100% bit-exact (0.0000%loss), scoring15/16(93.8%,+15.4%combined improvement over the parent models,10.3 tok/son ARM64).All Python scripts (
FastGGUFzero-copy parser,MRLmerger, streaming benchmark suite) and layer-by-layer JSON metrics are MIT-licensed in the repo above.All reactions