Deixe o seu agente de programação escolher o modelo.
Escolher um modelo para as suas placas significa escolher uma quantização, um mecanismo (vLLM ou llama.cpp), como dividi-lo entre as GPUs, quanto contexto dar a ele, o tipo de cache KV e se a decodificação especulativa ajuda. Cada palpite custa um download e um carregamento. Um agente de programação pode fazer essa busca por você enquanto você faz outra coisa, porque tudo o que o console faz é uma chamada de API.
Configure em três passos
- Instale o LM Warden no host com GPU (o comando está em Baixar e instalar) e conclua o assistente de configuração.
- Emita um token de administrador em Settings → Access Tokens, com validade de 30 dias. Exporte-o como
VW_ADMIN_TOKENe o endereço do warden comoWno shell que o seu agente usa. - Inicie o seu agente: Claude Code, Codex CLI ou outro que consiga executar comandos de shell. Ele pode usar um modelo hospedado para essa tarefa; o modelo que ele está ajustando é o das suas placas.
O que o agente usa
| Passo | Endpoint |
|---|---|
| Ver as placas | GET /api/system/gpus |
| Verificar se um modelo cabe, antes do download | POST /api/models/fit-preview |
| Registrar e obter uma configuração inicial | POST /api/models, GET /api/models/{model_id}/suggest-config |
| Baixar e carregar | POST /api/models/{model_id}/pull, POST /api/models/{model_id}/load |
| Medir o limite real de contexto | POST /api/models/{model_id}/stress, depois POST /api/models/{model_id}/stress/apply |
| Ler os números do warden | GET /api/stats/v2/throughput, GET /api/stats/v2/latency |
| Enviar tráfego de teste | uma chave de inferência de POST /api/tokens, em /v1/chat/completions |
O agente lê primeiro o guia do agente: uma descrição curta dessas chamadas escrita para um modelo de linguagem, com os erros a evitar.
Prompts para colar
Substitua https://your-warden pelo endereço do seu warden, e os nomes em maiúsculas por modelos que você tem em mente.
1. Examinar o hardware e pré-selecionar 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. Escolher o mecanismo e o layout para um 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 os limites reais e aplicá-los
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 dois candidatos na minha carga de trabalho
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 começar
- Um token de administrador tem direitos totais de administração sobre o warden: modelos, chaves e configurações. Ainda não há escopos mais restritos. Dê a ele uma validade curta.
- Um teste de estresse derruba um mecanismo de propósito para encontrar o limite dele. Rode esses prompts em um warden do qual ninguém mais dependa.
- Os downloads são grandes. Os prompts pedem que o agente verifique se o modelo cabe antes de baixar, mas fique de olho no disco.
- Revogue o token de administrador em Settings → Access Tokens quando o trabalho terminar.