Repository navigation
[executorch][native-ggml] Reserve each context's compute buffers once - #25517
Open
digantdesai wants to merge 1 commit into
Open
digantdesai wants to merge 1 commit into
digantdesai wants to merge 1 commit into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/25517
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 14ac04a with merge base 8c3f75d ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This was referenced Nov 22, 2026
This was referenced Nov 22, 2026
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…attention Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * __->__ #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 The HF exporter routes attention calls that pass a `softcap` to an eager attention written with 4-D tensors. transformers applies Gemma 2's attention logit softcapping only in its eager attention; its SDPA path silently ignores `softcap`, so softcapped models exported with the wrong numerics. Authored with assistance from Claude and Codex. Differential Revision: D131566104 Pull Request resolved: #25469
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…HF config Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * __->__ #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 Without the checkpoint's own weights, `_load` builds the causal LM of `config.get_text_config()`, the text-only path the multimodal model runs. A GGUF of a vision-language model's text decoder, exported with the model's multimodal config (e.g. `Gemma3ForConditionalGeneration`), failed to load because `from_config` built the whole multimodal model. Authored with assistance from Claude and Codex. Differential Revision: D131566106 Pull Request resolved: #25470
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * __->__ #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 `gguf_to_hf`'s key map skips gguf-py's vision and audio encoder tensors with one warning per load, as it skips config-derived tensors like `rope_freqs.weight`; any other unknown tensor still raises. It raised on any GGUF tensor that maps to no parameter, so a GGUF that also carries a multimodal model's encoder could not load its text decoder. Authored with assistance from Claude and Codex. Differential Revision: D131566107 Pull Request resolved: #25471
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * __->__ #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 `export_hf_llm --gguf --dequantize_gguf` exports the same model as `--gguf` with every quantized weight replaced by the float32 tensor eager dequantizes it to. Tied weights stay one constant and `aten.embedding` keeps the quantized export's literals. The two exports then share a graph, up to the quantized export's dequantize nodes, so comparing them separates a weight codec's error from everything else. Authored with assistance from Claude and Codex. Differential Revision: D131566114 Pull Request resolved: #25472
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * __->__ #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 native-vk passes gather `dim + rank` for a negative dim. ET-VK's gather maps `dim` to its WHCN axis as `rank - 1 - dim` without normalizing it, so a negative `dim` (as `torch.gather(x, -1, index)` exports) gathered along the wrong axis with no error. Authored with assistance from Claude and Codex. Differential Revision: D131676062 Pull Request resolved: #25473
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * __->__ #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 native-vk reduces into a keepdim temporary, repacked when its storage or packed dim differs from the output's, and squeezes the reduced dims into the output one at a time, highest first, including a rank-1 reduction over every dim (dim None or []), giving a scalar. ET-VK's texture reductions ignore `keepdim=False` and write a keepdim-shaped result, so native-vk read it with the wrong layout and returned wrong values with no error. Authored with assistance from Claude and Codex. Differential Revision: D131676063 Pull Request resolved: #25474
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…lowering Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * __->__ #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 A `make_dims_non_negative` pass rewrites every dim argument of every scheduled aten op to `dim + rank`, treating a scalar as rank one as ATen does, and rejects symbolic or out-of-range dims. Gather's own normalization goes away, and a scalar's squeeze runs as a copy. ET-VK kernels index dims as given, so a negative dim could select the wrong axis, as gather did. Authored with assistance from Claude and Codex. Differential Revision: D131676065 Pull Request resolved: #25475
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * __->__ #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 native-vk repacks the inputs of an op that reads and writes one packing, such as a reduction, expand or cat, tensor lists included, to its output's packing. Ops that read `self` or bind their inputs like the output keep their own conversions. Layout assignment packs a width-packed op's neighbors along width, which left such an op with inputs in another packing and wrong results with no error. Authored with assistance from Claude and Codex. Differential Revision: D131676066 Pull Request resolved: #25476
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * __->__ #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 A `flatten_linear_batches` pass runs every linear of a static rank-4 input as a rank-3 one on the merged leading dims and views the result back; at batch 1 the two views are redundant but harmless. A dynamic rank-4 input, which native-vk could not resize before either, and a rank-4 input whose output is not rank 4 are refused at load. ET-VK's linear ignores batch dims before -3, so a linear with a leading batch above one returned wrong values with no error. Authored with assistance from Claude and Codex. Differential Revision: D131676068 Pull Request resolved: #25477
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * __->__ #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 native-vk resizes a blitted `_to_copy`'s output to its input's sizes before each copy. ET-VK runs a same-dtype or float/half `_to_copy` as a blit, which has no resize hook, so with a dynamic input the output kept the sizes it was built with and later calls returned the wrong shape. Authored with assistance from Claude and Codex. Differential Revision: D131676069 Pull Request resolved: #25478
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * __->__ #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 native-vk computes log_softmax over a dim of size one as `x - x`, reading x in the output's storage and layout as softmax does. That result is exactly 0 (NaN where x is not finite), but ET-VK's log(sum(exp(x - max))) came out off for large inputs. Authored with assistance from Claude and Codex. Differential Revision: D131676070 Pull Request resolved: #25479
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * __->__ #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 F16 matrix multiplies keep ggml's accumulation by default, as llama.cpp does. For testing, the engine option `cuda_f32_accumulation_for_testing` (a runner flag too) makes linear and matmul with an F16 operand request F32 accumulation on CUDA, at 2-3x prefill and 4x decode GEMM time plus a transient F32 weight copy; HIP and the CPU never ask. cuBLAS multiplies F16 operands in F16 unless asked otherwise, so long F16 sums drift up to a few 1e-2 from eager; the option lets a test check F32 numerics. Authored with assistance from Claude and Codex. Differential Revision: D131791824 Pull Request resolved: #25480
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…ger tests Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * __->__ #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 The README lists six differences from eager that ggml's GPU kernels cause, each with a test that fails on its backend and is skipped there: on CUDA, TF32 F32 GEMMs, F16 GEMMs accumulated in F16 (a testing option requests F32), and fast-math tanh and GELU; on HIP, BF16 GEMMs rounded before the bias; on both, TF32 or XF32 MMF inputs for 4-16 rows and fp16 Q4_1/Q5_1 block-scale products, which the GPU op-sample check allows. The engine keeps ggml's defaults, as llama.cpp does. Authored with assistance from Claude and Codex. Differential Revision: D131791825 Pull Request resolved: #25481
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…eferences Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * __->__ #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 `record` runs the precise and int8-activation references of each call on their own deep copies of the method, and restores its buffers to their initial values after the golden calls. A chain whose calls mutate buffers shared them across the golden, precise and int8-activation passes, so each pass advanced the others' state. And since `ExportedProgram.state_dict` aliases the module's buffers, the state left after the golden calls was saved as the package's initial state. Authored with assistance from Claude and Codex. Differential Revision: D132169801 Pull Request resolved: #25482
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * __->__ #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 The partitioner keeps aten.softplus instead of decomposing it into exp, log1p, gt and where. ggml lowers it to ggml_softplus at beta 1 and threshold 20, and otherwise scales around it and picks x past the threshold by row gather. et-cpu's Reference provider computes it when no linked kernel library has it, and a CPU method that no provider accepts now names the operator. Gated DeltaNet's decay is a softplus, one ggml kernel. PTNs exported before hold it through log1p, which v6.3 parks, so they need re-export to run on ggml. Authored with assistance from Claude and Codex. Differential Revision: D133282462 Pull Request resolved: #25483
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * __->__ #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 New `gdn` op samples whose oracle is transformers' Qwen3.5 code, in f32: the recurrent gated delta rule at a small and at Qwen3.5's shape, and the `Qwen3_5GatedDeltaNet` layer chained over one-token decode calls, its conv and recurrent states buffers that a call at position 0 resets in the graph. GGUF schemes get a fifth scale family for the layer's five linears. Engines had no samples for Gated DeltaNet decode, the linear-attention layer of Qwen3.5. f16 and bf16 are left out: ggml's depthwise convolution is F32-only. Authored with assistance from Claude and Codex. Differential Revision: D132169802 Pull Request resolved: #25484
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…rope Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * __->__ #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 FuseRoPEPass also matches rotary tables of [R, B, T] position rows that are all equal, as transformers' Qwen3.5 M-RoPE builds them for text: trig of every row, the first row's interleaved slots overwritten with the others' (select_scatter, or the where it decomposes to), then cat(row, row). These rotate by the first row's positions; rows that may differ stay decomposed. Qwen3.5 graphs built these tables from cos, sin, where, slice_scatter and strided slices instead of one rope per projection. Authored with assistance from Claude and Codex. Differential Revision: D132884113 Pull Request resolved: #25485
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * __->__ #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 A model whose StaticCache has linear-attention layers (Qwen3.5's gated DeltaNet) exports a static one-token `forward`: their conv and recurrent states become non-persistent buffers that a call at position 0 resets in the graph by multiplying them by 0, and golden samples feed prompts one token per call. transformers' export wrapper registers every layer's keys and values, which these layers lack, and their chunked prefill does not export with a dynamic token count. Authored with assistance from Claude and Codex. Differential Revision: D132169803 Pull Request resolved: #25486
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…ables Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * __->__ #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 Qwen3.5 GGUF files load through transformers' own GGUF tables: its renames, norm offsets, `A_log`, convolution shape and value-head untiling. Quantized tensors keep their blocks where `get_gguf_plan` marks every conversion safe on packed rows; `out_proj`, whose tiled columns cross blocks, is dequantized. The MTP block and, with `--layers`, blocks past the last layer are skipped. transformers maintains these tables per architecture, so export reuses them instead of copying each one; unknown ops or a changed plan API fail loudly. Authored with assistance from Claude and Codex. Differential Revision: D132169804 Pull Request resolved: #25487
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * __->__ #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 A GGUF weight whose columns transformers' tables reorder, Qwen3.5's `linear_attn.out_proj`, now keeps its blocks as stored: `load_gguf` reorders its module's input instead, with a forward pre-hook that exports as a view and a transpose (two axes of the last dim swapped); other reorderings are refused. The reordering crosses quantization blocks, so the previous diff dequantized these weights: 1.33 GB more in a Qwen3.5-9B PTN, 5.19 GB in a 27B one. Authored with assistance from Claude and Codex. Differential Revision: D132169807 Pull Request resolved: #25488
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…DA and HIP Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * __->__ #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 On CUDA and HIP the ggml engine now stores a zero-initialized F32 mutable buffer in F16 when its only uses are row writes and flash attention keys or values that the GPU runs; the PTN still declares an F32 cache. The testing option `f32_gpu_kv_cache_for_testing` (a ggml_ptn_runner flag) keeps these in-graph caches F32; off-graph caches take CacheConfig::kv_dtype. ggml-cuda's flash attention rounds F32 keys and values to F16 on every call, as an F16 `set_rows` does, so results are unchanged at half the cache bytes. Authored with assistance from Claude and Codex. Differential Revision: D132607617 Pull Request resolved: #25489
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * __->__ #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 `FuseRoPEPass` also fuses a rotate-half RoPE whose cos/sin tables broadcast over dim 2, i.e. an apply on [B, T, H, D] before the head transpose, as `native.rope` between two `permute(0, 2, 1, 3)`. Gemma 4 rotates its projections in that layout, so its RoPE stayed as cos, sin, slices, negations and concatenations in every layer. Authored with assistance from Claude and Codex. Differential Revision: D133282463 Pull Request resolved: #25490
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * __->__ #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 Asks ggml whether the GPU runs a cache's flash attention over F16 keys and values with the mask the lowering passes: custom_sdpa always passes one, aten SDPA when it has attn_mask or is_causal. custom_sdpa without an explicit mask attends start_pos + T keys, so it is probed at 1 key as well as the cache's. ggml-cuda runs head size 512 only with a mask, a grouped query and a key count divisible by 256, so the mask-less probe kept gemma-4's global-layer caches in F32: twice their memory, and a conversion to F16 on every call. Authored with assistance from Claude and Codex. Differential Revision: D133282464 Pull Request resolved: #25491
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * __->__ #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 A method's lifted parameters, buffers and constants are now serialized in the order of their FQNs: their placeholder nodes, the method's constants and its mutable buffers. Nothing else in the program moves. Strict export lifts them in the order the model first reads them. Gemma 4 reads its two rotary inv_freq buffers in a set's iteration order, which follows the process's hash seed, so one export in three wrote another PTG. Authored with assistance from Claude and Codex. Differential Revision: D133282465 Pull Request resolved: #25492
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
… default Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * #25494 * __->__ #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 The LLM runner's --kv_dtype takes auto, fp32 or fp16 for every engine; auto, the default, is the engine's choice: the ggml runner stores an off-graph KV cache in F16 when it runs on a GPU and in F32 on the CPU. fp32 also keeps ggml's in-graph caches F32, and fp16 is refused for in-graph caches the engine keeps in F32. llama.cpp stores KV in F16, and so does the ggml engine's in-graph cache on GPUs; the off-graph cache was F32 everywhere, twice the KV bytes per step. Authored with assistance from Claude and Codex. Differential Revision: D133282466 Pull Request resolved: #25493
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…en activation quantization is off Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * #25495 * __->__ #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 The ggml engine's allow_activation_quant_for_weight_only now defaults to true, ggml's int8 activations as in llama.cpp. False no longer rejects weight-only quantized linears: their int4 or GGUF weights load dequantized to F32 and the linears run without activation quantization. Linears whose activations the model quantizes itself keep their blocks. It replaces the f32_weight_only_matmul testing option, which only covered GGUF linears. One knob, debugging off, then covers every matmul of a quantized weight. Authored with assistance from Claude and Codex. Differential Revision: D133282467 Pull Request resolved: #25494
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * #25496 * __->__ #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 An `aten.index.Tensor` that gathers whole matrices of a 3-D constant [E, O, I] by one 1-D index on dim 0, read only by a `bmm` as its weight side with activations [S, I, 1], now lowers with that `bmm` to one `ggml_mul_mat_id`. Experts may be F32, F16, BF16 or packed `gguf:<type>` constants. Other index gathers take slices of any rank by `get_rows`; inner-dim or several index tensors, and packed experts read any other way, are refused. Batched MoE layers export this form, and gathering per token copies S experts. Authored with assistance from Claude and Codex. Differential Revision: D133282468 Pull Request resolved: #25495
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * #25497 * __->__ #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 Let a gguf:<type> packed constant have leading dims, such as an MoE layer's stacked experts [E, rows, cols], read by index.Tensor on that dim. dequantize_gguf keeps its raw blocks' leading dims, so the existing fold stores them as one PackedQuant constant of the stacked logical shape. GGUF stores each expert projection as one tensor, and an engine can multiply each token by its routed experts' blocks directly, so the PTN can keep them packed instead of dequantizing every expert. Authored with assistance from Claude and Codex. Differential Revision: D133282469 Pull Request resolved: #25496
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
…nsor Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * #25498 * __->__ #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 Let ExportableGGUFTensor wrap a 3-D (E, N, row_bytes) blob, gather whole matrices with aten.index.Tensor (dequantize_gguf over the stacked blocks, which the PTN stores packed), and have iter_gguf yield a GGUF's 3-D quantized tensors, such as expert weights, in that form instead of flattened rows. The torchao int4 and intx conversions refuse such stacked matrices. transformers' batched_mm experts index the expert weights by routed id, so an MoE layer can then keep its experts packed through export. Authored with assistance from Claude and Codex. Differential Revision: D133282470 Pull Request resolved: #25497
meta-codesync Bot
pushed a commit
that referenced
this pull request
Nov 23, 2026
Stack from [ghstack](https://github.com/ezyang/ghstack/tree/0.15.0) (oldest at bottom): * #25518 * #25517 * #25516 * #25515 * #25514 * #25513 * #25512 * #25511 * #25510 * #25509 * #25508 * #25507 * #25506 * #25505 * #25504 * #25503 * #25502 * #25501 * #25500 * #25499 * __->__ #25498 * #25497 * #25496 * #25495 * #25494 * #25493 * #25492 * #25491 * #25490 * #25489 * #25488 * #25487 * #25486 * #25485 * #25484 * #25483 * #25482 * #25481 * #25480 * #25479 * #25478 * #25477 * #25476 * #25475 * #25474 * #25473 * #25472 * #25471 * #25470 * #25469 * #25468 * #25467 * #25466 * #25465 * #25464 * #25463 * #25462 * #25461 * #25460 * #25459 * #25458 * #25457 * #25456 * #25455 * #25454 * #25453 * #25452 * #25451 * #25450 * #25449 * #25448 * #25447 * #25446 * #25445 * #25444 * #25443 * #25442 * #25441 * #25440 * #25439 * #25438 Record mixture-of-experts samples from transformers' own modules under its batched_mm experts: Qwen3.5 MoE's experts (top-1, 2 and 8) and sparse block (softmax router, shared expert behind a sigmoid gate) and Gemma 4's router and experts (per-expert scales, GELU-tanh). GGUF schemes quantize stacked weights, every 3-D parameter but a convolution's, and int8_activations quantizes those experts' inputs and gated activations; routers and gates stay float, as in GGUF. These ops back the Qwen3.5 MoE and Gemma 4 MoE models. Authored with assistance from Claude and Codex. Differential Revision: D133282471 Pull Request resolved: #25498
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
A ggml engine context now owns its backends and one scheduler, whose
compute buffers each compile reserves for its method's worst case (largest
inputs, full key extents); every graph is laid out in them. A displaced
cached graph is laid out again from its built sources and allocations, as
ggml's split rewrites sources and its allocator keeps stale addresses.
Each cached graph held its own scheduler and compute buffer, allocated on
first use, so methods and key extents multiplied buffers and allocations.
Authored with assistance from Claude and Codex.
Differential Revision: D133282490