MCPcopy
hub / github.com/google-deepmind/gemma / _release_skip

Function _release_skip

gemma/gm/ckpts/_checkpoint.py:466–472  ·  view source on GitHub ↗

Release the memory of the skipped params.

(tree, tree_with_skip)

Source from the content-addressed store, hash-verified

464
465
466def _release_skip(tree, tree_with_skip) -> None:
467 """Release the memory of the skipped params."""
468 jax.tree.map(
469 lambda x, y: x.delete() if isinstance(y, _Skip) else None,
470 tree,
471 tree_with_skip,
472 )
473
474
475# ======================== Other utils ========================

Callers 1

_partial_restoreFunction · 0.85

Calls 1

mapMethod · 0.45

Tested by

no test coverage detected