Deja que tu agente de programación elija el modelo.
Elegir un modelo para tus tarjetas implica elegir una cuantización, un motor (vLLM o llama.cpp), cómo repartirlo entre las GPU, cuánto contexto darle, el tipo de caché KV y si conviene la decodificación especulativa. Cada intento cuesta una descarga y una carga. Un agente de programación puede hacer esa búsqueda por ti mientras haces otra cosa, porque todo lo que hace la consola es una llamada a la API.
Configúralo en tres pasos
- Instala LM Warden en el host con GPU (el comando está en Descargar e instalar) y completa el asistente de configuración.
- Genera un token de administrador en Settings → Access Tokens, con una caducidad de 30 días. En el shell que usa tu agente, expórtalo como
VW_ADMIN_TOKENy exporta la dirección del warden comoW. - Inicia tu agente: Claude Code, Codex CLI u otro que pueda ejecutar comandos de shell. Para este trabajo puede usar un modelo en la nube; el modelo que ajusta es el de tus tarjetas.
Lo que usa el agente
| Paso | Punto de conexión |
|---|---|
| Ver las tarjetas | GET /api/system/gpus |
| Comprobar que un modelo cabe antes de descargarlo | POST /api/models/fit-preview |
| Registrar el modelo y obtener una configuración inicial | POST /api/models, GET /api/models/{model_id}/suggest-config |
| Descargar y cargar | POST /api/models/{model_id}/pull, POST /api/models/{model_id}/load |
| Medir el límite real de contexto | POST /api/models/{model_id}/stress y luego POST /api/models/{model_id}/stress/apply |
| Leer las cifras del warden | GET /api/stats/v2/throughput, GET /api/stats/v2/latency |
| Enviar tráfico de prueba | una clave de inferencia de POST /api/tokens, en /v1/chat/completions |
El agente lee primero la guía para agentes: una breve descripción de estas llamadas escrita para un modelo de lenguaje, con los errores que hay que evitar.
Prompts para pegar
Sustituye https://your-warden por la dirección de tu warden, y los nombres en mayúsculas por los modelos que te interesen.
1. Inventariar el hardware y preseleccionar modelos
Read https://your-warden/agent-guide.md and follow it. My admin token is in $VW_ADMIN_TOKEN and the warden is at $W. List the GPUs this warden may use. Then shortlist three open-weight models from Hugging Face that fit them, for agentic coding with tool calling. Check each with POST /api/models/fit-preview and keep only those that fit with at least 65536 tokens of context. Show me a table: model, quantisation, engine, GPUs, context, and why. Do not download anything yet.
2. Elegir el motor y la distribución para un modelo
Read https://your-warden/agent-guide.md and follow it. Credentials are in $VW_ADMIN_TOKEN and $W. For the model MODEL_REPO, decide between vLLM and llama.cpp, and between tensor parallel and data parallel replicas on my GPUs. Use fit-preview for every layout you consider. Register and load the best two layouts one after the other, send each the same 20 streaming requests through an inference key you issue, and compare time to first token and tokens per second at concurrency 1 and 8. Keep the winner loaded, unload the other, revoke the key, and report the numbers.
3. Encontrar los límites reales y aplicarlos
Read https://your-warden/agent-guide.md and follow it. Credentials are in $VW_ADMIN_TOKEN and $W. The loaded model is MODEL_NAME. Nobody else is using this warden right now. Run a quick stress run on it, wait for it to finish, read its capabilities and apply the measured context. Then benchmark it at concurrency 1, 4 and 16 with prompts of about 2k and 30k tokens, and give me a table of time to first token and tokens per second.
4. Comparar dos candidatos con mi carga de trabajo
Read https://your-warden/agent-guide.md and follow it. Credentials are in $VW_ADMIN_TOKEN and $W. Compare MODEL_A and MODEL_B for my workload: the prompts in ./workload/*.txt. Load each in turn with its best layout, replay the prompts at concurrency 4, and record latency, tokens per second, and whether each answer is correct by your judgement. Write the results to ./model-comparison.md with a recommendation, and leave the recommended model loaded.
Antes de empezar
- Un token de administrador tiene todos los permisos de administración sobre el warden: modelos, claves y configuración. Todavía no hay permisos más restringidos. Dale una caducidad corta.
- Una prueba de estrés hace fallar un motor a propósito para encontrar su límite. Ejecuta estos prompts en un warden del que no dependa nadie más.
- Las descargas son grandes. Los prompts piden al agente que compruebe que el modelo cabe antes de descargarlo, pero vigila el espacio en disco.
- Revoca el token de administrador en Settings → Access Tokens cuando termine el trabajo.