mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-30 02:53:41 +08:00
nit
This commit is contained in:
parent
1036798dac
commit
21a05d14d2
@ -345,9 +345,7 @@ def stream_generate(
|
||||
with wired_limit(model, [generation_stream]):
|
||||
detokenizer.reset()
|
||||
tic = time.perf_counter()
|
||||
for n, (token, logprobs) in enumerate(
|
||||
generate_step(prompt, model, **kwargs),
|
||||
):
|
||||
for n, (token, logprobs) in enumerate(generate_step(prompt, model, **kwargs)):
|
||||
if n == 0:
|
||||
prompt_time = time.perf_counter() - tic
|
||||
prompt_tps = prompt.size / prompt_time
|
||||
|
Loading…
Reference in New Issue
Block a user