mirror of
https://github.com/ml-explore/mlx-examples.git
synced 2025-08-30 10:56:38 +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]):
|
with wired_limit(model, [generation_stream]):
|
||||||
detokenizer.reset()
|
detokenizer.reset()
|
||||||
tic = time.perf_counter()
|
tic = time.perf_counter()
|
||||||
for n, (token, logprobs) in enumerate(
|
for n, (token, logprobs) in enumerate(generate_step(prompt, model, **kwargs)):
|
||||||
generate_step(prompt, model, **kwargs),
|
|
||||||
):
|
|
||||||
if n == 0:
|
if n == 0:
|
||||||
prompt_time = time.perf_counter() - tic
|
prompt_time = time.perf_counter() - tic
|
||||||
prompt_tps = prompt.size / prompt_time
|
prompt_tps = prompt.size / prompt_time
|
||||||
|
Loading…
Reference in New Issue
Block a user