-
Notifications
You must be signed in to change notification settings - Fork 696
Update turbomind modeling infrastructure #4557
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
15692e3
990f70b
09a788f
a1740fb
b8fabe7
c39b5bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -527,7 +527,7 @@ def __str__(self): | |||||
| return f'text={self.text}\n{self._format_none_text_fields()}' | ||||||
|
|
||||||
| def __repr__(self): | ||||||
| return f'text={self.text!r}\n{self._format_none_text_fields()}' | ||||||
| return f'text={self.text}\n{self._format_none_text_fields()}' | ||||||
|
||||||
| return f'text={self.text}\n{self._format_none_text_fields()}' | |
| return f'{self.__class__.__name__}(text={self.text!r}\n{self._format_none_text_fields()})' |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # Copyright (c) OpenMMLab. All rights reserved. | ||
| """Builder sub-package — spec-driven module loading for TurboMind.""" | ||
| from __future__ import annotations | ||
|
|
||
| from ._base import Builder, BuiltModule, SplitSide, TextModelBuilder, _act_type_id, _cpp_dtype, _torch_dtype_to_cpp | ||
| from .attention import AttentionBuilder | ||
| from .decoder_layer import DecoderLayerBuilder, DecoderLayerConfig | ||
| from .deltanet import DeltaNetBuilder | ||
| from .ffn import FfnBuilder, fuse_w1w3 | ||
| from .mla import MLABuilder | ||
| from .module_list import ModuleListBuilder, ModuleListConfig | ||
| from .moe import MoeBuilder | ||
| from .norm import NormBuilder, make_norm_config | ||
|
|
||
| __all__ = [ | ||
| # Base | ||
| 'Builder', 'BuiltModule', 'TextModelBuilder', 'SplitSide', | ||
| '_cpp_dtype', '_act_type_id', '_torch_dtype_to_cpp', | ||
| # Builders | ||
| 'AttentionBuilder', 'FfnBuilder', 'MoeBuilder', | ||
| 'DeltaNetBuilder', 'MLABuilder', | ||
| 'DecoderLayerBuilder', 'ModuleListBuilder', | ||
| 'NormBuilder', | ||
| # Primitive config wrappers | ||
| 'make_norm_config', | ||
| # C++ config re-exports | ||
| 'DecoderLayerConfig', 'ModuleListConfig', | ||
| # Helper functions | ||
| 'fuse_w1w3', | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
except ImportError:block now immediately re-raises, making the subsequent fallback (is_turbomind_installed = Falseand the warning path) unreachable. Either remove theraiseto preserve the intended fallback-to-pytorch behavior, or remove the dead code and let the ImportError propagate consistently.