mlboydaisuke commited on
Commit
5bc70db
·
verified ·
1 Parent(s): 63856c4

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +14 -1
README.md CHANGED
@@ -60,7 +60,20 @@ delegate's blob for the output matmul. Tying them in PyTorch does not tie them h
60
  Referencing the weight through `F.linear` instead of the `proj_out` module does not either —
61
  exported both ways, whisper-tiny's decoder comes out at 198.0 MB exactly.
62
 
63
-
 
 
 
 
 
 
 
 
 
 
 
 
 
64
 
65
  ### Checked in the task's own units
66
 
 
60
  Referencing the weight through `F.linear` instead of the `proj_out` module does not either —
61
  exported both ways, whisper-tiny's decoder comes out at 198.0 MB exactly.
62
 
63
+ **The decoder's int8 build is not shipped.** Dynamic int8 quantizes the linear weights and
64
+ leaves the token embedding table in fp32, and that table is 79.7 MB — 51,865 tokens at
65
+ 384 dimensions. On this size that table is most of the file, so int8 lands at 110.2 MB against fp16's 99.1 MB — larger, because fp16 halves the table too. It converts and holds, but nothing would pick it, so it is not shipped.
66
+
67
+ Until recently there was no decoder int8 build at all, and this card said PT2E was observing
68
+ the int64 `decoder_input_ids`. That was wrong on both halves.
69
+ `XNNPACKQuantizer.transform_for_annotation` rewrites every scalar argument of
70
+ `add.Tensor`/`mul.Tensor` as `torch.tensor(float(arg))` whatever the node's dtype — one line
71
+ in ExecuTorch's `backends/xnnpack/quantizer/xnnpack_quantizer_utils.py`, still present on
72
+ main. In this decoder the casualty is `position_ids = torch.arange(...) + past_key_values_length`
73
+ (`modeling_whisper.py:749`, `past_key_values_length` being a python `int`): it comes back
74
+ float32, and the failure lands on `self.weight[position_ids]` — the **position** embedding
75
+ lookup, not the token ids, and no observer involved. Measured by running `prepare_pt2e`
76
+ with an empty quantizer and printing the failing node.
77
 
78
  ### Checked in the task's own units
79