cli-inference
できること
このスキルは、ターミナルからMLX-VLMのビジョンと言語のモデルを実行する方法をエージェントに教えます。テキスト、画像、音声の入力を扱い、読み込みや処理のエラーを直す手助けをします。
使う場面
- ✓Macでコマンドラインからビジョンまたは言語のモデルを動かしたいとき。
- ✓MLX-VLMのコマンドがモデル、プロンプト、重みの欠けについてエラーを出したとき。
- ✓画像や音声のファイルを使って、モデルを試す再現可能なコマンドがほしいとき。
スキルのリンク
https://github.com/Blaizzy/mlx-vlm/blob/main/skills/skills/cli-inference/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“ローカルのMLX-VLMのモデルでこの画像を説明するコマンドを教えてください。答えは短くしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、モデル、プロンプト、メディアのファイルを確認し、現在のフラグをヘルプの出力から読みます。作業に合うコマンドを組み立てます。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
CLI Inference
Use this workflow for uv run mlx_vlm.generate and related command-line inference tasks.
First Checks
- Identify the model ID or local path, modality, prompt, media files, and expected output.
- Prefer an existing local model path or cached Hugging Face model when reproducing. Do not download a large model unless the user asks.
- Check model-specific docs first when the family has a README under
mlx_vlm/models/<family>/README.md. - Use
uv run mlx_vlm.generate --helpto verify current flags before giving a final command.
Command Patterns
Text:
uv run mlx_vlm.generate \
--model <model-or-path> \
--prompt "Write a short answer." \
--max-tokens 128
Image:
uv run mlx_vlm.generate \
--model <model-or-path> \
--image /path/to/image.jpg \
--prompt "Describe this image." \
--max-tokens 128
Audio or multimodal:
uv run mlx_vlm.generate \
--model <model-or-path> \
--image /path/to/image.jpg \
--audio /path/to/audio.wav \
--prompt "Describe what you see and hear." \
--max-tokens 128
More Flags & Modalities
uv run mlx_vlm.generate --help is the source of truth (the CLI lives in the mlx_vlm/generate/ package). Beyond --model/--prompt/--image/--audio/--max-tokens, common flags:
--chat— interactive multi-turn session.--adapter-path— apply a LoRA adapter.--eos-tokensand sampling flags — use greedy/low-temp when debugging quality.--trust-remote-code— needed for some custom processors.--kv-bits/--kv-quant-scheme/--max-kv-size— quantized/bounded KV cache.--draft-model/--draft-kind— speculative decoding.- Image generation/editing:
--output-modality image,--output <file>, and the--diffusion-*flags drive diffusion image models — not just text-out VLMs.
Reproducibility Rules
- Include the exact command, model ID/path, media file type and size, Python version, package version or git commit, and full error.
- Use low-temperature or greedy settings when debugging quality or regressions.
- Bound output with
--max-tokens. - Preserve shell quoting exactly, especially prompts with JSON, XML-like thinking tokens, or newlines.
- If the failure depends on an image/audio/video file, record dimensions, duration, codec, and whether a small synthetic input reproduces it.
Common Failure Routing
model_typeunsupported: inspectconfig.jsonand current folders undermlx_vlm/models/.- Missing weights: check for
.safetensorsormodel.safetensors.index.json. - Processor/chat template errors: inspect
processing_*.py,prompt_utils.py, and model-specific README examples. - Media shape errors: test one image/audio/video item first, then multi-input cases.
- If the user needs an issue report rather than a fix, switch to
Skill("mlx-vlm-skills:reproducible-github-issues").
Validation
- Run the smallest command that exercises the requested modality.
- For code changes touching CLI parsing, run
uv run pytest mlx_vlm/tests/test_cli.py -q. - For generation behavior, prefer focused tests such as
test_generate.py,test_processors.py, or a model-specific test file before broad suites.
よくある質問
大きなモデルをダウンロードしますか?
利用者が求めない限り、大きなモデルはダウンロードしないよう、スキルは勧めています。
音声や動画も扱えますか?
はい。画像、音声、動画の入力を扱うと説明されています。
フラグはどこで確認すべきですか?
コマンドのヘルプの出力が正式な情報源だと、スキルは説明しています。
詳細
作者による元の説明
Use this skill when the user wants to run or debug MLX-VLM inference from the command line, including uv run mlx_vlm.generate, image/audio/video inputs, local model paths, Hugging Face model IDs, deterministic repro commands, and CLI errors around processors, prompts, model loading, or missing weights.
repo: Blaizzy/mlx-vlm
人気
- GitHubのスター
- 5.7k
- ランキング
- #14748
- ライセンス
- MIT
- 更新日
- 2026/11/2
コメント
- …
このリポジトリの他のスキル
convert-quantize
5.7kエージェントが、Hugging Faceのモデルを、MLX形式に変換し、量子化で小さくできるよう支援します。ビット数、モード、キャリブレーションを、ローカルの端末に合わせて選びます。
hf-cache-models
5.7kエージェントが、実行中のMLX-VLMサーバーから見えるモデルを一覧にし、キャッシュされたもの、独自のもの、読み込み済みのものを、モデル探索のエンドポイントに問い合わせて確認できるよう支援します。
reproducible-github-issues
5.7kエージェントが、MLX-VLMのバグや遅い結果について、環境の詳細、正確なコマンド、小さな例を含む、明確で再現できるGitHubのIssueを書けるよう支援します。
server-inference
5.7kエージェントが、MLX-VLMのAPIサーバーを実行してデバッグできるよう支援します。ヘルスチェック、チャットと応答のリクエスト、ストリーミング、よくあるリクエストのエラーを扱います。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。