Skip to content

Commit 47405d2

Browse files
committed
test(v5-g16): cross-arch 9 non-canonical presets — 18 e2e cells
Closes V5-G16 / cppmega-mlx-3va. V4-12 used hardcoded {preset}_mlp / {preset}_attn pattern and skipped presets whose brick factories named them differently. v5 supplies explicit mlpId/attnId per preset: glm_45 → glm_45_shared / glm_45_attn glm_45_air → glm_45_air_shared / glm_45_air_attn glm_47 → glm_47_shared / glm_47_attn intellect_3 → intellect_3_shared / intellect_3_attn qwen3_dense_0_6b → qwen3_0_6b_mlp / qwen3_0_6b_attn qwen3_dense_32b → qwen3_32b_mlp / qwen3_32b_attn qwen3_dense_4b → qwen3_4b_mlp / qwen3_4b_attn qwen3_dense_8b → qwen3_8b_mlp / qwen3_8b_attn sarvam_30b → sarvam_30b_shared / sarvam_30b_attn 9 presets × 2 mutations (activation→swiglu, pre_norm→layernorm) = 18 cells. Combined with V4-12's 10 canonical-named presets that brings cross-arch deep-verify coverage to 19/19 mlp+attn presets. 18/18 green in 19.2s.
1 parent 6d051bc commit 47405d2

1 file changed

Lines changed: 58 additions & 0 deletions

File tree

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// G16: cross-arch coverage for presets whose brick names don't follow
2+
// `{preset}_mlp` / `{preset}_attn` convention. V4-12 hardcoded the
3+
// canonical pattern and skipped these 9. v5 supplies explicit
4+
// mlp_id / attn_id per preset.
5+
6+
import { test, expect } from "@playwright/test";
7+
import { gotoApp, selectPreset, clickRunPipeline, closeModal } from "../fixtures";
8+
import { readTrainExtras } from "../utils/train_extras";
9+
10+
interface Entry { preset: string; mlpId: string; attnId: string; }
11+
12+
const ENTRIES: Entry[] = [
13+
{ preset: "glm_45", mlpId: "glm_45_shared", attnId: "glm_45_attn" },
14+
{ preset: "glm_45_air", mlpId: "glm_45_air_shared", attnId: "glm_45_air_attn" },
15+
{ preset: "glm_47", mlpId: "glm_47_shared", attnId: "glm_47_attn" },
16+
{ preset: "intellect_3", mlpId: "intellect_3_shared",attnId: "intellect_3_attn" },
17+
{ preset: "qwen3_dense_0_6b", mlpId: "qwen3_0_6b_mlp", attnId: "qwen3_0_6b_attn" },
18+
{ preset: "qwen3_dense_32b", mlpId: "qwen3_32b_mlp", attnId: "qwen3_32b_attn" },
19+
{ preset: "qwen3_dense_4b", mlpId: "qwen3_4b_mlp", attnId: "qwen3_4b_attn" },
20+
{ preset: "qwen3_dense_8b", mlpId: "qwen3_8b_mlp", attnId: "qwen3_8b_attn" },
21+
{ preset: "sarvam_30b", mlpId: "sarvam_30b_shared", attnId: "sarvam_30b_attn" },
22+
];
23+
24+
for (const { preset, mlpId, attnId } of ENTRIES) {
25+
test(`G16: ${preset} activation mutation propagates`, async ({ page }) => {
26+
test.setTimeout(60_000);
27+
await gotoApp(page);
28+
await selectPreset(page, preset);
29+
await page.locator(`[data-testid='brick-node-${mlpId}']`).click();
30+
const panel = page.getByTestId(`brick-context-${mlpId}`);
31+
await expect(panel).toBeVisible({ timeout: 4_000 });
32+
await page.locator(`[data-testid='brick-context-${mlpId}-activation']`)
33+
.selectOption("swiglu");
34+
await page.locator(`[data-testid='brick-context-${mlpId}-apply']`).click();
35+
await clickRunPipeline(page, "train");
36+
const extras = await readTrainExtras(page);
37+
expect(extras.model_summary.mlp_activation).toBe("swiglu");
38+
expect(extras.weight_delta_norm).toBeGreaterThan(0);
39+
await closeModal(page);
40+
});
41+
42+
test(`G16: ${preset} pre_norm mutation propagates`, async ({ page }) => {
43+
test.setTimeout(60_000);
44+
await gotoApp(page);
45+
await selectPreset(page, preset);
46+
await page.locator(`[data-testid='brick-node-${attnId}']`).click();
47+
const panel = page.getByTestId(`brick-context-${attnId}`);
48+
await expect(panel).toBeVisible({ timeout: 4_000 });
49+
await page.locator(`[data-testid='brick-context-${attnId}-pre-norm']`)
50+
.selectOption("layernorm");
51+
await page.locator(`[data-testid='brick-context-${attnId}-apply']`).click();
52+
await clickRunPipeline(page, "train");
53+
const extras = await readTrainExtras(page);
54+
expect(extras.model_summary.attention_pre_norm).toBe("layernorm");
55+
expect(extras.weight_delta_norm).toBeGreaterThan(0);
56+
await closeModal(page);
57+
});
58+
}

0 commit comments

Comments
 (0)