offgrid-ai 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.mjs +7 -4
- package/src/logs.mjs +7 -0
package/package.json
CHANGED
package/src/cli.mjs
CHANGED
|
@@ -637,12 +637,15 @@ async function runProfile(profile, options = {}) {
|
|
|
637
637
|
// Show memory estimate for local models
|
|
638
638
|
if (!isManaged && profile.modelPath && existsSync(profile.modelPath)) {
|
|
639
639
|
try {
|
|
640
|
-
const est = estimateMemory(profile.modelPath, profile.mmprojPath,
|
|
641
|
-
|
|
640
|
+
const est = estimateMemory(profile.modelPath, profile.mmprojPath, profile.drafterPath, profile.flags);
|
|
641
|
+
const rows = [
|
|
642
642
|
["Estimated total", pc.bold(`~${formatBytes(est.totalBytes)}`)],
|
|
643
643
|
["Model file", formatBytes(est.modelBytes)],
|
|
644
|
-
|
|
645
|
-
|
|
644
|
+
];
|
|
645
|
+
if (est.draftBytes) rows.push(["Drafter", formatBytes(est.draftBytes)]);
|
|
646
|
+
if (est.mmprojBytes) rows.push(["Vision projector", formatBytes(est.mmprojBytes)]);
|
|
647
|
+
rows.push(["Conversation memory", est.kvBytes ? `~${formatBytes(est.kvBytes)}` : "unknown"]);
|
|
648
|
+
console.log(renderSection("Memory estimate", renderRows(rows)));
|
|
646
649
|
} catch { /* estimate failed, skip */ }
|
|
647
650
|
}
|
|
648
651
|
|
package/src/logs.mjs
CHANGED
|
@@ -32,6 +32,13 @@ export function tailFriendly(rawLogPath, friendlyLogPath) {
|
|
|
32
32
|
function friendlyLine(line) {
|
|
33
33
|
const lower = line.toLowerCase();
|
|
34
34
|
const trimmed = line.trim();
|
|
35
|
+
// Known-harmless errors during MTP memory estimation — llama.cpp tries to measure
|
|
36
|
+
// the draft model's memory usage before allocating the shared KV cache, which
|
|
37
|
+
// fails because the assistant architecture needs the trunk context. This is
|
|
38
|
+
// expected and the server proceeds to load the draft model correctly afterward.
|
|
39
|
+
if (lower.includes("ctx_other") || lower.includes("failed to measure draft model memory")) {
|
|
40
|
+
return pc.dim(`[mtp] ${trimmed}`);
|
|
41
|
+
}
|
|
35
42
|
if (lower.includes("error") || lower.includes("failed")) return pc.red(`[error] ${trimmed}`);
|
|
36
43
|
if (lower.includes("listening") || lower.includes("http server")) return pc.green(`[server] ${trimmed}`);
|
|
37
44
|
if (lower.includes("llm_load") || lower.includes("load_model") || lower.includes("loading model")) return pc.cyan(`[load] ${trimmed}`);
|