Commit e36fec2
perf(encoder): gated q/k/v+fc1 int8 (FW_ENC_INT8_ATTN_IN) — 1.23x encoder, proper-noun-safe
Extends the fc1-only int8 lever to the attention INPUT projections (q/k/v), which
feed the softmax scores (error-robust; decode runs qkv int8 default-on). Keeps
attn_out + fc2 on f32. New enc_int8_attn_in() gate (FW_ENC_INT8_ATTN_IN), default
OFF = byte-identical (conformance GREEN).
Validated on track01_16k.wav (the ledger's proper-noun clip, found on-box):
q/k/v+fc1 int8 PRESERVES FrankenSearch/Franken projects/Franco (the exact nouns
prior whole-encoder-int8 mangled to 'Frank at') with only 7 word-diffs vs f32 --
FEWER than fc1-only's 19. So the whole-attention proper-noun failure was attn_out/fc2
(residual-feeding), NOT the input projections.
MEASURED (e2e_probe large-v3-turbo, PERF_SPANS jfk x3 encoder_window window-1, min of 3, 32t):
f32 2482.4 ms 1.00x
fc1-only 2218.4 ms 1.119x (19 track01 word-diffs)
q/k/v+fc1 2015.8 ms 1.231x (7 track01 word-diffs) <- strictly better
Encoder ~76-82% e2e => ~1.15x e2e. jfk ts+no_ts byte-identical.
Also corrects the fc1 entry: on track01 (not on-box last round) fc1-only is 19
word-diffs, not byte-identical -- both fc1 and attn_in are mild quality tradeoffs,
proper-noun-safe, correctly gated default-off. Ratio vs ORIG unchanged default.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5481d46 commit e36fec2
3 files changed
Lines changed: 48 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
6 | 22 | | |
7 | 23 | | |
8 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
479 | 492 | | |
480 | 493 | | |
481 | 494 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
357 | 376 | | |
358 | 377 | | |
359 | 378 | | |
| |||
0 commit comments