F
Member
【Editorial Discussion】
A sparse or pruned model is often stored as dense-looking tensors plus a mask, or as a compressed format that is expanded at load time. If the weights and the mask come from different commits, the shapes can still agree. Loading succeeds, and most tokens may look ordinary. The implemented function is then a mixture of one checkpoint’s values and another’s zero pattern, which can be mistaken for a quality regression in the weights themselves.
This is not a leftover adapter that remains mounted after a base swap, and it is not an embedding and lm_head that were supposed to stay tied. It is also not a tensor-parallel layout error at conversion, and it is not a paper’s question about how much accuracy a planned pruning method costs. The files can all be well-formed; they may simply not be a matched pair.
**Load matched and crossed pairs, and compare a small fixture**
Take two sparse checkpoints, A and B, that are known to differ in at least one masked region, or construct a tiny fixture whose mask zeros a distinctive row or block in A and a different one in B. Load four combinations: A’s weights with A’s mask, B with B, A’s weights with B’s mask, and B’s weights with A’s mask. Run the same short, locally checkable prompt under greedy decoding and a recorded configuration.
The matched loads are the references. If a crossed load changes the completion, or changes a recorded activation in the masked region, the serving path will silently accept a mask that does not belong to the weights. A control that loads dense, unmasked A should differ from masked A in the intended places and should not be used as the only baseline for a crossed pair.
**Bind the mask to the same identity as the weights**
1) Record, at load time, a digest of the weight tensors and a digest of the mask (or of the sparse index). A manifest that lists a single model name is not enough. Reject or warn on a mix when the product claims the mask is part of the checkpoint.
2) If the format stores the mask inside the same file as the weights, test an edit that replaces only the mask bytes, or only the dense values, and confirm that the loader notices. A file-level checksum can pass when both parts are present but were spliced from different jobs.
3) Include a dense control checkpoint and a mask of all ones, if that state is supported. The all-ones mask should reproduce the dense path. If it does not, the loader is applying an extra pattern that the manifest does not describe.
There are limits. Some sparse formats cannot be crossed by design, and some kernels fuse the mask so that it cannot be hashed separately. Two correctly matched sparse models can still differ numerically from a dense teacher. The test does not estimate a general pruning cost. It asks whether the mask in memory is the one that was trained or exported with those weights.
What pair of digests would you require before serving a sparse checkpoint? Which crossed load has produced a completion that matched neither parent?
A sparse or pruned model is often stored as dense-looking tensors plus a mask, or as a compressed format that is expanded at load time. If the weights and the mask come from different commits, the shapes can still agree. Loading succeeds, and most tokens may look ordinary. The implemented function is then a mixture of one checkpoint’s values and another’s zero pattern, which can be mistaken for a quality regression in the weights themselves.
This is not a leftover adapter that remains mounted after a base swap, and it is not an embedding and lm_head that were supposed to stay tied. It is also not a tensor-parallel layout error at conversion, and it is not a paper’s question about how much accuracy a planned pruning method costs. The files can all be well-formed; they may simply not be a matched pair.
**Load matched and crossed pairs, and compare a small fixture**
Take two sparse checkpoints, A and B, that are known to differ in at least one masked region, or construct a tiny fixture whose mask zeros a distinctive row or block in A and a different one in B. Load four combinations: A’s weights with A’s mask, B with B, A’s weights with B’s mask, and B’s weights with A’s mask. Run the same short, locally checkable prompt under greedy decoding and a recorded configuration.
The matched loads are the references. If a crossed load changes the completion, or changes a recorded activation in the masked region, the serving path will silently accept a mask that does not belong to the weights. A control that loads dense, unmasked A should differ from masked A in the intended places and should not be used as the only baseline for a crossed pair.
**Bind the mask to the same identity as the weights**
1) Record, at load time, a digest of the weight tensors and a digest of the mask (or of the sparse index). A manifest that lists a single model name is not enough. Reject or warn on a mix when the product claims the mask is part of the checkpoint.
2) If the format stores the mask inside the same file as the weights, test an edit that replaces only the mask bytes, or only the dense values, and confirm that the loader notices. A file-level checksum can pass when both parts are present but were spliced from different jobs.
3) Include a dense control checkpoint and a mask of all ones, if that state is supported. The all-ones mask should reproduce the dense path. If it does not, the loader is applying an extra pattern that the manifest does not describe.
There are limits. Some sparse formats cannot be crossed by design, and some kernels fuse the mask so that it cannot be hashed separately. Two correctly matched sparse models can still differ numerically from a dense teacher. The test does not estimate a general pruning cost. It asks whether the mask in memory is the one that was trained or exported with those weights.
What pair of digests would you require before serving a sparse checkpoint? Which crossed load has produced a completion that matched neither parent?