Repository navigation
Conversation
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait...
|
058324c to
dffa646
Compare
|
@coderabbitai review |
Action not completed
|
e01ba68 to
113053f
Compare
|
@coderabbitai full review |
Action not completed
|
113053f to
7fe1ed1
Compare
|
@coderabbitai full review |
Action not completed
|
…l batches Outputs byte-identical to the previous bridge on test requests. - Load research weights via mmaped safetensors (no Var autograd tracking): RSS 3.6 GB -> 0.4 GB at batch 4. - property_and_mobility_t runs the v0.50 trunk once for RT/MS2/CCS (was twice, plus two collates). - Bridge predicts identical model inputs once and runs batches on the rayon pool.
The v0.50 trunk, v0.52 refinement and v0.35 teacher run at the batch width instead of 64; features keep max_sequence_len as normalizer, MS2 is padded back to 63 cleavages. Predictions identical (max abs diff 0) on 256 real PXD003881 peptidoforms; 56 s -> 7.5 s at batch 1, 16 threads.
…ches layers::Linear flattens 3D/4D inputs to 2D and multiplies by a weight transposed once at load (only for non-Var weights; single-row and 2D inputs keep candle's path). Bit-identical to candle_nn::Linear (unit test) and on 256 real PXD003881 peptidoforms; ~1.3x less CPU. The bridge also sorts unique inputs by length before batching so batch>1 pads only to near-equal peptides.
Off by default (outputs stay bit-identical). With --fast-math the bridge uses candle's fused layer_norm row kernel for non-Var weights: ~1.2x less CPU on 256 real PXD003881 peptidoforms, max drift RT 3e-5, CCS 4e-4, MS2 2e-6. MKL backend was tried and dropped: candle 0.8.4 + intel-mkl-src fails to link (undefined hgemm_).
…bels foundation::distill: teacher_labelled_records (any PredictionModel teacher, e.g. v0.52 research stack), distill_foundation_student (small ResidueTransformer FoundationModel, supervised RT/CCS/MS2 on teacher predictions, deterministic holdout fidelity report), small_student_config. Training and inference crop each batch to its longest peptide (width-invariance unit test). examples/foundation_distill: CLI over a batch-request peptide list.
…g. distilled student)
distill_from_records / labelled_record split labelling from training. Batch responses deserialize, so a foundation_batch_predict response serves as a cached label file (foundation_distill --labels). --train-threads caps training: the small student does not scale past ~2 threads (rayon steal overhead).
prediction_record now lives in runtime, the specialist config gained size fields (use defaults), and the tensor batch validator was missing the instrument_present length.
… bridge The training collator marks instrument_present only for ids > 0 (id 0 is the learned unknown category). The bridge marked Some(0) as present, feeding the model a context combination it never saw in training.
7fe1ed1 to
ef29855
Compare
|
@coderabbitai full review |
Action performed
|

Stack 3/4 (base: stack 2)
Andes batch prediction bridge and student distillation.
--fast-mathfused LayerNormfoundation_distillexample: trains a small or medium student on cached teacher labels, with opt-intask_weightsConsolidates the non-featurizer part of
feature/foundation-distill(rebased from an olddevelop). Left out: docs-only result-log commits, and a duplicate ONNX encoder lowering insrc/onnx_export.rsthat stack 2 supersedes and that depended on a missing local path.Integration fix on top (
fix(foundation): adapt batch bridge and distillation to the stack 2 APIs):prediction_recordmoved toruntime, and the example now uses the research pair loader because stack 2 removed the legacyFoundationPredictorinstrument_presentlength. This was a latent bug on the original branch.Verified:
cargo check --workspace --all-targetswithonnx-exportis clean, andcargo test -p redeem-properties --features onnx-export --libgives 239 passed, 0 failed, 2 ignored.