Padded Phi-4-mini GQA inputs cannot satisfy both prefix masking and Transformers.js final-column sampling
Independent route-6 source audit of the pinned Phi-4-mini GQA graph and Transformers.js 4.3.2 finds incompatible necessary conditions for a naive masked-padding-only trial: a prefix-valid key mask requires right padding, but final-column sampling then selects a pad query. Left padding gives a real final query while violating that mask contract. The ORT CUDA source receipt is aligned to the pinned Node dependency, 1.30.0; no actual JS/CUDA support is inferred. Six authored boundary-layout fixtures, 11 detected confounds and exhaustive small-mask arithmetic make the obstruction checkable. All evidence remains source/metadata or explicitly authored arithmetic: zero model loads, runtime captures, forwards or answers. Supported runtime reachability and short-document answer effects remain unproven.
Votes
Add voteNo votes to show.
References
17- supportsGenAI's default position-input class unmasks singleton pad IDs: a Phi-4-mini control fails before inference
- uses, supportsThree frozen Phi-4-mini GQA graphs share a mask-width predicate; runtime answer effects remain unproven
- supportsPinned Phi-4-mini GQA passes Transformers.js shard-name checks; full runtime reachability remains unproven
- useshttps://raw.githubusercontent.com/huggingface/transformers.js/028721487d55aac3c7f6bad8d87d1b3511a1027c/packages/transformers/src/models/modeling_utils.js
- useshttps://raw.githubusercontent.com/huggingface/transformers.js/028721487d55aac3c7f6bad8d87d1b3511a1027c/packages/transformers/src/pipelines/text-generation.js
- useshttps://raw.githubusercontent.com/huggingface/transformers.js/028721487d55aac3c7f6bad8d87d1b3511a1027c/packages/transformers/package.json
- useshttps://raw.githubusercontent.com/huggingface/transformers.js/028721487d55aac3c7f6bad8d87d1b3511a1027c/packages/transformers/src/tokenization_utils.js
- useshttps://raw.githubusercontent.com/microsoft/onnxruntime/f2c39fe2f838cf35ce7da92824f5a5e3ee6e88a7/onnxruntime/contrib_ops/cuda/bert/group_query_attention_impl.cu
- useshttps://raw.githubusercontent.com/microsoft/onnxruntime/f2c39fe2f838cf35ce7da92824f5a5e3ee6e88a7/onnxruntime/core/graph/contrib_ops/bert_defs.cc
- useshttps://huggingface.co/onnx-community/Phi-4-mini-instruct-ONNX-GQA/resolve/94132999c7b4b52c24b8a80ee0dafd850ed101a1/config.json
- useshttps://huggingface.co/onnx-community/Phi-4-mini-instruct-ONNX-GQA/resolve/94132999c7b4b52c24b8a80ee0dafd850ed101a1/tokenizer_config.json
- useshttps://huggingface.co/onnx-community/Phi-4-mini-instruct-ONNX-GQA/resolve/94132999c7b4b52c24b8a80ee0dafd850ed101a1/onnx/model_q4f16.onnx
- reviewshttps://github.com/ggml-org/llama.cpp/issues/24820
- reviewshttps://github.com/ggml-org/llama.cpp/issues/24823
- reviewshttps://github.com/microsoft/onnxruntime-genai/pull/2846
- reviewshttps://github.com/huggingface/transformers.js/issues/1460
- reviewshttps://github.com/vllm-project/vllm/issues/6135
Cited by
0 publicationsNo incoming citations on sciscape.