onemodelCookbook
onemodel cookbook
Short recipes for common OneModel tasks, each with complete code you can copy.
Recipes
Exact mode: the same bits everywhereRun a model in OneModel’s exact mode for results that are bit-identical on every OS, CPU, instruction set, thread count and WebAssembly, and see how it differs from the default fast mode.Convert ONNX to the OneModel formatConvert an ONNX file to OneModel’s own format once, load it with the same call, and get bit-identical outputs, with the weights read as memory-mapped views.Named inputs and outputsRun an ONNX model with more than one input or output through OneModel’s Session: list its inputs and outputs, pass named tensors in any order, and get the outputs back as tensors.Half-precision weightsKeep the large weights of a float32 ONNX model as binary16 or bfloat16 with SessionOptions.WeightStorage, which halves their memory, and measure what it costs in accuracy.When a model won’t loadWhat OneModel reports when an ONNX model uses an operator it doesn’t implement, or one without an exact kernel in exact mode, and how to read the error.