chore(llm): update callers for renamed model variants
Picks up the registry rename in the front-end and Tauri command layer:
- src/lib/types/app.ts: LlmModelIdStr now lists the four new ids
(qwen3_5_2b / qwen3_5_4b / qwen3_5_9b / qwen3_6_27b).
- src/lib/pages/SettingsPage.svelte: LLM_MODELS table rebuilt with
four tiers (Minimal / Standard / High / Maximum), matching subtitles
and download-size copy. selectedLlmModelId fallback, hardware-warning
thresholds, tier-availability check, and ensureRecommendedLlmTier
fallback all retargeted at the new ids. The Maximum tier surfaces a
64 GB / 24 GB warning so users with mid-range hardware see honest
expectations.
- src-tauri/src/commands/llm.rs and commands/tasks.rs: doc-comment
examples refreshed (Qwen3 4B → Qwen3.5 4B, Qwen3's tokenizer →
Qwen's tokenizer — the BPE family is shared).
- src/lib/stores/llmStatus.svelte.ts: chip-detail example updated.
cargo build --workspace clean. cargo test --workspace clean.
npx svelte-check reports one pre-existing error in vite.config.js
(unused @ts-expect-error directive, dates back to the original
scaffold commit 9926a42); not introduced here, out of scope to fix.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -159,7 +159,7 @@ pub struct LlmTestResult {
|
|||||||
pub category: String,
|
pub category: String,
|
||||||
/// `true` when the LLM is healthy and usable after the test.
|
/// `true` when the LLM is healthy and usable after the test.
|
||||||
pub ok: bool,
|
pub ok: bool,
|
||||||
/// One-line status copy for the Settings chip ("Qwen3 4B ready").
|
/// One-line status copy for the Settings chip ("Qwen3.5 4B ready").
|
||||||
pub message: String,
|
pub message: String,
|
||||||
/// Optional actionable next step ("Click Download", "Delete and
|
/// Optional actionable next step ("Click Download", "Delete and
|
||||||
/// re-download", "Pick a smaller tier"). Absent when the state is
|
/// re-download", "Pick a smaller tier"). Absent when the state is
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ fn to_llm_examples(rows: Vec<FeedbackRow>) -> Vec<LlmFeedbackExample> {
|
|||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Rough character budget for the few-shot block. Qwen3's tokenizer
|
/// Rough character budget for the few-shot block. Qwen's tokenizer
|
||||||
/// averages ~3.5 chars per token in English, so 2000 chars is ~570
|
/// averages ~3.5 chars per token in English, so 2000 chars is ~570
|
||||||
/// tokens — well inside the 64-token reserve + response-token gap
|
/// tokens — well inside the 64-token reserve + response-token gap
|
||||||
/// against the 8192-token context cap (see `LlmEngine::generate`).
|
/// against the 8192-token context cap (see `LlmEngine::generate`).
|
||||||
|
|||||||
@@ -53,25 +53,32 @@
|
|||||||
|
|
||||||
const LLM_MODELS = [
|
const LLM_MODELS = [
|
||||||
{
|
{
|
||||||
id: "qwen3_1_7b",
|
id: "qwen3_5_2b",
|
||||||
label: "Low",
|
label: "Minimal",
|
||||||
subtitle: "Qwen3 1.7B",
|
subtitle: "Qwen3.5 2B",
|
||||||
fit: "8 GB RAM, CPU-heavy machines",
|
fit: "8 GB RAM, CPU-heavy machines",
|
||||||
size: "~1.1 GB",
|
size: "~1.3 GB",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "qwen3_4b_instruct_2507",
|
id: "qwen3_5_4b",
|
||||||
label: "Default",
|
label: "Standard",
|
||||||
subtitle: "Qwen3 4B Instruct 2507",
|
subtitle: "Qwen3.5 4B",
|
||||||
fit: "16 GB RAM or 8 GB+ VRAM",
|
fit: "16 GB RAM or 6 GB+ VRAM",
|
||||||
size: "~2.5 GB",
|
size: "~2.7 GB",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "qwen3_14b",
|
id: "qwen3_5_9b",
|
||||||
label: "High",
|
label: "High",
|
||||||
subtitle: "Qwen3 14B",
|
subtitle: "Qwen3.5 9B",
|
||||||
fit: "32 GB RAM or 16 GB+ VRAM",
|
fit: "32 GB RAM and 12 GB+ VRAM",
|
||||||
size: "~10.5 GB",
|
size: "~5.7 GB",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "qwen3_6_27b",
|
||||||
|
label: "Maximum",
|
||||||
|
subtitle: "Qwen3.6 27B",
|
||||||
|
fit: "64 GB RAM and 24 GB+ VRAM",
|
||||||
|
size: "~17 GB",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -459,7 +466,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function selectedLlmModelId() {
|
function selectedLlmModelId() {
|
||||||
return settings.llmModelId || "qwen3_4b_instruct_2507";
|
return settings.llmModelId || "qwen3_5_4b";
|
||||||
}
|
}
|
||||||
|
|
||||||
function llmModelStatus(modelId) {
|
function llmModelStatus(modelId) {
|
||||||
@@ -476,19 +483,23 @@
|
|||||||
|
|
||||||
function llmHardwareWarning(modelId) {
|
function llmHardwareWarning(modelId) {
|
||||||
const ramMb = systemInfo?.ram_mb || 0;
|
const ramMb = systemInfo?.ram_mb || 0;
|
||||||
if (modelId === "qwen3_14b" && ramMb < 32768) {
|
if (modelId === "qwen3_6_27b" && ramMb < 65536) {
|
||||||
|
return "Maximum tier needs 64 GB RAM (or a 24 GB GPU) to avoid heavy swap. Expect slow responses on this machine.";
|
||||||
|
}
|
||||||
|
if (modelId === "qwen3_5_9b" && ramMb < 32768) {
|
||||||
return "High tier will swap heavily on this machine. Expect slow responses.";
|
return "High tier will swap heavily on this machine. Expect slow responses.";
|
||||||
}
|
}
|
||||||
if (modelId === "qwen3_4b_instruct_2507" && ramMb < 16384 && !hasGpuAcceleration()) {
|
if (modelId === "qwen3_5_4b" && ramMb < 16384 && !hasGpuAcceleration()) {
|
||||||
return "Default tier is best with 16 GB RAM or a GPU-backed build.";
|
return "Standard tier is best with 16 GB RAM or a GPU-backed build.";
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function llmTierAvailable(modelId) {
|
function llmTierAvailable(modelId) {
|
||||||
const ramMb = systemInfo?.ram_mb || 0;
|
const ramMb = systemInfo?.ram_mb || 0;
|
||||||
if (modelId === "qwen3_14b") return ramMb >= 32768;
|
if (modelId === "qwen3_6_27b") return ramMb >= 65536;
|
||||||
if (modelId === "qwen3_4b_instruct_2507") return ramMb >= 16384 || hasGpuAcceleration();
|
if (modelId === "qwen3_5_9b") return ramMb >= 32768;
|
||||||
|
if (modelId === "qwen3_5_4b") return ramMb >= 16384 || hasGpuAcceleration();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -497,7 +508,7 @@
|
|||||||
try {
|
try {
|
||||||
settings.llmModelId = await invoke("recommend_llm_tier");
|
settings.llmModelId = await invoke("recommend_llm_tier");
|
||||||
} catch {
|
} catch {
|
||||||
settings.llmModelId = "qwen3_4b_instruct_2507";
|
settings.llmModelId = "qwen3_5_4b";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1732,7 +1743,7 @@
|
|||||||
<p class="text-[11px] text-text-tertiary mt-3">
|
<p class="text-[11px] text-text-tertiary mt-3">
|
||||||
Recommended for this machine:
|
Recommended for this machine:
|
||||||
<span class="text-text">
|
<span class="text-text">
|
||||||
{LLM_MODELS.find((model) => model.id === (settings.llmModelId || "qwen3_4b_instruct_2507"))?.subtitle || "Qwen3 4B Instruct 2507"}
|
{LLM_MODELS.find((model) => model.id === (settings.llmModelId || "qwen3_5_4b"))?.subtitle || "Qwen3.5 4B"}
|
||||||
</span>
|
</span>
|
||||||
{#if systemInfo}
|
{#if systemInfo}
|
||||||
· {Math.round((systemInfo.ram_mb || 0) / 1024)} GB RAM detected
|
· {Math.round((systemInfo.ram_mb || 0) / 1024)} GB RAM detected
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export type LlmStatusKind = "off" | "warming" | "ready" | "generating" | "error"
|
|||||||
|
|
||||||
export interface LlmStatusState {
|
export interface LlmStatusState {
|
||||||
kind: LlmStatusKind;
|
kind: LlmStatusKind;
|
||||||
/// Optional short phrase for the chip to surface (e.g. "Loading Qwen3 4B").
|
/// Optional short phrase for the chip to surface (e.g. "Loading Qwen3.5 4B").
|
||||||
detail: string | null;
|
detail: string | null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,11 @@ export type WhisperModelSize =
|
|||||||
| "Medium"
|
| "Medium"
|
||||||
| "Distil-L";
|
| "Distil-L";
|
||||||
export type AiTier = "off" | "cleanup" | "tasks";
|
export type AiTier = "off" | "cleanup" | "tasks";
|
||||||
export type LlmModelIdStr = "qwen3_1_7b" | "qwen3_4b_instruct_2507" | "qwen3_14b";
|
export type LlmModelIdStr =
|
||||||
|
| "qwen3_5_2b"
|
||||||
|
| "qwen3_5_4b"
|
||||||
|
| "qwen3_5_9b"
|
||||||
|
| "qwen3_6_27b";
|
||||||
export type LlmPromptPreset = "default" | "email" | "notes" | "code";
|
export type LlmPromptPreset = "default" | "email" | "notes" | "code";
|
||||||
export type AiGpuConcurrency = "parallel" | "sequential";
|
export type AiGpuConcurrency = "parallel" | "sequential";
|
||||||
export type TaskBucket = "inbox" | "today" | "soon" | "later";
|
export type TaskBucket = "inbox" | "today" | "soon" | "later";
|
||||||
|
|||||||
Reference in New Issue
Block a user