Upgrade Iced and render Markdown tables
This commit is contained in:
@@ -9,11 +9,9 @@ impl App {
|
||||
.supports_dspark()
|
||||
.then_some(Message::PreferenceLegacyMtpChanged);
|
||||
let legacy_mtp = hint(
|
||||
checkbox(
|
||||
"Enable legacy MTP for this model",
|
||||
self.preference_draft.legacy_mtp_enabled,
|
||||
)
|
||||
.on_toggle_maybe(legacy_mtp_toggle),
|
||||
checkbox(self.preference_draft.legacy_mtp_enabled)
|
||||
.label("Enable legacy MTP for this model")
|
||||
.on_toggle_maybe(legacy_mtp_toggle),
|
||||
"Uses the managed one-stage MTP support GGUF. The target model verifies every drafted token; it is mutually exclusive with DSpark.",
|
||||
);
|
||||
let dspark_toggle: Option<fn(bool) -> Message> = self
|
||||
@@ -22,11 +20,9 @@ impl App {
|
||||
.supports_dspark()
|
||||
.then_some(Message::PreferenceDsparkChanged);
|
||||
let dspark = hint(
|
||||
checkbox(
|
||||
"Enable DSpark for this model",
|
||||
self.preference_draft.dspark_enabled,
|
||||
)
|
||||
.on_toggle_maybe(dspark_toggle),
|
||||
checkbox(self.preference_draft.dspark_enabled)
|
||||
.label("Enable DSpark for this model")
|
||||
.on_toggle_maybe(dspark_toggle),
|
||||
"Speculative decoding with the managed DSpark draft artifact: a small model proposes tokens that the main model verifies in one pass. Usually a large speedup; the target model may also stream routed experts from SSD.",
|
||||
);
|
||||
let glm_mtp_toggle: Option<fn(bool) -> Message> = (self.preference_draft.model
|
||||
@@ -130,10 +126,8 @@ impl App {
|
||||
"LOCAL ENDPOINT",
|
||||
column![
|
||||
hint(
|
||||
checkbox(
|
||||
"Enable OpenAI-compatible endpoint",
|
||||
self.preference_draft.endpoint_enabled,
|
||||
)
|
||||
checkbox(self.preference_draft.endpoint_enabled)
|
||||
.label("Enable OpenAI-compatible endpoint")
|
||||
.on_toggle(Message::PreferenceEndpointEnabledChanged),
|
||||
"Serves the loaded model over an OpenAI-style HTTP API, so editors, scripts and agents on this machine can use it. Turned off, only this window can generate.",
|
||||
),
|
||||
@@ -144,10 +138,8 @@ impl App {
|
||||
.on_input(Message::PreferenceEndpointPortChanged),
|
||||
),
|
||||
hint(
|
||||
checkbox(
|
||||
"Allow browser clients (CORS)",
|
||||
self.preference_draft.endpoint_cors,
|
||||
)
|
||||
checkbox(self.preference_draft.endpoint_cors)
|
||||
.label("Allow browser clients (CORS)")
|
||||
.on_toggle(Message::PreferenceEndpointCorsChanged),
|
||||
"Answers with permissive CORS headers so JavaScript running in a web page may call the endpoint. Leave it off when only native tools connect.",
|
||||
),
|
||||
@@ -181,7 +173,7 @@ impl App {
|
||||
)
|
||||
.on_input(Message::PreferenceSystemPromptChanged)
|
||||
.padding(9),
|
||||
Space::with_height(4),
|
||||
Space::new().height(4),
|
||||
text("SAMPLING & REASONING").size(11).color(muted_text()),
|
||||
preference_input_row(
|
||||
"Temperature",
|
||||
@@ -261,12 +253,14 @@ impl App {
|
||||
prefill,
|
||||
),
|
||||
hint(
|
||||
checkbox("Prefer exact quality kernels", self.preference_draft.quality)
|
||||
checkbox(self.preference_draft.quality)
|
||||
.label("Prefer exact quality kernels")
|
||||
.on_toggle(Message::PreferenceQualityChanged),
|
||||
"Runs the exact Metal kernels instead of the fast approximations. Slightly slower, and it removes the small numeric differences those approximations introduce.",
|
||||
),
|
||||
hint(
|
||||
checkbox("Warm mapped weights at load time", self.preference_draft.warm_weights)
|
||||
checkbox(self.preference_draft.warm_weights)
|
||||
.label("Warm mapped weights at load time")
|
||||
.on_toggle(Message::PreferenceWarmWeightsChanged),
|
||||
"Reads every mapped weight page once at load, so the first reply is not interrupted by page faults from disk. Loading takes longer and memory pressure rises immediately.",
|
||||
),
|
||||
@@ -312,15 +306,14 @@ impl App {
|
||||
.on_input(Message::PreferenceMtpMarginChanged),
|
||||
),
|
||||
hint(
|
||||
checkbox("Enable integrated GLM MTP", self.preference_draft.glm_mtp)
|
||||
checkbox(self.preference_draft.glm_mtp)
|
||||
.label("Enable integrated GLM MTP")
|
||||
.on_toggle_maybe(glm_mtp_toggle),
|
||||
"Uses the prediction head built into GLM 5.2 for speculative decoding, so no separate draft model is loaded. Available for GLM 5.2 only.",
|
||||
),
|
||||
hint(
|
||||
checkbox(
|
||||
"Log GLM MTP timing counters",
|
||||
self.preference_draft.glm_mtp_timing,
|
||||
)
|
||||
checkbox(self.preference_draft.glm_mtp_timing)
|
||||
.label("Log GLM MTP timing counters")
|
||||
.on_toggle_maybe(glm_mtp_timing_toggle),
|
||||
"Records per-stage timings of the speculative path to the log, to show where the acceleration actually goes. A diagnostic aid that costs a little throughput.",
|
||||
),
|
||||
@@ -332,10 +325,8 @@ impl App {
|
||||
dspark_confidence,
|
||||
),
|
||||
hint(
|
||||
checkbox(
|
||||
"DSpark target-only decode",
|
||||
self.preference_draft.dspark_strict,
|
||||
)
|
||||
checkbox(self.preference_draft.dspark_strict)
|
||||
.label("DSpark target-only decode")
|
||||
.on_toggle_maybe(dspark_strict_toggle),
|
||||
"Lets the draft model only propose, never decide: every token is sampled by the full model. Gives up some of the speedup in exchange for output identical to non-speculative decoding.",
|
||||
),
|
||||
@@ -367,15 +358,17 @@ impl App {
|
||||
},
|
||||
))
|
||||
.size(12),
|
||||
Space::with_height(6),
|
||||
Space::new().height(6),
|
||||
text("SSD STREAMING").size(11).color(muted_text()),
|
||||
hint(
|
||||
checkbox("Enable SSD-backed model streaming", self.preference_draft.ssd_streaming)
|
||||
checkbox(self.preference_draft.ssd_streaming)
|
||||
.label("Enable SSD-backed model streaming")
|
||||
.on_toggle(Message::PreferenceSsdChanged),
|
||||
"Leaves the routed expert weights on disk and pages them in as they are needed, so a model larger than this machine's memory still runs. Every cache miss waits for the SSD; speculative support weights remain resident while target experts stream.",
|
||||
),
|
||||
hint(
|
||||
checkbox("Skip automatic expert preload", self.preference_draft.ssd_streaming_cold)
|
||||
checkbox(self.preference_draft.ssd_streaming_cold)
|
||||
.label("Skip automatic expert preload")
|
||||
.on_toggle(Message::PreferenceSsdColdChanged),
|
||||
"Starts with an empty expert cache instead of reading the likely experts up front. The model is ready sooner and uses less memory, at the price of slow first replies.",
|
||||
),
|
||||
@@ -461,7 +454,7 @@ impl App {
|
||||
),
|
||||
))
|
||||
.size(12),
|
||||
Space::with_height(6),
|
||||
Space::new().height(6),
|
||||
text("ADVANCED DIAGNOSTICS").size(11).color(muted_text()),
|
||||
preference_input_row(
|
||||
"Simulated used memory (GiB)",
|
||||
@@ -561,14 +554,14 @@ impl App {
|
||||
let header = row![
|
||||
icon(ICON_SETTINGS, 22),
|
||||
text("Preferences").size(24),
|
||||
Space::with_width(Length::Fill),
|
||||
Space::new().width(Length::Fill),
|
||||
text("⌘,").size(12),
|
||||
]
|
||||
.spacing(10)
|
||||
.align_y(Alignment::Center);
|
||||
let footer = row![
|
||||
action_button("Reset DS4 defaults").on_press(Message::ResetPreferences),
|
||||
Space::with_width(Length::Fill),
|
||||
Space::new().width(Length::Fill),
|
||||
action_button("Cancel").on_press(Message::DismissPanel),
|
||||
action_button("Save").on_press(Message::SavePreferences),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user