Skip to main content
skill CX Codex

flash-moe-inference — Claude Code skill: what it does, how to install

Runs the Qwen3.5-397B Mixture-of-Experts model on Apple Silicon by streaming expert weights directly from an SSD in pure C and Metal. Designed for Macs with 48GB of memory.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add reason-machines/trending-skills --skill flash-moe-inference -a claude-code
Open on GitHub

What flash-moe-inference does

This skill guides coding assistants through building and running the Flash-MoE execution runtime. Instead of attempting to fit the entire 209GB parameter set into memory, the engine streams four active experts per layer from NVMe storage on demand. Hand-written Metal compute kernels handle matrix multiplication directly on the GPU, achieving speeds above 4.4 tokens per second without Python runtime overhead.

The project compiles infer.m, an interactive terminal chat chat.m, and an isolated MoE benchmark main.m using a standard Makefile. Python is utilized strictly offline to extract tensors from safetensors archives into binary files. Requantizing experts down to 2-bit saves roughly 89GB of storage, though doing so compromises structured JSON generation and tool calls.

Execution strictly requires an Apple Silicon machine like M3 Max, 48GB unified RAM, macOS 26 or Darwin 25, and at least 210GB free SSD space. Systems missing these hardware prerequisites cannot run the pipeline.

What it helps with

  • compile the C and Metal inference engine using make
  • pack safetensors files into quantized binary slices for SSD streaming
  • start a local terminal chat with function calling support
  • benchmark forward-pass expert throughput on Apple Silicon hardware

Example prompts for the agent

  • Build the Flash-MoE engine with make and inspect the compiled binaries
  • Help unpack the Qwen3.5 safetensors directory into 4-bit expert chunks
  • Run infer with the prompt 'Explain quantum computing' for 100 tokens

How to install flash-moe-inference

1Skills CLI (Vercel)

npx skills add reason-machines/trending-skills --skill flash-moe-inference -a claude-code

2Manually: put the files in place

~/.claude/skills/flash-moe-inference/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/flash-moe-inference/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about flash-moe-inference

How to install flash-moe-inference in Claude Code?

Run npx skills add reason-machines/trending-skills --skill flash-moe-inference -a claude-code in your terminal.

What does flash-moe-inference do?

It equips the agent with steps to compile and execute a native C and Metal engine that streams 397B MoE weights from disk on Apple Silicon Macs.

What is the penalty for using 2-bit expert weights?

Downscaling weights to 2-bit shrinks total disk footprint from 209GB to 120GB, but it breaks reliable JSON outputs and prevents tool calling.

Similar skills

All skills for AI and ML →

From the same set139

my-brain-is-full-crew Drops ten agents into your Obsidian vault: they file notes, surface links between them, handle meetings and keep an eye on wellness. CX Codex +1 1,100installs 724-office-ai-agent Sets up an autonomous Python agent system with 26 built-in tools, three-tier memory, and MCP support. Useful when building continuous office automations with scheduled jobs. CX Codex +1 1,100installs weixin-agent-sdk This skill wires any AI backend into WeChat through the weixin-agent-sdk TypeScript framework: QR login plus a message loop. CX Codex +1 1,100installs ghostling-libghostty-terminal A skill that walks through building a minimal terminal emulator on the libghostty-vt C library, with Raylib handling windows and rendering. CX Codex +1 1,100installs claude-peers-mcp Enables parallel Claude Code sessions on one computer to locate each other and pass data in real time using a local message broker. CX Codex +1 1,000installs polymarket-arbitrage-trading-bot A skill that builds a trading bot for Polymarket's 15-minute Up/Down markets: it watches BTC, ETH, SOL and XRP and buys both legs once their combined price drops under a threshold. CX Codex +1 979installs awesome-free-llm-apis A reference skill listing LLM providers with permanent free tiers, their rate limits, models and Anthropic-compatible setup. CX Codex +1 978installs awesome-phd-cv Creates LaTeX CV and resume layouts for PhD students and researchers. Use it for an academic CV or an ATS-ready industry resume. CX Codex +1 975installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor