Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Apr 12, 2024
1 parent c0ac73a commit 7c3d493
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion llmfoundry/models/layers/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(
del kwargs # unused, just to capture any extra args from the config
super().__init__()

ffn_type = ffn_config.pop('ffn_type')
ffn_type = ffn_config['ffn_type']

self.ffn = build_ffn(
name=ffn_type,
Expand Down
3 changes: 2 additions & 1 deletion llmfoundry/models/layers/layer_builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def build_ffn(
bias: bool,
ffn_kwargs: Dict[str, Any],
):

registry_to_use = ffns
if name in ffns_with_norm:
registry_to_use = ffns_with_norm
Expand All @@ -47,7 +48,7 @@ def build_ffn(
'expansion_ratio': expansion_ratio,
'device': device,
'bias': bias,
**ffn_kwargs,
**{k:v for k,v in ffn_kwargs.items() if k != 'ffn_type'},
}

def _validation_function(maybe_module: Any):
Expand Down

0 comments on commit 7c3d493

Please sign in to comment.