Skip to content

Commit aaae125

Browse files
committed
Fix fusion and test
1 parent b343a05 commit aaae125

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

mlx_lm/fuse.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ def main() -> None:
7878
print("Dequantizing model")
7979
model = dequantize_model(model)
8080
config.pop("quantization", None)
81+
config.pop("quantization_config", None)
8182

8283
save_path = Path(args.save_path)
8384
save(

mlx_lm/models/deepseek_v32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ def __call__(
224224
mask = sparse_mask
225225
# Ensure the indexer cache is evaluated even if the topk_indices are unused
226226
# to keep the graph from getting too large
227-
if cache is not None:
227+
if cache is not None and cache[0] is not None:
228228
cache[0].keys = mx.depends(cache[0].keys, (cache[1].keys, cache[1].values))
229229

230230
output = scaled_dot_product_attention(

0 commit comments

Comments
 (0)