fix(classifiers): pass vb.pp("deberta") at DeBERTa model load sites (#2353)#2368
Merged
fix(classifiers): pass vb.pp("deberta") at DeBERTa model load sites (#2353)#2368
Conversation
fd7b588 to
86e287e
Compare
…2353) Both piiranha-v1 and deberta-v3-small-prompt-injection-v2 store backbone weights under deberta.* in their safetensors files. Loading with a root VarBuilder caused tensor-not-found errors, preventing PII NER and injection classifiers from loading.
86e287e to
75b41d4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
piiranha-v1) and injection classifier (deberta-v3-small-prompt-injection-v2) fail to load because HuggingFace safetensors store backbone weights underdeberta.*namespace, but the code passed a bareVarBuilderexpecting no prefixvb.pp("deberta")at all threeDebertaV2*Model::loadcall sites incrates/zeph-llm/src/classifier/vb.root()internally and are unaffectedChanges
crates/zeph-llm/src/classifier/ner.rs—DebertaV2NERModel::load(vb.pp("deberta"), ...)crates/zeph-llm/src/classifier/candle_pii.rs—DebertaV2NERModel::load(vb.pp("deberta"), ...)crates/zeph-llm/src/classifier/candle.rs—DebertaV2SeqClassificationModel::load(vb.pp("deberta"), ...)CHANGELOG.md— fix entry under[Unreleased]Test plan
cargo +nightly fmt --checkpassescargo clippy --features candle,metal -p zeph-llm -- -D warningspassescargo nextest run --features candle,metal -p zeph-llm --lib --bins— 833/833 passedCloses #2353