Agent skill

Vllm Metax Model Trim

by MetaX-MACA in MetaX-MACA/vLLM-metax

Trim large MetaX model directories for dummy smoke tests or real-checkpoint loading on limited GPUs.

Apache-2.0Auto-check passedAI & LLM Engineering

Install Vllm Metax Model Trim

skills CLI
$ npx skills add MetaX-MACA/vLLM-metax --skill vllm-metax-model-trim -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install MetaX-MACA/vLLM-metax vllm-metax-model-trim --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/MetaX-MACA/vLLM-metax.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/vllm-metax-model-trim .claude/skills/vllm-metax-model-trim && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vllm-metax-model-trim
GitHub stars
180
Token cost
~2.4k tokens
SKILL.md length
1,203 words
Files
5 (incl. references)
Skills in repo
6
Repo updated
First seen
Licence
Apache-2.0

At a glance

Trim large MetaX model directories for dummy smoke tests or real-checkpoint loading on limited GPUs.

  • Works in 4 steps: Inventory each submodel's depth, layer… → **Reduce depth first; preserve width,… → Record the original-to-new layer… → …
  • Tasks that involve LLM inference and serving
  • SKILL.md covers Establish inputs and coverage, Design the reduction, Generate the output directory and Validate and deliver
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Vllm Metax Model Trim is an agent skill from MetaX-MACA/vLLM-metax. Trim large MetaX model directories for dummy smoke tests or real-checkpoint loading on limited GPUs. Preserve target execution paths while reducing depth; use the real-weight workflow when a loadable checkpoint is requested. Not for accuracy evaluation or model compatibility upgrades.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including reference files (for example `agents/openai.yaml`, `references/real-weights.md` and `references/structures.md`).

It sits in AI & LLM Engineering, covering LLM inference and serving and QA and bug reports. It works with vLLM. The repository describes itself as: Community maintained hardware plugin for vLLM on MetaX GPU. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve LLM inference and serving
  • Tasks that involve QA and bug reports

Example prompts

  • “/vllm-metax-model-trim”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Inventory each submodel's depth, layer types, attention/cache types, Dense/MoE boundaries,
  2. **Reduce depth first; preserve width, expert counts, head/LoRA dimensions, and quantization
  3. Record the original-to-new layer mapping. Update layer arrays, periodic/offset rules,
  4. If memory is still insufficient, reduce runtime context, concurrency, and cache budgets

What it can do on your machine

Read from SKILL.md and the folder at commit df0f52b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vllm Metax Model Trim loads about 2.4k tokens when it runs, and up to ~8.7k if it reads all its reference files. Until then it costs about 77 tokens; SKILL.md has 1,203 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~77
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from MetaX-MACA/vLLM-metax at commit df0f52b, republished under its Apache-2.0 licence (© MetaX-MACA). 1,203 words, ~2,448 tokens.

Download SKILL.mdSave it as .claude/skills/vllm-metax-model-trim/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
vllm-metax-model-trim
description
Trim large MetaX model directories for dummy smoke tests or real-checkpoint loading on limited GPUs. Preserve target execution paths while reducing depth; use the real-weight workflow when a loadable checkpoint is requested. Not for accuracy evaluation or model compatibility upgrades.

vLLM-MetaX Model Trimming

Create a reduced model directory that preserves the execution paths under test. Select the output mode from the user's goal:

  • Dummy: portable configuration and assets for --load-format dummy smoke tests. Dummy loading skips checkpoint reads but still allocates parameters, runs applicable quantization postprocessing, and consumes GPU memory.
  • Real weights: a self-contained checkpoint containing the retained tensors, with their names remapped to the reduced model and a validated non-dummy load. Generate and execute a reproducible extraction script for the specific model and checkpoint format; keep the script with the deliverable. Read the real-weight guide before changing the configuration or copying weights. Do not treat a configuration-only result as a loadable checkpoint.

Neither mode establishes original-model accuracy, routing distributions, or performance.

Establish inputs and coverage

  • Determine the source and output directories, output mode, available GPUs/free memory, TP/PP/EP, quantization, context length, and target features from the conversation and existing configurations. For real weights, locate the complete source checkpoint and its format, and verify that it is readable before producing an output. Ask only for missing inputs that affect trimming. Without explicit feature targets, preserve distinct backbone layer types and list MTP/DSpark separately as optional coverage.
  • For configuration-only requests, do not allocate GPUs. When functional validation is requested, proceed through service and request tests. Check occupancy if available GPUs are unspecified; do not terminate other workloads to make room.
  • Record the actual Python, vLLM, vllm_metax, and Transformers versions and import origins. Inspect model registration, configuration classes, constructors, and dispatch conditions. Workspace source may differ from runtime source. This skill does not require an environment upgrade or automatically invoke the upgrade skills' adaptation audits.
  • Existing examples are under tools/batched_test/models/, not a root-level batched_test/. Read a relevant example's config.json, documentation, and launch script first. Avoid reading large tokenizer JSON files to understand architecture. Recheck example paths, environment variables, and historical success records against the current environment.

Design the reduction

Read the relevant sections of the structure guide. For unfamiliar architectures, derive field semantics from their actual consumers rather than applying another model family's field conventions.

  1. Inventory each submodel's depth, layer types, attention/cache types, Dense/MoE boundaries, quantization, sharing/references between layers, and optional prediction heads. Create a small table mapping each target path to retained layers/dependencies and a triggering request.
  2. Reduce depth first; preserve width, expert counts, head/LoRA dimensions, and quantization where possible. Select the fewest layers that cover the targets and satisfy dependencies. A homogeneous model can start with 1–2 layers. For heterogeneous models, do not blindly keep the first N layers or set every num_hidden_layers field to the same value. Removing the only retained instance of a distinct path, such as Engram, reduces feature coverage; it is not equivalent to removing repeated homogeneous layers. A model that can still generate text does not necessarily preserve all text-model paths. See the structure guide's Engram guidance.
  3. Record the original-to-new layer mapping. Update layer arrays, periodic/offset rules, sharing relationships, quantization module paths, MTP indices, and cross-layer references together. Determine which fields the implementation reads; descriptive JSON fields may not control execution. In real-weight mode, apply the same mapping to checkpoint tensor names and verify that retained tensor shapes match the reduced model. A structural mapping alone does not transfer weights.
  4. If memory is still insufficient, reduce runtime context, concurrency, and cache budgets before considering fewer experts or narrower dimensions. Check sharding, quantization groups, and kernel constraints before changing shapes. Record the original shapes and paths no longer covered. gpu_memory_utilization sets a budget; it does not shrink parameters, and an overly small budget can prevent startup.

Keep depth and TP decisions separate. Depth-only trimming normally leaves the retained tensors' TP partition constraints unchanged; fewer layers do not require fewer TP ranks, and layer count need not be divisible by TP. Check actual dimensions, quantization, kernels, and loader support for the requested TP. PP layer placement is a separate concern. Distinguish storage shards from rank partitions using the checkpoint parallelism contract. Explain changes to pre-partitioned files as re-sharding for a new TP, not as a consequence of having fewer layers.

For real weights, budget output disk space separately from GPU memory, including large lookup tables and any additional checkpoint formats. If capacity would require dropping a distinct target path, give the concrete size and coverage tradeoff and resolve that scope choice before omitting it, unless already authorized. Do not silently reinterpret “preserve text and image” as permission to remove an expensive text module; consider a larger destination or fewer duplicate output formats first.

Show full SKILL.md (454 more words)Show less

Generate the output directory

  • Default to tools/batched_test/models/<model-name>-dummy-<N>layers/ or tools/batched_test/models/<model-name>-weights-<N>layers/, according to the output mode. Choose a new name if it already exists, or update it as explicitly requested. Preserve the source model and the user's existing examples; do not modify the source in place.
  • Deep-copy the original JSON and make explicit field edits, preserving unknown fields. Use configuration-class to_dict() output to inspect normalization, not to overwrite the source JSON and potentially lose extension metadata.
  • Copy required non-weight assets: config.json, tokenizer data/vocabulary/merges/SentencePiece files, tokenizer_config.json, special tokens, chat templates, and applicable generation or processor configurations. See the structure guide for multimodal and custom-code requirements. Dereference required file symlinks during copying to keep the result portable.
  • In dummy mode, omit weight shards. Weight indices are usually unnecessary; retain an index only when configuration discovery code consumes its metadata, and document its purpose and the absence of real shards. An index alone does not justify downloading weights. In real-weight mode, write the retained tensors and a matching index if sharded; follow the real-weight guide. Do not classify files solely by suffix: a tokenizer .model file is not a model checkpoint.
  • Preserve the active embedded or standalone quantization configuration. Do not remove quantization to make a quantized model pass.
  • Document the source, before/after field values, layer mapping, retained and omitted paths, required files, environment, runnable serve command, and test results in the output directory. Replace stale absolute paths from existing examples.

