sjakek commited on
Commit
006e194
·
verified ·
1 Parent(s): b206919

Add portable ATX layer-expert residency policies

Browse files
README.md CHANGED
@@ -29,6 +29,31 @@ Companion artifacts:
29
  - [`recommendations/atx_expert_residency_policy.json`](recommendations/atx_expert_residency_policy.json): local ATX residency policy artifact, when available.
30
  - [`upload_manifest.json`](upload_manifest.json): file hashes, source paths, and upload metadata.
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  ## Important Caveats
33
 
34
  These results are observational routing/contribution-proxy measurements. They are useful for proposing which experts or layer-expert cells should remain VRAM-resident, but they are not a causal proof that those policies preserve quality or maximize throughput. Final residency recommendations should be validated with forced-residency/offload runs on the same prompts or agent tasks.
 
29
  - [`recommendations/atx_expert_residency_policy.json`](recommendations/atx_expert_residency_policy.json): local ATX residency policy artifact, when available.
30
  - [`upload_manifest.json`](upload_manifest.json): file hashes, source paths, and upload metadata.
31
 
32
+
33
+ ## Portable ATX Residency Policies
34
+
35
+ The `policies/` directory contains four portable `--moe-residency-policy` JSON files generated from the combined coding saliency data:
36
+
37
+ | File | Selected layer-expert cells | Combined importance share |
38
+ |---|---:|---:|
39
+ | [`policies/combined_top_05pct_layer_experts.atx.json`](policies/combined_top_05pct_layer_experts.atx.json) | 512 | 66.1% |
40
+ | [`policies/combined_top_10pct_layer_experts.atx.json`](policies/combined_top_10pct_layer_experts.atx.json) | 1,024 | 80.0% |
41
+ | [`policies/combined_top_15pct_layer_experts.atx.json`](policies/combined_top_15pct_layer_experts.atx.json) | 1,536 | 87.1% |
42
+ | [`policies/combined_top_20pct_layer_experts.atx.json`](policies/combined_top_20pct_layer_experts.atx.json) | 2,048 | 91.2% |
43
+
44
+ Example usage with the ATX fork:
45
+
46
+ ```bash
47
+ ./build-atx-metal/bin/llama-server \
48
+ -m /path/to/Qwen3.6-35B-A3B-UD-Q4_K_XL.gguf \
49
+ --moe-residency-policy policies/combined_top_10pct_layer_experts.atx.json \
50
+ --moe-residency-stats stats.json \
51
+ --ctx-size 4096 \
52
+ --parallel 1
53
+ ```
54
+
55
+ These policies rank layer-expert cells by mean normalized importance across SciCode MVP and Terminal-Bench Hard Agent traces. They recommend which cells to duplicate/cache hot in VRAM; they are not yet throughput-validated as globally optimal.
56
+
57
  ## Important Caveats
58
 
59
  These results are observational routing/contribution-proxy measurements. They are useful for proposing which experts or layer-expert cells should remain VRAM-resident, but they are not a causal proof that those policies preserve quality or maximize throughput. Final residency recommendations should be validated with forced-residency/offload runs on the same prompts or agent tasks.
