Compare commits
3 Commits
fix/versio
...
fix/perf-a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48a6166a57 | ||
| 35730871bf | |||
| 6593f78ded |
@@ -120,7 +120,7 @@ export async function GET() {
|
|||||||
ok: envError === null,
|
ok: envError === null,
|
||||||
error: envError,
|
error: envError,
|
||||||
},
|
},
|
||||||
version: "0.5.0",
|
version: "0.6.0",
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1804,8 +1804,13 @@ function ConfigTab({
|
|||||||
No .gguf files found
|
No .gguf files found
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
) : (
|
) : (
|
||||||
models.map((m) => (
|
models.filter((m) => m.kind === "base").map((m) => (
|
||||||
<SelectItem key={m.name} value={m.name}>
|
<SelectItem key={m.relativePath} value={m.relativePath}>
|
||||||
|
{m.subdir && (
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{m.subdir}/
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
<span className="font-mono">{m.name}</span>
|
<span className="font-mono">{m.name}</span>
|
||||||
<span className="ml-2 text-muted-foreground text-xs">{m.sizeHuman}</span>
|
<span className="ml-2 text-muted-foreground text-xs">{m.sizeHuman}</span>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
@@ -1913,11 +1918,18 @@ function ConfigTab({
|
|||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent>
|
<SelectContent>
|
||||||
<SelectItem value="__none__">— None —</SelectItem>
|
<SelectItem value="__none__">— None —</SelectItem>
|
||||||
{models.map((m) => (
|
{models
|
||||||
<SelectItem key={m.name} value={m.name}>
|
.filter((m) => m.kind === "mtp" || m.kind === "draft")
|
||||||
<span className="font-mono">{m.name}</span>
|
.map((m) => (
|
||||||
</SelectItem>
|
<SelectItem key={m.relativePath} value={m.relativePath}>
|
||||||
))}
|
{m.subdir && (
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{m.subdir}/
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<span className="font-mono">{m.name}</span>
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
</div>
|
</div>
|
||||||
@@ -1936,6 +1948,67 @@ function ConfigTab({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{/* Multimodal (mmproj) — vision projector for VL models */}
|
||||||
|
<div className="rounded-md border p-4 space-y-3 bg-muted/20">
|
||||||
|
<div>
|
||||||
|
<span className="text-sm font-medium flex items-center gap-2">
|
||||||
|
<Zap className="h-4 w-4 text-warning" />
|
||||||
|
Multimodal projector (mmproj)
|
||||||
|
</span>
|
||||||
|
<p className="text-xs text-muted-foreground mt-0.5">
|
||||||
|
Vision projector for VL models (Qwen3-VL, Llama 3.2 Vision, etc.).
|
||||||
|
Select the mmproj .gguf file that matches your base model.
|
||||||
|
Leave empty for text-only models.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div className="space-y-1.5">
|
||||||
|
<Label htmlFor="mmproj-select">mmproj file</Label>
|
||||||
|
<Select
|
||||||
|
value={config.mmprojPath || "__none__"}
|
||||||
|
onValueChange={(v) => update("mmprojPath", v === "__none__" ? "" : v)}
|
||||||
|
>
|
||||||
|
<SelectTrigger id="mmproj-select">
|
||||||
|
<SelectValue placeholder="None (text-only)" />
|
||||||
|
</SelectTrigger>
|
||||||
|
<SelectContent>
|
||||||
|
<SelectItem value="__none__">— None (text-only) —</SelectItem>
|
||||||
|
{models
|
||||||
|
.filter((m) => m.kind === "mmproj")
|
||||||
|
.map((m) => (
|
||||||
|
<SelectItem key={m.relativePath} value={m.relativePath}>
|
||||||
|
{m.subdir && (
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{m.subdir}/
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<span className="font-mono">{m.name}</span>
|
||||||
|
<span className="ml-2 text-muted-foreground text-xs">{m.sizeHuman}</span>
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
|
{/* Also show base models as fallback (some mmproj files
|
||||||
|
don't have 'mmproj' in the name) */}
|
||||||
|
{models.filter((m) => m.kind === "mmproj").length === 0 && (
|
||||||
|
models.map((m) => (
|
||||||
|
<SelectItem key={m.relativePath} value={m.relativePath}>
|
||||||
|
{m.subdir && (
|
||||||
|
<span className="text-muted-foreground text-xs">
|
||||||
|
{m.subdir}/
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<span className="font-mono">{m.name}</span>
|
||||||
|
</SelectItem>
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</SelectContent>
|
||||||
|
</Select>
|
||||||
|
{config.mmprojPath && (
|
||||||
|
<div className="text-[10px] text-muted-foreground font-mono">
|
||||||
|
--mmproj /models/{config.mmprojPath}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="grid gap-4 sm:grid-cols-2">
|
<div className="grid gap-4 sm:grid-cols-2">
|
||||||
<div className="space-y-1.5">
|
<div className="space-y-1.5">
|
||||||
<Label htmlFor="overflow">Context overflow</Label>
|
<Label htmlFor="overflow">Context overflow</Label>
|
||||||
@@ -3923,7 +3996,9 @@ function OverviewView({
|
|||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const gen = props.default_generation_settings as
|
// Try multiple key names — llama.cpp has changed these across versions
|
||||||
|
const gen = (props.default_generation_settings ||
|
||||||
|
props.generation_settings) as
|
||||||
| {
|
| {
|
||||||
n_predict?: number;
|
n_predict?: number;
|
||||||
temperature?: number;
|
temperature?: number;
|
||||||
@@ -3949,8 +4024,30 @@ function OverviewView({
|
|||||||
? activeSlots.reduce((s, x) => s + (x.timings?.predicted_per_second || 0), 0) /
|
? activeSlots.reduce((s, x) => s + (x.timings?.predicted_per_second || 0), 0) /
|
||||||
activeSlots.length
|
activeSlots.length
|
||||||
: null;
|
: null;
|
||||||
const hasMultimodal = Boolean(props.has_multimodal);
|
const hasMultimodal = Boolean(
|
||||||
const totalSlots = (props.total_slots as number) || slots.length;
|
props.has_multimodal ?? props.mmproj_path ?? props.is_multimodal
|
||||||
|
);
|
||||||
|
const totalSlots =
|
||||||
|
(props.total_slots as number) ||
|
||||||
|
(props.n_slots as number) ||
|
||||||
|
slots.length;
|
||||||
|
// Ctx usage — guard against NaN (slots may not have n_past/n_ctx when idle)
|
||||||
|
const ctxUsed = slots.reduce(
|
||||||
|
(s, x) => s + (typeof x.n_past === "number" ? x.n_past : 0),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
const ctxTotal = slots.reduce(
|
||||||
|
(s, x) => s + (typeof x.n_ctx === "number" ? x.n_ctx : 0),
|
||||||
|
0
|
||||||
|
);
|
||||||
|
// n_context from props (might be n_context or n_ctx_total)
|
||||||
|
const totalCtx =
|
||||||
|
(props.n_context as number) ||
|
||||||
|
(props.n_ctx_total as number) ||
|
||||||
|
ctxTotal ||
|
||||||
|
null;
|
||||||
|
|
||||||
|
const [showRaw, setShowRaw] = React.useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
@@ -3969,11 +4066,10 @@ function OverviewView({
|
|||||||
<MetricCell
|
<MetricCell
|
||||||
label="Ctx usage"
|
label="Ctx usage"
|
||||||
value={
|
value={
|
||||||
slots.length > 0
|
ctxTotal > 0
|
||||||
? `${slots.reduce((s, x) => s + x.n_past, 0)} / ${slots.reduce(
|
? `${ctxUsed} / ${ctxTotal}`
|
||||||
(s, x) => s + x.n_ctx,
|
: ctxUsed > 0
|
||||||
0
|
? `${ctxUsed}`
|
||||||
)}`
|
|
||||||
: "—"
|
: "—"
|
||||||
}
|
}
|
||||||
hint="tokens across all slots"
|
hint="tokens across all slots"
|
||||||
@@ -4008,7 +4104,7 @@ function OverviewView({
|
|||||||
/>
|
/>
|
||||||
<MetricCell
|
<MetricCell
|
||||||
label="Total ctx"
|
label="Total ctx"
|
||||||
value={typeof props.n_context === "number" ? `${props.n_context}` : "—"}
|
value={totalCtx != null ? `${totalCtx}` : "—"}
|
||||||
hint="n_ctx × parallel"
|
hint="n_ctx × parallel"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -4051,6 +4147,32 @@ function OverviewView({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Raw JSON dump — for debugging when fields are missing */}
|
||||||
|
<div>
|
||||||
|
<button
|
||||||
|
className="text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline"
|
||||||
|
onClick={() => setShowRaw((v) => !v)}
|
||||||
|
>
|
||||||
|
{showRaw ? "▼" : "▶"} Raw /props + /slots JSON
|
||||||
|
</button>
|
||||||
|
{showRaw && (
|
||||||
|
<div className="mt-2 space-y-2">
|
||||||
|
<div>
|
||||||
|
<div className="text-[10px] text-muted-foreground mb-1">/props:</div>
|
||||||
|
<pre className="text-[10px] font-mono whitespace-pre-wrap bg-zinc-950 dark:bg-black text-zinc-300 rounded-md border p-2 max-h-40 overflow-y-auto scrollbar-thin">
|
||||||
|
{JSON.stringify(props, null, 2)}
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<div className="text-[10px] text-muted-foreground mb-1">/slots:</div>
|
||||||
|
<pre className="text-[10px] font-mono whitespace-pre-wrap bg-zinc-950 dark:bg-black text-zinc-300 rounded-md border p-2 max-h-40 overflow-y-auto scrollbar-thin">
|
||||||
|
{JSON.stringify(slots, null, 2)}
|
||||||
|
</pre>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -4077,7 +4199,7 @@ function SlotsView({ slots }: { slots: SlotInfo[] }) {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-xs text-muted-foreground font-mono">
|
<div className="text-xs text-muted-foreground font-mono">
|
||||||
ctx: {s.n_past}/{s.n_ctx}
|
ctx: {s.n_past ?? "?"}/{s.n_ctx ?? "?"}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Displayed in the footer and available via /api/debug so the user can
|
* Displayed in the footer and available via /api/debug so the user can
|
||||||
* verify the update actually took effect.
|
* verify the update actually took effect.
|
||||||
*/
|
*/
|
||||||
export const DASHBOARD_VERSION = "0.5.0";
|
export const DASHBOARD_VERSION = "0.6.0";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build timestamp — set at build time by Next.js.
|
* Build timestamp — set at build time by Next.js.
|
||||||
|
|||||||
Reference in New Issue
Block a user