You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 939f73d
Browse filesBrowse the repository at this point in the historyBrowse files
## Summary
- add the Qwen3.8 Flash-Next/Qwen4Exp three-model image-language package
(`decoder`, `vision_encoder`, `embedding`)
- reuse the source-identical no-DeepStack Qwen3/Qwen3.5 vision tower
with a 2560-wide merger
- preserve independent lexical `ple_input_ids`, fused `inputs_embeds`,
four-channel text + M-RoPE positions, and every heterogeneous
recurrent/KV/QSA/PLE state
- cast processor float32 patches once at the BF16 vision boundary
- emit explicit `mobius.state_manifest` and
`mobius.unsupported_token_ids` contracts for direct ONNX Runtime
orchestration
## Bounded multimodal streaming
Both `qwen4_exp` and `qwen4_exp_text` use the bounded safetensors path;
the eager `_download_weights` route is unreachable. One shard index
validates config-derived deterministic PLE buffers and plans decoder,
embedding, and vision bindings. Each graph is cloned, lazily bound, and
initializer-folded in isolation; the package is updated only after every
staged component succeeds. Missing tensors, corrupt PLE hash buffers, or
fold failures leave the original package untouched.
Parameter payloads remain `LazyTensor`s and no source state dict is
retained. The approximately 95 GiB PLE table is allocated once only when
materialized/serialized and populated one checkpoint shard at a time.
Loader accounting reports model/initializer/lazy counts, deterministic
bytes validated eagerly, and zero retained source tensors.
## Enforced image-only boundary
The checkpoint's source video token is validated, then removed from
normalized runtime metadata. Explicit configs requesting video
capability fail closed and the embedding graph exposes no
`video_features` input. It sanitizes any source video token before
vocabulary lookup, computes a runtime `has_video`, and reshapes one zero
element to `[1 + has_video]`. Valid requests reduce/add zero; video
requests demand two elements and fail ONNX Reshape's element-count
invariant before an EP executes. ORT CUDA uses the shared
`ReshapeHelper` for this check (`onnxruntime@b1f76d58`,
`cuda/tensor/reshape.h`), avoiding CUDA Gather's out-of-range zero-fill
behavior. Optimized CPU is exercised locally and the same test executes
CUDA when available; processor-native mixed input also fails through the
guard.
## Runtime workflow boundary
onnxruntime-genai and the current ONNX GenAI workflow schema cannot
represent Qwen4Exp's `ple_input_ids`, four-axis positions, and
heterogeneous state membership. Both exporters reject before writing
artifacts. ONNX GenAI detection checks package config, explicit config,
and the structural decoder ABI, so a non-Qwen override cannot bypass
preflight or modify an existing output directory. Direct ONNX Runtime
users consume `mobius.state_manifest` instead.
## Source pins
- `Qwen/Qwen3.8-Flash-Next@f5d08274bafd880402bd16f5e3e6c514136ec06c`
- `huggingface/transformers@598d8ba8baaec7fec5a22da0e2844c7bf4ea20e1`
## Final-base rebase
Lower-layer PR #656 was squash-merged to `main` as `8f902ac2`. This
branch replays only #657's multimodal work onto that commit; no
pre-squash lower-layer or GGUF implementation files remain in the PR
diff.
## Validation
- final Qwen4 loader/multimodal/synthetic suite: 47 passed, 6 skipped
- full runtime exporter suites: 263 passed
- pinned HuggingFace image parity plus real image/video boundary tests:
3 passed
- post-rebase GGUF report/shard/runtime regression suite: 831 passed
- Qwen4 component inspection and review-thread regressions: passed
- pinned lintrunner format + lint: clean
- independent GPT-5.6 Sol CUDA-guard rereview: no findings
## Waivers
- **L4/L5 real-weight golden:** the 512-expert checkpoint requires a
large GPU; the immutable YAML case records the CI skip.
- **Released runtime workflows:** ORT GenAI and ONNX GenAI metadata
export fail closed as described above.
- **Full checkpoint CUDA generation:** checkpoint scale makes this
impractical in this session; CUDA's shared Reshape validation is
source-pinned and the guard regression runs on CUDA whenever that EP is
available.
This PR targets `main`, is intentionally non-draft, and must not be
merged by this session.
---------
Signed-off-by: Justin Chu <[email protected]>
Co-authored-by: Copilot App <[email protected]>
0 commit comments