Commit bae4e37
committed
Fix Gemma RMSNorm +1 offset missing on --checkpoint path
The `--checkpoint` code path skipped the Gemma-specific RMSNorm weight
adjustment (`weight + 1`). Gemma stores norm weights as deviations from
1 and computes `(1 + w) * x`, but ExecuTorch's RMSNorm computes `w * x`.
The HF download path applied the +1 offset correctly, but passing a
converted checkpoint via `--checkpoint` silently produced garbage output
from all 36+ norm layers, regardless of quantization recipe.1 parent 42581f1 commit bae4e37
1 file changed
Lines changed: 13 additions & 0 deletions
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
195 | 208 | | |
196 | 209 | | |
197 | 210 | | |
| |||
0 commit comments