In this article
A causal multivariate mask describes temporal relations between patches; flattened array order alone does not encode those relations.
Identify the concrete attention contract
A decoder-style forecasting model can arrange several variates in one token sequence. A standard triangular mask over array indices does not automatically reproduce its intended temporal relationships. The Moirai-MoE implementation calls a packed causal attention helper with sample and time identifiers. Preserve those explicit relations when moving the model to another attention backend or exporting its numerical execution graph.
Follow sample isolation before temporal causality
The mask helper first restricts attention to matching sample identities, then applies a non-strict temporal comparison. Separate packed examples remain distinct even if their local times coincide. A replacement that uses only time IDs can combine unrelated examples; a replacement that uses only array positions can remove valid same-time relationships among variates. Both changes alter the model’s information flow without necessarily causing a shape error.
Preserve aligned-time variate relationships
Several channels can describe one temporal position. Non-strict time causality allows relationships that differ from a strict ordering of those channels in a flattened sequence. The Moirai-MoE paper provides architecture context, while the installed helper defines the exact implemented permission rule. Distinguish the temporal identity of a patch from the location at which an exporter happened to store it, particularly when optimizing layout or packing.
Do not infer compatibility from an attention kernel name
An optimized kernel may expect a mask convention, packed sequence boundaries or causal orientation different from the model wrapper’s representation. The packed Moirai guide supplies related identity controls. Translate the permission relation explicitly rather than setting a generic causal flag and assuming equivalence. The numerical values in the network can remain unchanged while an incorrect mask silently removes context or reveals a disallowed future patch.
Compare the permission matrix on a tiny fixture
Construct a small packed fixture with separate samples, repeated times across variates and a later time. Compare the intended allowed pairs with the reference helper before comparing model outputs. The artifact-manifest guide adds release context. A port passes when sample isolation, same-time interaction and temporal direction match. Runtime acceleration is a separate measurement after that equivalence, rather than evidence that a successful optimized attention invocation preserved the original forecasting procedure.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.