Ddavidich commited on
Commit
9135101
·
verified ·
1 Parent(s): 5d36324

Мультимодальность починена: зрительная башня переведена в FP8

Browse files

Картинка убивала движок: cuFuncSetAttribute -> CUDA_ERROR_INVALID_VALUE в
humming_gemm. Слои зрения были квантованы целочисленным pack-quantized с
группой 16, а на Blackwell её принимает только ядро humming, которое там не
запускается. Остальные отказываются: Marlin берёт -1/32/64/128, Conch -1/128,
Machete и CUTLASS требуют Hopper, AllSpark не знает sm_120.

Просто перейти на группу 128 нельзя: у linear_fc2 вход 4304 = 16 x 269.

Лестница схем, замерено на живой карте:
int g16 (было) 331 МБ — движок падает
NVFP4 g16 254 МиБ — жив, ответ мусор
FP8 поканально 445 МиБ — РАБОТАЕТ
BF16 879 МиБ — работает, подробнее

Выбран FP8: вдвое дешевле BF16 при верном ответе. Модель описывает картинку:
'LOMONOSOV ZENIT logo with a stylized emblem and text on a dark background'.

Миллион при этом сохраняется — проверено сквозным прогоном без флагов на
пустой 5090: веса 16.31 ГиБ, кэш 1 017 164 токена, выбрано окно 1 010 001,
модель отвечает.

config.json CHANGED
@@ -261,74 +261,41 @@
261
  "zp_dtype": null
262
  }
263
  },
264
- "vision_attention_w8a16_g16": {
265
- "format": "pack-quantized",
266
- "input_activations": null,
267
- "output_activations": null,
268
  "targets": [
 
269
  "re:^model\\.visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$",
270
- "re:^visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$"
 
 
 
271
  ],
272
  "weights": {
273
- "actorder": null,
274
- "block_structure": null,
275
- "dynamic": false,
276
- "group_size": 16,
277
  "num_bits": 8,
278
- "observer": "memoryless_minmax",
279
- "observer_kwargs": {},
280
- "scale_dtype": null,
281
- "strategy": "group",
282
  "symmetric": true,
283
- "type": "int",
284
- "zp_dtype": null
285
- }
286
- },
287
- "vision_mlp_w4a16_g128": {
288
- "format": "pack-quantized",
289
- "input_activations": null,
290
- "output_activations": null,
291
- "targets": [
292
- "re:^model\\.visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$",
293
- "re:^visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$"
294
- ],
295
- "weights": {
296
- "actorder": null,
297
- "block_structure": null,
298
  "dynamic": false,
299
- "group_size": 128,
300
- "num_bits": 4,
301
- "observer": "memoryless_minmax",
302
  "observer_kwargs": {},
303
- "scale_dtype": null,
304
- "strategy": "group",
305
- "symmetric": true,
306
- "type": "int",
307
- "zp_dtype": null
308
- }
309
- },
310
- "vision_mlp_w4a16_g16": {
311
- "format": "pack-quantized",
312
- "input_activations": null,
313
- "output_activations": null,
314
- "targets": [
315
- "re:^model\\.visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$",
316
- "re:^visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$"
317
- ],
318
- "weights": {
319
  "actorder": null,
320
- "block_structure": null,
321
- "dynamic": false,
322
- "group_size": 16,
323
- "num_bits": 4,
324
- "observer": "memoryless_minmax",
325
- "observer_kwargs": {},
326
- "scale_dtype": null,
327
- "strategy": "group",
328
  "symmetric": true,
329
- "type": "int",
330
- "zp_dtype": null
331
- }
 
 
 
 
 
 
332
  }
333
  },
334
  "format": "mixed-precision",
 
261
  "zp_dtype": null
262
  }
263
  },
264
+ "vision_fp8": {
265
+ "format": "float-quantized",
 
 
266
  "targets": [
267
+ "re:^model\\.visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$",
268
  "re:^model\\.visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$",
269
+ "re:^model\\.visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$",
270
+ "re:^visual\\.(?:blocks\\.\\d+\\.mlp\\.linear_fc1|(?:merger|deepstack_merger_list\\.\\d+)\\.linear_fc[12])$",
271
+ "re:^visual\\.blocks\\.\\d+\\.attn\\.(?:qkv|proj)$",
272
+ "re:^visual\\.blocks\\.\\d+\\.mlp\\.linear_fc2$"
273
  ],
274
  "weights": {
 
 
 
 
275
  "num_bits": 8,
276
+ "type": "float",
 
 
 
277
  "symmetric": true,
278
+ "strategy": "channel",
279
+ "group_size": null,
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  "dynamic": false,
281
+ "observer": "minmax",
 
 
282
  "observer_kwargs": {},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  "actorder": null,
284
+ "block_structure": null
285
+ },
286
+ "input_activations": {
287
+ "num_bits": 8,
288
+ "type": "float",
 
 
 
289
  "symmetric": true,
290
+ "strategy": "token",
291
+ "group_size": null,
292
+ "dynamic": true,
293
+ "observer": null,
294
+ "observer_kwargs": {},
295
+ "actorder": null,
296
+ "block_structure": null
297
+ },
298
+ "output_activations": null
299
  }
300
  },
301
  "format": "mixed-precision",
model-vision.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fc7bf6ee790c68f9a106143d040bc096793cd298ff00cad4d7691840caaf1c9a
3
- size 346784336
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:06410afac298f1d1efadbbd34855e5233180d1c37faae662f3449ef7c4ff24ec
3
+ size 466737968
model.safetensors.index.json CHANGED
The diff for this file is too large to render. See raw diff