-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[None][feat] EXAONE-4.5 Support #12873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
b885c26
EXAONE-4.5 support
yechank-nvidia 10f030e
address model_type issue
yechank-nvidia 285ca1d
transformer 5.0.0 compatibility
yechank-nvidia 88dd544
remove print
yechank-nvidia 2f93d54
optimize Qwen2.5 Vision Encoder
yechank-nvidia e2bb136
add EXAONE-4.5 to the README.md
yechank-nvidia 16bd516
add unittest
yechank-nvidia 29c8c16
update PLACEHOLDERS
yechank-nvidia 0de69a1
modify Qwen3-VL Vision Encoder
yechank-nvidia 45aa566
refine test
yechank-nvidia e48e116
fix weight loading
yechank-nvidia c3c4951
[None][feat] Bring EXAONE 4.5 + VLM tests up to transformers 5.8
yechank-nvidia 0589177
[None][doc] Add EXAONE 4.5 to multimodal support matrix
yechank-nvidia a38102b
[None][feat] Make EXAONE 4.5 config loading work on transformers 5.3
yechank-nvidia 987ec30
[None][refactor] Prefer HF's Exaone4_5 config classes when available
yechank-nvidia 8e11f7c
[None][refactor] Address EXAONE 4.5 PR review feedback
yechank-nvidia a99b949
[None][refactor] Drop redundant tie_word_embeddings overrides and inl…
yechank-nvidia cc861a2
[None][refactor] Address EXAONE 4.5 PR review feedback (round 2)
yechank-nvidia 74d5417
[None][test] Extend EXAONE 4.5 unit test modality coverage
yechank-nvidia 981b1e6
[None][fix] Mirror Qwen3-VL max_position_embeddings from text_config
yechank-nvidia 30819ae
[None][refactor] Add NVIDIA copyright header to exaone4_5_weight_mapper
yechank-nvidia 36d9309
[None][test] Order disable_fuse_rope scenario last in Qwen-VL test su…
yechank-nvidia File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
38 changes: 38 additions & 0 deletions
38
tensorrt_llm/_torch/models/checkpoints/hf/exaone4_5_weight_mapper.py
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| from tensorrt_llm._torch.models.checkpoints.base_weight_loader import ConsumableWeightsDict | ||
| from tensorrt_llm._torch.models.checkpoints.hf.weight_mapper import HfWeightMapper | ||
| from tensorrt_llm._torch.models.modeling_utils import register_mapper | ||
|
|
||
|
|
||
| @register_mapper("HF", "Exaone4_5_ForConditionalGeneration") | ||
| class Exaone4_5HfWeightMapper(HfWeightMapper): | ||
| def preprocess_weights(self, weights: dict): | ||
| """Rename HF checkpoint prefixes; supports plain dict and ConsumableWeightsDict.""" | ||
| is_consumable = isinstance(weights, ConsumableWeightsDict) | ||
| renamed = {} | ||
| for key, value in weights.items(): | ||
| if key.startswith("model.visual."): | ||
| new_key = key.replace("model.visual.", "visual.") | ||
| renamed[new_key] = value | ||
| elif key.startswith("model.language_model."): | ||
| new_key = key.replace("model.language_model.", "model.") | ||
| renamed[new_key] = value | ||
| else: | ||
| renamed[key] = value | ||
| if is_consumable: | ||
| return ConsumableWeightsDict(renamed) | ||
| return renamed |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.