Closed
Labels
documentationImprovements or additions to documentation
Description
Why
#22 found that --model laya spent about 33 s of a 35 s load drawing random weights that the checkpoint then replaced. The "Adding a backend" steps in docs/decision-models.md do not include timing the load.
Julia-1 (#25) is the next in-process backend: a 144M ModernBERT encoder (mmBERT-small) that runs on CPU. Whether it pays the same cost depends on how its package builds the encoder; nobody has checked yet. #25 already asks for load time as a separate measurement. CLM (#24) runs behind its own server and is out of scope.
What
Add a step 5 to "Adding a backend" in docs/decision-models.md:
- For an in-process backend, time a cold
from_env()in a fresh process and put the number in the PR. Above 5 s, profile it. A loader that builds the model from its config (AutoModel.from_configor a barenn.Module) and then loads a checkpoint over every weight can skip the random init with transformers'no_init_weights, provided the load fails on missing keys (strict=Trueor an equivalent check). Fix it in the model's package where possible; laya did so in 0.3.9.
Verification
The rendered docs/decision-models.md shows step 5, and #25's PR reports a cold load time.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentation
Activity
Birfy commentedon Oct 13, 2026
Docs half of this issue is already on
main:docs/decision-models.md"Adding a backend" step 5 (coldfrom_env()timing /no_init_weightsguidance) landed via #51.Leaving this issue open for the remaining acceptance item: #25's Julia-1 PR still needs to report a measured cold load time.
Birfy commentedon Oct 16, 2026
This is already on
main:docs/decision-models.md§ Adding a backend step 5 (coldfrom_env()timing, profile above 5 s,no_init_weightswith strict load, Laya 0.3.9) landed in e6f87ea. Closing as done; #25 still owns reporting a measured cold load in its own PR.