Skip to main content

Crate kime_model

Crate kime_model 

Source
Expand description

ModelSpec, checkpoint formats, weight loading, the .kime packed format and the graph builders for both model families: the laya compat graph and the kime-v1 split encoder. See spec/05-model.md and spec/07-engine.md.

Every file is untrusted input. The parsers take a &[u8] and check each offset and length before using it, so a malformed or hostile file is an error and never a read out of bounds.

Modules§

laya
The laya compat family: Laya 0.3.7’s DecisionModel over a ModernBERT encoder.
pack
The .kime packed format: one file holding a model’s tensors and config files, laid out so the tensors can be mapped and used in place.
safetensors
A safetensors reader that treats the file as hostile.

Structs§

Entry
Where one tensor lives in its blob. Offsets are absolute and have been checked against the blob.
Model
A loaded compat model: its spec, its tensors and the graph bound to them.
Tensors
Named tensors backed by one blob, in the order their file lists them.
View
A borrowed tensor.

Enums§

Error
Everything that can go wrong opening a checkpoint.

Constants§

LAYA_FILES
The files of a Laya checkpoint directory that kime reads, beside model.safetensors. tokenizer_config.json is optional.