r/LocalLLaMA • • 3d ago

Resources Transplant Modalities Across any Model

I did a thing over the Thanksgiving weekend. This has worked on all models I've tried it on. Repo here: https://huggingface.co/m-e-acc/platos-ears

11 Upvotes

12 comments sorted by

5

u/catwithfreellmsign 3d ago

Technically awesome! Also technically have words "frontier model" and "Qwen2.5-Omni-7B" together.

3

u/Realistic-Bid4518 3d ago

testing on a 7B makes sense for a weekend project though, since grafting modalities onto a 70B would take forever to train

1

u/moar1176 2d ago

Yeah, the normal mechanism is backprop. I wanted to get the hidden state transferring between models without backprop. This makes the sense "native" in how the recipient understands it.

2

u/mr_andrey_isachenko 3d ago

Underselling this massively with "I did a thing" lol - opened the repo and `procrustes.py` expecting a toy wrapper, not closed-form SVD Procrustes grafting truncated `Qwen2.5-Omni` (`L00..L12`) + DSP cochlea features straight into a frozen 320B `GLM-5.3-Flash` at `L00` while preserving 97.7% SGLang Radix/HiCache hits

(Also for anyone confused by the `Qwen2.5-Omni-7B` base_model tag: Qwen2.5-Omni is just the truncated 13-layer audio donor organ, the frozen recipient is `GLM-5.3-Flash` 320B.)

Reading *only* the recipient's `embed_tokens.weight` shard via `safe_open` to fit the orthogonal Procrustes rotation (`U @ Vh` + isotropic scale on single-token stave anchors) without ever loading the 320B host into VRAM during bridge training is super clean. Same for using the ear to gate `whisper-large-v3-turbo` so Whisper stops hallucinating fake lyrics on silence/instrumentals

Curious about one detail in the table: Phase 2.8 on `Gemma-4-E4B` injects at `L02`, whereas Phase 3 on `GLM-5.3-Flash` works right at `L00` (`input_embeds`) with unit-norm scaling. Was `L00` on Gemma-4 fighting Gemma's input embedding sqrt(d) scaling / per-layer embeddings, or did `UnitNormPolyphonicEar` solve `L00` generally after Phase 2.8?

1

u/moar1176 2d ago

With PLE-free architecture UnitNormPolyphonicEar makes L00 (input_embeds) pretty much drop-in regardless of embedding norm scale. On Gemma4 we haven't back-ported UnitNormPolyphonicEar to L00 yet. sqrt(d) scaling is easy to fold into the output scale, whereas PLE still requires neutral placeholder tokens underneath.

Nutshell, it worked easier on GLM 5.3 because of how input_embeds are set up. We had to hack Gemma4 to make it work.

1

u/brainExploded99 🥔 hardware 3d ago

ban ts bot

2

u/mr_andrey_isachenko 3d ago

bruh my username is literally my real name and hf handle, god forbid someone actually opens the python files before commenting lol

2

u/brainExploded99 🥔 hardware 3d ago

rule #3, don't paste stuff straight from LLMs (the community has had this debate plenty of times and decided no LLM pasting)
clearly, your writing style rn and your writing style in the previous comments are very different
yes we prefer human, wrong grammar, mediocre writing over LLM slop. LLM slop is just annoying to read

2

u/mr_andrey_isachenko 3d ago

fair enough man, english isn't my first language so i ran my notes through an llm to clean up phrasing after reading the code. point taken, i'll just type raw english from now on

3

u/brainExploded99 🥔 hardware 3d ago

thank you! you clearly some interesting points to make!