You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf115ba
Browse filesBrowse the repository at this point in the historyBrowse files
fix: cap classifier vocab at STUDENT_MAX_CLASS during interning
The student deserializer rejects nclass > 2048, but the trainers did not, so
fit()/distill_predict could grow the label (and soft-label) arrays, or even hit
SQLITE_NOMEM, before erroring, or register a classifier blob that then failed to
load. Add STUDENT_MAX_CLASS (predict-student.h) as the single source for the
cap, use it for the three nclass deserializer checks, and reject an oversized
vocabulary DURING interning (immediately after each predict0_intern_label) in
predict0_train_student and both distill_predict classify loops, plus check
nproba before allocating the soft-label arrays. The post-convergence checks are
kept as defensive invariants. PREDICT_ERR_SCHEMA throughout. Regression tests
over 2049 distinct classes for both fit() and distill_predict.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments