The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.
TypeScript agentai-chatai-studioall-in-onecoding-agentdesktop-appfluximage-generationlinuxllmlocal-ailocal-llmopen-sourceprivacyself-hostedstable-diffusionuncensoreduncensored-aivideo-generationwindows
fix(abliterate): the knowledge check asks 1000 MMLU questions
purplebb092baf3375
diff --git a/src-tauri/src/commands/abliterate/mod.rs b/src-tauri/src/commands/abliterate/mod.rsindex 72cf8aab..dce34bc5 100644--- a/src-tauri/src/commands/abliterate/mod.rs+++ b/src-tauri/src/commands/abliterate/mod.rs@@ -16,7 +16,7 @@//! 2. download: the safetensors of the repo at the commit the dialog showed.//! 3. check before: the ORIGINAL GGUF in a llama-server of its own, through//! the same short check as at the end (refusals on 50 JailbreakBench-//! prompts, false alarms on 50 harmless ones, 200 MMLU questions, each+//! prompts, false alarms on 50 harmless ones, 1000 MMLU questions, each//! answer kept as right or wrong so the two runs compare question by//! question).//! 4. search: Heretic's trials, without its menus (`lu_abliterate.py search`).@@ -72,9 +72,11 @@ const CONSTRAINTS: &str = include_str!("../../../resources/abliterate/constraint/// JailbreakBench has 100 of each; the search never sees them.const CHECK_N: u32 = 50;/// MMLU questions in the check. 50 left a loss of three questions inside-/// chance (3.0.8 on the box: 22 → 21 of 50), so a real loss and noise read-/// the same; 200 cost the box about a minute more per check.-const MMLU_N: u32 = 200;+/// chance (3.0.8 on the box: 22 → 21 of 50). 200 were still too few: on the+/// box the first 200 read as a real loss (88 → 79) while all 1000 showed+/// none (409 → 410). 1000 one-letter answers cost the box under a minute+/// per check for a 0.5B model.+const MMLU_N: u32 = 1000;const LOG_LINES: usize = 160;// ── Paths ─────────────────────────────────────────────────────────────────@@ -1675,6 +1677,8 @@ mod tests {let old: Check = serde_json::from_str(r#"{"refusals":39,"falseAlarms":13,"mmlu":22,"n":50}"#).unwrap();assert!(!check_is_current(Some(&old)));assert!(!check_is_current(None));+ let first_309 = Check { mmlu_n: Some(200), mmlu_marks: Some("1".repeat(200)), ..old.clone() };+ assert!(!check_is_current(Some(&first_309)));let new = Check { mmlu_n: Some(MMLU_N), mmlu_marks: Some("1".repeat(MMLU_N as usize)), ..old };assert!(check_is_current(Some(&new)));}diff --git a/src-tauri/src/commands/abliterate/plan.rs b/src-tauri/src/commands/abliterate/plan.rsindex 2d2d41cf..9e179c82 100644--- a/src-tauri/src/commands/abliterate/plan.rs+++ b/src-tauri/src/commands/abliterate/plan.rs@@ -431,8 +431,8 @@ pub fn estimate(input: &EstimateInput<'_>) -> Estimate {let per_trial = (secs_per_trial_per_b(device.kind, quantization) * p_b).max(min_secs_per_trial(device.kind));let search = per_trial * input.trials as f64;// Loading, the refusal directions, the shard merge, conversion and the- // two checks of 100 short prompts and 200 one-letter MMLU answers each.- let fixed = 180.0 + 60.0 * p_b + 2.0 * (90.0 + 45.0 * p_b);+ // two checks of 100 short prompts and 1000 one-letter MMLU answers each.+ let fixed = 180.0 + 60.0 * p_b + 2.0 * (120.0 + 60.0 * p_b);let minutes = (search + fixed) / 60.0;let minutes_low = (minutes * 0.7).ceil().max(5.0) as u64;let minutes_high = (minutes * 1.8).ceil().max(minutes_low as f64 + 5.0) as u64;diff --git a/src/components/models/RemoveRefusalsDialog.tsx b/src/components/models/RemoveRefusalsDialog.tsxindex bcb3e25c..7a7065c8 100644--- a/src/components/models/RemoveRefusalsDialog.tsx+++ b/src/components/models/RemoveRefusalsDialog.tsx@@ -322,7 +322,7 @@ function PlanView({ path, onClose }: { path: string; onClose: () => void }) {<p className={`t-body ${HINWEIS_TEXT.ruhig}`}>{CLAIM}</p><p className={`t-micro ${HINWEIS_TEXT.ruhig}`}>The chat model is unloaded while the run works. Before and after, LU asks both versions the same 100 short- requests and 200 knowledge questions and shows you the counts; the questions and answers are not kept.+ requests and 1000 knowledge questions and shows you the counts; the questions and answers are not kept.</p>{needsLicense && (diff --git a/src/components/models/__tests__/remove-refusals-dialog.test.tsx b/src/components/models/__tests__/remove-refusals-dialog.test.tsxindex e0234856..4f48335e 100644--- a/src/components/models/__tests__/remove-refusals-dialog.test.tsx+++ b/src/components/models/__tests__/remove-refusals-dialog.test.tsx@@ -114,10 +114,10 @@ describe('before the run', () => {expect(screen.getByText(/nothing is uploaded/)).toBeTruthy()})- it('names the check the run makes: 100 requests and 200 knowledge questions (3.0.9)', async () => {+ it('names the check the run makes: 100 requests and 1000 knowledge questions (3.0.9)', async () => {api.abliteratePlan.mockResolvedValue(plan())openFor()- expect(await screen.findByText(/the same 100 short requests and 200 knowledge questions/)).toBeTruthy()+ expect(await screen.findByText(/the same 100 short requests and 1000 knowledge questions/)).toBeTruthy()})it('opens Start only after the 18+ line, and sends what was chosen', async () => {