Skip to content
Back to skills

Expert Cache

ASecurity

"Debug and extend mixtral-offloading's MoE expert cache, storage

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
documentationapi

Works with

  • api

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill expert-cache --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Expert Cache?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Expert Cache
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-expert-cache/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-expert-cache)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: expert-cache
description: "Debug and extend mixtral-offloading's MoE expert cache, storage
  wrapper, and sparse routing internals."
metadata:
  disco-role: operating
disable-model-invocation: true
license: MIT
---

# Expert Cache

Use this sub-skill when the task is about expert offloading internals rather
than simply running the demo: `ExpertCache`, `MixtralExpertWrapper`,
`SparseMoeWrapper`, expert UIDs, LRU eviction groups, pinned offload storage,
or cache-capacity errors.

## Read this when

- The user sees `Cache is full`, `No evictable experts`, `already loading
  experts`, duplicate expert UID assertions, or eviction-group assertions.
- The task is to change offloading policy, add prefetching, debug storage
  movement, or inspect sparse MoE routing.
- The user wants to understand how `offload_per_layer` becomes `main_size` and
  `offload_size` inside `ExpertCache`.

## Route map

1. Read [references/expert-cache-api.md](references/expert-cache-api.md) for
   `ExpertInfo`, `EvictionGroupInfo`, `ExpertCache`, and method invariants.
2. Read [references/storage-and-routing.md](references/storage-and-routing.md)
   for `MixtralExpertWrapper` storage replacement and `SparseMoeWrapper.forward`
   routing flow.
3. Use [scripts/inspect_cache_plan.py](scripts/inspect_cache_plan.py) to compute
   cache capacities and example expert UIDs without loading model weights.
4. Read [references/troubleshooting.md](references/troubleshooting.md) for
   capacity, reentrancy, storage, pinned-memory, and routing-shape failures.

## What this sub-skill owns

- Expert-cache capacity and eviction invariants.
- Expert UID layout and eviction-group behavior.
- Storage wrapping and state-dict storage hooks.
- Sparse MoE top-k routing through cached experts.

## What to route elsewhere

- Use [../inference-workflow/SKILL.md](../inference-workflow/SKILL.md) for full
  model construction, generation, and offload config selection.
- Use [../quantization-kernels/SKILL.md](../quantization-kernels/SKILL.md) for
  HQQ quantized MLP layers, packing, and Triton kernel failures.

## Safe verification

Most cache internals require real `MixtralExpertWrapper` objects backed by
CUDA `UntypedStorage`. For safe planning, use the bundled script and source/API
reasoning. Do not construct the full cache with dummy objects unless their
storage type, size, and device match the expected wrapper invariants.

Files in this skill

  • SKILL.md2.4 KB
  • references/expert-cache-api.md2.9 KB
  • references/storage-and-routing.md2.3 KB
  • references/troubleshooting.md2.2 KB
  • scripts/inspect_cache_plan.py2.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.