Zum Inhalt springen
Skillpedia
Allgemeines Programmieren5.7k · #14748

cli-inference

Was er macht

Dieser Skill zeigt einem Agenten, wie er MLX-VLM-Modelle für Bild und Sprache über ein Terminal ausführt. Er deckt Text-, Bild- und Audioeingaben ab und hilft, Fehler beim Laden oder Verarbeiten zu beheben.

Wann du ihn nutzt

  • ✓Wenn ein Nutzer ein Bild- oder Sprachmodell auf einem Mac über die Kommandozeile ausführen will.
  • ✓Wenn ein Befehl für MLX-VLM einen Fehler zu einem Modell, einer Eingabe oder fehlenden Gewichten meldet.
  • ✓Wenn ein Nutzer einen wiederholbaren Befehl will, um ein Modell mit einer Bild- oder Audiodatei zu testen.

Link zum Skill

https://github.com/Blaizzy/mlx-vlm/blob/main/skills/skills/cli-inference/SKILL.md

Kopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.

So nutzt du ihn

Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.

Fertige Nachricht zum Einfügen

Nutze diesen Skill, um mir zu helfen: https://github.com/Blaizzy/mlx-vlm/blob/main/skills/skills/cli-inference/SKILL.md Lies die SKILL.md unter diesem Link und folge ihren Anweisungen für meine Aufgabe.
Soll deine KI Skills wie diesen selbst finden?Installiere den kostenlosen Skillpedia-MCP: eine Zeile, und sie durchsucht vor jeder Aufgabe 15.000+ Skills.In 1 Minute installieren →

Beispielanfrage an deine KI

“Zeig mir den Befehl, mit dem mein lokales MLX-VLM-Modell dieses Bild beschreibt, und halte die Antwort kurz.”

5 neue Skills pro Woche. 1 Minute Lesezeit.

So funktioniert es

Der Agent prüft das Modell, die Eingabeaufforderung und die Mediendateien und liest dann die Hilfeausgabe nach aktuellen Optionen. Er baut einen Befehl, der zur Aufgabe passt.

Technischer Inhalt (originale SKILL.md)

Originaltext des Autors, auf Englisch, direkt von GitHub.

CLI Inference

Use this workflow for uv run mlx_vlm.generate and related command-line inference tasks.

First Checks

  1. Identify the model ID or local path, modality, prompt, media files, and expected output.
  2. Prefer an existing local model path or cached Hugging Face model when reproducing. Do not download a large model unless the user asks.
  3. Check model-specific docs first when the family has a README under mlx_vlm/models/<family>/README.md.
  4. Use uv run mlx_vlm.generate --help to 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-tokens and 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_type unsupported: inspect config.json and current folders under mlx_vlm/models/.
  • Missing weights: check for .safetensors or model.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.
Häufige Fragen

Lädt das große Modelle herunter?

Der Skill sagt, kein großes Modell herunterzuladen, außer der Nutzer verlangt es.

Kann er Audio und Video verarbeiten?

Ja. Der Skill deckt Bild-, Audio- und Videoeingaben ab.

Wo sehe ich die Optionen zuerst nach?

Der Skill sagt, dass die Hilfeausgabe des Befehls die maßgebliche Quelle ist.

Details

Originalbeschreibung des Autors

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

Beliebtheit

GitHub-Sterne
5.7k
Platz im Ranking
#14748
Lizenz
MIT
Aktualisiert
2.11.2026

Ist dieser Skill nützlich?

0

Anmelden um abzustimmen.

Kommentare

  • …

Weitere Skills aus diesem Repository

Ähnliche Skills