Saltar al contenido
Skillpedia
Deploy y nube (DevOps)12 mil · #11533

minicpm5-deploy-mlx

Qué hace

Esta skill guía a tu IA para ejecutar MiniCPM5 en un Mac con Apple Silicon, usando el framework MLX de Apple. Es para usuarios de Mac que quieren la opción local más rápida de su equipo.

Cuándo usarla

  • ✓Cuando tienes un Mac de la serie M y quieres ejecutar MiniCPM5 en local.
  • ✓Cuando quieres usar mlx_lm para generar texto desde la línea de comandos.
  • ✓Cuando tienes un modelo de Hugging Face y quieres convertirlo al formato MLX en tu Mac.

Link de la skill

https://github.com/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-mlx/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/OpenBMB/MiniCPM/blob/main/skills/minicpm5-deploy-mlx/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

“Ayúdame a ejecutar MiniCPM5 en mi Mac con MLX y comprueba que da la respuesta correcta a 1+1.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La skill instala las herramientas mlx-lm, ejecuta una prueba con un modelo MLX ya preparado y también puede convertir un modelo que ya tengas al formato MLX.

Contenido técnico (SKILL.md original)

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

Deploy MiniCPM5-1B and MiniCPM5-2B with MLX (Apple Silicon)

Apple's on-device tensor framework. Highest throughput on M-series. Stays inside one Python process — no separate server, no llama.cpp build chain.

Required input

Var Example Default
MLX_REPO openbmb/MiniCPM5-2B-MLX (pre-converted 4-bit affine) required; openbmb/MiniCPM5-1B-MLX also works
OR HF_REPO + QUANT openbmb/MiniCPM5-2B, 4bit or bf16 for local conversion
MAX_TOKENS 200 200

Steps

1. Install (once)

pip install "mlx-lm>=0.31" "gguf"

2A. Use a pre-converted MLX repo (recommended when available)

mlx_lm.generate --model "${MLX_REPO}" \
    --prompt "<|im_start|>user
1+1=?<|im_end|>
<|im_start|>assistant
" \
    --max-tokens ${MAX_TOKENS} --temp 1.0 --top-p 0.95

2B. Convert from a HF checkpoint locally (advanced)

Use mlx_lm.convert only if you have a self-trained HF fp16 checkpoint:

HF=/path/to/your-fp16-hf

# Convert: bf16
mlx_lm.convert --hf-path "$HF" --mlx-path ./minicpm5-mlx-bf16

# Convert: 4-bit (smaller / faster)
mlx_lm.convert --hf-path "$HF" --mlx-path ./minicpm5-mlx-q4 -q --q-bits 4

Then run as in 2A.

3. Validate

The reply should contain "2" for 1+1=?.

OpenAI-compatible server (mlx-lm)

mlx_lm.server --model "${MLX_REPO}" --host 127.0.0.1 --port 8000

curl http://127.0.0.1:8000/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{
        "model": "default",
        "messages": [{"role":"user","content":"1+1=?"}],
        "temperature": 1.0, "top_p": 0.95, "max_tokens": 64
    }'

Common pitfalls

  • Slow first generate: MLX JIT-compiles kernels on first call (~5-10 s); subsequent calls hit the warm cache.
  • Model runs past <|im_end|>: only happens on mlx-lm < 0.31 (older versions ignore multi-id eos_token_id lists). Upgrade, or pass --extra-eos-token "<|im_end|>" as a manual override — <|im_end|> is token id 130073 and is already listed in generation_config.json on 0.31+.

When NOT to use

  • Not on Apple Silicon → minicpm5-deploy-llama-cpp (CPU/CUDA) or minicpm5-deploy-vllm (CUDA)
  • Want a desktop GUI → minicpm5-deploy-lmstudio (LM Studio bundles an MLX runtime)
  • Want one-line CLI run → minicpm5-deploy-ollama

Reference

docs/deployment/mlx.md

Preguntas frecuentes

¿Tengo que convertir un modelo yo mismo?

Normalmente no. La skill recomienda un repositorio MLX ya preparado cuando existe.

¿Cómo sé que funciona?

La skill indica que la respuesta debe contener el número 2 para la pregunta 1+1.

¿Puede iniciar un servidor local?

Sí. La skill incluye un servidor compatible con OpenAI a través de mlx_lm.server.

Detalles

Descripción original del autor

Run MiniCPM5-1B or MiniCPM5-2B natively on Apple Silicon with Apple's MLX framework. Use when the user has an Apple Silicon Mac and asks for "MLX", "mlx_lm", "mlx_lm.convert", "mlx_lm.generate", or wants the fastest path on Apple Silicon.

repo: OpenBMB/MiniCPM

Popularidad

Estrellas en GitHub
12 mil
Posición en el ranking
#11533
Licencia
Apache-2.0
Actualizada
21/9/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas