v5 Phase 1: Erklaeren (Swapping/RAM, Kontext, Guides-Neubau)
- Swapping-Klartext + Spitzenbedarf (peak_ram) pro Modell: Modelle-Konfig + Cookbook-Setup-Modal zeigen 'nur ein Modell gleichzeitig, groesstes zaehlt'. models.py: peak_ram_gb/_optimal in Meta. - Kontextfenster: infoDot(ⓘ)-Helfer in ui.js + Tooltips an ctx-Feldern. - Guides-Tab komplett neu = echter Anfaenger-Guide (LLM/GGUF/Quant/Kontext/Swapping/MCP/Skills/Agenten). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
// models.js — "Modelle"-Ansicht (v3): Schnelltest-Chat, Modell-Tabelle, Kontext-Konfiguration.
|
||||
|
||||
import { api } from "../core/api.js";
|
||||
import { $, badge, esc, toast, confirmModal } from "../core/ui.js";
|
||||
import { $, badge, esc, toast, confirmModal, infoDot } from "../core/ui.js";
|
||||
|
||||
const CTX_HELP = "Kontext = das Kurzzeitgedächtnis des Modells. Größer = merkt sich mehr (längere Dateien/Chats), braucht aber mehr Speicher und wird etwas langsamer.";
|
||||
|
||||
let ALL = [];
|
||||
function refreshSoon() { document.dispatchEvent(new Event("mc:refresh")); }
|
||||
@@ -53,14 +55,14 @@ function mount() {
|
||||
<button id="cfg-close" class="ghost" style="position:absolute;top:14px;right:14px">Schließen</button>
|
||||
<h3>Modell konfigurieren</h3>
|
||||
<p class="mono-sm" id="cfg-model-name" style="margin:-4px 0 16px"></p>
|
||||
<label>Kontext-Größe (Tokens)</label>
|
||||
<label>Kontext-Größe (Tokens) ${infoDot(CTX_HELP)}</label>
|
||||
<input id="cfg-ctx" type="number" value="8192">
|
||||
<div class="hint">Höhere Werte erlauben längere Texte, brauchen aber mehr Grafikspeicher.</div>
|
||||
<div class="tile" id="cfg-rec" style="display:none;margin:0 0 14px;justify-content:space-between;align-items:center" >
|
||||
<div class="tile" id="cfg-rec" style="display:none;margin:8px 0 10px;justify-content:space-between;align-items:center" >
|
||||
<div style="flex:1"><div style="font-size:13px">Empfohlen für deine Hardware</div>
|
||||
<div class="hint" id="cfg-rec-note" style="margin:4px 0 0"></div></div>
|
||||
<button class="ghost" id="cfg-rec-apply">Optimal übernehmen</button>
|
||||
</div>
|
||||
<div class="hint" style="margin-bottom:14px">Es läuft immer nur <b>ein</b> Modell gleichzeitig — ein größerer Kontext hier beeinflusst deine anderen Modelle nicht.</div>
|
||||
<button class="primary" id="cfg-save" style="width:100%;margin-top:6px">Speichern</button>
|
||||
</div>
|
||||
</div>`;
|
||||
@@ -104,9 +106,10 @@ function openConfig(alias) {
|
||||
$("#cfg-ctx").value = m.meta?.ctx || 8192;
|
||||
const opt = m.meta?.optimal_ctx, rec = $("#cfg-rec");
|
||||
if (opt) {
|
||||
const cur = m.meta?.ctx || 0;
|
||||
$("#cfg-rec-note").textContent =
|
||||
`Bis ~${Math.round(opt / 1024)}k passt komfortabel. Aktuell: ~${Math.round(cur / 1024)}k.`;
|
||||
const cur = m.meta?.ctx || 0, peak = m.meta?.peak_ram_gb, peakOpt = m.meta?.peak_ram_optimal_gb;
|
||||
$("#cfg-rec-note").innerHTML =
|
||||
`Optimal ~${Math.round(opt / 1024)}k → ~${peakOpt} GB Spitzenbedarf.<br>` +
|
||||
`Aktuell ~${Math.round(cur / 1024)}k → ~${peak} GB.`;
|
||||
$("#cfg-rec-apply").onclick = () => { $("#cfg-ctx").value = opt; };
|
||||
rec.style.display = "flex";
|
||||
} else { rec.style.display = "none"; }
|
||||
|
||||
Reference in New Issue
Block a user