Saltar al contenido
Skillpedia
APIs y servidores (backend)5,7 mil · #14752

server-inference

Qué hace

Esta skill enseña a un agente a arrancar y solucionar problemas de un servidor MLX-VLM al que otras herramientas llaman mediante una API de estilo OpenAI. Cubre la comprobación de estado, la lista de modelos y las solicitudes de chat.

Cuándo usarla

  • ✓Cuando un usuario quiere arrancar un servidor local de MLX-VLM para chat o llamadas a la API.
  • ✓Cuando una solicitud al servidor falla y el usuario necesita averiguar por qué.
  • ✓Cuando un usuario quiere conectar una aplicación compatible con OpenAI al servidor local.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/Blaizzy/mlx-vlm/blob/main/skills/skills/server-inference/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Arranca mi servidor MLX-VLM y muéstrame cómo enviar una solicitud de chat desde mi aplicación.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

El agente arranca el servidor, comprueba su estado y su lista de modelos, y luego envía una solicitud de prueba. Separar los problemas de arranque de los de las solicitudes facilita encontrar la causa.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Server Inference

Use this workflow for the FastAPI server and API-compatible inference.

First Checks

  1. Identify the server command, model, port, request endpoint, request body, and expected response.
  2. Start with health/model-list checks before debugging generation.
  3. Separate server startup failures from request-handling failures.
  4. Keep streaming and non-streaming repros separate.

Startup

uv run mlx_vlm.server \
  --model <model-or-path> \
  --port 8080

Useful startup flags include --adapter-path, --trust-remote-code, --log-level, --enable-thinking, --thinking-budget, --draft-model, --draft-kind, --kv-bits, --kv-quant-scheme, --max-kv-size, and --vision-cache-size.

Minimal Checks

curl http://127.0.0.1:8080/health
curl http://127.0.0.1:8080/v1/models
curl http://127.0.0.1:8080/metrics

Minimal chat request:

curl -s http://127.0.0.1:8080/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "<model-or-path>",
    "messages": [{"role": "user", "content": "Say hello."}],
    "max_tokens": 32,
    "stream": false
  }'

Minimal Responses API request:

curl -s http://127.0.0.1:8080/v1/responses \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "<model-or-path>",
    "input": "Say hello.",
    "max_output_tokens": 32
  }'

Endpoint Surface (beyond chat/responses)

The server exposes more than chat — cover or route to these as needed:

  • Anthropic Messages API: /v1/messages, plus /v1/messages/count for token counting.
  • Audio: /v1/audio/speech (TTS), /v1/audio/transcriptions and /v1/audio/translations (STT).
  • Images: /v1/images/generations and /v1/images/edits (diffusion image models).
  • Cache & metrics: /v1/cache/stats, /v1/cache/reset, /v1/metrics.
  • Models: /v1/models lists loaded models and model candidates in the shared Hugging Face cache, with a loaded boolean indicating which are in memory — see Skill("mlx-vlm-skills:hf-cache-models").

Match the model kind to the endpoint (an image endpoint needs a diffusion/image model, audio endpoints need an audio model); a mismatch returns a clear 4xx, not a crash.

Debugging Rules

  • Capture the server command, server logs, request body, response status, and response body.
  • Test /v1/models after preload/load changes.
  • For OpenAI client issues, reproduce with curl before blaming the client SDK.
  • For streaming bugs, save raw event chunks and compare with non-streaming.
  • For structured outputs, isolate the JSON schema and confirm whether the same request works without schema constraints.
  • For tool calls, inspect native support and the parser inferred from the loaded processor's actual chat template. Follow Tool Calling for parser registration and validation.

Validation

  • For route/schema changes, run uv run pytest mlx_vlm/tests/test_server.py -q.
  • For structured output changes, include uv run pytest mlx_vlm/tests/test_generate.py -q -k 'thinking_aware or json_schema'.
  • For tool parser changes, add compact regressions to TestProcessToolCalls in mlx_vlm/tests/test_server.py and run the shared tool streaming tests in that module, plus any existing tests for affected parsers. Reuse consolidated tests instead of creating a new test file.
  • If the result is a user-facing bug report, switch to Skill("mlx-vlm-skills:reproducible-github-issues").
Preguntas frecuentes

¿Qué dirección usa el servidor?

Los ejemplos usan una dirección local en el puerto 8080, que el usuario puede cambiar.

¿Admite el envío en flujo?

Sí. La skill indica que las solicitudes en flujo y sin flujo deben probarse por separado.

¿Qué comprobaciones van primero?

La skill recomienda las comprobaciones de estado y de lista de modelos antes de depurar la generación.

Detalles

Descripción original del autor

Use this skill when the user wants to run or debug MLX-VLM server inference, including uv run mlx_vlm.server, /v1/models, /v1/chat/completions, /v1/responses, streaming, OpenAI-compatible clients, health checks, metrics, model unload/reload, adapters, trust-remote-code, and server request/response failures.

repo: Blaizzy/mlx-vlm

Popularidad

Estrellas en GitHub
5,7 mil
Posición en el ranking
#14752
Licencia
MIT
Actualizada
2/11/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas