> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-es/modelos-de-lenguaje/kimi-k2.md).

# Kimi K2.5

Despliega Kimi K2.5 (1T MoE multimodal) de Moonshot AI en GPUs de Clore.ai

Kimi K2.5, lanzado el 27 de enero de 2026 por Moonshot AI, es un **modelo multimodal Mixture-of-Experts de 1 billón de parámetros** con 32 mil millones de parámetros activos por token. Construido mediante preentrenamiento continuo sobre \~15 billones de tokens visuales y de texto mixtos sobre Kimi-K2-Base, entiende de forma nativa texto, imágenes y video. K2.5 introduce **Swarm de Agentes** tecnología — coordinando hasta 100 agentes de IA especializados simultáneamente — y logra un rendimiento de vanguardia en programación (76,8% SWE-bench Verified), visión y tareas agenticas. Disponible bajo una **licencia de pesos abiertos** en HuggingFace.

## Características clave

* **1T total / 32B activos** — arquitectura MoE de 384 expertos con atención MLA y SwiGLU
* **Multimodal nativo** — preentrenado con tokens de visión y lenguaje; entiende imágenes, video y texto
* **Swarm de Agentes** — descompone tareas complejas en subtareas en paralelo mediante agentes generados dinámicamente
* **ventana de contexto de 256K** — procesa bases de código completas, documentos largos y transcripciones de video
* **Razonamiento híbrido** — admite tanto el modo instantáneo (rápido) como el modo de pensamiento (razonamiento profundo)
* **Programación sólida** — 76,8% SWE-bench Verified, 73,0% SWE-bench Multilingual

## Requisitos

Kimi K2.5 es un modelo enorme — el checkpoint FP8 es de \~630 GB. Alojarlo por cuenta propia requiere hardware serio.

| Componente | Cuantizado (GGUF Q2)        | FP8 completo  |
| ---------- | --------------------------- | ------------- |
| GPU        | 1× RTX 4090 + 256 GB de RAM | 8× H200 141GB |
| VRAM       | 24 GB + descarga a CPU      | 1.128GB       |
| RAM        | 256 GB+                     | 256GB         |
| Disco      | SSD de 400 GB               | 700GB NVMe    |
| CUDA       | 12.8+                       | 12.8+         |

