mirror of
https://github.com/xai-org/grok-1
synced 2024-11-14 22:01:59 +08:00
Change subfunction signature to ignore value
Instead of marking `value` for deletion by doing ```py del value # Unused. ``` ignore the variable in the function signature.
This commit is contained in:
parent
7050ed204b
commit
9024770ce8
4
model.py
4
model.py
@ -90,9 +90,7 @@ def ffn_size(emb_size, widening_factor):
|
|||||||
|
|
||||||
|
|
||||||
def apply_rules(rules):
|
def apply_rules(rules):
|
||||||
def _apply_rules(path, value):
|
def _apply_rules(path, _):
|
||||||
del value # Unused.
|
|
||||||
|
|
||||||
path_list = [str(i.key).split("/") for i in path if isinstance(i, jax.tree_util.DictKey)]
|
path_list = [str(i.key).split("/") for i in path if isinstance(i, jax.tree_util.DictKey)]
|
||||||
flattened_path = jax.tree_util.tree_flatten(path_list)[0]
|
flattened_path = jax.tree_util.tree_flatten(path_list)[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user