policies/README.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ATX Combined Coding Layer-Expert Residency Policies
2
+
3
+ These JSON files are portable policies for the ATX llama.cpp fork. Use them with `--moe-residency-policy FILE` and record `--moe-residency-stats stats.json`.
4
+
5
+ The percentages are fractions of all Qwen3.6 MoE layer-expert cells: `40 layers * 256 experts = 10,240` cells.
6
+
7
+ | Policy | Selected cells | Intended use |
8
+ |---|---:|---|
9
+ | `combined_top_05pct_layer_experts.atx.json` | 512 | Tight VRAM budget / strongest hot-cell hypothesis |
10
+ | `combined_top_10pct_layer_experts.atx.json` | 1,024 | Balanced first test |
11
+ | `combined_top_15pct_layer_experts.atx.json` | 1,536 | Broader hot-cell coverage |
12
+ | `combined_top_20pct_layer_experts.atx.json` | 2,048 | Approximately the top fifth of observed coding-important cells |
13
+
14
+ Each file includes a `keep_layer_experts` array accepted by the ATX policy parser. Extra rank and score fields are ignored by the runtime but kept for inspection.
15
+
16
+ These are observational saliency recommendations, not proven optimal throughput policies. Compare them against whole-layer policies and random controls on the same prompts.
policies/combined_layer_expert_policy_index.json ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "schema_version": "atx-moe-residency-policy-index-v1",
3
+ "description": "Portable ATX layer-expert residency policies generated from combined coding saliency traces.",
4
+ "usage": "./build-atx-metal/bin/llama-server -m /path/to/model.gguf --moe-residency-policy policies/combined_top_10pct_layer_experts.atx.json --moe-residency-stats stats.json",
5
+ "basis": "Mean of per-dataset normalized importance_score shares from SciCode MVP and Terminal-Bench Hard Agent traces.",
6
+ "total_layer_expert_pairs": 10240,
7
+ "policies": [
8
+ {
9
+ "percent": 5,
10
+ "path": "policies/combined_top_05pct_layer_experts.atx.json",
11
+ "selected_pairs": 512,
12
+ "cumulative_mean_importance_share": 0.660590412743,
13
+ "cumulative_scicode_importance_share": 0.742969757523,
14
+ "cumulative_terminal_bench_hard_agent_importance_share": 0.578211067963,
15
+ "sha256": "a7dde8b4fc3427913fecc4bb98d7fe20acdee13d7c38f5ce6456b796c3803d66",
16
+ "bytes": 259724
17
+ },
18
+ {
19
+ "percent": 10,
20
+ "path": "policies/combined_top_10pct_layer_experts.atx.json",
21
+ "selected_pairs": 1024,
22
+ "cumulative_mean_importance_share": 0.800313006063,
23
+ "cumulative_scicode_importance_share": 0.858042322518,
24
+ "cumulative_terminal_bench_hard_agent_importance_share": 0.742583689608,
25
+ "sha256": "c1561d95890d6da837100317fd4aff97de0b51c5a185af9880634e90eb2f8f0a",
26
+ "bytes": 516940
27
+ },
28
+ {
29
+ "percent": 15,
30
+ "path": "policies/combined_top_15pct_layer_experts.atx.json",
31
+ "selected_pairs": 1536,
32
+ "cumulative_mean_importance_share": 0.871043543523,
33
+ "cumulative_scicode_importance_share": 0.9104168024,
34
+ "cumulative_terminal_bench_hard_agent_importance_share": 0.831670284645,
35
+ "sha256": "96d990967c23ef65f207fec3e71fc6fbcd32dbfaeb46b8d699823722c255ad15",
36
+ "bytes": 774273
37
+ },
38
+ {
39
+ "percent": 20,
40
+ "path": "policies/combined_top_20pct_layer_experts.atx.json",
41
+ "selected_pairs": 2048,
42
+ "cumulative_mean_importance_share": 0.912287774427,
43
+ "cumulative_scicode_importance_share": 0.940337427439,
44
+ "cumulative_terminal_bench_hard_agent_importance_share": 0.884238121415,
45
+ "sha256": "33b64099ce42008d2e30046253210a481051c86eb945354b0f9f372df3d74086",
46
+ "bytes": 1030436
47
+ }
48
+ ]
49
+ }
policies/combined_top_05pct_layer_experts.atx.json ADDED
The diff for this file is too large to render. See raw diff
 
policies/combined_top_10pct_layer_experts.atx.json ADDED
The diff for this file is too large to render. See raw diff
 
policies/combined_top_15pct_layer_experts.atx.json ADDED
The diff for this file is too large to render. See raw diff
 
policies/combined_top_20pct_layer_experts.atx.json ADDED
The diff for this file is too large to render. See raw diff