Skip to content

feat(qwen): migrate semantic tasks and extend embeddings - #1558

Draft
JiaxinD wants to merge 12 commits into
NVIDIA:mainfrom
JiaxinD:feat/qwen-task-sdk
Draft

JiaxinD wants to merge 12 commits into
NVIDIA:mainfrom
JiaxinD:feat/qwen-task-sdk

Conversation

@JiaxinD

@JiaxinD JiaxinD commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Background

Qwen needs semantic TextContinuation support in #1498 while preserving streaming and generation capacity. Its embedding comparator also hardcodes the 0.6B output dimension. The integration retains upstream's native conversation history support.

Exit Criteria

Expose typed text/token-ID continuation, preserve streaming and conversation behavior, validate published embedding profiles and reject invalid inputs. Larger embedding execution remains outside this PR's qualification matrix.

Implementation

  • Bind continuation with family-owned Config and an exclusive generation lease. TP models do not advertise streaming.
  • Preserve cancellation, ChatML, vocabulary checks, zero-token continuation and owned C11/C++17 results.
  • Retain upstream conversation bindings and history rendering. Share Qwen configuration validation, exclude single-turn template switches from conversations and retain their positive token cap. Continuation and streaming retain zero-token support.
  • Accept official 4B/8B embedding topology and dimensions 2560/4096 in CPU contracts and the reference comparator.
  • Keep unqualified 4B/8B E2E manifests removed per maintainer feedback. Retain pinned CPU fixtures and rejection tests.
  • Preserve upstream benchmark-profile removals, S1 Mini ownership and core provenance validation. Reject prebuilt bundles advertising legacy text_generation; pass system prompts unchanged to text SDK consumers while token-ID inputs bypass preprocessing.

Changes remain under families/qwen. Rebuild legacy generation bundles for the semantic primary task. Shared API/ABI definitions and bundle format are unchanged by this PR. The upstream merge preserves published history.

Change categories

  • Model or runtime behavior
  • Public API
  • ABI
  • Bundle or artifact format
  • Dependencies
  • Documentation only
  • CI or developer tooling

Validation

Commands and Results

Executed check Result
pytest families/qwen/tests core/builder/tests/test_model_support.py -q 118 passed, 16 skipped
Architecture, impact, metadata and public source hygiene suites 99 passed
Fresh public SDK/API/loader/bundle sources and actual family CMake targets, selected CTest Seven native CPU contracts passed; C11/C++17 consumers compiled
Conversation integration regression on mechanical merge, then repaired parser Task pipeline failed before repair; all seven contracts passed after repair
Model inventory, impact, legal headers, clang-format and git diff --check Passed

Conversation tests verify binding/schema, exact once-only history rendering and pre-engine rejection boundaries. CPU engine/state doubles do not establish generated output correctness.

Hardware, Environment, and Revisions

Head 31f1b53d30a5afc315f0d0ceda2de8a9b78a071b integrates NVIDIA/main 8194f406fb0f3b89d81d719566852e71f1a34f16 into prior head 1404788d78fddc82adebe58dc9090fb6e4aa6185. Windows Python3.13 CPU, WSL Ubuntu GCC13.3, C11/C++17 and CUDA12.6 headers/runtime; CUDA_VISIBLE_DEVICES empty. Pinned fixtures: Qwen/Qwen3-Embedding-4B@5cf2132abc99cad020ac570b19d031efec650f2b and Qwen/Qwen3-Embedding-8B@1d8ad4ca9b3dd8059ad90a75d4983776a23d44af.

Not Run / Remaining Gaps

Current-head TensorRT/GPU inference, protected CI, larger embeddings, FP8/TP4 and performance are unvalidated. Radix authentication expired. Earlier head 1404788d passed public CPU/Stable/Dev; those results do not qualify this merge. Fifteen Python skips are unselected GPU E2Es; one Windows native build probe is skipped, with native CMake validation separately completed in WSL.

Contributor Self-Review

  • I have completed a self-review of this change.

Reviewed provenance/task boundaries, conversation integration, configuration, streaming lifecycle and consumers.

Notes For Future Readers

S1 Mini criteria and checkpoint pins are preserved. Removed manifests can return after qualification. Ready conversion remains subject to the three-PR author capacity policy; protected execution remains required.

Risk level

  • Low
  • Medium
  • High

Primary-task and streaming integration need protected execution; CPU tests do not establish GPU parity or performance equivalence.

Expose Qwen generation through the semantic TextContinuation contract while retaining the existing graph, sampler, native-KV and distributed paths. Move family support and qualification manifests to the new task, and add config and SDK consumer coverage. Rebuilt bundles are required for the new primary task.
@coderabbitai

coderabbitai Bot commented Sep 30, 2026 •

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

I, JiaxinD <djx2048@gmail.com>, hereby add my Signed-off-by to this commit: 130e2cc

Cover the semantic primary Task across all declared Qwen model types.

