Repository navigation
Conversation
Signed-off-by: JiaxinD <djx2048@gmail.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 |
Contributor
Author
|
@yifeif-nv Community CPU, Stable and Dev pass for e51a904, including all six official FP16/BF16 cases. Please trigger protected CI for this head. |
This branch has not been deployed
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
DistilBERT, ELECTRA and MPNet accept BF16 builds, but their family-owned encoder builders store embedding and mask constants in FP16. This loses BF16-range values before TensorRT sees them and mixes FP16 constants with BF16 tensors in strongly typed mask arithmetic. Reproduced against current upstream; no originating issue.
Exit Criteria
Preserve BF16 constant range and requested graph types, keep the FP32 output boundary, and cover each family's existing official checkpoint with an unchanged FP32 CLS oracle. The scoped official FP16/BF16 engine/reference checks now pass in public Dev CI.
Implementation
Changes are confined to
families/distilbert/**,families/electra/**andfamilies/mpnet/**; no cross-family imports or shared implementation. No public API, ABI, dependency, bundle-schema or runtime-source change.Change categories
Validation
Commands and Results
python -m pytest families/{distilbert,electra,mpnet}/tests/test_bf16_constants.py -q -p no:cacheproviderpython -m pytest families/distilbert/tests families/electra/tests families/mpnet/tests tools/tests/test_architecture.py tools/tests/test_family_impact.py tools/tests/test_pr_metadata.py tools/tests/test_public_source_hygiene.py -q -p no:cacheproviderpython -m tools.model_ci validate;python tools/test_impact.py --validate;python -m tools.legal_headers --check;git diff --checkHardware, Environment, and Revisions
Head
e51a9041d33cd9e613dabb61659fac1f92dd158a; upstream2674c813ad927e7cccdeb00347d4bae61cb4c668. Linux CPU/Python3.12, NumPy/ml_dtypes; focused tests also ran on Windows/Python3.13. Public Dev ran mergeca4b6be7, whose second parent is this head.distilbert/distilbert-base-uncased12040accade4e8a0f71eabdb258fecc2e7e948begoogle/electra-base-discriminator1ae76a97c7e84a4e640876a07453fccd636f0667sentence-transformers/all-mpnet-base-v2e8c3b32edf5434bc2275fc9bab85f82640a19130Not Run / Remaining Gaps
No local GPU execution, TP/multicard, performance or peak-memory proof. Radix authentication remains expired. Public Dev validates the scoped engine/reference cases; the CPU interpreter alone does not. Existing builder formatting fails on both baseline and head; required Ruff checks pass, without unrelated reformatting.
Contributor Self-Review
Independent review found no code blocker.
Notes For Future Readers
Rebuild BF16 bundles. Official model configs and Apache-2.0 model metadata were inspected; no weights or third-party implementation were added. Raw CLS features are not normalized sentence embeddings. Existing GELU dispatch is unchanged, tracked separately in #1801. Draft now remains only for the existing Ready-capacity restriction.
Risk level
BF16 constant storage and graph casts change across three independently owned families; scoped public Dev qualification passes, broader hardware and performance remain unqualified.