Skip to main content

Crate pf_model

Crate pf_model 

Source
Expand description

§pf-model

Captures model-weight diffs (LoRA, IA³, full-finetune, in-place TTT) and implements the TIES + DARE task-vector merge from agent_docs/model-layer.md.

§What ships in Phase 5 (this commit)

§Wire format

For Phase 5 we use a single JSON-typed wire format (model.diff.v1) for every variant. Parameter tensors are stored as Vec<f32> with shape metadata; safetensors interop lands in Phase 10’s vLLM adapter where it’s actually needed (no point pulling 50 kloc of safetensors deps now).

Re-exports§

pub use diff::DiffKind;
pub use diff::FullDelta;
pub use diff::IA3Delta;
pub use diff::InPlaceTttDelta;
pub use diff::LoraAdapter;
pub use diff::LoraDelta;
pub use diff::ModelDiff;
pub use diff::TttStep;
pub use merge::TiesParams;
pub use merge::dare;
pub use merge::ties_merge;
pub use serialize::load_diff;
pub use serialize::store_diff;

Modules§

diff
Typed weight-diff payloads for the four supported diff kinds.
merge
TIES + DARE task-arithmetic merge primitives.
serialize
Round-trip every ModelDiff variant through a pf_core::cas::BlobStore.