-
Notifications
You must be signed in to change notification settings - Fork 35
Concatenated dim #336
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?
Concatenated dim #336
Conversation
@property | ||
def global_expanded_shape(self) -> tuple[int, ...]: | ||
return sum((dim.global_expanded_shape for dim in self._dims), ()) | ||
def local_to_global_partial( |
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.
Is it possible to add function signatures at least to newly introduced functions including short description of what new functions do? This would simplify reviewing a lot.
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.
I'll add some doc. Where is the signature missing? See also their descriptions in the associated TensorMeta
methods. https://github.com/ServiceNow/Fast-LLM/pull/336/files#diff-3517f1a1541e286fce5d2a79d1eb3efab238c23f888696fc44e37d85a1692671R195
✨ Description
Another round of prequisites for TP Mamba and misc improvements.
ConcatenatedTensorDim
to support complex parallel dimensions (ex. SSM inner projection). Clean up theTensorDim
interface and move some functionality from Tensorto
TensorDim` for smoother integration.Initializer
class to allow for more detailed initialization strategies. Addrequires_global_initialization
for initializers that won't work on local slices (ex. init_A).init_uniform_centered