mlboydaisuke commited on
Commit
8b2f828
·
verified ·
1 Parent(s): 0833e57

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +9 -6
README.md CHANGED
@@ -66,12 +66,15 @@ leaves the token embedding table in fp32, and that table is 159.3 MB — 51,865
66
  768 dimensions. On this size the rest of the decoder finally outweighs it: int8 comes in at 315.5 MB against fp16's 387.3 MB, so it is the smallest portable build and it ships.
67
 
68
  Until recently there was no decoder int8 build at all, and this card said PT2E was observing
69
- the int64 `decoder_input_ids`. That was wrong. `XNNPACKQuantizer.transform_for_annotation`
70
- rewrites every scalar argument of `add.Tensor`/`mul.Tensor` as `torch.tensor(float(arg))`
71
- whatever the node's dtype, so the `arange(n) + 0` that builds the attention mask came back
72
- float32 and could no longer index — one line in ExecuTorch's
73
- `backends/xnnpack/quantizer/xnnpack_quantizer_utils.py`, still present on main, and nothing
74
- to do with the token ids.
 
 
 
75
 
76
  ### Checked in the task's own units
77
 
 
66
  768 dimensions. On this size the rest of the decoder finally outweighs it: int8 comes in at 315.5 MB against fp16's 387.3 MB, so it is the smallest portable build and it ships.
67
 
68
  Until recently there was no decoder int8 build at all, and this card said PT2E was observing
69
+ the int64 `decoder_input_ids`. That was wrong on both halves.
70
+ `XNNPACKQuantizer.transform_for_annotation` rewrites every scalar argument of
71
+ `add.Tensor`/`mul.Tensor` as `torch.tensor(float(arg))` whatever the node's dtype one line
72
+ in ExecuTorch's `backends/xnnpack/quantizer/xnnpack_quantizer_utils.py`, still present on
73
+ main. In this decoder the casualty is `position_ids = torch.arange(...) + past_key_values_length`
74
+ (`modeling_whisper.py:749`, `past_key_values_length` being a python `int`): it comes back
75
+ float32, and the failure lands on `self.weight[position_ids]` — the **position** embedding
76
+ lookup, not the token ids, and no observer involved. Measured by running `prepare_pt2e`
77
+ with an empty quantizer and printing the failing node.
78
 
79
  ### Checked in the task's own units
80