Repository navigation
fix(personaplex): preserve Half embedding additions - #1781
Closed
chaofengw-nv wants to merge 1 commit into
Closed
chaofengw-nv wants to merge 1 commit into
chaofengw-nv wants to merge 1 commit into
Conversation
Sum audio embeddings before text and round every FP16 addition as the Native temporal input does. Keep the existing FP32 path and infer the temporal base dtype from the engine cache contract. Add host-only rounding and summation regressions. This fixes an input defect; complete audio parity still requires separate validation. Refs: NVIDIA#1778 Signed-off-by: chaofengw <chaofengw@nvidia.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
This was referenced Oct 17, 2026
chaofengw-nv
added a commit
to chaofengw-nv/TensorRT-Model-Connect-fork
that referenced
this pull request
Oct 20, 2026
Sum audio embeddings before text and round each addition to Half for Half temporal engines. Closes NVIDIA#1778 Refs NVIDIA#1781 Signed-off-by: chaofengw <chaofengw@nvidia.com>
3 of 11 tasks
Collaborator
Author
chaofengw-nv
added a commit
to chaofengw-nv/TensorRT-Model-Connect-fork
that referenced
this pull request
Oct 21, 2026
Sum audio embeddings before text and round each addition to Half for Half temporal engines. Closes NVIDIA#1778 Refs NVIDIA#1781 Signed-off-by: chaofengw <chaofengw@nvidia.com>
chaofengw-nv
added a commit
that referenced
this pull request
Oct 21, 2026
* fix(personaplex): decode with the FP32 Mimi codec Build the Mimi decoder in FP32, matching the encoder and native codec for every language-model precision. Closes #1750 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): keep RMSNorm epsilon in FP32 Create RMSNorm epsilon in FP32 so the 1e-8 value survives Half network construction. Closes #1779 Refs #1780 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): preserve Half embedding additions Sum audio embeddings before text and round each addition to Half for Half temporal engines. Closes #1778 Refs #1781 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): round the FP16 depth input like the reference Round depth projection weights, inputs, projection output and token embedding additions at the reference Half boundaries. Closes #1788 Refs #1789 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): preserve reference RoPE precision Construct RoPE angles and rotation in FP32, then restore the input dtype across the family decoder variants. Closes #1790 Refs #1791 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): round the SwiGLU gate product once Evaluate SiLU and its gate product in FP32, casting the combined result to the projection dtype once. Closes #1793 Refs #1794 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): build the FP16 profile with a Half core Remove component-promotion selectors from the primary FP16 manifest. Preserve the declared BF16 E2E reference and all existing thresholds. Refs #1786 Refs #1795 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): preserve residual input rounding Preserve rounded branch outputs before residual addition across the family decoder variants. Closes #1796 Refs #1797 Signed-off-by: chaofengw <chaofengw@nvidia.com> * fix(personaplex): store RMSNorm weights in the model dtype Round RMSNorm scale weights to the model dtype before the FP32 normalization computation. Closes #1799 Refs #1800 Signed-off-by: chaofengw <chaofengw@nvidia.com> --------- Signed-off-by: chaofengw <chaofengw@nvidia.com>
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.
Background
Fixes #1778. Native FP16 PersonaPlex adds audio codebook embeddings in order, then text, rounding each addition to Half. The runtime instead adds text first in FP32 and casts only the final sum. Identical token histories therefore produce different temporal inputs before any transformer computation.
Exit Criteria
Implementation
Select Half summation from the temporal engine's base cache dtype. Per-layer FP32 promotion retains this base cache contract. Use CUDA's host-only round-to-nearest-even Half conversions for each embedding value and addition; no GPU kernel or CUDA-runtime call is introduced. Both dual-stream and text-prompt frames use the same family-owned helper. Add the CUDA header include path only to the affected CPU test target.
Change categories
Validation
Commands and Results
CUDA_VISIBLE_DEVICESempty: compilefamilies/personaplex/tests/cpp/test_speech_temporal_embed_plan.cppusingg++ -std=c++17 -Wall -Wextra -Wpedantic -I. -isystem /usr/local/cuda/include, then execute the resulting binary: passed without linking cudart or executing GPU work. Covers Half ties/subnormals/overflow, rounding after every addition, audio-before-text cancellation, the preserved FP32 sum, and existing embedding/logit cases.[1, 0.000400066375732421875, -1]return zero after this change; the original FP32-sum path returns0.000400066375732421875before its final cast, reproducing the defect.python -m tools.model_ci validate,python -m tools.test_impact --base github/main --validate,git diff --check, and clang-format 22 on changed C++ files: passed.Hardware, Environment, and Revisions
a8b1160451353a47a66883eae832d8ed4e05dc87; base9643800b3b5a951382c87ae1ebfbbeb24b1a8090.nvidia/personaplex-7b-v1at revisionfdaf4090. The summation helper and C++ regression are byte-identical to the ones used in the diagnosis pipeline. The focused PR uses the first base-cache dtype instead of checking every identically typed base cache.Not Run / Remaining Gaps
This PR alone has not passed full audio-parity acceptance, multi-GPU execution, or protected exact-head premerge. The capture pipeline includes separate resampler/Mimi fixes and does not qualify this entire PR head as an end-to-end pass. Remaining temporal/depth differences are being investigated without changing quality gates.
Contributor Self-Review
Reviewed the six-file family-local diff, prompt and ordinary-frame call sites, base-cache dtype contract, host-only Half conversions, unchanged FP32 path, test assertions, DCO, and the distinction between component proof and audio acceptance.
Notes For Future Readers
Risk level
Every FP16 temporal input now follows Native's arithmetic boundaries. Token trajectories can change even though token IDs and checkpoint weights are unchanged.