fast-mlx

Replace slow operators with MLX fast ops to optimize graph performance.

1|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/WindChimeRan/claude-dotfiles --skill fast-mlx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fast-mlx
Source: https://github.com/WindChimeRan/claude-dotfiles/tree/main/skills/fast-mlx
Command: npx skills add https://github.com/WindChimeRan/claude-dotfiles --skill fast-mlx

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

MLX models and graphs often suffer from runtime bottlenecks due to non-optimized operators, eager evaluations, and suboptimal memory management. This Skill analyzes MLX graphs to identify opportunities to replace slow ops with fast MLX primitives, improves compilation strategy, and reduces peak memory usage.

Core Features & Use Cases

  • Optimize graph performance by substituting slow operations with MLX fast ops and enabling shapeless or shape-aware compilation when appropriate.
  • Tune memory usage with lazy loading awareness and temporaries management to minimize peak memory during evaluation.
  • Profiling and debugging guidance to locate bottlenecks in graph evaluation and execution.

Quick Start

Instruct MLX to optimize a given graph by replacing slow operators with fast equivalents and enabling compilation optimizations.

Frequently Asked Questions about fast-mlx

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize MLX graph performance by replacing slow operators?

Optimize MLX graph performance by substituting slow operations with MLX fast ops and enabling shapeless or shape-aware compilation to reduce runtime bottlenecks during evaluation.

Why does my MLX model suffer from high peak memory usage during evaluation?

High peak memory usage in MLX models often results from suboptimal memory management, eager evaluations, and unmanaged temporaries. Tuning lazy loading awareness and temporaries minimizes this peak memory.

What is the best way to profile and locate bottlenecks in MLX graph execution?

The best way to locate MLX execution bottlenecks is through performance profiling and debugging guidance, which identifies slow operators and suboptimal compilation strategies within the graph.

Does MLX compilation work with both fixed-shape and lazy-evaluation patterns?

Yes, MLX compilation applies across both fixed-shape and lazy-evaluation patterns, allowing you to enable shape-aware or shapeless compilation to optimize workloads effectively.

When should I avoid eager evaluation in MLX workloads?

You should avoid eager evaluation in MLX workloads when optimizing graph performance and minimizing peak memory, as it causes runtime bottlenecks and prevents efficient temporaries management.