Signed-off-by: JiaxinD <djx2048@gmail.com>
Signed-off-by: JiaxinD <djx2048@gmail.com>
Signed-off-by: JiaxinD <djx2048@gmail.com>
Signed-off-by: JiaxinD <djx2048@gmail.com>
Accept the pinned 4B and 8B sentence-transformers configurations while preserving unknown-topology rejection. Add optional native E2E cases and compare embedding dimensions against the reference configuration.

Signed-off-by: JiaxinD <djx2048@gmail.com>
@JiaxinD JiaxinD changed the title refactor(qwen): migrate generation to TextContinuation Task feat(qwen): migrate semantic tasks and extend embeddings Oct 6, 2026
@JiaxinD

JiaxinD commented Oct 7, 2026

Copy link
Copy Markdown
Contributor Author

@yifeif-nv Could you rerun Dev Community CI for #1558 (eba91686) and #1583 (27214f4c) after #1595? Their previous attempts stopped during GPU provisioning before model tests.
The manual qualification of #1413's current head passed; these two unchanged heads still need that validation.

@yifeif-nv yifeif-nv added the run-internal-ci Maintainer-approved dispatch to internal CI label Oct 7, 2026
@github-actions github-actions Bot removed the run-internal-ci Maintainer-approved dispatch to internal CI label Oct 7, 2026
@yifeif-nv

Copy link
Copy Markdown
Collaborator

@yifeif-nv Could you rerun Dev Community CI for #1558 (eba91686) and #1583 (27214f4c) after #1595? Their previous attempts stopped during GPU provisioning before model tests. The manual qualification of #1413's current head passed; these two unchanged heads still need that validation.

Hey, I've triggered the internal CI for you. The dev CI is the community GPU CI that is still in development. It is not gating the merging. So once the internal CI is passed, I will merge the PR. Thanks.

@JiaxinD

JiaxinD commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

@yifeif-nv Thanks for triggering Internal CI. It failed on eba91686 with details withheld; could you share the failing test name and a sanitized error excerpt so I can fix it?

Preserve upstream streaming, cancellation, generation leases and KV-capacity checks while retaining semantic Task configuration and bounded token-ID inputs. Keep ChatML system prompts, zero-token continuations and family SDK consumer build dependencies, with native contract coverage.

Signed-off-by: JiaxinD <djx2048@gmail.com>
Signed-off-by: JiaxinD <djx2048@gmail.com>
@yifeif-nv

Copy link
Copy Markdown
Collaborator

Hey @JiaxinD I think we'll need to remove
families/qwen/tests/manifests/qwen3-embedding-4b.json
families/qwen/tests/manifests/qwen3-embedding-8b.json

for this PR. Then you can locally verify it via

python -m pytest \
  families/qwen/tests/test_embedding_profiles.py \
  families/qwen/tests/test_embedding_e2e_dimensions.py -q

python -m tools.model_ci validate
python tools/test_impact.py --validate

This is due to the private CI require any ckpt declared to be tested in L0 and both ckpt are current declared as premerge = false. We can add in the test in a later time

Merge NVIDIA/main while preserving semantic continuation and S1 Mini ownership. Remove the unqualified larger embedding manifests requested by the maintainer, retain their CPU contracts, and propagate system prompts unchanged through text SDK checks.

Signed-off-by: JiaxinD <djx2048@gmail.com>
@JiaxinD

JiaxinD commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Removed the 4B/8B manifests and integrated upstream at cb6291bb. CPU profile coverage remains; 170 Python tests and seven native contracts passed locally.
@yifeif-nv Could you rerun Internal CI for this head once Community CPU completes?

Signed-off-by: JiaxinD <djx2048@gmail.com>
@JiaxinD

JiaxinD commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

@yifeif-nv Community CPU, Stable and Dev pass on bc52bbfd. Could you trigger Internal CI for this current head?

Signed-off-by: JiaxinD <djx2048@gmail.com>
@JiaxinD

JiaxinD commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

@yifeif-nv Community CPU, Stable and Dev passed for 1404788. Please trigger protected CI for this head.

Integrate current upstream conversation history with the family-owned continuation configuration and retain separate template and token-cap constraints.

Signed-off-by: JiaxinD <djx2048@gmail.com>
@JiaxinD

JiaxinD commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Integrated upstream conversation history in 31f1b53, retaining the family-owned Config and streaming lease. Seven native CPU contracts and 118 Python tests passed; GPU/protected qualification remains pending.

@JiaxinD

JiaxinD commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@yifeif-nv Community CPU passed for 31f1b53. Please trigger protected CI for this head.

@chaofengw-nv chaofengw-nv added the run-internal-ci Maintainer-approved dispatch to internal CI label Oct 21, 2026
@github-actions github-actions Bot removed the run-internal-ci Maintainer-approved dispatch to internal CI label Oct 21, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants