Skip to content

Commit cc3264c

Browse files
authored
More useful error message for unsupported batching (#687)
1 parent a227a9e commit cc3264c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mlx_lm/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ def _make_cache(model, left_padding):
874874
"""
875875

876876
def to_batch_cache(c):
877-
if isinstance(c, KVCache):
877+
if type(c) is KVCache:
878878
return BatchKVCache(left_padding)
879879
elif isinstance(c, ArraysCache):
880880
c.left_padding = mx.array(left_padding)

0 commit comments

Comments
 (0)