Commit 09869ee
authored
[Bugfix] Route Gemma4 ClippableLinear clip buffers during weight loading (#352)
Gemma4ClippableLinear registers input_max/input_min/output_max/output_min as buffers rather than parameters, so AutoWeightsLoader cannot find them via named_parameters(). Intercept these weights and load them directly into the corresponding buffers before passing the remaining weights to the loader.
Signed-off-by: GrootLiu <1219671600@qq.com>1 parent 189a443 commit 09869ee
1 file changed
Lines changed: 37 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1359 | 1359 | | |
1360 | 1360 | | |
1361 | 1361 | | |
| 1362 | + | |
| 1363 | + | |
| 1364 | + | |
| 1365 | + | |
| 1366 | + | |
| 1367 | + | |
| 1368 | + | |
| 1369 | + | |
| 1370 | + | |
| 1371 | + | |
| 1372 | + | |
| 1373 | + | |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
| 1394 | + | |
| 1395 | + | |
1362 | 1396 | | |
1363 | 1397 | | |
1364 | 1398 | | |
1365 | 1399 | | |
1366 | | - | |
| 1400 | + | |
| 1401 | + | |
| 1402 | + | |
1367 | 1403 | | |
1368 | 1404 | | |
1369 | 1405 | | |
| |||
0 commit comments