$ the-wire · showcase
nnsight aligns tokenizer loading with weights, adds Gemma BOS fix
By RepoJournal · Filed · About Interpretability · Composed from the cited sources · methodology
nnsight merged dev into main, closing a real correctness gap where lazy, config= and pre-built module loads pulled tokenizers from the default cache and default branch while weights came from the ones the caller named, and enabling BOS prepending for Gemma tokenizers that omit it.
transformers: build the pipeline the same way on every load path ndif-team/nnsight
Every load path now calls pipeline() with the full set of load kwargs. Previously a lazy build, a config= load, or a module you passed in all skipped revision, so the tokenizer resolved against the default cache and default branch mismatched against the weights you actually loaded. If you load nnsight models from a pinned revision or a non-default branch, this is the fix that makes your prompts...
transformers: prepend <bos> for Gemma tokenizers that leave it off ndif-team/nnsight
Gemma returns noise unless input starts with <bos>, and the Gemma 4 -it tokenizers leave it off a plain string. nnsight now checks the model's own tokenizer on load and sets tokenizer.add_bos_token = True when it does not prepend, which means Gemma generations that previously came back as garbage from a raw string should now just work.
dev → main: transformers 5.23, load-kwargs routing, Gemma <bos>, vLLM V2 runner ndif-team/nnsight
The dev to main merge also brings transformers 5.23 support on the tensor-parallel path by reading its resolved plan, dotted implementation path resolution in _loaded_preprocessors, a mount fix that keeps .save out of anyio's typed-attribute check, and new docs for running LoRA adapters on a vLLM engine. If you are on transformers 5.23, this is the version to run.
transformers: trim the Gemma <bos> tests and drop the docs paragraph ndif-team/nnsight
The Gemma <bos> test suite was trimmed to the three cases that each fail without part of the fix: a string on a tokenizer that omits <bos>, a chat that must keep exactly one, and a PaliGemma tokenizer that must be left alone. Operators loading PaliGemma can read that last case as the guarantee that the change does not touch tokenizers already doing the right thing.
Action items