mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-31 11:54:37 +08:00
clear cache during prompt processing
This commit is contained in:
parent
b7373cb44f
commit
1ac75759ee
@ -242,6 +242,7 @@ def generate_step(
|
||||
model(y[:prefill_step_size][None], cache=prompt_cache)
|
||||
mx.eval([c.state for c in prompt_cache])
|
||||
y = y[prefill_step_size:]
|
||||
mx.metal.clear_cache()
|
||||
|
||||
y, logprobs = _step(y)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user