Expand description
Safetensors checkpoint loading, binary unpacking, packed saving, and header inspection.
Structs§
- Checkpoint
Stats - Summary statistics for a LittleBit checkpoint directory.
- Layer
Inspection - Per-layer metadata extracted from a LittleBit checkpoint.
- Loaded
State Dict - Unpacked checkpoint tensors alongside detected format metadata.
- Safetensors
Reader - Safe streaming safetensors reader that parses headers once and seeks to load
individual tensors or 3D dimension-0 slices on demand using zero
unsafecode. - Sharded
Safetensors Writer - Incremental sharded safetensors writer that flushes completed shards to disk and frees their in-memory buffers as quantization progresses.
- Tensor
Location - Location metadata for a single tensor inside a safetensors shard on disk.
Enums§
- Checkpoint
Format - Detected checkpoint storage format.
Functions§
- inspect_
checkpoint - Inspect a local LittleBit checkpoint without loading full weight tensors into memory.
- load_
and_ unpack_ state_ dict - Load a checkpoint directory and automatically unpack
*_packed/*_shapetensors intotarget_dtypefloat tensors matching upstream_load_and_process_state_dict. - load_
raw_ safetensors_ dir - Load all raw safetensors tensors from a checkpoint directory (single file or sharded index).
- save_
packed_ safetensors - Save a state dictionary to
dir/model.safetensorsand writedir/model.safetensors.index.json.