Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
02cf85e
Initial implementation of fused LoRA
timmoon10 Aug 4, 2025
3afeedf
Get fused LoRA to run
timmoon10 Aug 4, 2025
c651d90
Initial work toward tensor-parallel support
timmoon10 Aug 5, 2025
67de5f4
Enable fused LoRA based on model config
timmoon10 Aug 5, 2025
1711fd3
Tweak comments
timmoon10 Aug 5, 2025
b23d8e0
Add TE version checks
timmoon10 Aug 6, 2025
155738e
Fix linter warning
timmoon10 Aug 6, 2025
86a937d
Apply isort and black reformatting
timmoon10 Aug 6, 2025
d9eccfa
Use in-place fork/add ops to enable GEMMs with beta=1
timmoon10 Aug 12, 2025
9b84bac
Add ops directly to te.op.Sequential
timmoon10 Aug 12, 2025
abf7aed
Merge branch 'main' into fused-lora
timmoon10 Aug 13, 2025
d6136c9
Move fused LoRA impl into LoRALinear subclass
timmoon10 Aug 14, 2025
9f7df8d
Fix bug where fused impl was always disabled
timmoon10 Aug 14, 2025
0044d77
Apply isort and black reformatting
timmoon10 Aug 14, 2025
a0bf318
Merge branch 'main' into fused-lora
timmoon10 Aug 22, 2025
c4b9ace
Support wgrad accumulation fusion
timmoon10 Aug 22, 2025
79dd433
Add integration test for TE op fuser
timmoon10 Aug 22, 2025
793cc28
Apply isort and black reformatting
timmoon10 Aug 22, 2025
e6ce9b8
Explicitly list module containers that are compatible with list or di…
timmoon10 Aug 22, 2025
a8055ed
Apply isort and black reformatting
timmoon10 Aug 22, 2025
e9ceb35
Add missing docstring
timmoon10 Aug 22, 2025
709656c
Apply isort and black reformatting
timmoon10 Aug 22, 2025
d521c5a
Update Mcore version
timmoon10 Aug 28, 2025
5aa9145
Merge branch 'main' into fused-lora
timmoon10 Aug 28, 2025
62fa5b5
Merge branch 'main' into fused-lora
timmoon10 Sep 3, 2025
95d50b9
Update Megatron-LM commit
timmoon10 Sep 3, 2025
5916252
Merge branch 'main' into fused-lora
gautham-kollu Sep 3, 2025
3d1d43f
Merge branch 'main' into fused-lora
timmoon10 Sep 5, 2025
6b67653
Merge branch 'main' into fused-lora
chtruong814 Sep 5, 2025
942dc35
Attempt to support forward hooks in fused LoRA
timmoon10 Sep 7, 2025
0feba6b
Merge branch 'main' into fused-lora
timmoon10 Sep 8, 2025
264e6a1
Apply isort and black reformatting
timmoon10 Sep 8, 2025
e843b8a
Merge branch 'main' into fused-lora
gautham-kollu Sep 8, 2025
ddbe734
Merge branch 'main' into fused-lora
gautham-kollu Sep 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/cicd-main-nemo2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ jobs:
runner: self-hosted-azure
- script: L2_NeMo_2_GPT_LoRA_TP1PP1_MBS1_Chat
runner: self-hosted-azure
- script: L2_NeMo_2_GPT_LoRA_TP1PP1_MBS1_TE_op_fuser
runner: self-hosted-azure
- script: L2_NeMo_2_Mixtral_LoRA_EP2PP1_MBS2_exclude
runner: self-hosted-azure
- script: L2_NeMo_2_Mixtral_LoRA_EP2PP1_MBS2
Expand Down
11 changes: 9 additions & 2 deletions nemo/collections/llm/fn/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

@runtime_checkable
class HasBool(Protocol):
"""Protocol for objects with bool operation"""

def __bool__(self) -> bool: ...


Expand Down Expand Up @@ -72,13 +74,18 @@ def double_weights(m):
if not kwargs.pop("_skip_map", False) and hasattr(module, "map"):
return module.map(func, leaf_only=leaf_only, **kwargs)

if isinstance(module, nn.Module) and not isinstance(module, (nn.Sequential, nn.ModuleList, nn.ModuleDict)):
return _map_module(module, func, leaf_only=leaf_only, **kwargs)
elif isinstance(module, Iterable):
# Assume iterable is API-compatible with dict or list
if all(hasattr(module, key) for key in ["items", "values", "keys"]):
return _map_module_dict(module, func, leaf_only=leaf_only, **kwargs)

return _map_module_list(module, func, leaf_only=leaf_only, **kwargs)
else:
return _map_module(module, func, leaf_only=leaf_only, **kwargs)
raise ValueError(
"Expected `module` to be a PyTorch module or a collection of modules, "
f"but got {module.__class__.__name__}."
)


def walk(
Expand Down
Loading
Loading