Validate and deliver

Follow the validation guide within the requested scope:

  1. Check field dependencies and asset completeness. Load configurations/tokenizers/processors offline and inspect normalized configurations and actual model registration. CPU configuration loading does not establish successful GPU model construction.
  2. When runtime validation is requested, start vllm serve on the selected GPUs with the load format matching the output: dummy for dummy mode, or the real checkpoint format without --load-format dummy. For real weights, successful startup and generation are required before reporting the checkpoint as loadable. Check health, then send requests exercising prefill and multiple decode steps. Add long-input, modality, parallel, or speculative requests for the target features and save logs.
  3. Classify failures as trimming/configuration or missing-dependency issues, checkpoint mapping/completeness issues (real-weight mode), insufficient resources, dummy initialization/quantization postprocessing limitations, or implementation defects. Retry only evidence-backed adjustments. If no valid configuration or available resources satisfy the target, deliver the generated artifacts and concrete blocker. Do not claim success by removing target paths, shrinking indefinitely, or modifying kernels.
  4. Report configuration checks, checkpoint integrity and tensor coverage (real-weight mode), startup, generation, and additional branches separately. Mark unexecuted GPU checks as unverified and never call an untested real-weight checkpoint loadable. Clean up services and workers started for this task and record abnormal shutdowns. Provide artifact paths, usage, and coverage limits.

© MetaX-MACA, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in .codex/skills/vllm-metax-model-trim of MetaX-MACA/vLLM-metax.

  • SKILL.md
  • agents/openai.yaml
  • references/real-weights.md
  • references/structures.md
  • references/validation.md

Open the folder on GitHubat commit df0f52b

Compare with similar skills

Vllm Metax Model Trim next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vllm Metax Model Trim compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vllm Metax Model Trim this skillMetaX-MACA/vLLM-metax180—~2.4kAutomated safety check: PassApache-2.0
SageMaker Serving Image Selectionhuggingface/skills11k1 repos~4.6kAutomated safety check: PassApache-2.0
Hugging Face Local Model Evalshuggingface/skills11k2 repos~1.6kAutomated safety check: PassApache-2.0
Qwen Mtp GgufR6410418/Jackrong-llm-finetuning-guide1.7k—~1.7kAutomated safety check: PassMIT
CI Fails Buildkiteguqiong96/Lvllm4652 repos~349Automated safety check: PassApache-2.0
Gptqmodel Tokenizer NormalizationModelCloud/GPTQModel1.3k—~1.1kAutomated safety check: PassCustom licence

