← back to Exo
processor load
2849128d6acad1c139d1c8963bf054ec3f16316a · 2024-07-28 01:03:34 +0530 · Varshith
Files touched
M exo/inference/mlx/sharded_utils.py
Diff
commit 2849128d6acad1c139d1c8963bf054ec3f16316a
Author: Varshith <varshith.bathini@sprinklr.com>
Date: Sun Jul 28 01:03:34 2024 +0530
processor load
---
exo/inference/mlx/sharded_utils.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/exo/inference/mlx/sharded_utils.py b/exo/inference/mlx/sharded_utils.py
index 0bc8efe6..2964d544 100644
--- a/exo/inference/mlx/sharded_utils.py
+++ b/exo/inference/mlx/sharded_utils.py
@@ -235,10 +235,10 @@ async def load_shard(
model = apply_lora_layers(model, adapter_path)
model.eval()
- # TODO: figure out a better way
- if "llama" in str(model_path):
- tokenizer = load_tokenizer(model_path, tokenizer_config)
- return model, tokenizer
- elif "llava" in str(model_path):
+ # TODO: figure out a generic solution
+ if model.model_type == "llava":
processor = AutoProcessor.from_pretrained(model_path)
- return model, processor
\ No newline at end of file
+ return model, processor
+ else:
+ tokenizer = load_tokenizer(model_path, tokenizer_config)
+ return model, tokenizer
\ No newline at end of file
← 54993995 conflicts
·
back to Exo
·
try/except for decode, #75 5eafd5a3 →