Repository navigation
[None][test] Add coverage for Glm5NextForConditionalGeneration - #21500
StanleySun639 merged 2 commits into
Conversation
Signed-off-by: Stanley Sun <[email protected]>
2c47565 to
c07cad5
Compare
|
/bot run |
|
No actionable comments were generated in the recent review. WalkthroughAdds a CUDA regression test for the registered GLM5 Next VLM. The test checks text-forward output properties and compares logits from token IDs, equivalent embeddings, changed prefix tokens, and a direct norm-plus-LM-head path. ChangesGLM5-next forwarding test
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Merge Risk:
|
|
PR_Github #82155 [ run ] triggered by Bot. Commit: |
|
PR_Github #82155 [ run ] completed with state |
…e MLA The test builds a CUDA model and runs the BF16, 64-head sparse attention path, which dispatches to FlashMLA. Reuse the capability guard that test_sparse_prefill_continuation_preserves_partial_pools already applies to the same path so CPU-only and non-Blackwell runs skip cleanly. Signed-off-by: Stanley Sun <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
/bot run |
|
PR_Github #82220 [ run ] triggered by Bot. Commit: |
|
PR_Github #82220 [ run ] completed with state |
|
Automatically added "ci: full pre-merge approved" because this PR has satisfied the required GitHub review approvals. Unresolved review conversations and other required checks remain independent merge requirements. |
Dev Engineer Review
The change adds a CUDA regression test for the registered GLM5 Next conditional-generation path. It checks model registration, sparse decoder construction, logits properties, embedding-input equivalence, context sensitivity, and the effect of the decoder. The test skips unless CUDA is available and the device has compute capability 10. No source or configuration changes are reported. Review finding counts are unavailable. The PR description reports successful CI runs; test execution results are not independently verified here.
QA Engineer Review
tests/unittest/_torch/modeling/test_glm5_next_contracts.pyaddstest_registered_vlm_text_forward. The test covers registered-model selection and text-forward behavior with synthetic sparse-attention metadata. The file is listed in the CI test listtests/integration/test_lists/test-db/l0_b200.yml. No manual-QA list entry was found. Coverage verdict: sufficient for the stated text-forward regression scope; the test requires Blackwell-class CUDA hardware.Per-File QA Perspective
tests/unittest/_torch/modeling/test_glm5_next_contracts.py: Covers registered-model selection, sparse decoder construction, logits properties, embedding equivalence, context sensitivity, and decoder-path behavior. The file is listed intests/integration/test_lists/test-db/l0_b200.yml; the test skips on systems without CUDA capability 10.Description
Adds unit-test coverage for existing supported model architectures.
tests/unittest/_torch/modeling/test_glm5_next_contracts.py::test_registered_vlm_text_forwardverifies: The exact conditional-generation registration resolves to Glm5NextVLM, and its constructed language model contains the requested real sparse decoder layer. Every top-level forward returns finite torch.float32 context logits with shape (13, 32). Caller-supplied embeddings reproduce token-ID logits even when the accompanying token IDs are different. Changing preceding tokens while retaining the final token changes its output logits, demonstrating contextual decoder computation. Forward logits differ from the separately computed embedding-to-final-norm-to-LM-head baseline that omits the decoder.Test Coverage
unittest/_torch/modeling/test_glm5_next_contracts.py::test_registered_vlm_text_forwardSUCCESSGap Fixer Validation
461580bcd5adPR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
If PR introduces API changes, an appropriate PR label is added - either
api-compatibleorapi-breaking. Forapi-breaking, includeBREAKINGin the PR title.Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
Update tava architecture diagram if there is a significant design change in PR.
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
To see a list of available CI bot commands, please comment
/bot help.