This commit is contained in:
Awni Hannun
2024-10-12 14:30:53 -07:00
parent 55bcfbc6a5
commit 537598afc6

View File

@@ -348,7 +348,7 @@ def generate(
if formatter:
# We have to finalize so that the prob corresponds to the last segment
detokenizer.finalize()
with mx.stream(mx.default_stream(mx.cpu)):
with mx.stream(mx.cpu):
prob = mx.exp(logprobs[token]).item()
formatter(detokenizer.last_segment, prob)
else: