← back to Exo
hotfix edge case where we try to render before tokenizer is set
85279007b30742987d1b825d3e1cb6a6e98bf66a · 2024-08-23 22:57:04 +0100 · Alex Cheema
Files touched
Diff
commit 85279007b30742987d1b825d3e1cb6a6e98bf66a
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Fri Aug 23 22:57:04 2024 +0100
hotfix edge case where we try to render before tokenizer is set
---
main.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/main.py b/main.py
index f4af926c..98cebe8f 100644
--- a/main.py
+++ b/main.py
@@ -89,8 +89,7 @@ api = ChatGPTAPI(
on_chat_completion_request=lambda req_id, __, prompt: topology_viz.update_prompt(req_id, prompt) if topology_viz else None
)
node.on_token.register("update_topology_viz").on_next(
- lambda req_id, tokens, __: topology_viz.update_prompt_output(req_id,
- inference_engine.tokenizer.decode(tokens) if hasattr(inference_engine, "tokenizer") else tokens) if topology_viz else None
+ lambda req_id, tokens, __: topology_viz.update_prompt_output(req_id, inference_engine.tokenizer.decode(tokens)) if topology_viz and hasattr(inference_engine, "tokenizer") else None
)
← 09a84683 upgrade mlx to 0.17.0
·
back to Exo
·
only use_fast tokenizer for Mistral Large until this inconsi 8cad0e18 →