def safetensors
import bendtorch-load@1.2.0.0/main.bend as BendtorchLoadimport Base
import bendtorch@1.2.0.0/main.bend as T
607# All parameters from a safetensors file: `layout` names the model's tensors in Layer.dump order (a tied output head
608# is not in it, as SmolLM2's is not in its file), and Layer.load fills the parameters from them as `weights` does
609def safetensors(~P: Type, ~X: Type, ~Y: Type, ~S: Type, ~m: T.Layer<P, X, Y, S>, +path: String, +layout: List<&2, Entry>, p: P) -> IO(P):
610 do IO<P>:
611 h : Header <- header(path)
612 piece(~P, ~X, ~Y, ~S, ~m, path, h, layout, p)
Uses (9)
Used by (0)
No other definition uses this definition.