**Recomendación de Clore.ai**: Para servir con precisión completa, alquila 8× H200 ([bare metal](https://clore.ai/bare-metal)). Para inferencia local cuantizada, una sola H100 de 80 GB o incluso una RTX 4090 + una descarga intensiva a CPU funcionan a velocidad reducida.

## Inicio rápido con llama.cpp (cuantizado)

La forma más accesible de ejecutar K2.5 localmente — usando las cuantizaciones GGUF de Unsloth:

```bash
# Clona y compila llama.cpp
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
cmake -B build -DGGML_CUDA=ON && cmake --build build --config Release -j

# Descarga el modelo cuantizado (Q2_K_XL — 375 GB, buen equilibrio entre calidad y tamaño)
huggingface-cli download unsloth/Kimi-K2.5-GGUF \
  Kimi-K2.5-UD-Q2_K_XL-00001-of-00005.gguf \
  Kimi-K2.5-UD-Q2_K_XL-00002-of-00005.gguf \
  Kimi-K2.5-UD-Q2_K_XL-00003-of-00005.gguf \
  Kimi-K2.5-UD-Q2_K_XL-00004-of-00005.gguf \
  Kimi-K2.5-UD-Q2_K_XL-00005-of-00005.gguf \
  --local-dir ./models

# Ejecuta la inferencia (ajusta --n-gpu-layers según tu VRAM)
./build/bin/llama-server \
  -m ./models/Kimi-K2.5-UD-Q2_K_XL-00001-of-00005.gguf \
  --n-gpu-layers 10 \
  --threads 32 \
  --ctx-size 16384 \
  --host 0.0.0.0 --port 8080
```

> **Nota**: La visión aún no es compatible con GGUF/llama.cpp para K2.5. Para funciones multimodales, usa vLLM.

## Configuración de vLLM (Producción — Modelo completo)

Para servir en producción con soporte multimodal completo:

```bash
# Instala la versión nightly de vLLM (K2.5 requiere la más reciente)
pip install -U vllm --pre \
  --extra-index-url https://wheels.vllm.ai/nightly/cu129 \
  --extra-index-url https://download.pytorch.org/whl/cu128 \
  --index-strategy unsafe-best-match
```

### Servir en 8× GPUs H200

```bash
vllm serve moonshotai/Kimi-K2.5 \
  -tp 8 \
  --mm-encoder-tp-mode data \
  --tool-call-parser kimi_k2 \
  --reasoning-parser kimi_k2 \
  --trust-remote-code \\
  --gpu-memory-utilization 0.90
```

### Consulta con texto

```python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")

response = client.chat.completions.create(
    model="moonshotai/Kimi-K2.5",
    messages=[
        {"role": "system", "content": "Eres Kimi, un asistente de IA creado por Moonshot AI."},
        {"role": "user", "content": "Escribe un servicio FastAPI con soporte WebSocket para chat en tiempo real"}
    ],
    temperature=0.6,
    max_tokens=4096
)
print(response.choices[0].message.content)
```

### Consulta con imagen (multimodal)

```python
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY", timeout=3600)

response = client.chat.completions.create(
    model="moonshotai/Kimi-K2.5",
    messages=[{
        "role": "user",
        "content": [
            {
                "type": "image_url",
                "image_url": {"url": "https://example.com/diagram.png"}
            },
            {
                "type": "text",
                "text": "Describe este diagrama en detalle y extrae todo el texto."
            }
        ]
    }],
    max_tokens=2048
)
print(response.choices[0].message.content)
```

## Acceso a la API (sin necesidad de GPU)

Si alojarlo tú mismo es excesivo, usa la API oficial de Moonshot:

```python
from openai import OpenAI

# Plataforma Moonshot — API compatible con OpenAI
client = OpenAI(
    api_key="your-moonshot-api-key",
    base_url="https://api.moonshot.ai/v1"
)

response = client.chat.completions.create(
    model="kimi-k2.5",
    messages=[
        {"role": "user", "content": "Explica la arquitectura Agent Swarm en Kimi K2.5"}
    ],
    temperature=0.6,
    max_tokens=2048
)
print(response.choices[0].message.content)
```

## Llamada de herramientas

K2.5 sobresale en el uso de herramientas agenticas:

```python
import json
from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")

tools = [{
    "type": "function",
    "function": {
        "name": "search_code",
        "description": "Busca en una base de código archivos y funciones relevantes",
        "parameters": {
            "type": "object",
            "required": ["query"],
            "properties": {
                "query": {"type": "string", "description": "Consulta de búsqueda"}
            }
        }
    }
}]

response = client.chat.completions.create(
    model="moonshotai/Kimi-K2.5",
    messages=[{"role": "user", "content": "Encuentra todo el código relacionado con la autenticación en el proyecto"}],
    tools=tools,
    tool_choice="auto",
    temperature=0.6
)

for tool_call in response.choices[0].message.tool_calls:
    print(f"Function: {tool_call.function.name}")
    print(f"Args: {json.loads(tool_call.function.arguments)}")
```

## Inicio rápido con Docker

```bash
# Usando vLLM Docker con 8 GPU
docker run --gpus all -p 8000:8000 \\
  --ipc=host \
  -v ~/.cache/huggingface:/root/.cache/huggingface \\
  vllm/vllm-openai:latest \
  --model moonshotai/Kimi-K2.5 \
  --tensor-parallel-size 8 \
  --mm-encoder-tp-mode data \
  --tool-call-parser kimi_k2 \
  --reasoning-parser kimi_k2 \
  --trust-remote-code
```

## Consejos para usuarios de Clore.ai

* **compromiso entre API y autoalojamiento**: El K2.5 completo necesita 8× H200 a [bare metal](https://clore.ai/bare-metal). La API de Moonshot tiene nivel gratuito o pago por token — usa la API para explorar, aloja por tu cuenta para cargas de producción sostenidas.
* **Cuantizado en una sola GPU**: El Unsloth GGUF Q2\_K\_XL (\~375 GB) puede ejecutarse en una RTX 4090 (US$0,14–0,42/h) con 256 GB de RAM mediante descarga a CPU — espera \~5–10 tok/s. Lo suficientemente bueno para uso personal y desarrollo.
* **K2 solo de texto para configuraciones económicas**: Si no necesitas visión, `moonshotai/Kimi-K2-Instruct` es el predecesor solo de texto — el mismo MoE de 1T pero más ligero de desplegar (sin la sobrecarga del codificador de visión).
* **Ajusta la temperatura correctamente**: Usa `temperature=0.6` para el modo instantáneo, `temperature=1.0` para el modo de pensamiento. Una temperatura incorrecta provoca repetición o incoherencia.
* **Paralelismo entre expertos para mayor rendimiento**: En configuraciones multinodo, usa `--enable-expert-parallel` en vLLM para mayor rendimiento. Consulta la documentación de vLLM para la configuración de EP.

## Solución de problemas

| Problema                                   | Solución                                                                                                         |
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
| `OutOfMemoryError` con el modelo completo  | Necesita 8× H200 (1128 GB en total). Usa pesos FP8, establece `--gpu-memory-utilization 0.90`.                   |
| la inferencia GGUF es muy lenta            | Asegúrate de tener suficiente RAM para el tamaño cuantizado. Q2\_K\_XL necesita \~375 GB combinados de RAM+VRAM. |
| La visión no funciona en llama.cpp         | El soporte de visión para K2.5 GGUF aún no está disponible — usa vLLM para multimodal.                           |
| Salida repetitiva                          | Establece `temperature=0.6` (instantáneo) o `1.0` (pensamiento). Añade `min_p=0.01`.                             |
| La descarga del modelo tarda una eternidad | checkpoint FP8 de \~630 GB. Usa `huggingface-cli download` con `--resume-download`.                              |
| Las llamadas a herramientas no se analizan | Añade `--tool-call-parser kimi_k2 --enable-auto-tool-choice` al comando vLLM serve.                              |

## Lecturas adicionales

* [Kimi K2.5 en HuggingFace](https://huggingface.co/moonshotai/Kimi-K2.5)
* [Blog técnico de Kimi K2.5](https://www.kimi.com/blog/kimi-k2-5.html)
* [Artículo técnico de Kimi K2.5](https://arxiv.org/abs/2602.02276)
* [Receta K2.5 de vLLM](https://docs.vllm.ai/projects/recipes/en/latest/moonshotai/Kimi-K2.5.html)
* [Cuantizaciones GGUF de Unsloth](https://huggingface.co/unsloth/Kimi-K2.5-GGUF)
* [Plataforma API de Moonshot](https://platform.moonshot.ai)
* [GitHub de Kimi K2](https://github.com/MoonshotAI/Kimi-K2)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-es/modelos-de-lenguaje/kimi-k2.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
