LM Warden

Lassen Sie Ihren Coding-Agenten das Modell wählen.

Ein Modell für Ihre Karten auszuwählen heißt: eine Quantisierung wählen, eine Engine (vLLM oder llama.cpp), die Aufteilung auf die GPUs, die Kontextgröße, den KV-Cache-Typ und ob spekulatives Decoding hilft. Jeder Versuch kostet einen Download und einen Ladevorgang. Ein Coding-Agent kann diese Suche für Sie übernehmen, während Sie etwas anderes tun, denn alles, was die Konsole tut, ist ein API-Aufruf.

Einrichtung in drei Schritten

  1. Installieren Sie LM Warden auf dem GPU-Host (der Befehl steht unter Download & Installation) und schließen Sie den Einrichtungsassistenten ab.
  2. Stellen Sie ein Admin-Token aus, unter Settings → Access Tokens mit einer Gültigkeit von 30 Tagen. Exportieren Sie es als VW_ADMIN_TOKEN und die Adresse des Wardens als W in der Shell, die Ihr Agent verwendet.
  3. Starten Sie Ihren Agenten: Claude Code, Codex CLI oder einen anderen, der Shell-Befehle ausführen kann. Für diese Aufgabe kann er ein gehostetes Modell nutzen; optimiert wird das Modell auf Ihren Karten.

Was der Agent verwendet

SchrittEndpunkt
Karten erfassenGET /api/system/gpus
Vor dem Download prüfen, ob ein Modell passtPOST /api/models/fit-preview
Registrieren, eine Startkonfiguration erhaltenPOST /api/models, GET /api/models/{model_id}/suggest-config
Herunterladen und ladenPOST /api/models/{model_id}/pull, POST /api/models/{model_id}/load
Die echte Kontextobergrenze messenPOST /api/models/{model_id}/stress, dann POST /api/models/{model_id}/stress/apply
Die Zahlen des Wardens lesenGET /api/stats/v2/throughput, GET /api/stats/v2/latency
Testverkehr sendenein Inferenzschlüssel aus POST /api/tokens, für /v1/chat/completions

Der Agent liest zuerst den Agent-Leitfaden: eine kurze Beschreibung dieser Aufrufe, geschrieben für ein Sprachmodell, samt typischer Fehler, die es zu vermeiden gilt.

Prompts zum Einfügen

Ersetzen Sie https://your-warden durch die Adresse Ihres Wardens und die großgeschriebenen Namen durch die Modelle, die Sie im Sinn haben.

1. Die Hardware erfassen und Modelle vorauswählen

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. Engine und Aufteilung für ein Modell wählen

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. Die echten Grenzen finden und anwenden

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. Zwei Kandidaten mit meiner Arbeitslast vergleichen

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.

Bevor Sie beginnen

  • Ein Admin-Token hat volle Administratorrechte über den Warden: Modelle, Schlüssel und Einstellungen. Feiner abgestufte Berechtigungen gibt es noch nicht. Geben Sie ihm eine kurze Laufzeit.
  • Ein Stresstest bringt eine Engine absichtlich zum Absturz, um ihre Grenze zu finden. Führen Sie diese Prompts auf einem Warden aus, von dem sonst niemand abhängt.
  • Downloads sind groß. Die Prompts weisen den Agenten an, vor dem Herunterladen zu prüfen, ob das Modell passt, aber behalten Sie Ihren Speicherplatz im Blick.
  • Widerrufen Sie das Admin-Token unter Settings → Access Tokens, wenn die Aufgabe erledigt ist.