Module precision_schedule

Module precision_schedule 

Source
Expand description

2026-09-25: A per-(layer, role) weight precision schedule: Role tags a tensor, Dtype is a requested precision, and PrecisionSchedule resolves a (layer, role) pair to a dtype.

The only schedule in use is PrecisionSchedule::default(), which ModelWeightLoader::precision_schedule returns for every loader (weight_loader/mod.rs); it resolves every lookup to Dtype::Inherit. The qwen35 loader only logs a schedule that has an override (weight_loader/qwen35/load_layers.rs), and no loader calls dtype_for.

Owner: model-arch (weight loading). Invariants:

  • dtype_for resolves in the order: sensitive-layer dtype (Attention, Expert and SharedExpert tensors only), then the role’s dtype, then the global default; Inherit at a step falls through to the next.

Structs§

PrecisionSchedule
2026-09-25: Per-(layer, role) precision schedule: one dtype per role, a global default, and a set of sensitive layers with their own dtype.

Enums§

Dtype
2026-09-25: Target precision for a tensor. Inherit means no override; the other variants request that precision.
Role
2026-09-25: Semantic role of a tensor, used for precision lookups. Adding a role means extending the matches in Role::name, Role::from_str and PrecisionSchedule::dtype_for.