Deployments: llama.cpp web UI toggle, clearer start failures, log fixes

- Web UI option for llama.cpp deployments (--no-webui when off); the deployment
  page links to it on the published host port.
- Follow container logs after the start with tail=all: following a created
  container returned an already-closed stream, so startup output was lost.
- Failed starts name the cause from the log (vLLM ValueError, llama.cpp error
  lines) before the last output.
- A deployment's vLLM dtype replaces the runtime's --dtype instead of repeating it.
- vLLM memory estimate: 3 GiB overhead (measured ~6.9 GiB for SmolLM2-135M
  with a 4 GiB KV cache).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Pascal LinxweilerandClaude Opus 5.5 committed 2026-10-06 12:01:52 +02:00
1 parent 8b74fa69db
commit 66e6a8c4f7
11 files changed
+130 -23

No files matched your search

@@ -1,6 +1,6 @@
"use client";
import { PencilIcon, PlayIcon, SendIcon, SquareIcon, Trash2Icon } from "lucide-react";
import { ExternalLinkIcon, PencilIcon, PlayIcon, SendIcon, SquareIcon, Trash2Icon } from "lucide-react";
import Link from "next/link";
import { useRouter } from "next/navigation";
import { useEffect, useRef, useState, useSyncExternalStore } from "react";
@@ -74,6 +74,8 @@ export function DeploymentDetail({ initial }: { initial: Deployment }) {
() => null,
);
const published = d.hostPort && hostname ? `http://${hostname}:${d.hostPort}/v1` : null;
// llama-server's built-in chat UI, served at / on the same port.
const webUi = d.engine === "llama.cpp" && d.options.webui !== false && d.hostPort && hostname ? `http://${hostname}:${d.hostPort}/` : null;
return (
<div className="flex flex-col gap-4">
@@ -95,6 +97,18 @@ export function DeploymentDetail({ initial }: { initial: Deployment }) {
<code className="font-mono text-xs text-muted-foreground">{d.runtimeImage}</code>
</div>
<div className="flex flex-wrap items-center gap-2">
{webUi && (
<a
href={webUi}
target="_blank"
rel="noreferrer"
className={cn(buttonVariants({ variant: "outline" }), d.state !== "running" && "pointer-events-none opacity-50")}
aria-disabled={d.state !== "running"}
>
<ExternalLinkIcon />
Web UI
</a>
)}
{active ? (
<Button variant="outline" onClick={() => stopDeployment(d.id)}>
<SquareIcon />
@@ -108,6 +108,7 @@ export function DeploymentForm({
const [cacheTypeK, setCacheTypeK] = useState(o?.cacheTypeK ?? "");
const [cacheTypeV, setCacheTypeV] = useState(o?.cacheTypeV ?? "");
const [flashAttn, setFlashAttn] = useState(o?.flashAttn ?? "");
const [webui, setWebui] = useState(o?.webui !== false);
const [batchSize, setBatchSize] = useState(o?.batchSize != null ? String(o.batchSize) : "");
const [ubatchSize, setUbatchSize] = useState(o?.ubatchSize != null ? String(o.ubatchSize) : "");
const [dtype, setDtype] = useState(o?.dtype ?? "");
@@ -142,6 +143,7 @@ export function DeploymentForm({
cacheTypeK: engine === "llama.cpp" && cacheTypeK ? cacheTypeK : null,
cacheTypeV: engine === "llama.cpp" && cacheTypeV ? cacheTypeV : null,
flashAttn: engine === "llama.cpp" && flashAttn ? (flashAttn as "auto" | "on" | "off") : null,
webui: engine === "llama.cpp" ? webui : null,
dtype: engine === "vllm" && dtype ? dtype : null,
maxNumSeqs: engine === "vllm" ? intOrNull(maxNumSeqs) : null,
kvCacheGb: engine === "vllm" ? numOrNull(kvCacheGb) : null,
@@ -414,6 +416,12 @@ export function DeploymentForm({
<option value="off">off</option>
</select>
</Field>
<Field label="Web UI" hint={webui ? (hostPort ? `Opens at http://<server>:${hostPort}/` : "Needs a host port to open it (below).") : "--no-webui"}>
<select value={webui ? "on" : "off"} onChange={(e) => setWebui(e.target.value === "on")} className={selectClass}>
<option value="on">on</option>
<option value="off">off</option>
</select>
</Field>
<Field label="Batch / micro-batch" hint="-b / -ub">
<div className="flex gap-1.5">
<Input value={batchSize} onChange={(e) => setBatchSize(e.target.value.replace(/\D/g, ""))} inputMode="numeric" placeholder="2048" aria-label="Batch size" />