Similar skills

  • Official

    Chooses the right serving container and current image URI for deploying a Hugging Face model to a SageMaker endpoint, preferring Hugging Face images over generic ones.

    11k GitHub starsUsed in 1 repo~4.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Official

    Runs evaluations of Hugging Face Hub models on local hardware with inspect-ai or lighteval, and helps choose between vLLM, Transformers and accelerate backends.

    11k GitHub starsUsed in 2 repos~1.6k tokens
    AI & LLM EngineeringAuto-check passed
  • Qwen Mtp Gguf

    R6410418/Jackrong-llm-finetuning-guide

    Complete agent-ready workflow for Qwen-family MTP or nextn GGUF conversion and release.

    1.7k GitHub stars~1.7k tokensUpdated 3 mo ago
    AI & LLM EngineeringAuto-check passed
  • CI Fails Buildkite

    guqiong96/Lvllm

    Fetch and diagnose vLLM Buildkite CI failure logs. An agent skill from guqiong96/Lvllm.

    465 GitHub starsUsed in 2 repos~349 tokens
    AI & LLM EngineeringAuto-check passed
  • Diagnose and correct GPT-QModel tokenizer initialization, tokenization normalization, special-token handling, prompt rendering, and chat-template problems.

    1.3k GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Add Diffusion Model

    vllm-project/vllm-omni

    Add a new diffusion model (text-to-image, text-to-video, image-to-video, text-to-audio, image editing) to vLLM-Omni, including native non-Diffusers ports, reference-parity validation, Cache-DiT…

    7.1k GitHub stars~7k tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from MetaX-MACA/vLLM-metax

  • Vllm Metax Model Upgrade

    MetaX-MACA/vLLM-metax

    Review and upgrade MetaX model support against a target vLLM revision and installed MACA components, recursively including model-dependent attention and kernels.

    180 GitHub stars~3.2k tokensUpdated yesterday
    Auto-check passed
  • Vllm Metax Registry Upgrade

    MetaX-MACA/vLLM-metax

    Review and adapt vllmmetax/registry registrations, quantization configurations, CustomOps and kernel dispatch against a target vLLM revision and installed MetaX APIs.

    180 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Vllm Metax Attention Upgrade

    MetaX-MACA/vLLM-metax

    Review and adapt MetaX attention backends, MLA, sparse indexers, cache layouts, and their kernel wrappers against a target vLLM revision and the actually installed MetaX component APIs.

    180 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Vllm Metax Patch Upgrade

    MetaX-MACA/vLLM-metax

    Audit and adapt monkey patches in vllmmetax/patch/ against a target upstream revision.

    180 GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Vllm Metax Upgrade Common

    MetaX-MACA/vLLM-metax

    Establish the shared environment, source/runtime correspondence, target confirmation and validation evidence for MetaX vLLM upgrades.

    180 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Vllm Metax Model Trim

What does Vllm Metax Model Trim do?

Trim large MetaX model directories for dummy smoke tests or real-checkpoint loading on limited GPUs. Vllm Metax Model Trim is an agent skill from MetaX-MACA/vLLM-metax. Trim large MetaX model directories for dummy smoke tests or real-checkpoint loading on limited GPUs.

When should I use Vllm Metax Model Trim?

Vllm Metax Model Trim fits situations like: tasks that involve LLM inference and serving; tasks that involve QA and bug reports.

How do I install Vllm Metax Model Trim in Claude Code?

Run `npx skills add MetaX-MACA/vLLM-metax --skill vllm-metax-model-trim -a claude-code`. Or copy the skill folder (.codex/skills/vllm-metax-model-trim in MetaX-MACA/vLLM-metax) into .claude/skills/vllm-metax-model-trim in your project. Claude Code loads it when a task matches its description.

How do I install Vllm Metax Model Trim in Codex?

Run `npx skills add MetaX-MACA/vLLM-metax --skill vllm-metax-model-trim -a codex`. Or copy the skill folder (.codex/skills/vllm-metax-model-trim in MetaX-MACA/vLLM-metax) into .agents/skills/vllm-metax-model-trim in your project. Codex loads it when a task matches its description.

Can I use Vllm Metax Model Trim in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add MetaX-MACA/vLLM-metax --skill vllm-metax-model-trim -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vllm-metax-model-trim, .gemini/skills/vllm-metax-model-trim, .github/skills/vllm-metax-model-trim and .opencode/skills/vllm-metax-model-trim in your project.

What does Vllm Metax Model Trim need to run?

SKILL.md names no scripts, command-line tools or credentials: Vllm Metax Model Trim is instructions for the agent only.

Does Vllm Metax Model Trim access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Vllm Metax Model Trim safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vllm Metax Model Trim use?

Vllm Metax Model Trim is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vllm Metax Model Trim use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.2k tokens, read only when the agent opens those files.

What are the alternatives to Vllm Metax Model Trim?

Skills that share tags, products or a category with Vllm Metax Model Trim: SageMaker Serving Image Selection (huggingface/skills, 11k stars), Hugging Face Local Model Evals (huggingface/skills, 11k stars), Qwen Mtp Gguf (R6410418/Jackrong-llm-finetuning-guide, 1.7k stars) and CI Fails Buildkite (guqiong96/Lvllm, 465 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vllm Metax Model Trim?

MetaX-MACA (a GitHub organization) maintains it in MetaX-MACA/vLLM-metax, which has 180 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on October 10, 2026.

Source: MetaX-MACA/vLLM-metax on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.