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)
diff::ModelDifftagged enum + per-variant payloads.serialize::store_diff/serialize::load_diff: round-trip every variant through anypf_core::cas::BlobStore.merge::dare/merge::ties_merge: the two task-arithmetic primitives, tested on small synthetic tensors.
§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
ModelDiffvariant through apf_core::cas::BlobStore.