Skip to content

load: reach a VL model's layers, not just load it - #104

Merged
WestWaters merged 1 commit into
mainfrom
fix/vl-text-layers
Sep 16, 2026
Merged

WestWaters merged 1 commit into
mainfrom
fix/vl-text-layers

Conversation

@WestWaters

Copy link
Copy Markdown
Owner

Fixing the loader moved the failure two lines down. pollard-probe loaded Qwen2-VL successfully and then died on len(model.model.layers) -- which reads as a different bug and is the same one: a vision-language model keeps its decoder under model.language_model, so every direct model.model.layers raises AttributeError on a model that has just loaded fine.

Seven tools did this: probe, abliterate, doctor, lowbit, gptq, hf_smooth, palette. All go through pollard_load.text_layers() now, which finds the stack for either family.

VL: 28 layers, first block Qwen2VLDecoderLayer, attn projections reachable

One of those was a latent crash unrelated to VL: pollard_abliterate imported the helper inside main(), while abliterate() uses it at module scope -- so the tool worked when driven from the CLI and raised NameError when called as a library. Hoisted.

A test walks every pollard_*.py and fails on a direct layer reach, the same way the loader test does, because the two halves of this bug are easy to fix separately and leave half-broken.

58/58 pass.

Fixing the loader moved the failure two lines down. pollard-probe loaded Qwen2-VL successfully and
then died on `len(model.model.layers)` -- which reads as a different bug and is the same one: a
vision-language model keeps its decoder under model.language_model, so every direct
`model.model.layers` raises AttributeError on a model that has just loaded fine.

Seven tools did this: probe, abliterate, doctor, lowbit, gptq, hf_smooth, palette. All go through
pollard_load.text_layers() now, which finds the stack for either family.

  VL: 28 layers, first block Qwen2VLDecoderLayer, attn projections reachable

One of those was a latent crash unrelated to VL: pollard_abliterate imported the helper inside
main(), while abliterate() uses it at module scope -- so the tool worked when driven from the CLI
and raised NameError when called as a library. Hoisted.

A test walks every pollard_*.py and fails on a direct layer reach, the same way the loader test
does, because the two halves of this bug are easy to fix separately and leave half-broken.

58/58 pass.
@WestWaters
WestWaters merged commit 152a6c7 into main Sep 16, 2026
1 check passed
@WestWaters
WestWaters deleted the fix/vl-text-layers branch September 16, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant