0
Fork 0
mirror of https://github.com/zml/zml.git synced 2026-11-16 19:11:09 +00:00
zml/examples
Benjamin Rabier 2b9119822d examples: load with zml.io.Loader
The examples load through zml.io.Loader: bufferize the model, start,
wait, and free the buffers with deinitBufferized. The loader logs the
bytes, time and rate itself, so the hand-written timers go.

examples/llm creates its loader in a block that initializes, compiles
and loads the model: the loader sets its backend up while the model
compiles, and the block frees it, with its pinned host memory, before
the chat starts. The weights still load after compilation, to leave
room for autotuning. The lfm2 and llama tests take a loader with
default options and pass their live progress node. mnist and mnist_dp
read their checkpoint through a VFS, create the loader before
compiling, and load in main, without a Mnist.load or unloadBuffers.
examples/io's load is the same recipe over every checkpoint tensor,
and load_check names zml.io.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
History 2026-11-08 07:35:32 +01:00
..
benchmark zml/exe: return launch errors from Exe.call 2026-11-04 23:04:25 +01:00
io examples: load with zml.io.Loader 2026-11-08 07:35:32 +01:00
llm examples: load with zml.io.Loader 2026-11-08 07:35:32 +01:00
mnist examples: load with zml.io.Loader 2026-11-08 07:35:32 +01:00
sharding zml/exe: return launch errors from Exe.call 2026-11-04 23:04:25 +01:00