What is MLC LLM?
MLC LLM es un compilador de aprendizaje automático y motor de despliegue para modelos de lenguaje grandes. Compila los modelos a código nativo con TVM y los ejecuta en MLCEngine, un único motor de inferencia que funciona en muchas plataformas desde una misma base de código. It sits in the Local Runtimes category of the Models & Inference tools and is open-source, written in Python and licensed Apache-2.0.
Resumen
MLC LLM es un compilador de aprendizaje automático y motor de despliegue para modelos de lenguaje grandes. Compila los modelos a código nativo con TVM y los ejecuta en MLCEngine, un único motor de inferencia que funciona en muchas plataformas desde una misma base de código.
Está pensado para desarrolladores que necesitan ejecutar LLM fuera de un servidor típico con GPU en la nube. El mismo motor y compilador funcionan en GPU de NVIDIA, AMD, Apple e Intel, en el navegador mediante WebGPU y WASM, y en dispositivos iOS y Android.
Como entorno de ejecución local, expone una API compatible con OpenAI a través de un servidor REST, Python y JavaScript, así que puedes sustituir las APIs alojadas por esta y seguir ejecutando la inferencia en el hardware que controlas.
Qué hace
- Funciona en GPU de NVIDIA, AMD, Apple e Intel mediante CUDA, ROCm, Metal, Vulkan y OpenCL
- Se despliega en el navegador con WebGPU y WASM, además de en iOS y Android
- MLCEngine ofrece un único motor de inferencia y compilador en todas las plataformas de destino
- API compatible con OpenAI a través de un servidor REST, Python y JavaScript
- Basado en la compilación de aprendizaje automático de Apache TVM para generar código nativo
- Incluye una CLI para chatear y para lanzar un servidor local de estilo OpenAI
Primeros pasos
Instala el paquete y, después, habla con un modelo desde Python o lanza un servidor local compatible con OpenAI. Los modelos se descargan directamente de Hugging Face con el prefijo HF://.
Instalar MLC LLM
Instala el paquete de Python con pip.
pip install mlc-llmChatear con un modelo desde Python
Crea un MLCEngine, recibe una respuesta de chat en streaming y, después, termina el motor. Esto descarga y ejecuta un modelo Llama 3 8B cuantizado (se recomiendan unos 6GB de VRAM libre).
from mlc_llm import MLCEngine
model = "HF://mlc-ai/Llama-3-8B-Instruct-q4f16_1-MLC"
engine = MLCEngine(model)
for response in engine.chat.completions.create(
messages=[{"role": "user", "content": "What is the meaning of life?"}],
model=model,
stream=True,
):
for choice in response.choices:
print(choice.delta.content, end="", flush=True)
engine.terminate()O ejecuta un servidor compatible con OpenAI
Lanza un servidor REST en http://127.0.0.1:8000 que acepta peticiones de estilo OpenAI, para que los clientes existentes puedan conectarse a él.
mlc_llm serve HF://mlc-ai/Llama-3-8B-Instruct-q4f16_1-MLCCommands and code are distilled from the project's own documentation — always check the repositorio oficial para lo último.
Cuándo usarlo
- Ejecuta un LLM en local, en un portátil o en la GPU de una estación de trabajo, en lugar de usar una API alojada
- Incluye funciones de IA en el navegador que se ejecutan en el cliente con WebGPU y WASM
- Integra modelos de lenguaje en el dispositivo dentro de apps de iOS o Android
- Añade un endpoint local compatible con OpenAI para desarrollo y pruebas
How MLC LLM compares
MLC LLM alongside other open-source local runtimes tools AI/TLDR tracks, ranked by GitHub stars.
| Herramienta | Estrellas | Qué hace |
|---|---|---|
| Ollama | ★ 189k | A developer-friendly tool that downloads and runs local LLMs from the terminal with a built-in OpenAI-compatible API. |
| llama.cpp | ★ 137k | A C/C++ inference engine that runs LLMs in the GGUF format on CPUs, Apple Silicon, and GPUs with low memory use. |
| GPT4All | ★ 77.3k | GPT4All is a free desktop app and Python client that runs large language models locally on your own computer, with no API calls or GPU required. |
| Colibrì | ★ 54.1k | A pure-C inference engine that keeps a Mixture-of-Experts model's dense trunk resident in RAM and streams its routed experts from disk, so 744B-2.8T models run on consumer hardware. |
| LocalAI | ★ 50.6k | A self-hosted server that exposes an OpenAI-compatible API for running text, vision, voice, and image models on local hardware. |
| Strata | ★ 49.5k | A one-click Windows and Linux engine that splits the 125B Qwen3.8-Flash-Next across GPU, RAM, CPU and SSD so it runs on a 12 GB gaming card, with OpenAI and Anthropic APIs on localhost. |
| Jan | ★ 46.3k | An open-source desktop app that runs LLMs fully offline as a ChatGPT-style assistant on your own computer. |
| MLC LLM | ★ 23.4k | Compila y ejecuta LLM de forma nativa en cualquier GPU, navegador o teléfono |

