0.11.2
#4916
Replies: 1 comment
-
Will this change affect |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What's Changed
nnx.merge
now doesn't create a copy of the Variables in the incoming states by default, meaning that the new merged structures holds references to the incoming Variables. This enables new patterns, for example its now possible to create models with the same state but with different runtime behavior:model
andeval_model
share the same Variables and are therefore kept in sync but have different runtime behavior, this avoids having to constantly mutate a single model back and forth between different runtime modes which can be error prone / cause unwanted recompilation.To keep the old behavior use
nnx.merge(..., copy=True)
.PRs
New Contributors
Full Changelog: v0.11.1...v0.11.2
This discussion was created from the release 0.11.2.
Beta Was this translation helpful? Give feedback.
All reactions