Import Model

Use when importing a new model architecture into MAX from a Hugging Face model ID. Triggers on: "import a model into MAX", "add model to MAX", "bring up <HF model> in MAX". Workflow: inspect the Hugging Face config and modeling code, then scaffold from a similar ModuleV3 architecture. Implement each layer as a max.nn Module that matches HF, serve, then verify against the Hugging Face reference. When the server runs but output is wrong (gibberish, greedy mismatch, coherent-then-diverges), load debug-model for the divergence hunt.

213 stars 22 forksAI, LLMs & Agents Plugin marketplace

Install

Claude Code plugin
/plugin marketplace add modular/skills

The repo is a Claude Code plugin marketplace. Run /plugin afterwards to pick the plugin that includes this skill.

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add modular/skills --skill import-model
Manual install
git clone --depth 1 https://github.com/modular/skills.git /tmp/skills
mkdir -p ~/.claude/skills
cp -r /tmp/skills/import-model ~/.claude/skills/import-model

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Import a model into MAX

**Input:** a Hugging Face model ID (`$ARGUMENTS`).

Copy [references/template.md](references/template.md) to track this port as
you work through the phases. Its file references are paths from this skill's
root, so they still resolve after you copy it elsewhere.

Porting a model to MAX means writing a ModuleV3 model that performs the same
computation as the model's `modeling_<type>.py` in Hugging Face
`transformers`. You then compile it with the released weights and verify that
the outputs match. ModuleV3 is MAX's model API. Layers are `Module` subclasses
from `max.nn` with a `forward()` over `Tensor` values. Ops come
from `max.functional` (imported as `F`). The pipeline builds the
module under `F.lazy()` and compiles it with `compile(weights=...)`.
Single-GPU, tensor-parallel, and expert-parallel models all use ModuleV3.
Multi-GPU models shard through a `DeviceMesh`.

Before choosing a donor, read the
[module registration compatibility reference](../migrate-max-v2-to-v3/references/module-registration.md)
([published copy](https://github.com/modular/skills/blob/main/migrate-max-v2-to-v3/references/module-registration.md)
if this skill was installed alone). Prefer a registered ModuleV3 donor when its
task and required features are supported. Document the compatibility gap when
retaining a custom pipeline. The runtime's encoder and vision support is broader
than this skill's decoder scaffolding; do not infer generator support from the
Read the full skill on GitHub

Details

Skill name
import-model
Repository
modular/skills
Path
import-model/SKILL.md
Repo updated
18 November 2026

FAQ

What does the Import Model skill do?

Use when importing a new model architecture into MAX from a Hugging Face model ID. Triggers on: "import a model into MAX", "add model to MAX", "bring up <HF model> in MAX". Workflow: inspect the Hugging Face config and modeling code, then scaffold from a similar ModuleV3 architecture. Implement each layer as a max.nn Module that matches HF, serve, then verify against the Hugging Face reference. When the server runs but output is wrong (gibberish, greedy mismatch, coherent-then-diverges), load debug-model for the divergence hunt.

How do I install the Import Model skill?

Claude Code plugin: /plugin marketplace add modular/skills. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Import Model popular?

It lives in modular/skills, which has 213 GitHub stars and 22 forks.

Related skills

Benchmark Model

213

modular/skills

Benchmark a model served on MAX with the `max benchmark` command: measure throughput (tokens/sec), latency (TTFT, TPOT, inter-token latency), and GPU utilization by driving load against a running `max serve` endpoint. Use this whenever the user wants to benchmark, load-test, or measure the performance of a MAX model, get tokens-per-second / TTFT / TPOT numbers, run a concurrency or request-rate sweep, compare latency vs throughput, size a deployment, or produce benchmark JSON, even if they don't say "benchmark" by name. Also use when a `max benchmark` run fails to connect or reports zero/garba

AI, LLMs & Agents22

Debug Model

213

modular/skills

Debug a MAX model that loads, compiles, serves, and generates tokens but whose output disagrees with a reference implementation. Use whenever parity debugging stalls on scalar taps, the model returns gibberish or wrong greedy tokens, logit cosine is high but argmax differs, or generation is coherent then diverges. Applies during an architecture port, a quantization bring-up, a multi-GPU conversion, or after a MAX upgrade. Triggers on "parity failure", "silent corruption", "logits match but tokens diverge", "top-1 mismatch", "greedy divergence", and "model serves but generates garbage". Not for

AI, LLMs & Agents22

Eval Model

213

modular/skills

Measures the task accuracy of text models served by MAX using standard benchmarks such as GSM8K, MMLU, HellaSwag, ARC, AIME, GPQA, TruthfulQA, WinoGrande, and BABILong. Use when benchmarking a served model, comparing it with model-card or reference scores, verifying that a new MAX model produces correct answers, or running repeatable dataset evaluations against a MAX OpenAI-compatible endpoint.

AI, LLMs & Agents22

Migrate Max V2 to V3

213

modular/skills

Use when migrating a MAX model from the V2 graph API (max.nn.legacy, TensorValue, explicit Graph construction) to ModuleV3 (max.nn, Tensor, F.lazy() + compile()). Triggers on: "migrate to ModuleV3", "port a max.nn.legacy model to max.experimental", "convert TensorValue to Tensor", "update my model to the V3 API", "ModuleV3 migration". Workflow: read the concept map, rewrite imports and __call__ signatures, and replace graph building with compile(weights=...). Align weight names with the new module hierarchy and move the KV cache unflatten into forward(). Port sharding to a DeviceMesh when the

AI, LLMs & Agents22

Excalidraw MCP Diagramming

206

thomast1906/github-copilot-agent-skills

Create and edit diagrams on a live Excalidraw canvas using the Excalidraw MCP server. Use when asked to draw, diagram, sketch, or visualise architectures, workflows, data flows, system designs, flowcharts, mind maps, or sequence diagrams. Trigger phrases include "create an excalidraw", "draw me a diagram", "make a flowchart", "visualise the system", "diagram this architecture", "export to PNG/SVG". Can export to PNG, SVG, .excalidraw file, or a shareable URL. Do NOT use for Draw.io or diagrams.net output (use drawio-mcp-diagramming instead).

AI, LLMs & Agents54

Profile Model

213

modular/skills

Profile a model running on MAX to find where it spends time and whether the GPU is saturated. Use when the user asks to "profile my model," "where is my model spending time," "why is inference slow," "is my GPU being utilized," "how much GPU am I using," "get a kernel breakdown," "capture an nsys/rocprof/ncu trace of max serve," or wants to measure MAX inference performance. Works for any model MAX can run — built-in architectures and custom ones loaded with --custom-architectures — from a pip or pixi install (max generate, max serve, or a Python script) on NVIDIA or AMD GPUs. Decide cheapest-

AI, LLMs & Agents22

Browse the most popular Claude skills, all ai, llms & agents skills, or write your own with the skills generator.