This commit is contained in:
Angelos Katharopoulos 2025-01-14 17:14:44 -08:00
parent 2e08e8b96c
commit 5278143c1b

View File

@ -21,7 +21,7 @@ from mlx_lm.tuner.utils import build_schedule
@contextmanager
def swapped_with_identity(obj, func):
old_func = getattr(obj, func)
setattr(obj, func, lambda x: x)
setattr(obj, func, lambda x, **kwargs: x)
yield
setattr(obj, func, old_func)