BendtorchLoad.safetensors: def of bendtorch-load@1.3.0.0 Import: import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad Lines 609-614 of bendtorch-load@1.3.0.0/main.bend: https://jend.leeeet.dev/read.txt?path=bendtorch-load@1.3.0.0/main.bend&start_line=609&end_line=614 import Base import bendtorch@1.3.0.0/main.bend as T # All parameters from a safetensors file: `layout` names the model's tensors in Layer.dump order (a tied output head # is not in it, as SmolLM2's is not in its file), and Layer.load fills the parameters from them as `weights` does def safetensors(~P: Type, ~X: Type, ~Y: Type, ~S: Type, ~m: T.Layer, +path: String, +layout: List<&2, Entry>, p: P) -> IO(P): do IO

: h : Header <- header(path) piece(~P, ~X, ~Y, ~S, ~m, path, h, layout, p) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=Entry https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=Header https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=header https://jend.leeeet.dev/definition.txt?path=bendtorch-load@1.3.0.0/main.bend&name=piece https://jend.leeeet.dev/definition.txt?path=bendtorch@1.3.0.0/main.bend&name=Layer