Skip to content

Commit e385ba2

Browse files
committed
Record in the spec where a map is built, and that both forms coexist
The producer findings belong in the contract rather than only in review: a map is derived where a layer records its metadata, because collection cannot see per-rank extents, and a parameter the machinery never touches still needs one or it falls back to its name category. State as a rule that a reader preferring the map must mark the category patterns superseded, since a strict conversion otherwise rejects them. Signed-off-by: Achyuthan Sivasankar <achyuthan.sivasankar@gmail.com>
1 parent 5666907 commit e385ba2

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

deepspeed/checkpoint/affine_ir_spec.md

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,30 @@ whose name matched a metadata key could never be confused for one.
399399
and for debugging a checkpoint that will not load.
400400
- **`locations` is per piece, not per parameter.** This is the field that expresses
401401
`bigcodetype`, whose kv block is held identically by every rank (§5).
402-
403-
### 6.4 Size
402+
- **A reader that prefers the map must still account for the categories.** Additivity means
403+
both are in the file, so a reader taking the map never consults the category branches —
404+
which leaves their patterns looking unused, and a strict conversion rejects them. They are
405+
superseded, not unused, and the reader has to say so. This is not cosmetic: it is the
406+
difference between a checkpoint that converts and one that aborts.
407+
408+
### 6.4 Where a map is built
409+
410+
Not where the file is assembled. Collecting model-level metadata sees only the conversion
411+
schema, which does not carry per-rank extents — those are resolved while a layer is built
412+
and are not recoverable later from a shape alone. So a map is derived at the point a layer
413+
records its metadata, and collection gathers what the layers produced.
414+
415+
Two consequences worth stating, because both are easy to get wrong:
416+
417+
- A parameter the tensor-parallel machinery never touches is still describable — one piece
418+
held by every rank — but it reaches no layer, so nothing derives its map. It needs the
419+
degree of the group, which only the partitioned layers know. Producing a map for it means
420+
taking that from elsewhere in the model rather than skipping it: a parameter with no map
421+
falls back to its name category, which is what the IR exists to replace.
422+
- A layout the machinery refuses to describe produces no map, and conversion falls back to
423+
the categories. That is the intended escape, not a gap.
424+
425+
### 6.5 Size
404426

405427
Measured on a fused-QKV parameter at TP=8: 96 pieces, 6836 bytes of compact JSON —
406428
about **71 bytes per piece**. Extrapolated by tensor count:

0 commit comments

Comments
 (0)