Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 1 addition & 1 deletion src/instructlab/training/accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def __getattr__(self, name):

def get_fsdp_config(self):
is_lora = self.model.lora_config is not None
block_name = self.model._no_split_modules[0]
block_name = next(iter(self.model._no_split_modules))

wrap_policy = None
if is_lora > 0:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_accelerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def mock_model():
model = MagicMock(spec=Model)
model.model = MagicMock()
model.lora_config = None
model._no_split_modules = ["LlamaDecoderLayer"]
model._no_split_modules = {"LlamaDecoderLayer"}
# Add children method to model
model.children = MagicMock(return_value=[])
model.model.children = MagicMock(return_value=[])
Expand Down
Loading