Add extended public-safe evidence bundle v1

#2
by ryan-0608 - opened
This view is limited to 50 files because it contains too many changes. See the raw diff here.
Files changed (50) hide show
  1. checksums/extended-evidence-v1.sha256 +309 -0
  2. docs/extended-evidence-v1/EXCLUSIONS.md +18 -0
  3. docs/extended-evidence-v1/README.md +61 -0
  4. figures/data/qwen3-4b/v1/q3_4b_armA_traj.csv +33 -0
  5. figures/data/qwen3-4b/v1/q3_4b_armB_traj.csv +33 -0
  6. figures/data/qwen3-4b/v1/q3_4b_gen_traj.csv +30 -0
  7. figures/rendered/historical/v1/code250k_vs_gen.png +3 -0
  8. figures/rendered/historical/v1/fig_bigdata_vs_gen.png +3 -0
  9. figures/rendered/historical/v1/fig_exp1_forgetting.png +3 -0
  10. figures/rendered/historical/v1/fig_exp1_three_recipes.png +3 -0
  11. figures/rendered/historical/v1/fig_exp4_inference.png +3 -0
  12. figures/rendered/historical/v1/fig_exp5_method_vs_data.png +3 -0
  13. figures/rendered/historical/v1/fig_forgetting_matrix.png +3 -0
  14. figures/rendered/historical/v1/fig_fusion_combined.png +3 -0
  15. figures/rendered/historical/v1/fig_gen800k_loss_al.png +3 -0
  16. figures/rendered/historical/v1/fig_merged_vs_specialist.png +3 -0
  17. figures/rendered/historical/v1/fig_q3_4b_traj.png +3 -0
  18. figures/rendered/historical/v1/fig_serving.png +3 -0
  19. figures/rendered/historical/v1/fig_smalldata_vs_gen.png +3 -0
  20. figures/rendered/historical/v1/fig_specialist_overall.png +3 -0
  21. figures/rendered/historical/v1/fig_warm_saturation.png +3 -0
  22. figures/rendered/historical/v1/gen_per_domain_AL.png +3 -0
  23. figures/rendered/historical/v1/gen_vs_merge_attn.png +3 -0
  24. figures/rendered/historical/v1/joint_vs_pipeline_code.png +3 -0
  25. figures/rendered/historical/v1/overfit_attention_ladder.png +3 -0
  26. figures/rendered/historical/v1/overfit_loss_al.png +3 -0
  27. figures/rendered/historical/v1/reasonmix_5arm_per_domain.png +3 -0
  28. figures/rendered/historical/v1/recipe_budget.png +3 -0
  29. figures/rendered/paper-current-candidate/v1/fig_architecture_v8.drawio +728 -0
  30. figures/rendered/paper-current-candidate/v1/fig_architecture_v8.png +3 -0
  31. figures/rendered/paper-current-candidate/v1/fig_architecture_v8.svg +0 -0
  32. figures/rendered/paper-current-candidate/v1/fig_main_results.png +3 -0
  33. figures/rendered/paper-current-candidate/v1/fig_qwen3_4b_matched.pdf +0 -0
  34. figures/rendered/paper-current-candidate/v1/fig_qwen3_4b_matched.png +3 -0
  35. licenses/extended-evidence-v1/LICENSE +21 -0
  36. manifests/extended-evidence-v1/artifact-manifest.jsonl +0 -0
  37. manifests/extended-evidence-v1/release-summary.json +34 -0
  38. recipes/plotting/v1/build_mos_architecture_drawio.py +856 -0
  39. recipes/plotting/v1/fig_5arm_per_domain.py +49 -0
  40. recipes/plotting/v1/fig_code250k_vs_gen.py +33 -0
  41. recipes/plotting/v1/fig_exp1_forgetting.py +58 -0
  42. recipes/plotting/v1/fig_exp1_three_recipes.py +33 -0
  43. recipes/plotting/v1/fig_exp4_inference.py +51 -0
  44. recipes/plotting/v1/fig_exp5_method_vs_data.py +38 -0
  45. recipes/plotting/v1/fig_fusion_combined.py +31 -0
  46. recipes/plotting/v1/fig_matrix_and_arms.py +118 -0
  47. recipes/plotting/v1/fig_merged_vs_specialist.py +39 -0
  48. recipes/plotting/v1/fig_serving_specialist.py +58 -0
  49. recipes/plotting/v1/plot_main_results.py +380 -0
  50. recipes/plotting/v1/plot_mos_5x5_gains.py +929 -0
checksums/extended-evidence-v1.sha256 ADDED
@@ -0,0 +1,309 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 2469e607e691cba884beda0fe55fe69bf1dbb14ca8f22765a81139f6bf60d18d docs/extended-evidence-v1/EXCLUSIONS.md
2
+ 41d8ad21168e4958be51f2a6649c585c2151c807d95f6d05daaef0d837ee0404 docs/extended-evidence-v1/README.md
3
+ 70082850ca060f1a2b0a7762c85ba07d515b4c66d87382870dda0be5a5ceafd1 figures/data/qwen3-4b/v1/q3_4b_armA_traj.csv
4
+ 6f406c21eea7ee25bda9c00bec301d705a3427bf2de2e6ab839ef31cc701090a figures/data/qwen3-4b/v1/q3_4b_armB_traj.csv
5
+ 5dd37b6c7d9a3d4c6ede536aec2a869aa26afd8c67c3096a04e66355827815e9 figures/data/qwen3-4b/v1/q3_4b_gen_traj.csv
6
+ 89992f95494655a1263b1f17c098c97e68bba6aa19279f29b7d22a049096ce50 figures/rendered/historical/v1/code250k_vs_gen.png
7
+ 66e0cfc000e9583110ce5d174ab1874210eee0b026d25fd863e7f69139f78ec3 figures/rendered/historical/v1/fig_bigdata_vs_gen.png
8
+ c88b5a91d84cfbf30f5f9b1813ae470f808e348d27f224f57b8704490f839016 figures/rendered/historical/v1/fig_exp1_forgetting.png
9
+ 2b9633ec3524f23766a72e788206c114e02d7b0da5be8f3cf8a501848fe2fb52 figures/rendered/historical/v1/fig_exp1_three_recipes.png
10
+ e8602bc3791560060deba3ad715eedf6fd9d1ef5d76c1774d3ef5a5fb0ccb2bd figures/rendered/historical/v1/fig_exp4_inference.png
11
+ bf243131b8c61f12c258760307178a8d7888e41c5ef1f5a8981f37b7f639b83a figures/rendered/historical/v1/fig_exp5_method_vs_data.png
12
+ 58be85cb2527aa44c3e8c2579831138104bc70fa7e33794e1855df76988e9d6d figures/rendered/historical/v1/fig_forgetting_matrix.png
13
+ 73c7ceff7bf8f01c0bc3e861c689532619dc2f358f51b37a0d9cedd8b07779bc figures/rendered/historical/v1/fig_fusion_combined.png
14
+ cc68719d712a0bc37321c46ec7d9b6368c08fc3f4523ef1d1c3d7771e5a99a37 figures/rendered/historical/v1/fig_gen800k_loss_al.png
15
+ ca381bfb16abfde13f5e88c917b27698155fa073e99cba70ad50235c6565a155 figures/rendered/historical/v1/fig_merged_vs_specialist.png
16
+ 16825387c4de0251447e50ba54aa99585cf8fc2790b1d0f4c8438035c40e23f0 figures/rendered/historical/v1/fig_q3_4b_traj.png
17
+ 77ae4d2ff2f302212f1252b8bd1fbdc3c0d244dfd2a1be06d093a964575eff8e figures/rendered/historical/v1/fig_serving.png
18
+ 1b8928ad66e0c86b58bc8d9088af11647e78f4f42180e95a0a5bd96017f623e3 figures/rendered/historical/v1/fig_smalldata_vs_gen.png
19
+ 0e3e6ae946db8f2922832f3b0b09673877c0cf68a55f9027fdc93d60399b9446 figures/rendered/historical/v1/fig_specialist_overall.png
20
+ 861c7f202252b6798391fb5bc98bc88d7379e38b3c7d77d2e4fbf0f74f144085 figures/rendered/historical/v1/fig_warm_saturation.png
21
+ eb2084ef355799b98ab08000994e54aa8966196cbb3485235a942ed8966ac32c figures/rendered/historical/v1/gen_per_domain_AL.png
22
+ 2f484b361bed4165c4aac24a52ad66b7a3f9ea7948d7f617c764784085ac39b5 figures/rendered/historical/v1/gen_vs_merge_attn.png
23
+ 221d21d5085f280ace83fe2532a3ae52858a6787af5f28addfd480095114984b figures/rendered/historical/v1/joint_vs_pipeline_code.png
24
+ 7bb2f21888c8c79e731add5c61021aff4be2c58a9dfc499601d902700867802c figures/rendered/historical/v1/overfit_attention_ladder.png
25
+ d8b24897fdce78a542aa0f9387e13299ffe3a34c679b607470ac984bddbbf10c figures/rendered/historical/v1/overfit_loss_al.png
26
+ 77b4ad8a26a01b67b052d7374de6b11350d89ba6eace1e8d135af159ffca5c7f figures/rendered/historical/v1/reasonmix_5arm_per_domain.png
27
+ 7c314a567c8cadfcfb602bc0ad10c328b6dca571213b88ef656bf78404350af4 figures/rendered/historical/v1/recipe_budget.png
28
+ 0415d8aa007c14b576bb25e56837b95235cf9e68afe828a775be58f265b46cb9 figures/rendered/paper-current-candidate/v1/fig_architecture_v8.drawio
29
+ 3961c8a6ccc80992197b8746453cffd1d6f87ed158ce6103a72b4db361996f66 figures/rendered/paper-current-candidate/v1/fig_architecture_v8.png
30
+ 0a8c69fabf7ca2a57a13b4dd77edf2b94bfa1fd31fd9f28a259f7b014ec07048 figures/rendered/paper-current-candidate/v1/fig_architecture_v8.svg
31
+ dc224065a687b7631cec8da84803ec6b8b1c5c34b737dfaa4e7077c9eb04318d figures/rendered/paper-current-candidate/v1/fig_main_results.png
32
+ c843a6bd2b0a20aad7d6b2816277b60af03b44bfd4a1a8a75bc7ac1c74bac746 figures/rendered/paper-current-candidate/v1/fig_qwen3_4b_matched.pdf
33
+ 1243e3db541c0be5dbdacdabf6046ad065911ec2080bacd7d6e69bc9100689db figures/rendered/paper-current-candidate/v1/fig_qwen3_4b_matched.png
34
+ da25818d68a3da676fed16a019beadd6b12f5e4d59ade85840c23a6070240323 licenses/extended-evidence-v1/LICENSE
35
+ 01369f893c8ca40e0b1bfefc3d0a006833bd1757dc287755d1dcd9bd6e5fd7bc manifests/extended-evidence-v1/artifact-manifest.jsonl
36
+ ea5920812d91ae4a6e6cc503936d1c87fb833b622ef2b5bb9fb24037a4e5195e manifests/extended-evidence-v1/release-summary.json
37
+ fe3d7a8074dc76533eefa49e627d779650c811fb0068698546330d811b8cb3c5 recipes/plotting/v1/build_mos_architecture_drawio.py
38
+ c8e6297def7e8dfc361a437c798c8b8586f6f0ee99772cfa915ecc325ea9ba01 recipes/plotting/v1/fig_5arm_per_domain.py
39
+ c6ec2787808a900478e9a92fb7f3092e04835603882d39a3ad0d24b2d486e193 recipes/plotting/v1/fig_code250k_vs_gen.py
40
+ f49d9a5dfc3f7512af3cc86f0729774344357fa7de748e9917e90a5a4bf16d84 recipes/plotting/v1/fig_exp1_forgetting.py
41
+ 9fd98d1f1bb1a6e449bf503569fd8fbd82d89f7366a811f0fd9be4e3b9ac7e95 recipes/plotting/v1/fig_exp1_three_recipes.py
42
+ ebe9bc1be8f0de7bdd83bcc74e71314fd9ca7758802bfa660128a265c5e4f9f1 recipes/plotting/v1/fig_exp4_inference.py
43
+ 44f959ce1232a19ea3dcee93bb41df5268171e47cf2d66ed4b5e7d84312497a5 recipes/plotting/v1/fig_exp5_method_vs_data.py
44
+ 39542922ee86c359fc3c6e0153daba478ada98e8d10da5e40b8b9994a440a87f recipes/plotting/v1/fig_fusion_combined.py
45
+ 6967a36b0a4ce87c5650409a561bc90a186eb25633501593c87e6da9460c2bd2 recipes/plotting/v1/fig_matrix_and_arms.py
46
+ 6eb66c23518bd7e2b8edc74f23ddb53635cac18ae839c4862ec9bfbc1ca8bdc5 recipes/plotting/v1/fig_merged_vs_specialist.py
47
+ a692b7e495c6d3ceaf46857436a115ffc299375936e37f820ddda02468a724b7 recipes/plotting/v1/fig_serving_specialist.py
48
+ d28b0d29bda5f5ee10c4ea22fa24e7b1b07e5ba2d86c57f74f58285b06e9b58e recipes/plotting/v1/plot_main_results.py
49
+ 663f813697a0026b093a0a6ef68d3b99be3a7c159eadbe2c5b3522e645d92eec recipes/plotting/v1/plot_mos_5x5_gains.py
50
+ 6fdf9f53c384d1ec47ed182dcf2d44987ff30bb0255bef0061fa7c723b785c0e recipes/plotting/v1/plot_qwen3_4b_matched.py
51
+ a7beb62c3b84008553ff9051ecc76bbd859667bf28898b182317363c8128e404 recipes/plotting/v1/plot_recipe_budget.py
52
+ b7ebb2c81dacb6ef06dcb87fb879ea663f2327b7417606520bb30cb299ef006a recipes/requirements-v1.txt
53
+ dae17f81b9fa4b5dba14545e732f6731e359e80e3845f937c09fe81ef8a6e068 results/historical-al-curves/v1/a2_code/al_curve.csv
54
+ 7d56cbca48fdec9cc37fc26e701ca5da6841884f8a49e51c929090c49cb5fe6b results/historical-al-curves/v1/a2_creative_writing/al_curve.csv
55
+ 5da7a3f0e5d955881ce5903f4a7b7567212f89400f130a574fdc0cb783169551 results/historical-al-curves/v1/a2_factual_qa/al_curve.csv
56
+ aee9cf5c10f54cadba4b30b513c18b2651f1fbc6b10d25da719eaea74f471682 results/historical-al-curves/v1/a2_general/al_curve.csv
57
+ 4ce95c7937d1362f0593ad93531d65620a484e138237ce793ea1b3ef03099c5b results/historical-al-curves/v1/a2_math/al_curve.csv
58
+ e88672fadfaaaeb1088504c919208f8b125f1aecb7a14942fc5888d572714857 results/historical-al-curves/v1/a3_code/al_curve.csv
59
+ b5a492456138dc23d09264c26ca671082eb3fb36765ec5398aa31f56d77d2cc1 results/historical-al-curves/v1/a3_creative_writing/al_curve.csv
60
+ b7b8776a83582db069ecd349784aa52d40dcd3bbd6c100c13780a873590c4b98 results/historical-al-curves/v1/a3_factual_qa/al_curve.csv
61
+ 4073a14f31f2d26f0c1974f3e571a45c24209bf2562b2c7725d207d134047a9e results/historical-al-curves/v1/a3_general/al_curve.csv
62
+ 07ba1e5ce58ff013aab9a96738301295f32731facc3ec5b7678802d5ef8c996f results/historical-al-curves/v1/a3_math/al_curve.csv
63
+ cd427bc83af9d2f892924bd1993ead327acab61c06279e5c627abe2e18cc6809 results/historical-al-curves/v1/a4_code/al_curve.csv
64
+ c1867fc99b121cfd613ce2a9d40f8f12a13491e146f85d3175d7bf8c3591c02f results/historical-al-curves/v1/a4_creative_writing/al_curve.csv
65
+ cf142156c17e74d5ac67967b93995dbaf47ee34d4ab28cf65d0044846cd52785 results/historical-al-curves/v1/a4_factual_qa/al_curve.csv
66
+ 81d3dcaacdd7405966d5eb5715dd04c434e714abf3a9620ae492430065c8dbc6 results/historical-al-curves/v1/a4_general/al_curve.csv
67
+ 8e717efab00e869e764262597696297a9bfd5cd7839e0d9ddd2ba623acb0aa05 results/historical-al-curves/v1/a4_math/al_curve.csv
68
+ c105111e04a724b5b21af90fd5e1ecd2b10820db32c9fb041e3cfe153e862f6f results/historical-al-curves/v1/a5_code/al_curve.csv
69
+ 454d8a6f5a03494e4d8aace991965482a858e04bbcdd4c16cb07773ba3895afa results/historical-al-curves/v1/a5_creative_writing/al_curve.csv
70
+ 43df7e88a7ddd7bbbc9471c65682b4584af117b0d1f02dc0ade07bb29395c9cf results/historical-al-curves/v1/a5_factual_qa/al_curve.csv
71
+ e64d977591372dca44bb442ced4a6f5c1f39464a84471bf1ebc21abe5e29bdd3 results/historical-al-curves/v1/a5_general/al_curve.csv
72
+ b85e52e687ba97220b8cad613cc209578df53767e40ab55fd9cf2fdf5808f3b1 results/historical-al-curves/v1/a5_math/al_curve.csv
73
+ 0784056349eac36c44dc1da700b5e051dd60ebfb832254fadf0e30049bdb6644 results/historical-al-curves/v1/a6_code/al_curve.csv
74
+ 6f0c6689cc637a4046f1cd36d32c97f5df4d6931d4bbd0df7f373929a7384258 results/historical-al-curves/v1/a6_creative_writing/al_curve.csv
75
+ 8ab6645dd36b4c7ed6e150591aa796d07fca2f453083a4ea7690b19d14f0522c results/historical-al-curves/v1/a6_factual_qa/al_curve.csv
76
+ dcc0ad60fb88da0a1c2b124b7e6daa94fa4bea76de8ac393eac3edefd900de8d results/historical-al-curves/v1/a6_general/al_curve.csv
77
+ 743758c18a447dc760c512d1525a6adea57a0f8086d0d0b7b8acf0a88a9b16b7 results/historical-al-curves/v1/a6_math/al_curve.csv
78
+ c3c3784e3a7046135fe0772b9e9acedbfe45473bf125a7c69766e08118a90b9f results/historical-al-curves/v1/a7_code/al_curve.csv
79
+ 0eab7d6c41d11ccd0653115a7077d4b9e22943bbd9512867b71eaa2e0df01327 results/historical-al-curves/v1/a7_creative_writing/al_curve.csv
80
+ d86f5a9a467df89b88deb48595e53915114626e692200afe2b1cceb68951f7ad results/historical-al-curves/v1/a7_factual_qa/al_curve.csv
81
+ c66d5d71f44d502be2f4319b57d99d7ab498e470e8b29808fc7943c5cde07423 results/historical-al-curves/v1/a7_general/al_curve.csv
82
+ 07fa6f01a556aff84978b938d7210e2c32cbcea0ff28b672895169ef2096b9fa results/historical-al-curves/v1/a7_math/al_curve.csv
83
+ 63bc1738955954356859cdca199f48a3948003f6c6ceb523e7658dc6297c4fe5 results/historical-al-curves/v1/aw0_code/al_curve.csv
84
+ 58a7c10f203fdfca83c4445aab6b8db5bc93a5ebf6c5ee39a30adea955238048 results/historical-al-curves/v1/aw1_code/al_curve.csv
85
+ 766d1a00823d6db3f2cd6a3d96e11b935d31120f95f780b6d1f8b41a53a95f82 results/historical-al-curves/v1/aw2_code/al_curve.csv
86
+ b3b6db437eb990291582e1fe8180fb77a5fc44394ae3a4bd595b58a1fa95116e results/historical-al-curves/v1/aw3_code/al_curve.csv
87
+ 71a499635ea64fb0e45ea136aafe69f2466b508e0b66e6b8158a681ab0fb6ffb results/historical-al-curves/v1/aw4_code/al_curve.csv
88
+ e135392f04e9db93600e871c8a82b556b7f380c7622db82489bf158358fb0a29 results/historical-al-curves/v1/aw5_code/al_curve.csv
89
+ 23bdd93d5bfa5c24aed9089fb1f1903927a2de4bf26629ee42194d31994fe2c3 results/historical-al-curves/v1/aw6_code/al_curve.csv
90
+ 793994b7cbf0695dcc184bf095697988aef78be0ad6c8fabb615c2f16200d652 results/historical-al-curves/v1/aw7_code/al_curve.csv
91
+ ed2bab825dda5d70ddb6a3e16a0a86633178f1c8e3a2149031d56f11be4b05b0 results/historical-al-curves/v1/b0_code/al_curve.csv
92
+ f56a485034b29f7e1c65c8021efe18f5980d732c4e1556d6550e93a52d55f616 results/historical-al-curves/v1/b0_creative_writing/al_curve.csv
93
+ f33c9d7fa3985e39ac50ff1d8dad02d72e7276a08c8d43492627be23ed67c579 results/historical-al-curves/v1/b0_factual_qa/al_curve.csv
94
+ 51ea0ab13244e62257a02239ca42aade659a535afff79faafc4f37c4d6ca5316 results/historical-al-curves/v1/b0_general/al_curve.csv
95
+ 405dd523d42728d330a5a5de80f12957a15f954c41f06474c0f898f841c7b4b9 results/historical-al-curves/v1/b0_math/al_curve.csv
96
+ 97932cc47a49befbf27f7957d827a37c3b93d691d8b5692562c9fe52d964d941 results/historical-al-curves/v1/b1_code/al_curve.csv
97
+ f8185aae5e4724c5a86c6adfeb34c16e7767f929d3d633c0d60cab0f8127128b results/historical-al-curves/v1/b1_creative_writing/al_curve.csv
98
+ c2031c105435638bb133232dc1bd0c8b23454a368fa6bddc457426981dfbde56 results/historical-al-curves/v1/b1_factual_qa/al_curve.csv
99
+ 0967339a7d6711ef84490506221730589487c1d21586cd1e131bb4b5e0540a11 results/historical-al-curves/v1/b1_general/al_curve.csv
100
+ 1fb5f0f30ded6faad7a1f8a02050853cb500df707853dfbfe4239016e625a6bf results/historical-al-curves/v1/b1_math/al_curve.csv
101
+ 784723990cdf7fb9cbae73598ade59da5c5e494666187d39ccab98e2a13e843c results/historical-al-curves/v1/b2_code/al_curve.csv
102
+ 2d7c6e582ced15922331dbd31ca93ac17476daa07af395bba9f2c4e90793ada8 results/historical-al-curves/v1/b2_creative_writing/al_curve.csv
103
+ 8a7fc49463e125c3572f43300ae6f51229d3b7a9460f8a4cd7415f4029155e0d results/historical-al-curves/v1/b2_factual_qa/al_curve.csv
104
+ 17a09873412bd568cc0e707da3502f5413a58fc10085a640d4e6433645ad0307 results/historical-al-curves/v1/b2_general/al_curve.csv
105
+ 8cfcdd3707b7474195e9c1d55361ebf1d7798eccc1bd5d2e77a5e354a05e0272 results/historical-al-curves/v1/b2_math/al_curve.csv
106
+ e4f9520174ba9ba33873c3c667883034cb9112e0ed8fb1e9ec6f680142ded0c5 results/historical-al-curves/v1/b2_v3_cont_curve_8x5x1x6/al_curve.csv
107
+ c36f8911c0042f6f686cd63a43330bb2dcb007709aa8b15807eb8a32dd259341 results/historical-al-curves/v1/b2_v3_curve_8x5x1x6/al_curve.csv
108
+ 0944a8604c0bd5a5218a9a0c6a4b3ed370657b300e8941d9a5265f5b21634b54 results/historical-al-curves/v1/b3_code/al_curve.csv
109
+ 7f35dd8bac7bec1c7fd38eee49ef144cf8cd1ea6577c28ebf7b02008a0e018c4 results/historical-al-curves/v1/b3_creative_writing/al_curve.csv
110
+ 393b855f4794d72ab7fd16d2dff264c975f3407f3b781831465fd79334e705f3 results/historical-al-curves/v1/b3_factual_qa/al_curve.csv
111
+ 76db113c70a264f7f3d96bb764b2befdcbd8ddd30593babbd13be47c7ccd36c2 results/historical-al-curves/v1/b3_general/al_curve.csv
112
+ cb2c4c321389e1f978648ac9b634532606885924336ee9eff3e9ee3df0dd8806 results/historical-al-curves/v1/b3_math/al_curve.csv
113
+ 20dcba4e0f4a97d64d795ab5e97e377d14f083ce3ca8e9febf6ab1def6bd05d8 results/historical-al-curves/v1/b4_code/al_curve.csv
114
+ cfb4e10bdb3f8896f321403b653c01f8edc7be518376a7508ee1fe16abf5133b results/historical-al-curves/v1/b4_creative_writing/al_curve.csv
115
+ 6889a3c240b28f1708a8aa1844fbd9e016ede9cd06201d3f3444e852d6bd18a9 results/historical-al-curves/v1/b4_factual_qa/al_curve.csv
116
+ 93e2192320c39883bb6e536275fbc5af9992c285856a98c51f745a6c2cd322f1 results/historical-al-curves/v1/b4_general/al_curve.csv
117
+ 897845f483d8fbbc7f9cf587698bc4b7a96e126f7716172bc5547f7138ba7bfd results/historical-al-curves/v1/b4_math/al_curve.csv
118
+ 092f185463e80a3f3870785173b7047d62662919946293db45b2e432318717e5 results/historical-al-curves/v1/b5_code/al_curve.csv
119
+ 0c193663d6bf65c6ffede829949cb80bc68801c4b52e7b3b254c410cb476e8d3 results/historical-al-curves/v1/b5_creative_writing/al_curve.csv
120
+ bd5d632a8da9392f4ff22a73c1540e8990ba72407c09eb80e5f326abd31657d3 results/historical-al-curves/v1/b5_factual_qa/al_curve.csv
121
+ 7ab5552d57bee9349fa05b10f0ec20751db6d57745f192b0fff040df83c70db7 results/historical-al-curves/v1/b5_general/al_curve.csv
122
+ 601ddb84962c2e9a12c49338d3688b534b1b6e8efc3ea1f7c47dfd8274ac3e85 results/historical-al-curves/v1/b5_math/al_curve.csv
123
+ d5858dc1897c4d64feadf087ea74740c3657b736e50b1561e442c7d7e66a0b3a results/historical-al-curves/v1/b6_code/al_curve.csv
124
+ 752306586324989229b99b0eb4dc42d52faca211e44337bd279f063ee27c31c8 results/historical-al-curves/v1/b6_creative_writing/al_curve.csv
125
+ 97e815c6b08c33cd7c10581fed459dfe06d2a01328d1f433908f4ec0261b469f results/historical-al-curves/v1/b6_factual_qa/al_curve.csv
126
+ 9da6e16cbbe001a4826ad54233041c396ce4dce90e4074639f6a74ce9c4dcb62 results/historical-al-curves/v1/b6_general/al_curve.csv
127
+ 66c4a1fc30f00ec6a172c79df7bc9bfd5eb20300b4b45961387b215a3459f223 results/historical-al-curves/v1/b6_math/al_curve.csv
128
+ 9caaf63ef828990870bcfbc53c48d849cfd1b9a7db2f33b028a82f32e7246ccd results/historical-al-curves/v1/b7_code/al_curve.csv
129
+ 16228b3deb7f7e45f190ef229186df928daaa0a182b9a7f7b5a8fe0e0bf84748 results/historical-al-curves/v1/b7_creative_writing/al_curve.csv
130
+ 6d380638c474c93a128897ea0d5e38507c8fc639cd5afdac85cfbf55e9be72ae results/historical-al-curves/v1/b7_factual_qa/al_curve.csv
131
+ 4c00e7142537032150da6be745d880fb00fc63e7722d3f016cc7801bc9180884 results/historical-al-curves/v1/b7_general/al_curve.csv
132
+ ea0b445042ac886293657641a64bb039fd6e2cd26a6c2b73bdf3b6446b05e567 results/historical-al-curves/v1/b7_math/al_curve.csv
133
+ 4c7950c6ca3dbe06d5674d2568b5b183b56de92bf4fa76230af5c5d045e1eabd results/historical-al-curves/v1/c0_code/al_curve.csv
134
+ b74b5f158b2f61a23d899aec307d8615f8a33d158032b2a896804b0bf1450514 results/historical-al-curves/v1/c0_creative_writing/al_curve.csv
135
+ b4e8a4ec59a51f14f79275cb1341280656a6bee50653fe497c88680af5acbcee results/historical-al-curves/v1/c0_factual_qa/al_curve.csv
136
+ 0ee93e536ed44dbcfab2d08f8f8a76e6590b4f35cc8fc1a88cb58248700b2a78 results/historical-al-curves/v1/c0_general/al_curve.csv
137
+ 607c0206b4b6e6985297e22ee36d60fc8d315d5275b5b1d10546d2ec5de1b44e results/historical-al-curves/v1/c0_math/al_curve.csv
138
+ d7b3403ff3fe7e8cc6e119f046911c339bc297fb9d6484ea667326c5b4993f52 results/historical-al-curves/v1/c1_code/al_curve.csv
139
+ 954ff064cf4cec980f9439cd5c7434272ffc93ecd38f0eb7fba1c7c08c1fa518 results/historical-al-curves/v1/c1_creative_writing/al_curve.csv
140
+ db592b66feeeb1b807c0cd192b474eb6beca4b3be00d1cf9bd1faafd6175b47a results/historical-al-curves/v1/c1_factual_qa/al_curve.csv
141
+ 803576dbe5083e7b3a487a9780cb06bb58c63e82601156afe931fd3e04d7155d results/historical-al-curves/v1/c1_general/al_curve.csv
142
+ eca7f51ff784366375d5e29799fc5bf316a9ef803812d14e22c066f508c1cb35 results/historical-al-curves/v1/c1_math/al_curve.csv
143
+ 65685989c83c8cde6179b3baf8725a231c5d020e326accc2f4ccb65db4ebecb5 results/historical-al-curves/v1/c2_code/al_curve.csv
144
+ 868681f811ac8721811740d3c504f35bf37d1560d67d045c86e68023b7ea3dcd results/historical-al-curves/v1/c2_creative_writing/al_curve.csv
145
+ d5b2c7f25d9bcfb1ee072c5529e8cdfa8122de16cf8ae5b25601a27ea4b6b684 results/historical-al-curves/v1/c2_factual_qa/al_curve.csv
146
+ 211aca725b163fc8c6db2956352f254e03005204551d0bce4fe2c11fc24166ca results/historical-al-curves/v1/c2_general/al_curve.csv
147
+ ba923a05b754e4009f41f452da060bf128b4af1d97b5d60c69cb0adf970964b4 results/historical-al-curves/v1/c2_math/al_curve.csv
148
+ 7a7032f0fdb54aff1bb68456bcc4619107572d9e1c7be9f04653dffe903e2c31 results/historical-al-curves/v1/c3_code/al_curve.csv
149
+ dd88bd7aa0c7d70467c88eba8ea31c26f4db5aa82c6c485f723f1bc6a8a47f7a results/historical-al-curves/v1/c3_creative_writing/al_curve.csv
150
+ 8790230d20b4996547849d1fee887ccf70a036fb69c3377c93ef237b74e9576f results/historical-al-curves/v1/c3_factual_qa/al_curve.csv
151
+ d1586a3cf87eee78a83d6fdac95a70203c4b18fa56f371b1f3f1b801fe1c27b1 results/historical-al-curves/v1/c3_general/al_curve.csv
152
+ 4ad7ce036023a5644f713848b56b428fd78ba427e77ab2aea8039105c12cc5de results/historical-al-curves/v1/c3_math/al_curve.csv
153
+ 7155ecbb5af764aff597a5071312c4fbe7ea3b9678d438e53a84db5994d544c3 results/historical-al-curves/v1/c4_code/al_curve.csv
154
+ 7a9502461a40264469134c1602dce11605d746fb362d7946826addfabe04ee9c results/historical-al-curves/v1/c4_creative_writing/al_curve.csv
155
+ deec1ade9fbb0ca6120706265aebad6ed2ac5dfd1303a4235276dfe4dd86af9a results/historical-al-curves/v1/c4_factual_qa/al_curve.csv
156
+ e92a4cdf7a876ca2100795d03735b95741af6acd8346c11fb2baca421f9b8b13 results/historical-al-curves/v1/c4_general/al_curve.csv
157
+ e42b09abd0da17dadf2ec15a8f3a97ebd8abe052ed1cd28971fd35c4d82979b7 results/historical-al-curves/v1/c4_math/al_curve.csv
158
+ 3b5f8477eb60ba034b09b80033824d38bc061efb987392bba95ebf82f84085b2 results/historical-al-curves/v1/c5_code/al_curve.csv
159
+ a7c05f9e0de662069c4c327511e5a44d8c5c2600a8a3d327d23a18e91f29fc75 results/historical-al-curves/v1/c5_creative_writing/al_curve.csv
160
+ e38286d943199cec158517b54a799287c37c50d78e996d30ec13c8099c5cb080 results/historical-al-curves/v1/c5_factual_qa/al_curve.csv
161
+ 160423ad74f8f5bf5924b853e143138763795e3e7f0432729ebf07426d708c56 results/historical-al-curves/v1/c5_general/al_curve.csv
162
+ 093d79e141db17e3f2da8411b754057585377e77dbe2ca4b0c021c18721233ce results/historical-al-curves/v1/c5_math/al_curve.csv
163
+ efa094eefd03080e2d1612e2780cabc4b4fe82102bae3a70d685bf1fd9a5bdce results/historical-al-curves/v1/c6_code/al_curve.csv
164
+ 990c56cc487367e9e418bbeff9132144433f082632b7416e2d22dd36f003c689 results/historical-al-curves/v1/c6_creative_writing/al_curve.csv
165
+ e2ce13345d49e2960fa9e52649675e0a1c1af4b61f59e5d13a2375fb806263ee results/historical-al-curves/v1/c6_factual_qa/al_curve.csv
166
+ 5d94f62ca87701b51af5ef930fe63be1df7958e85773ccd402edeacbf59a25b1 results/historical-al-curves/v1/c6_general/al_curve.csv
167
+ 4fc731227fb3cc66f90a5152759c216faada25a65fc332d8148541b9f1c4bac0 results/historical-al-curves/v1/c6_math/al_curve.csv
168
+ 4e8ea13685b72455b24ab172fa68d71743bc71a6d7ed7462fe30e36ee16a08d7 results/historical-al-curves/v1/c7_code/al_curve.csv
169
+ 307586723ae39dda90995aded367c77aa254e3820a2ded9f42f2c62ef83f463f results/historical-al-curves/v1/c7_creative_writing/al_curve.csv
170
+ ecff8fdc0258485e27b1f4ebf11449d4345b6f12cae0c7ef4ecbd4c0d3705167 results/historical-al-curves/v1/c7_factual_qa/al_curve.csv
171
+ 927daac26248cf56a8e7f09bd8c6b4a19a1f841cfb6b64d3d8643b5c0e017832 results/historical-al-curves/v1/c7_general/al_curve.csv
172
+ e4af3170b25fc05d0ad872adb322836852e15d0d40fca7b7fd4f7f7b27b8dd62 results/historical-al-curves/v1/c7_math/al_curve.csv
173
+ 1789f2c326487f364f3c14bc9ef4773d2f5e6a3ddaee65cb8b1c2847f6116d47 results/historical-al-curves/v1/d0_code/al_curve.csv
174
+ cc4024858d44b0252ff081901cb2d710e83257679835f6d40ff8c8744db33602 results/historical-al-curves/v1/d0_code_bench/al_curve.csv
175
+ 02c34be9c790947677503f07b3873849e14458c3cf18efed4717be917dadddab results/historical-al-curves/v1/d0_creative_writing/al_curve.csv
176
+ 3eb6cfcd4fa4a755eb9d2f9a9c04ad4a82341a5eee734be5922d0a3530568c30 results/historical-al-curves/v1/d0_creative_writing_bench/al_curve.csv
177
+ 2140012b6c2b0f52b2aada13cfad0cdae99afeb8b7936281c65e197c2f8b0fac results/historical-al-curves/v1/d0_factual_qa/al_curve.csv
178
+ b88004349fe0af1749dcfd00d3d1719c63079daab247bd961224ef7d5355eb20 results/historical-al-curves/v1/d0_factual_qa_bench/al_curve.csv
179
+ 511471c17e2d15eedbd3481e7a9771170fccfdeeec09916974e3c1633793ee86 results/historical-al-curves/v1/d0_general/al_curve.csv
180
+ 898934747a054fa24b146c14a5f2aba09d61152cc5c38a902cf4f56ff5af1d42 results/historical-al-curves/v1/d0_general_bench/al_curve.csv
181
+ 5c4e2ae4caf4bef8303353cde38d98055123220e68f69c6896d65296edb81eb4 results/historical-al-curves/v1/d0_math/al_curve.csv
182
+ 1e361705ccdbb2fa0507cfc3beffebddd392d36038efa3e8dc2542d281777545 results/historical-al-curves/v1/d0_math_bench/al_curve.csv
183
+ ebf1b0e2d4ec3da18de3011f029c029a81b8b14407c9b1d6a78333af3f07f433 results/historical-al-curves/v1/d1_code/al_curve.csv
184
+ 8912e2738a3460457ee2b1968dd3dacf93e7fdaa6b22cc064359777f5f5ccf01 results/historical-al-curves/v1/d1_creative_writing/al_curve.csv
185
+ ed8eed33bff28b02c080d46b998217298a68e630abc23e732cc47251acadb2ab results/historical-al-curves/v1/d1_factual_qa/al_curve.csv
186
+ 91824d146176f24973bfa6fbfe8a6d55249ac4881d1d5a23935c13f1d2c51618 results/historical-al-curves/v1/d1_general/al_curve.csv
187
+ 8ccaf221637cc8cf7631ad7d9dd260adcf9f09520eff899ee72c5867f44f1714 results/historical-al-curves/v1/d1_math/al_curve.csv
188
+ 2ba1138d82f05ed5fd7bc45186cff4351328324ad93608d2c25c20ddc8fe0b2d results/historical-al-curves/v1/d2_code/al_curve.csv
189
+ 9c0dab3f0616fb762d43aeecab1e19d292d92ba3b72e74efc6ee3c37d2547dcf results/historical-al-curves/v1/d2_creative_writing/al_curve.csv
190
+ c63e517f6e5970d1b2208a455e50073b5fd531cfd9484b70890577a72baa74bf results/historical-al-curves/v1/d2_factual_qa/al_curve.csv
191
+ 849b26bbb6d4cb5ec1b2ae207745d0c8cb5433b274404e116bb4a41bd9649f96 results/historical-al-curves/v1/d2_general/al_curve.csv
192
+ 9a6dd3a37a3daf3368a2262863b82ae34e47192e25d16ab763b4dbd39f7a5799 results/historical-al-curves/v1/d2_math/al_curve.csv
193
+ 48877d7e509598be3940beed6654af434efa1de2d9e4f46eb42352ddeb22c8ec results/historical-al-curves/v1/d3_code/al_curve.csv
194
+ 2dc5e5d683438c79532dfabbe065e694a6b9603fa5ef7e73648eee7ad0ec7138 results/historical-al-curves/v1/d3_creative_writing/al_curve.csv
195
+ e2e5ed61a2ed83cd6e09030ce52692106a8ae7ebdbe1c18bdf58fc0abe150845 results/historical-al-curves/v1/d3_factual_qa/al_curve.csv
196
+ f080acc44e7d4ddc6a7cc253a722d9cfb73b531e235e0605101f951fed43e47c results/historical-al-curves/v1/d3_general/al_curve.csv
197
+ ba98a34a8360433870e3e12475fc275a7ab6d03bcc9b94029e7fa81a8dd97f2c results/historical-al-curves/v1/d3_math/al_curve.csv
198
+ 06430bbb7a1dde00cb11eae287cf41212f0c4270fab85d6a7b4ea9cdfcc6376e results/historical-al-curves/v1/d4_code/al_curve.csv
199
+ 138322d96b562a197c3dfce4be96877a63d5c60da9299baf9a4e1462e0457057 results/historical-al-curves/v1/d4_creative_writing/al_curve.csv
200
+ f6a4e0d1aabcd786e184e3845c2d8f07afff7938c8faacc6a6e5831024300e55 results/historical-al-curves/v1/d5_code/al_curve.csv
201
+ 544e7047314513d17b726f10c4a47e3069d3d48eddb779cde9bef3f3aa9acb98 results/historical-al-curves/v1/d5_creative_writing/al_curve.csv
202
+ 2c4c0da28aec12ee646a01c36e54e226f6f2f7c2598daa589e24083b753178dc results/historical-al-curves/v1/d5_factual_qa/al_curve.csv
203
+ db3224fa3489c952487463cb049c202e60a01ef6665d2d5a2aecc01d44c2985b results/historical-al-curves/v1/d5_general/al_curve.csv
204
+ e492b9a6a7e2fa83288c02c0f450739f2d30d124d6e05aa8cce23225792fdafe results/historical-al-curves/v1/d5_math/al_curve.csv
205
+ d6fe8d0beec5432eab9c8fe8a9b4fcbb7b08effc638f07bc8d56dd73cf18b1bb results/historical-al-curves/v1/d6_code/al_curve.csv
206
+ dcc8681fc1864c9af927f1acb89ca6e18cf2b8bb16738eb500779cdd79ef1321 results/historical-al-curves/v1/d6_creative_writing/al_curve.csv
207
+ ec1c8abcab0e73ceb72b7aeeaa56cacc483e032fe97bdb27b13096f659f933a4 results/historical-al-curves/v1/d6_factual_qa/al_curve.csv
208
+ 38416012f7b76ee350ed97bb6efe3f2b3454a430a1a588e3a1007035804f26fc results/historical-al-curves/v1/d6_general/al_curve.csv
209
+ a9ed8256345309365b7cd216a0c587ab31c6e66d76eb9790c4b66dafd2e96859 results/historical-al-curves/v1/d6_math/al_curve.csv
210
+ cee9296d23831df5ee2411bb8a5f95c905796418fe20293c1a7c92981cdb99fe results/historical-al-curves/v1/d7_code/al_curve.csv
211
+ 1dc7a8e5e0b04f920984b60ff2203bcf6dac7f48a5f331ffe0189bd893387d74 results/historical-al-curves/v1/d7_creative_writing/al_curve.csv
212
+ 701dbf445877534d1817c9a7132023654f10ea50e4878c3aebd98a79614e60f5 results/historical-al-curves/v1/d7_factual_qa/al_curve.csv
213
+ bb45782350192168b00e368c3919d1a133096e2ba93b6c583f90ea903ab4a908 results/historical-al-curves/v1/d7_general/al_curve.csv
214
+ ca8299b3e74ed2a8b1831f7ecaf2cfecff9c8931f1396da632354b4b6e93a4d9 results/historical-al-curves/v1/d7_math/al_curve.csv
215
+ b5f3417a3a63c110dfa9d0bd7af497940873925f4f2ac969816034d64b54908c results/historical-al-curves/v1/gendense_l0/al_curve.csv
216
+ cc92b9d1cef97edf64e31bfabe6ef9b2dcfcc343d7f2c3fc492187adf72fce57 results/historical-al-curves/v1/gendense_l1/al_curve.csv
217
+ 76d88265db58b5a24a79096ed0dc6dc8ca2e5e24024a15c8777e38e6e0895eee results/historical-al-curves/v1/gendense_l2/al_curve.csv
218
+ 6e29784a0f479940051139ec7bc3b281c5d747f8169770daf008a05b64e72414 results/historical-al-curves/v1/gendense_l3/al_curve.csv
219
+ 74378cdfcbbdb0342d963b8368350ca0a2dcaf7a9e331bbedd6b67bda9e313a5 results/historical-al-curves/v1/gendense_l4/al_curve.csv
220
+ cb8e712bf404f41ce40f3329276dcef71a9e05852fe4c230f2a21a23a4cf348c results/historical-al-curves/v1/gendense_l5/al_curve.csv
221
+ 7cd3d94ff8987950768e4722014f3956f2af4114d1bdb428361028603b6d1088 results/historical-al-curves/v1/gendense_l6/al_curve.csv
222
+ e36b37efcd21b27b438bf1015266172c0804f369b48d64c243ab70cc9ab34867 results/historical-al-curves/v1/gendense_l7/al_curve.csv
223
+ edf093e7b7be16957278d8c961197b9e913be5b5ac0678df48bcd54e8c963fbf results/historical-al-curves/v1/genep4_code/al_curve.csv
224
+ 644c907eb90c2ed4790bf0805df65af178fa4348076e6b7a5258bbe7bb5eb7e4 results/historical-al-curves/v1/genep4_math/al_curve.csv
225
+ f575b47ecd4d248d4f4c0f4a2e6e685ee60fc9aff335f0eae2e64d06d503ff17 results/historical-al-curves/v1/merge89/al_curve.csv
226
+ ffa68e561efb0ff335945d7f5ce2c4ce884c1cea35fbecc0acfc8f0a3a7f5a1c results/historical-al-curves/v1/mv2c89/al_curve.csv
227
+ acfb67b4fa59a0eb7a175f2c110e8b609eb2ff530283f5ad770e949b3d15d595 results/historical-al-curves/v1/mv3x89/al_curve.csv
228
+ 62fe8604350ac825389c66aa3282b9c5076cfac2cbd33ce35f98222c8995edfd results/historical-al-curves/v1/mx_code_code/al_curve.csv
229
+ 471ed1c8cb6266ce5462dd90f4fd767ff224b794b6431b51207b3db10e953d86 results/historical-al-curves/v1/mx_code_creative_writing/al_curve.csv
230
+ a0ac4e1243a51d3a5ab2aaf79595f8e89836f1f43210073c32fa36530bef3638 results/historical-al-curves/v1/mx_code_factual_qa/al_curve.csv
231
+ 75ff837f1749d0f095ca7ba242cf6d00d7817b27049efa3c2cc4b51f9c5b4a9a results/historical-al-curves/v1/mx_code_general/al_curve.csv
232
+ 27e2d44d0e1d64adbdc9dbb02f8fdfd5849a1acb65e886bca1b663dc947b1df2 results/historical-al-curves/v1/mx_code_math/al_curve.csv
233
+ 193bbf84b8b4802b7ca15e36ff505558842da29023f3f450441b771e3244bdc0 results/historical-al-curves/v1/mx_creative_writing_code/al_curve.csv
234
+ 0c193663d6bf65c6ffede829949cb80bc68801c4b52e7b3b254c410cb476e8d3 results/historical-al-curves/v1/mx_creative_writing_creative_writing/al_curve.csv
235
+ 169dcde892e3f47236c2e5a440b18478aac40b6d578920e865124e3ce1ce729e results/historical-al-curves/v1/mx_creative_writing_factual_qa/al_curve.csv
236
+ 79ffe500ee72208d201cde35dada407cd3120dd3761ebb53cc89107efac2420b results/historical-al-curves/v1/mx_creative_writing_general/al_curve.csv
237
+ 4cb4168637b1d2ecfc71fe0709a3cabc8a59dbdf0d4a8894af7473afb3fe5458 results/historical-al-curves/v1/mx_creative_writing_math/al_curve.csv
238
+ 0da911fc412c8831a08db40720644b2d07d1878e8b2d9505d2c344c58ed18f32 results/historical-al-curves/v1/mx_factual_qa_code/al_curve.csv
239
+ c22215e9aac307a3d72ec1dc4054e8c65bbfaae5e81c501d2e628b89e0ccac6a results/historical-al-curves/v1/mx_factual_qa_creative_writing/al_curve.csv
240
+ ebc0bf6bf21573185e2a4e494f4d2ba3a3fdefc0ab5bdcf7dd6cbb77bdb63e14 results/historical-al-curves/v1/mx_factual_qa_factual_qa/al_curve.csv
241
+ 42edb75d5a4adece22f31fc5895568f5a0195373097fd356b1f463afaf03fca7 results/historical-al-curves/v1/mx_factual_qa_general/al_curve.csv
242
+ 29dfae8c16ec355149bec331dab105867ec8741f0af6dc411d15d9074f2927ce results/historical-al-curves/v1/mx_factual_qa_math/al_curve.csv
243
+ ea26ed3625839230a90b0b5fb91ad8808856c13e16e1e303cf799c736c5b570d results/historical-al-curves/v1/mx_general_code/al_curve.csv
244
+ 8e0fb5a0a6730b5f416190e30515cf294b4646c09d285f070d8d3eb15e0ce6bf results/historical-al-curves/v1/mx_general_creative_writing/al_curve.csv
245
+ d8767ce37119ecb19671fe82e28c340b6323d8c5fcce7e336ee004cc30472499 results/historical-al-curves/v1/mx_general_factual_qa/al_curve.csv
246
+ 127bbd05b322c4e702ca8637c1754d299986f0ef8d08a9a37f8d734bb22e7ead results/historical-al-curves/v1/mx_general_general/al_curve.csv
247
+ 3701966065391c5c89b1dca082fd9ab93ebc4ee444b51db0ae8d05268a5a50f1 results/historical-al-curves/v1/mx_general_math/al_curve.csv
248
+ a6b1afa6900cb541c4979a6714d42aed473565d9d646088961e2f5c4ccb6736b results/historical-al-curves/v1/mx_math_code/al_curve.csv
249
+ 5eba966fd12aaf38b508164c325bb480d95aceec7a8fd3b359ff12084c8b8635 results/historical-al-curves/v1/mx_math_creative_writing/al_curve.csv
250
+ 42c6c251cfe5c3559195b53a9860f00e545286f24aacf56e700f5d8c24c29aa8 results/historical-al-curves/v1/mx_math_factual_qa/al_curve.csv
251
+ 0ef053311d4cae8ba0d339bf066e396bbc9624fccb00ee79a9ccf6215190f772 results/historical-al-curves/v1/mx_math_general/al_curve.csv
252
+ 601ddb84962c2e9a12c49338d3688b534b1b6e8efc3ea1f7c47dfd8274ac3e85 results/historical-al-curves/v1/mx_math_math/al_curve.csv
253
+ ae5e4086fd51850db624e71aad1f6390564afea4c01909138b8ec518174a6ddd results/historical-al-curves/v1/rc89/al_curve.csv
254
+ 1e682fc087dfa045ab6cd0604b6a6d60ccc9779188c383b3cce5d98922cb3348 results/historical-al-curves/v1/route89/al_curve.csv
255
+ 226d571094d6326d5c77156c8b6f9b6f23565eb0a558589f23bc047a89b59fb9 results/historical-al-curves/v1/rw89x/al_curve.csv
256
+ d3786c58dd808b47532eadae27684b67369fd668725e3c58ab5b6d95fbb8eb0f results/historical-al-curves/v1/rwr2_0_code/al_curve.csv
257
+ 98daad9455c1beef6de932d4c515c3f211ecce2b6db33d4195d2882f2a4ec8a0 results/historical-al-curves/v1/rwr2_1_code/al_curve.csv
258
+ ee1dc53951abdc88505e4eb04a160a2a0c069529ae4c7921f4a161c087bc7ed7 results/historical-al-curves/v1/rwr2_2_code/al_curve.csv
259
+ d66a15fbbacb240934dc919517d50be294ee76085c831d44adfc4131b9f9a324 results/historical-al-curves/v1/scnAg0_code/al_curve.csv
260
+ c0d060695f2f0c87fcd74cd065b720d47548eaf06d91dbc942fd1a8aa5d179ca results/historical-al-curves/v1/scnAg0_math/al_curve.csv
261
+ 071f37849a80671bebc47c9c9bd9020b0a150dc39185575f323621cf5808e6a2 results/historical-al-curves/v1/scnAg1_code/al_curve.csv
262
+ f74a58358baddb9ad7038e3be19273d990e93fd1f6814d2c14b2fe9fe2a840ab results/historical-al-curves/v1/scnAg1_math/al_curve.csv
263
+ e81f887a2721c5e0334c956f7a4de7f31102b5a76b453e8510c34883172148d3 results/historical-al-curves/v1/scnAg2_code/al_curve.csv
264
+ b8d5de6fafb9437dd34f8dd0a92b861e3ff4303e21d37fdd82ea0ba426563025 results/historical-al-curves/v1/scnAg2_math/al_curve.csv
265
+ d177d4bd11c69bb5a669851dd02451a604ebeceb9d9763594d5f9f083bf75c85 results/historical-al-curves/v1/scnAg3_code/al_curve.csv
266
+ 81a5d982e68efcd144f0353c18f97d1eb5372018d1e7bcdd0ebff652b15e16f7 results/historical-al-curves/v1/scnAg3_math/al_curve.csv
267
+ 7de24f2594949bfe5ee6faa5ca99d976d72e97741ea961315aebfe1e447bd0d8 results/historical-al-curves/v1/scnAm0_math/al_curve.csv
268
+ 3cbab716c23dd154accda87f4bcf794b2fc0651752aad17d823dc39b062b1660 results/historical-al-curves/v1/scnAm1_math/al_curve.csv
269
+ bf5646e0311035d6a58c3aa05f4c16c5a03ec9cad2a5e3f238d0870a468c932f results/historical-al-curves/v1/scnAm2_math/al_curve.csv
270
+ d1d8c2c472413573c1649ed6ece2cf45351f0f2801b90d3c1c3c1765de330ad0 results/historical-al-curves/v1/scnAm3_math/al_curve.csv
271
+ a27520a897853df3e676180297494c22b731734ac6b01dd7128ab0e28744dcae results/historical-al-curves/v1/scnAm_code/al_curve.csv
272
+ df9636a07e3c7c635e4c25e7c4c2ec39a062c3b691ed01d7630c902de36665cf results/historical-al-curves/v1/sd0_code/al_curve.csv
273
+ 50f86a08650e19fdec4c1705af72c2667a25ad12c21fd228f540dfc17807fd91 results/historical-al-curves/v1/sd1_code/al_curve.csv
274
+ b966d37e18be328c18ac4488c53ca7ad314680d6878ba721b1f0b126bfde4351 results/historical-al-curves/v1/sd2_code/al_curve.csv
275
+ 595ca5c6d0f9c564c9c4d3c1858259f14ba43a6c59a2c3a980017c8dddea6d5c results/historical-al-curves/v1/sd3_code/al_curve.csv
276
+ 49f06e20a64540e35a1882f0d6f77c2ef97b0de40221adbdd4ce5ebb2e4fa6cc results/historical-al-curves/v1/sd4_code/al_curve.csv
277
+ 203fe4ec71adef91a5e2c932d23b23a55f16b4db72cf8c8c26c10391807247f3 results/historical-al-curves/v1/sd5_code/al_curve.csv
278
+ 93e9532b8afa55c7d04ebf21a097f5050719ae7faaf79c514a0b49fdb76433dd results/historical-al-curves/v1/sd5pk_creative_writing/al_curve.csv
279
+ 6b48f906b7b3fc0ec47d1b4cb5a758c6779bae518405ab96773a31add496885e results/historical-al-curves/v1/sd5pk_factual_qa/al_curve.csv
280
+ b024f11ac64c058c715cb5652556058e912dc5b2b27e6a45f1c2a98ff9839b20 results/historical-al-curves/v1/sd5pk_general/al_curve.csv
281
+ 86a5dc6aa38a11753c1f7c543bac0be7e9508412fd9d3621b8a1dccf675a52b7 results/historical-al-curves/v1/sd5pk_math/al_curve.csv
282
+ bd8c6ca5ee8bbc993cceb689528c6324f0c06175684ade3addd753d4e30bd124 results/historical-al-curves/v1/sd6_code/al_curve.csv
283
+ 60e6b8260e89c9efab753e867c2bde1b4a8ee54b1715a7215216849297f33fb8 results/historical-al-curves/v1/sd7_code/al_curve.csv
284
+ e803f1bd631885a062f8cf78cfc78fd6010d5a75dd7a6575fc71256d386a5d91 results/historical-al-curves/v1/sg0_code/al_curve.csv
285
+ 99e0a6ef3217f4d18ddc84092678467918f548c52e2fac892f779dade359cad5 results/historical-al-curves/v1/sg1_code/al_curve.csv
286
+ 2312de5495b1bb06fd039a8ca49124b2ea19ae82174889c996aba3af5890cba7 results/historical-al-curves/v1/sg2_code/al_curve.csv
287
+ 3abbfc13e520c00535e6cd2ecff9aa5aa91b8e3e4f1feca133a8c4557c580dbb results/historical-al-curves/v1/sg3_code/al_curve.csv
288
+ 86a4d3bdeca1c89716a4afc24dc1f9a56a14e8df479fc8071fca91f8b0b3da05 results/historical-al-curves/v1/sg4_code/al_curve.csv
289
+ e5b0bec024da1370030d6c903dc14a353aa22d92a6c1a1efe2116374307265a8 results/historical-al-curves/v1/sg5_code/al_curve.csv
290
+ 182709212d475a24728d84a642a0f589d0ad3807183a40a5375a95998f9ab05b results/historical-al-curves/v1/sg6_code/al_curve.csv
291
+ 171d83662652e87ba1819c8e3ed696d30ae974994d486f50904a8673155c15a4 results/historical-al-curves/v1/sg7_code/al_curve.csv
292
+ 763cb159181b98cffc15de07014e37bf2c378c84953a02147d860bfb76ff9f64 results/historical-al-curves/v1/sgpk_creative_writing/al_curve.csv
293
+ 94d277ef87c5eb724a44e1e4e6e4bd310c2e86415ec10069c4cd65d111baf549 results/historical-al-curves/v1/sgpk_factual_qa/al_curve.csv
294
+ d9d8404db125c2cf0594ec8f30cc2f95fdf144eb2768dd1518dad1ad251bd08f results/historical-al-curves/v1/sgpk_general/al_curve.csv
295
+ 566138ead9cd5d33e7434ac677ef7064c85c90587017164f9b12c89942b9f2d5 results/historical-al-curves/v1/sgpk_math/al_curve.csv
296
+ b21b54dcc70720f4b52af10e8d85653072580c197b8020c128871e208a462f9f results/historical-al-curves/v1/wr2be0_code/al_curve.csv
297
+ 79a52b7a1a9ad1aa7412ec94606f1e762c1b5ede13fa3ea5c2a6d6da6509200f results/historical-al-curves/v1/wr2be1_code/al_curve.csv
298
+ b8c3d0f74241fd61dc13cb394b7780c546160e26730a0956d1938285f096a65e results/historical-al-curves/v1/wr2be2_code/al_curve.csv
299
+ fe39d6da277ea0f5fcaa73778bb46c2ef01a8309487153963f92764d1dc8d780 results/historical-al-curves/v1/wr3e0_code/al_curve.csv
300
+ dec31dbef3209b9019a41fe89f9c6a586f4a3dc0878287df741953101288a583 results/historical-al-curves/v1/wr3e1_code/al_curve.csv
301
+ 6cfca51dd583996e8e68b1f2659aa472c2445ab4e0a847ef4d6a796276ae16fd results/historical-al-curves/v1/wr3e2_code/al_curve.csv
302
+ 7e858ff1246214c81cf70976c920436d3271f9c77bd4e13a659ec9f4d3768864 results/main-figure-r1/v1/frozen-aggregate-cells.json
303
+ b2b335f41aa9a2381726c9d2c90aa8eb12a1a3b4f31ebfa60c31045ec168855d verification/v1/bootstrap_b1_exact_3p2m_routed.py
304
+ aee31b4fac56dba2507403e989daf7010a50a01fde3edb7ebca0bad57a90f2ae verification/v1/bootstrap_b2_epoch5_router.py
305
+ a20de477a77313a08619b1977b80e7fb7ffe83bd08bd923e0aa5c8132dd6901d verification/v1/bootstrap_paired_al.py
306
+ 9734fc9b2b24a74ffa63708ae0ae7442962cef40f9147c14c3528c416c78d0ca verification/v1/r1_mainfig_verify_exports.py
307
+ f52bef510022d3ca470104bb184cdffe83ead49648dd712e64b0ea9149d901e3 verification/v1/verify_b1_exact_3p2m_routed_artifacts.py
308
+ 7427838713af5748fbfd600af2b8a8d4d50d58a7403f072c352c025b12a0e3d1 verification/v1/verify_b2_epoch5_artifacts.py
309
+ 67e2df392b3f69b5e9e8d4c0c2dddc20f7e5b79a9dcbb7f8cd3fffd278cf5a33 verification/v1/verify_b5_qwen3_4b_evidence.py
docs/extended-evidence-v1/EXCLUSIONS.md ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Deliberate exclusions
2
+
3
+ This bundle excludes:
4
+
5
+ - `REPORT.md`, `EVIDENCE_LEDGER.md`, manuscript sources, and private planning;
6
+ - raw prompt datasets, prompt text, per-prompt generations, and router groups;
7
+ - raw benchmark/training logs and JSONL result sidecars;
8
+ - model weights, optimizer state, activations, prepared datasets, and caches;
9
+ - private internal training code or data;
10
+ - files containing credentials, usernames, or absolute internal paths;
11
+ - path-heavy R1/B1/C1/C3 manifests except the minimized aggregate R1 projection;
12
+ - `gen_curves.py`, `r1_mainfig_preflight.py`,
13
+ `r1_mainfig_validate_cells.py`, and `verify_c3_qwen3_4b_intake.py`, whose
14
+ current forms retain internal execution topology and need a separate
15
+ parameterization review.
16
+
17
+ Historical aggregate curves and figures are retained for reuse, but their
18
+ presence does not promote them to current-paper evidence.
docs/extended-evidence-v1/README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MoS-DFlash extended evidence bundle v1
2
+
3
+ Frozen: `2026-07-23T20:26:58Z`
4
+
5
+ This public-safe bundle contains reusable aggregate acceptance-length curves,
6
+ figure data, author-generated rendered figures, plotting recipes, and
7
+ verification utilities from the MoS-DFlash research workspace.
8
+
9
+ ## Evidence boundary
10
+
11
+ - `results/historical-al-curves/v1/` contains aggregate AL values only. The
12
+ legacy `ckpt` column is a logical run/checkpoint identifier, not a filesystem
13
+ path. These curves are historical experiment records and are **not all
14
+ current-paper claims**.
15
+ - `results/main-figure-r1/v1/frozen-aggregate-cells.json` is a deliberately
16
+ minimized public projection. It retains only the complete 52/52 status and
17
+ the numeric panels consumed by the plotting code. All cell-level file paths,
18
+ prompt references, sidecars, and raw records were omitted.
19
+ - `figures/rendered/historical/v1/` preserves historical author-generated
20
+ figures. `figures/rendered/paper-current-candidate/v1/` records the selected
21
+ paper assets at this freeze; the manuscript remains the authority for which
22
+ figures are finally submitted.
23
+ - `recipes/plotting/v1/` and `verification/v1/` contain code, not raw inputs.
24
+ Callers must supply their own licensed datasets, model paths, and aggregate
25
+ sidecars where required.
26
+
27
+ ## Reproducible examples
28
+
29
+ ```bash
30
+ python recipes/plotting/v1/plot_main_results.py \
31
+ --evidence results/main-figure-r1/v1/frozen-aggregate-cells.json \
32
+ --output /tmp/fig_main_results.png
33
+
34
+ python recipes/plotting/v1/plot_mos_5x5_gains.py \
35
+ --evidence results/main-figure-r1/v1/frozen-aggregate-cells.json \
36
+ --output-dir /tmp/mos-matrices
37
+
38
+ python recipes/plotting/v1/build_mos_architecture_drawio.py \
39
+ --output /tmp/fig_architecture_v8.drawio
40
+ ```
41
+
42
+ The Qwen3-4B matched-volume plotting recipe expects the aggregate trajectory
43
+ from the separately frozen `releases/b5-qwen3-4b-fixed-budget/` evidence lane.
44
+
45
+ ## Audit
46
+
47
+ - `manifests/extended-evidence-v1/artifact-manifest.jsonl` maps every published
48
+ content object to its repository-relative source path and source SHA-256.
49
+ - `checksums/extended-evidence-v1.sha256` freezes staged bytes.
50
+ - Files with hard-coded Weka or `/tmp` output locations were not copied as-is.
51
+ Only explicit sanitized copies with relative output paths are present, and
52
+ their source and staged hashes differ in the manifest.
53
+
54
+ No raw prompts, per-prompt generations, benchmark/training logs, private model
55
+ or activation material, credentials, absolute internal paths, `REPORT.md`, or
56
+ `EVIDENCE_LEDGER.md` are included.
57
+
58
+ ## License
59
+
60
+ Code and author-generated artifacts in this bundle are released under the MIT
61
+ license in `licenses/extended-evidence-v1/LICENSE`.
figures/data/qwen3-4b/v1/q3_4b_armA_traj.csv ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ point,step,overall_al,code,math,factual_qa,creative_writing,general
2
+ step_10000,10000,3.1315,3.1009,4.4019,2.6961,2.6091,2.8495
3
+ step_12500,12500,3.1969,3.1276,4.5913,2.7403,2.6474,2.8777
4
+ step_15000,15000,3.2012,3.1329,4.5902,2.7227,2.6764,2.8840
5
+ step_17500,17500,3.2312,3.1796,4.5761,2.7718,2.6783,2.9503
6
+ step_20000,20000,3.2405,3.1978,4.6114,2.7855,2.6783,2.9295
7
+ step_22500,22500,3.2702,3.2066,4.6825,2.7797,2.7210,2.9610
8
+ step_2500,2500,2.9335,2.8528,4.1414,2.5529,2.3996,2.7209
9
+ step_25000,25000,3.2897,3.2198,4.7660,2.8254,2.6797,2.9575
10
+ step_27500,27500,3.2950,3.2186,4.7407,2.7984,2.7394,2.9779
11
+ step_30000,30000,3.3085,3.2391,4.7723,2.8213,2.7316,2.9781
12
+ step_32500,32500,3.3256,3.2592,4.8172,2.8294,2.7085,3.0135
13
+ step_35000,35000,3.3261,3.2914,4.8069,2.8414,2.6962,2.9948
14
+ step_37500,37500,3.3239,3.2841,4.8004,2.8284,2.7176,2.9890
15
+ step_40000,40000,3.3506,3.2863,4.8107,2.8388,2.7968,3.0202
16
+ step_42500,42500,3.3679,3.2620,4.9353,2.8437,2.7576,3.0407
17
+ step_45000,45000,3.3627,3.2946,4.8828,2.8456,2.7726,3.0178
18
+ step_47500,47500,3.3761,3.3020,4.8511,2.8643,2.8334,3.0299
19
+ step_5000,5000,3.0275,2.9729,4.2464,2.6362,2.5029,2.7791
20
+ step_50000,50000,3.3793,3.3113,4.9204,2.8589,2.7821,3.0235
21
+ step_52500,52500,3.3732,3.3012,4.9109,2.8472,2.7816,3.0251
22
+ step_55000,55000,3.3787,3.3068,4.8855,2.8820,2.7892,3.0299
23
+ step_57500,57500,3.3867,3.3318,4.8669,2.8990,2.8080,3.0275
24
+ step_60000,60000,3.3851,3.3215,4.9434,2.8583,2.7836,3.0184
25
+ step_62500,62500,3.3869,3.2986,4.9339,2.8783,2.8065,3.0170
26
+ step_65000,65000,3.3844,3.3203,4.8788,2.8800,2.7953,3.0476
27
+ step_67500,67500,3.3854,3.3001,4.8815,2.8600,2.8460,3.0393
28
+ step_70000,70000,3.3894,3.3288,4.9029,2.8620,2.8070,3.0465
29
+ step_72500,72500,3.3713,3.3143,4.8882,2.8801,2.7253,3.0484
30
+ step_7500,7500,3.0940,3.0365,4.3622,2.6655,2.5707,2.8351
31
+ epoch_0_step_24970,24970,3.2848,3.2287,4.6862,2.8052,2.7273,2.9769
32
+ epoch_1_step_49940,49940,3.3640,3.2700,4.8682,2.8645,2.8029,3.0143
33
+ epoch_2_step_74910,74910,3.3845,3.3085,4.9530,2.8821,2.7355,3.0432
figures/data/qwen3-4b/v1/q3_4b_armB_traj.csv ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ point,step,overall_al,code,math,factual_qa,creative_writing,general
2
+ step_10000,10000,3.3373,3.2303,4.7736,2.8494,2.7661,3.0674
3
+ step_12500,12500,3.3604,3.2559,4.8735,2.8494,2.7591,3.0638
4
+ step_15000,15000,3.3424,3.2609,4.7799,2.8671,2.7336,3.0708
5
+ step_17500,17500,3.3587,3.2884,4.7953,2.8823,2.7616,3.0662
6
+ step_20000,20000,3.3828,3.2908,4.8577,2.8816,2.7912,3.0929
7
+ step_22500,22500,3.4117,3.3280,4.8962,2.8947,2.8319,3.1077
8
+ step_2500,2500,3.2904,3.2040,4.6521,2.8480,2.7205,3.0272
9
+ step_25000,25000,3.4146,3.3412,4.9544,2.8993,2.7676,3.1106
10
+ step_27500,27500,3.3808,3.3244,4.8682,2.8768,2.7483,3.0864
11
+ step_30000,30000,3.4306,3.3264,4.9819,2.9117,2.8277,3.1051
12
+ step_32500,32500,3.4111,3.3200,4.9407,2.8812,2.8235,3.0901
13
+ step_35000,35000,3.4409,3.3530,4.9654,2.9262,2.8673,3.0927
14
+ step_37500,37500,3.4415,3.3442,4.9805,2.9096,2.8555,3.1174
15
+ step_40000,40000,3.4502,3.3550,5.0112,2.9184,2.8487,3.1178
16
+ step_42500,42500,3.4495,3.3484,5.0098,2.9469,2.8272,3.1151
17
+ step_45000,45000,3.4678,3.3501,5.0866,2.9109,2.8646,3.1270
18
+ step_47500,47500,3.4720,3.3631,5.0507,2.9503,2.8834,3.1122
19
+ step_5000,5000,3.3201,3.2545,4.7445,2.8371,2.7114,3.0531
20
+ step_50000,50000,3.4360,3.3625,4.9667,2.9192,2.8004,3.1313
21
+ step_52500,52500,3.4759,3.3722,5.0564,2.9192,2.9047,3.1270
22
+ step_55000,55000,3.4906,3.3837,5.0837,2.9562,2.8976,3.1320
23
+ step_57500,57500,3.4824,3.3605,5.1011,2.9401,2.8743,3.1363
24
+ step_60000,60000,3.4746,3.3761,5.0779,2.9522,2.8455,3.1212
25
+ step_62500,62500,3.4826,3.3732,5.0982,2.9484,2.8856,3.1076
26
+ step_65000,65000,3.4856,3.3630,5.1509,2.9388,2.8593,3.1162
27
+ step_67500,67500,3.4704,3.3592,5.1142,2.9123,2.8272,3.1390
28
+ step_70000,70000,3.4722,3.3882,5.0450,2.9536,2.8582,3.1158
29
+ step_72500,72500,3.4776,3.3580,5.1156,2.9522,2.8587,3.1035
30
+ step_7500,7500,3.3310,3.2471,4.7096,2.8579,2.7861,3.0542
31
+ epoch_0_step_24970,24970,3.3997,3.3121,4.9177,2.9156,2.7651,3.0880
32
+ epoch_1_step_49940,49940,3.4776,3.3692,5.0779,2.9344,2.8970,3.1094
33
+ epoch_2_step_74910,74910,3.4775,3.3702,5.0536,2.9517,2.8796,3.1326
figures/data/qwen3-4b/v1/q3_4b_gen_traj.csv ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ step,overall_al,code,math,factual_qa,creative_writing,general
2
+ 10000,3.1686,3.0954,4.4225,2.7484,2.6225,2.9544
3
+ 11250,3.1772,3.1039,4.4655,2.7516,2.6328,2.9324
4
+ 1250,2.8705,2.8119,3.8965,2.5357,2.4068,2.7016
5
+ 12500,3.2067,3.1265,4.5161,2.7495,2.6620,2.9796
6
+ 13750,3.2080,3.1213,4.5298,2.7881,2.6315,2.9692
7
+ 15000,3.2329,3.1571,4.5298,2.7828,2.6881,3.0066
8
+ 16250,3.2303,3.1638,4.5333,2.8110,2.6524,2.9912
9
+ 17500,3.2244,3.1572,4.5287,2.8225,2.6216,2.9920
10
+ 18750,3.2505,3.1740,4.5890,2.8148,2.6895,2.9849
11
+ 20000,3.2580,3.1773,4.6245,2.8278,2.6648,2.9958
12
+ 21250,3.2841,3.2001,4.6594,2.8040,2.7143,3.0429
13
+ 22500,3.2748,3.2091,4.6305,2.8277,2.6620,3.0446
14
+ 23750,3.2820,3.2021,4.6091,2.8431,2.7181,3.0378
15
+ 2500,2.9964,2.9148,4.1491,2.6310,2.5090,2.7783
16
+ 25000,3.3024,3.2186,4.6353,2.8531,2.7463,3.0587
17
+ 26250,3.2875,3.2030,4.6233,2.8247,2.7414,3.0452
18
+ 27500,3.2927,3.2635,4.6114,2.8239,2.7157,3.0490
19
+ 28750,3.2976,3.2152,4.6911,2.8471,2.7057,3.0287
20
+ 30000,3.2872,3.2221,4.6485,2.8589,2.6593,3.0472
21
+ 31250,3.2953,3.2416,4.6257,2.8402,2.6999,3.0691
22
+ 32500,3.2755,3.1940,4.6257,2.8419,2.6853,3.0304
23
+ 33750,3.3071,3.2128,4.6789,2.8465,2.7220,3.0751
24
+ 35000,3.2808,3.2014,4.6642,2.8179,2.7018,3.0183
25
+ 36250,3.2694,3.1896,4.6233,2.8381,2.6616,3.0345
26
+ 3750,3.0412,2.9734,4.2085,2.6458,2.5334,2.8447
27
+ 5000,3.0631,3.0204,4.2495,2.6940,2.5024,2.8490
28
+ 6250,3.1019,3.0239,4.3264,2.6841,2.5902,2.8851
29
+ 7500,3.1331,3.0864,4.3506,2.7112,2.5946,2.9230
30
+ 8750,3.1352,3.0659,4.3782,2.7174,2.5937,2.9209
figures/rendered/historical/v1/code250k_vs_gen.png ADDED

Git LFS Details

  • SHA256: 89992f95494655a1263b1f17c098c97e68bba6aa19279f29b7d22a049096ce50
  • Pointer size: 130 Bytes
  • Size of remote file: 77.2 kB
figures/rendered/historical/v1/fig_bigdata_vs_gen.png ADDED

Git LFS Details

  • SHA256: 66e0cfc000e9583110ce5d174ab1874210eee0b026d25fd863e7f69139f78ec3
  • Pointer size: 130 Bytes
  • Size of remote file: 74.5 kB
figures/rendered/historical/v1/fig_exp1_forgetting.png ADDED

Git LFS Details

  • SHA256: c88b5a91d84cfbf30f5f9b1813ae470f808e348d27f224f57b8704490f839016
  • Pointer size: 131 Bytes
  • Size of remote file: 348 kB
figures/rendered/historical/v1/fig_exp1_three_recipes.png ADDED

Git LFS Details

  • SHA256: 2b9633ec3524f23766a72e788206c114e02d7b0da5be8f3cf8a501848fe2fb52
  • Pointer size: 130 Bytes
  • Size of remote file: 80.6 kB
figures/rendered/historical/v1/fig_exp4_inference.png ADDED

Git LFS Details

  • SHA256: e8602bc3791560060deba3ad715eedf6fd9d1ef5d76c1774d3ef5a5fb0ccb2bd
  • Pointer size: 131 Bytes
  • Size of remote file: 147 kB
figures/rendered/historical/v1/fig_exp5_method_vs_data.png ADDED

Git LFS Details

  • SHA256: bf243131b8c61f12c258760307178a8d7888e41c5ef1f5a8981f37b7f639b83a
  • Pointer size: 131 Bytes
  • Size of remote file: 108 kB
figures/rendered/historical/v1/fig_forgetting_matrix.png ADDED

Git LFS Details

  • SHA256: 58be85cb2527aa44c3e8c2579831138104bc70fa7e33794e1855df76988e9d6d
  • Pointer size: 131 Bytes
  • Size of remote file: 134 kB
figures/rendered/historical/v1/fig_fusion_combined.png ADDED

Git LFS Details

  • SHA256: 73c7ceff7bf8f01c0bc3e861c689532619dc2f358f51b37a0d9cedd8b07779bc
  • Pointer size: 130 Bytes
  • Size of remote file: 98.6 kB
figures/rendered/historical/v1/fig_gen800k_loss_al.png ADDED

Git LFS Details

  • SHA256: cc68719d712a0bc37321c46ec7d9b6368c08fc3f4523ef1d1c3d7771e5a99a37
  • Pointer size: 131 Bytes
  • Size of remote file: 163 kB
figures/rendered/historical/v1/fig_merged_vs_specialist.png ADDED

Git LFS Details

  • SHA256: ca381bfb16abfde13f5e88c917b27698155fa073e99cba70ad50235c6565a155
  • Pointer size: 130 Bytes
  • Size of remote file: 99.8 kB
figures/rendered/historical/v1/fig_q3_4b_traj.png ADDED

Git LFS Details

  • SHA256: 16825387c4de0251447e50ba54aa99585cf8fc2790b1d0f4c8438035c40e23f0
  • Pointer size: 131 Bytes
  • Size of remote file: 109 kB
figures/rendered/historical/v1/fig_serving.png ADDED

Git LFS Details

  • SHA256: 77ae4d2ff2f302212f1252b8bd1fbdc3c0d244dfd2a1be06d093a964575eff8e
  • Pointer size: 131 Bytes
  • Size of remote file: 108 kB
figures/rendered/historical/v1/fig_smalldata_vs_gen.png ADDED

Git LFS Details

  • SHA256: 1b8928ad66e0c86b58bc8d9088af11647e78f4f42180e95a0a5bd96017f623e3
  • Pointer size: 130 Bytes
  • Size of remote file: 73.6 kB
figures/rendered/historical/v1/fig_specialist_overall.png ADDED

Git LFS Details

  • SHA256: 0e3e6ae946db8f2922832f3b0b09673877c0cf68a55f9027fdc93d60399b9446
  • Pointer size: 130 Bytes
  • Size of remote file: 57.1 kB
figures/rendered/historical/v1/fig_warm_saturation.png ADDED

Git LFS Details

  • SHA256: 861c7f202252b6798391fb5bc98bc88d7379e38b3c7d77d2e4fbf0f74f144085
  • Pointer size: 131 Bytes
  • Size of remote file: 117 kB
figures/rendered/historical/v1/gen_per_domain_AL.png ADDED

Git LFS Details

  • SHA256: eb2084ef355799b98ab08000994e54aa8966196cbb3485235a942ed8966ac32c
  • Pointer size: 130 Bytes
  • Size of remote file: 34.8 kB
figures/rendered/historical/v1/gen_vs_merge_attn.png ADDED

Git LFS Details

  • SHA256: 2f484b361bed4165c4aac24a52ad66b7a3f9ea7948d7f617c764784085ac39b5
  • Pointer size: 131 Bytes
  • Size of remote file: 136 kB
figures/rendered/historical/v1/joint_vs_pipeline_code.png ADDED

Git LFS Details

  • SHA256: 221d21d5085f280ace83fe2532a3ae52858a6787af5f28addfd480095114984b
  • Pointer size: 131 Bytes
  • Size of remote file: 172 kB
figures/rendered/historical/v1/overfit_attention_ladder.png ADDED

Git LFS Details

  • SHA256: 7bb2f21888c8c79e731add5c61021aff4be2c58a9dfc499601d902700867802c
  • Pointer size: 131 Bytes
  • Size of remote file: 222 kB
figures/rendered/historical/v1/overfit_loss_al.png ADDED

Git LFS Details

  • SHA256: d8b24897fdce78a542aa0f9387e13299ffe3a34c679b607470ac984bddbbf10c
  • Pointer size: 131 Bytes
  • Size of remote file: 182 kB
figures/rendered/historical/v1/reasonmix_5arm_per_domain.png ADDED

Git LFS Details

  • SHA256: 77b4ad8a26a01b67b052d7374de6b11350d89ba6eace1e8d135af159ffca5c7f
  • Pointer size: 130 Bytes
  • Size of remote file: 96.9 kB
figures/rendered/historical/v1/recipe_budget.png ADDED

Git LFS Details

  • SHA256: 7c314a567c8cadfcfb602bc0ad10c328b6dca571213b88ef656bf78404350af4
  • Pointer size: 131 Bytes
  • Size of remote file: 360 kB
figures/rendered/paper-current-candidate/v1/fig_architecture_v8.drawio ADDED
@@ -0,0 +1,728 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version='1.0' encoding='utf-8'?>
2
+ <mxfile host="Electron" modified="2026-07-21T00:00:00.000Z" version="30.3.14">
3
+ <diagram id="mos-v8" name="MoS architecture">
4
+ <mxGraphModel dx="0" dy="0" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="2400" pageHeight="1420" math="0" shadow="0" background="#FFFFFF">
5
+ <root>
6
+ <mxCell id="0" />
7
+ <mxCell id="1" parent="0" />
8
+ <mxCell id="v_2" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
9
+ <mxGeometry x="700" y="20" width="2" height="650" as="geometry" />
10
+ </mxCell>
11
+ <mxCell id="v_3" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
12
+ <mxGeometry x="30" y="700" width="2240" height="2" as="geometry" />
13
+ </mxCell>
14
+ <mxCell id="v_4" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
15
+ <mxGeometry x="2330" y="700" width="40" height="2" as="geometry" />
16
+ </mxCell>
17
+ <mxCell id="panel_A" value="A" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#263746;strokeColor=#263746;strokeWidth=1.8;fontColor=#FFFFFF;fontFamily=Helvetica;fontSize=30;fontStyle=1;align=center;verticalAlign=middle;spacing=4;ellipse;" vertex="1" parent="1">
18
+ <mxGeometry x="40" y="28" width="46" height="46" as="geometry" />
19
+ </mxCell>
20
+ <mxCell id="title_A" value="Construct training signals" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=32;fontColor=#263746;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
21
+ <mxGeometry x="102" y="26" width="540" height="50" as="geometry" />
22
+ </mxCell>
23
+ <mxCell id="v_5" value="TRAINING GROUPS" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=23;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
24
+ <mxGeometry x="40" y="88" width="400" height="34" as="geometry" />
25
+ </mxCell>
26
+ <mxCell id="domain_1" value="Domain 1" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=19;fontStyle=1;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;verticalAlign=top;spacingTop=22;" vertex="1" parent="1">
27
+ <mxGeometry x="40" y="130" width="120" height="78" as="geometry" />
28
+ </mxCell>
29
+ <mxCell id="v_6" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#5F879C;strokeColor=#5F879C;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_1">
30
+ <mxGeometry x="0" y="0" width="120" height="9" as="geometry" />
31
+ </mxCell>
32
+ <mxCell id="v_7" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_1">
33
+ <mxGeometry x="28" y="60" width="64" height="3" as="geometry" />
34
+ </mxCell>
35
+ <mxCell id="domain_2" value="Domain 2" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=19;fontStyle=1;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;verticalAlign=top;spacingTop=22;" vertex="1" parent="1">
36
+ <mxGeometry x="200" y="130" width="120" height="78" as="geometry" />
37
+ </mxCell>
38
+ <mxCell id="v_8" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#5F879C;strokeColor=#5F879C;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_2">
39
+ <mxGeometry x="0" y="0" width="120" height="9" as="geometry" />
40
+ </mxCell>
41
+ <mxCell id="v_9" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_2">
42
+ <mxGeometry x="28" y="60" width="64" height="3" as="geometry" />
43
+ </mxCell>
44
+ <mxCell id="domain_mid" value="⋯" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=19;fontStyle=1;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;verticalAlign=top;spacingTop=22;" vertex="1" parent="1">
45
+ <mxGeometry x="360" y="130" width="120" height="78" as="geometry" />
46
+ </mxCell>
47
+ <mxCell id="v_10" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#5F879C;strokeColor=#5F879C;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_mid">
48
+ <mxGeometry x="0" y="0" width="120" height="9" as="geometry" />
49
+ </mxCell>
50
+ <mxCell id="v_11" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_mid">
51
+ <mxGeometry x="28" y="60" width="64" height="3" as="geometry" />
52
+ </mxCell>
53
+ <mxCell id="domain_n" value="Domain N" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=19;fontStyle=1;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;verticalAlign=top;spacingTop=22;" vertex="1" parent="1">
54
+ <mxGeometry x="520" y="130" width="120" height="78" as="geometry" />
55
+ </mxCell>
56
+ <mxCell id="v_12" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#5F879C;strokeColor=#5F879C;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_n">
57
+ <mxGeometry x="0" y="0" width="120" height="9" as="geometry" />
58
+ </mxCell>
59
+ <mxCell id="v_13" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#D7E0E5;strokeColor=#D7E0E5;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="domain_n">
60
+ <mxGeometry x="28" y="60" width="64" height="3" as="geometry" />
61
+ </mxCell>
62
+ <mxCell id="xy_pair" value="&lt;b&gt;Request–response&lt;/b&gt;&lt;br&gt;pair (x, y)" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
63
+ <mxGeometry x="90" y="250" width="280" height="78" as="geometry" />
64
+ </mxCell>
65
+ <mxCell id="offline_assignment" value="&lt;b&gt;Prompt-only&lt;/b&gt;&lt;br&gt;training label d" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=2.0;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
66
+ <mxGeometry x="400" y="250" width="250" height="78" as="geometry" />
67
+ </mxCell>
68
+ <mxCell id="e_14" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.5;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.2;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="domain_1" target="xy_pair">
69
+ <mxGeometry relative="1" as="geometry" />
70
+ </mxCell>
71
+ <mxCell id="e_15" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.5;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.4;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="domain_2" target="xy_pair">
72
+ <mxGeometry relative="1" as="geometry" />
73
+ </mxCell>
74
+ <mxCell id="e_16" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.5;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.6;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="domain_mid" target="xy_pair">
75
+ <mxGeometry relative="1" as="geometry" />
76
+ </mxCell>
77
+ <mxCell id="e_17" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.5;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.8;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="domain_n" target="xy_pair">
78
+ <mxGeometry relative="1" as="geometry" />
79
+ </mxCell>
80
+ <mxCell id="e_18" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="xy_pair" target="offline_assignment">
81
+ <mxGeometry relative="1" as="geometry" />
82
+ </mxCell>
83
+ <mxCell id="v_19" value="Response y" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
84
+ <mxGeometry x="40" y="360" width="130" height="32" as="geometry" />
85
+ </mxCell>
86
+ <mxCell id="response_0" value="y&lt;sub&gt;1&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
87
+ <mxGeometry x="210" y="350" width="60" height="48" as="geometry" />
88
+ </mxCell>
89
+ <mxCell id="response_1" value="y&lt;sub&gt;2&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
90
+ <mxGeometry x="280" y="350" width="60" height="48" as="geometry" />
91
+ </mxCell>
92
+ <mxCell id="response_2" value="y&lt;sub&gt;a&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFF1DD;strokeColor=#C77E26;strokeWidth=1.8;fontColor=#C77E26;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
93
+ <mxGeometry x="350" y="350" width="60" height="48" as="geometry" />
94
+ </mxCell>
95
+ <mxCell id="response_3" value="y&lt;sub&gt;4&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
96
+ <mxGeometry x="420" y="350" width="60" height="48" as="geometry" />
97
+ </mxCell>
98
+ <mxCell id="response_4" value="⋯" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
99
+ <mxGeometry x="490" y="350" width="60" height="48" as="geometry" />
100
+ </mxCell>
101
+ <mxCell id="e_20" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.8;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="xy_pair" target="response_0">
102
+ <mxGeometry relative="1" as="geometry">
103
+ <Array as="points">
104
+ <mxPoint x="230" y="340" />
105
+ <mxPoint x="240" y="340" />
106
+ </Array>
107
+ </mxGeometry>
108
+ </mxCell>
109
+ <mxCell id="v_21" value="sampled anchor" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#C77E26;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
110
+ <mxGeometry x="340" y="405" width="150" height="28" as="geometry" />
111
+ </mxCell>
112
+ <mxCell id="masked_candidate_block" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
113
+ <mxGeometry x="250" y="440" width="390" height="112" as="geometry" />
114
+ </mxCell>
115
+ <mxCell id="v_22" value="Masked candidate block" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#4F9169;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="masked_candidate_block">
116
+ <mxGeometry x="15" y="10" width="360" height="30" as="geometry" />
117
+ </mxCell>
118
+ <mxCell id="masked_0" value="y&lt;sub&gt;a&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFF1DD;strokeColor=#C77E26;strokeWidth=1.8;fontColor=#C77E26;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="masked_candidate_block">
119
+ <mxGeometry x="28" y="52" width="68" height="48" as="geometry" />
120
+ </mxCell>
121
+ <mxCell id="masked_1" value="[M]" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="masked_candidate_block">
122
+ <mxGeometry x="108" y="52" width="68" height="48" as="geometry" />
123
+ </mxCell>
124
+ <mxCell id="masked_2" value="[M]" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="masked_candidate_block">
125
+ <mxGeometry x="188" y="52" width="68" height="48" as="geometry" />
126
+ </mxCell>
127
+ <mxCell id="masked_3" value="[M]" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=24;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="masked_candidate_block">
128
+ <mxGeometry x="268" y="52" width="68" height="48" as="geometry" />
129
+ </mxCell>
130
+ <mxCell id="e_23" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#C77E26;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.33;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="response_2" target="masked_candidate_block">
131
+ <mxGeometry relative="1" as="geometry" />
132
+ </mxCell>
133
+ <mxCell id="frozen_target_train" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
134
+ <mxGeometry x="40" y="560" width="180" height="110" as="geometry" />
135
+ </mxCell>
136
+ <mxCell id="v_24" value="Frozen target" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#6D7B84;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="frozen_target_train">
137
+ <mxGeometry x="12" y="10" width="156" height="30" as="geometry" />
138
+ </mxCell>
139
+ <mxCell id="v_25" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="frozen_target_train">
140
+ <mxGeometry x="28" y="52" width="124" height="8" as="geometry" />
141
+ </mxCell>
142
+ <mxCell id="v_26" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="frozen_target_train">
143
+ <mxGeometry x="28" y="68" width="124" height="8" as="geometry" />
144
+ </mxCell>
145
+ <mxCell id="v_27" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="frozen_target_train">
146
+ <mxGeometry x="28" y="84" width="124" height="8" as="geometry" />
147
+ </mxCell>
148
+ <mxCell id="frozen_feature_stack" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
149
+ <mxGeometry x="250" y="570" width="190" height="92" as="geometry" />
150
+ </mxCell>
151
+ <mxCell id="v_28" value="Frozen features" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#6D7B84;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="frozen_feature_stack">
152
+ <mxGeometry x="10" y="8" width="170" height="28" as="geometry" />
153
+ </mxCell>
154
+ <mxCell id="v_29" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="frozen_feature_stack">
155
+ <mxGeometry x="20" y="46" width="150" height="7" as="geometry" />
156
+ </mxCell>
157
+ <mxCell id="v_30" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="frozen_feature_stack">
158
+ <mxGeometry x="20" y="59" width="136" height="7" as="geometry" />
159
+ </mxCell>
160
+ <mxCell id="v_31" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="frozen_feature_stack">
161
+ <mxGeometry x="20" y="72" width="122" height="7" as="geometry" />
162
+ </mxCell>
163
+ <mxCell id="train_zt_port" value="Target context&lt;br&gt;&lt;b&gt;z&lt;sub&gt;t&lt;/sub&gt;&lt;/b&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
164
+ <mxGeometry x="480" y="555" width="170" height="54" as="geometry" />
165
+ </mxCell>
166
+ <mxCell id="train_q_port" value="Prompt features&lt;br&gt;&lt;b&gt;q(x)&lt;/b&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1.8;fontColor=#6D7B84;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
167
+ <mxGeometry x="480" y="620" width="170" height="54" as="geometry" />
168
+ </mxCell>
169
+ <mxCell id="e_32" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#6D7B84;strokeWidth=1.7;endArrow=blockThin;endFill=1;endSize=9;exitX=0;exitY=0.55;exitDx=0;exitDy=0;entryX=0.25;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="xy_pair" target="frozen_target_train">
170
+ <mxGeometry relative="1" as="geometry">
171
+ <Array as="points">
172
+ <mxPoint x="20" y="295" />
173
+ <mxPoint x="20" y="540" />
174
+ </Array>
175
+ </mxGeometry>
176
+ </mxCell>
177
+ <mxCell id="e_33" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#6D7B84;strokeWidth=1.7;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="frozen_target_train" target="frozen_feature_stack">
178
+ <mxGeometry relative="1" as="geometry" />
179
+ </mxCell>
180
+ <mxCell id="e_34" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#5F879C;strokeWidth=1.8;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.35;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="frozen_feature_stack" target="train_zt_port">
181
+ <mxGeometry relative="1" as="geometry" />
182
+ </mxCell>
183
+ <mxCell id="e_35" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#6D7B84;strokeWidth=1.6;endArrow=blockThin;endFill=1;endSize=9;dashed=1;dashPattern=8 6;exitX=1;exitY=0.75;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="frozen_feature_stack" target="train_q_port">
184
+ <mxGeometry relative="1" as="geometry" />
185
+ </mxCell>
186
+ <mxCell id="panel_B" value="B" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#263746;strokeColor=#263746;strokeWidth=1.8;fontColor=#FFFFFF;fontFamily=Helvetica;fontSize=30;fontStyle=1;align=center;verticalAlign=middle;spacing=4;ellipse;" vertex="1" parent="1">
187
+ <mxGeometry x="750" y="28" width="46" height="46" as="geometry" />
188
+ </mxCell>
189
+ <mxCell id="title_B" value="Jointly train MoS" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=32;fontColor=#263746;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
190
+ <mxGeometry x="812" y="26" width="520" height="50" as="geometry" />
191
+ </mxCell>
192
+ <mxCell id="v_36" value="ONE EXPANDED DRAFT LAYER" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=23;fontColor=#355F74;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
193
+ <mxGeometry x="750" y="88" width="500" height="34" as="geometry" />
194
+ </mxCell>
195
+ <mxCell id="train_h_in" value="h&lt;sub&gt;ℓ&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=30;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
196
+ <mxGeometry x="760" y="250" width="90" height="66" as="geometry" />
197
+ </mxCell>
198
+ <mxCell id="train_norm_1" value="Norm" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=25;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
199
+ <mxGeometry x="890" y="250" width="110" height="66" as="geometry" />
200
+ </mxCell>
201
+ <mxCell id="train_attention" value="Shared&lt;br&gt;attention" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=2.2;fontColor=#355F74;fontFamily=Helvetica;fontSize=27;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
202
+ <mxGeometry x="1040" y="215" width="210" height="136" as="geometry" />
203
+ </mxCell>
204
+ <mxCell id="train_plus_1" value="+" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#263746;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=32;fontStyle=1;align=center;verticalAlign=middle;spacing=4;ellipse;" vertex="1" parent="1">
205
+ <mxGeometry x="1280" y="257" width="52" height="52" as="geometry" />
206
+ </mxCell>
207
+ <mxCell id="train_norm_2" value="Norm" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=25;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
208
+ <mxGeometry x="1370" y="250" width="100" height="66" as="geometry" />
209
+ </mxCell>
210
+ <mxCell id="train_mlp_bank" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
211
+ <mxGeometry x="1500" y="135" width="300" height="260" as="geometry" />
212
+ </mxCell>
213
+ <mxCell id="v_37" value="MLP bank" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=25;fontColor=#263746;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="train_mlp_bank">
214
+ <mxGeometry x="15" y="10" width="270" height="34" as="geometry" />
215
+ </mxCell>
216
+ <mxCell id="train_mlp_1" value="MLP&lt;sub&gt;ℓ,1&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.1;fontColor=#6D7C87;fontFamily=Helvetica;fontSize=22;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="train_mlp_bank">
217
+ <mxGeometry x="18" y="54" width="264" height="30" as="geometry" />
218
+ </mxCell>
219
+ <mxCell id="train_mlp_2" value="MLP&lt;sub&gt;ℓ,2&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.1;fontColor=#6D7C87;fontFamily=Helvetica;fontSize=22;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="train_mlp_bank">
220
+ <mxGeometry x="18" y="92" width="264" height="30" as="geometry" />
221
+ </mxCell>
222
+ <mxCell id="train_mlp_3" value="MLP&lt;sub&gt;ℓ,d&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.2;fontColor=#5C477B;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="train_mlp_bank">
223
+ <mxGeometry x="18" y="130" width="264" height="30" as="geometry" />
224
+ </mxCell>
225
+ <mxCell id="train_mlp_4" value="⋯" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.1;fontColor=#6D7C87;fontFamily=Helvetica;fontSize=22;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="train_mlp_bank">
226
+ <mxGeometry x="18" y="168" width="264" height="30" as="geometry" />
227
+ </mxCell>
228
+ <mxCell id="train_mlp_5" value="MLP&lt;sub&gt;ℓ,N&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.1;fontColor=#6D7C87;fontFamily=Helvetica;fontSize=22;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="train_mlp_bank">
229
+ <mxGeometry x="18" y="206" width="264" height="30" as="geometry" />
230
+ </mxCell>
231
+ <mxCell id="train_plus_2" value="+" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#263746;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=32;fontStyle=1;align=center;verticalAlign=middle;spacing=4;ellipse;" vertex="1" parent="1">
232
+ <mxGeometry x="1840" y="257" width="52" height="52" as="geometry" />
233
+ </mxCell>
234
+ <mxCell id="train_h_out" value="h&lt;sub&gt;ℓ+1&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=28;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
235
+ <mxGeometry x="1930" y="250" width="100" height="66" as="geometry" />
236
+ </mxCell>
237
+ <mxCell id="zt_train_0" value="z&lt;sub&gt;t&lt;/sub&gt;&lt;sup&gt;1&lt;/sup&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
238
+ <mxGeometry x="790" y="145" width="56" height="48" as="geometry" />
239
+ </mxCell>
240
+ <mxCell id="zt_train_1" value="z&lt;sub&gt;t&lt;/sub&gt;&lt;sup&gt;2&lt;/sup&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
241
+ <mxGeometry x="854" y="145" width="56" height="48" as="geometry" />
242
+ </mxCell>
243
+ <mxCell id="zt_train_2" value="⋯" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
244
+ <mxGeometry x="918" y="145" width="56" height="48" as="geometry" />
245
+ </mxCell>
246
+ <mxCell id="train_projection" value="Target-context&lt;br&gt;projection" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=23;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
247
+ <mxGeometry x="1040" y="130" width="210" height="66" as="geometry" />
248
+ </mxCell>
249
+ <mxCell id="training_selector" value="Training label d" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=2.0;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
250
+ <mxGeometry x="1280" y="120" width="180" height="44" as="geometry" />
251
+ </mxCell>
252
+ <mxCell id="e_38" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_h_in" target="train_norm_1">
253
+ <mxGeometry relative="1" as="geometry" />
254
+ </mxCell>
255
+ <mxCell id="e_39" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_norm_1" target="train_attention">
256
+ <mxGeometry relative="1" as="geometry" />
257
+ </mxCell>
258
+ <mxCell id="e_40" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_attention" target="train_plus_1">
259
+ <mxGeometry relative="1" as="geometry" />
260
+ </mxCell>
261
+ <mxCell id="e_41" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_plus_1" target="train_norm_2">
262
+ <mxGeometry relative="1" as="geometry" />
263
+ </mxCell>
264
+ <mxCell id="e_42" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.6;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_norm_2" target="train_mlp_3">
265
+ <mxGeometry relative="1" as="geometry" />
266
+ </mxCell>
267
+ <mxCell id="e_43" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.6;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_mlp_3" target="train_plus_2">
268
+ <mxGeometry relative="1" as="geometry" />
269
+ </mxCell>
270
+ <mxCell id="e_44" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_plus_2" target="train_h_out">
271
+ <mxGeometry relative="1" as="geometry" />
272
+ </mxCell>
273
+ <mxCell id="e_45" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#5F879C;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="zt_train_2" target="train_projection">
274
+ <mxGeometry relative="1" as="geometry" />
275
+ </mxCell>
276
+ <mxCell id="e_46" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#5F879C;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_projection" target="train_attention">
277
+ <mxGeometry relative="1" as="geometry" />
278
+ </mxCell>
279
+ <mxCell id="e_47" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;dashed=1;dashPattern=8 6;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="training_selector" target="train_mlp_3">
280
+ <mxGeometry relative="1" as="geometry">
281
+ <Array as="points">
282
+ <mxPoint x="1480" y="142" />
283
+ <mxPoint x="1480" y="280" />
284
+ </Array>
285
+ </mxGeometry>
286
+ </mxCell>
287
+ <mxCell id="e_48" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.7;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_h_in" target="train_plus_1">
288
+ <mxGeometry relative="1" as="geometry">
289
+ <Array as="points">
290
+ <mxPoint x="805" y="380" />
291
+ <mxPoint x="1305" y="380" />
292
+ </Array>
293
+ </mxGeometry>
294
+ </mxCell>
295
+ <mxCell id="v_49" value="residual" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#6D7C87;fontStyle=0;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
296
+ <mxGeometry x="940" y="390" width="120" height="28" as="geometry" />
297
+ </mxCell>
298
+ <mxCell id="e_50" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=1.7;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_plus_1" target="train_plus_2">
299
+ <mxGeometry relative="1" as="geometry">
300
+ <Array as="points">
301
+ <mxPoint x="1305" y="420" />
302
+ <mxPoint x="1865" y="420" />
303
+ </Array>
304
+ </mxGeometry>
305
+ </mxCell>
306
+ <mxCell id="v_51" value="residual" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#6D7C87;fontStyle=0;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
307
+ <mxGeometry x="1540" y="388" width="120" height="28" as="geometry" />
308
+ </mxCell>
309
+ <mxCell id="v_52" value="Same d across layers" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#5C477B;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
310
+ <mxGeometry x="760" y="445" width="240" height="34" as="geometry" />
311
+ </mxCell>
312
+ <mxCell id="same_group_0" value="MLP&lt;sub&gt;1,d&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.0;fontColor=#5C477B;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
313
+ <mxGeometry x="1060" y="438" width="160" height="52" as="geometry" />
314
+ </mxCell>
315
+ <mxCell id="same_group_1" value="MLP&lt;sub&gt;2,d&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.0;fontColor=#5C477B;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
316
+ <mxGeometry x="1270" y="438" width="160" height="52" as="geometry" />
317
+ </mxCell>
318
+ <mxCell id="same_group_2" value="MLP&lt;sub&gt;L,d&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.0;fontColor=#5C477B;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
319
+ <mxGeometry x="1550" y="438" width="160" height="52" as="geometry" />
320
+ </mxCell>
321
+ <mxCell id="v_53" value="⋯" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=28;fontColor=#5C477B;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
322
+ <mxGeometry x="1455" y="445" width="60" height="34" as="geometry" />
323
+ </mxCell>
324
+ <mxCell id="e_54" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="same_group_0" target="same_group_1">
325
+ <mxGeometry relative="1" as="geometry" />
326
+ </mxCell>
327
+ <mxCell id="e_55" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.2;endArrow=none;endFill=0;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="same_group_1" target="v_53">
328
+ <mxGeometry relative="1" as="geometry" />
329
+ </mxCell>
330
+ <mxCell id="e_56" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.2;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="v_53" target="same_group_2">
331
+ <mxGeometry relative="1" as="geometry" />
332
+ </mxCell>
333
+ <mxCell id="initialization_inset" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FBFCFD;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
334
+ <mxGeometry x="2050" y="80" width="310" height="160" as="geometry" />
335
+ </mxCell>
336
+ <mxCell id="v_57" value="Initialization" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=24;fontColor=#263746;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="initialization_inset">
337
+ <mxGeometry x="15" y="10" width="280" height="30" as="geometry" />
338
+ </mxCell>
339
+ <mxCell id="v_58" value="Public DFlash or trained generalist" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=19;fontColor=#6D7C87;fontStyle=0;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="initialization_inset">
340
+ <mxGeometry x="15" y="50" width="280" height="30" as="geometry" />
341
+ </mxCell>
342
+ <mxCell id="v_59" value="↓" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#6D7C87;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="initialization_inset">
343
+ <mxGeometry x="135" y="80" width="40" height="20" as="geometry" />
344
+ </mxCell>
345
+ <mxCell id="v_60" value="Shared modules +&lt;br&gt;copied MLP groups" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#5C477B;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="initialization_inset">
346
+ <mxGeometry x="15" y="108" width="280" height="42" as="geometry" />
347
+ </mxCell>
348
+ <mxCell id="block_logits" value="Parallel predictions" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#7A62A0;strokeWidth=1.8;fontColor=#5C477B;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
349
+ <mxGeometry x="2070" y="280" width="270" height="52" as="geometry" />
350
+ </mxCell>
351
+ <mxCell id="block_loss" value="Block-prediction loss" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#7A62A0;strokeWidth=2.0;fontColor=#5C477B;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
352
+ <mxGeometry x="2070" y="360" width="270" height="52" as="geometry" />
353
+ </mxCell>
354
+ <mxCell id="block_update" value="Updates shared modules&lt;br&gt;and selected MLP" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=1.8;fontColor=#5C477B;fontFamily=Helvetica;fontSize=19;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
355
+ <mxGeometry x="2070" y="440" width="270" height="62" as="geometry" />
356
+ </mxCell>
357
+ <mxCell id="e_61" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="train_h_out" target="block_logits">
358
+ <mxGeometry relative="1" as="geometry" />
359
+ </mxCell>
360
+ <mxCell id="e_62" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="block_logits" target="block_loss">
361
+ <mxGeometry relative="1" as="geometry" />
362
+ </mxCell>
363
+ <mxCell id="e_63" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="block_loss" target="block_update">
364
+ <mxGeometry relative="1" as="geometry" />
365
+ </mxCell>
366
+ <mxCell id="v_64" value="ROUTER SUPERVISION" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#2B6D64;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
367
+ <mxGeometry x="760" y="535" width="300" height="30" as="geometry" />
368
+ </mxCell>
369
+ <mxCell id="router_detached_features" value="Prompt features&lt;br&gt;(no gradient)" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1.8;fontColor=#6D7B84;fontFamily=Helvetica;fontSize=19;fontStyle=1;align=center;verticalAlign=middle;spacing=4;dashed=1;dashPattern=8 6;" vertex="1" parent="1">
370
+ <mxGeometry x="760" y="575" width="230" height="64" as="geometry" />
371
+ </mxCell>
372
+ <mxCell id="router_pool" value="Mean pool" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=1.8;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
373
+ <mxGeometry x="1020" y="580" width="130" height="58" as="geometry" />
374
+ </mxCell>
375
+ <mxCell id="request_router_train" value="Request router" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=1.8;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
376
+ <mxGeometry x="1190" y="580" width="170" height="58" as="geometry" />
377
+ </mxCell>
378
+ <mxCell id="route_loss" value="Routing loss" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#4F8E83;strokeWidth=2.0;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
379
+ <mxGeometry x="1390" y="580" width="150" height="58" as="geometry" />
380
+ </mxCell>
381
+ <mxCell id="router_update" value="Router update" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=1.8;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
382
+ <mxGeometry x="1570" y="580" width="180" height="58" as="geometry" />
383
+ </mxCell>
384
+ <mxCell id="e_65" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="router_detached_features" target="router_pool">
385
+ <mxGeometry relative="1" as="geometry" />
386
+ </mxCell>
387
+ <mxCell id="e_66" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="router_pool" target="request_router_train">
388
+ <mxGeometry relative="1" as="geometry" />
389
+ </mxCell>
390
+ <mxCell id="e_67" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="request_router_train" target="route_loss">
391
+ <mxGeometry relative="1" as="geometry" />
392
+ </mxCell>
393
+ <mxCell id="e_68" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="route_loss" target="router_update">
394
+ <mxGeometry relative="1" as="geometry" />
395
+ </mxCell>
396
+ <mxCell id="mos_checkpoint" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#263746;strokeWidth=2.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
397
+ <mxGeometry x="2070" y="535" width="270" height="125" as="geometry" />
398
+ </mxCell>
399
+ <mxCell id="v_69" value="MoS checkpoint" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=23;fontColor=#263746;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="mos_checkpoint">
400
+ <mxGeometry x="15" y="12" width="240" height="32" as="geometry" />
401
+ </mxCell>
402
+ <mxCell id="v_70" value="Shared modules · MLP bank&lt;br&gt;Request router" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=19;fontColor=#6D7C87;fontStyle=0;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="mos_checkpoint">
403
+ <mxGeometry x="15" y="52" width="240" height="54" as="geometry" />
404
+ </mxCell>
405
+ <mxCell id="e_71" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=1.8;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.65;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="block_update" target="mos_checkpoint">
406
+ <mxGeometry relative="1" as="geometry" />
407
+ </mxCell>
408
+ <mxCell id="e_72" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.8;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="1" source="router_update" target="mos_checkpoint">
409
+ <mxGeometry relative="1" as="geometry">
410
+ <Array as="points">
411
+ <mxPoint x="1870" y="609" />
412
+ <mxPoint x="1870" y="630" />
413
+ </Array>
414
+ </mxGeometry>
415
+ </mxCell>
416
+ <mxCell id="panel_C" value="C" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#263746;strokeColor=#263746;strokeWidth=1.8;fontColor=#FFFFFF;fontFamily=Helvetica;fontSize=30;fontStyle=1;align=center;verticalAlign=middle;spacing=4;ellipse;" vertex="1" parent="1">
417
+ <mxGeometry x="40" y="730" width="46" height="46" as="geometry" />
418
+ </mxCell>
419
+ <mxCell id="title_C" value="Request-routed speculative decoding" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=32;fontColor=#263746;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
420
+ <mxGeometry x="102" y="728" width="760" height="50" as="geometry" />
421
+ </mxCell>
422
+ <mxCell id="v_73" value="ROUTE ONCE" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=23;fontColor=#2B6D64;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
423
+ <mxGeometry x="40" y="792" width="220" height="32" as="geometry" />
424
+ </mxCell>
425
+ <mxCell id="infer_prompt" value="Prompt x" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=26;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
426
+ <mxGeometry x="40" y="845" width="160" height="68" as="geometry" />
427
+ </mxCell>
428
+ <mxCell id="target_prefill" value="Frozen target&lt;br&gt;prompt pass" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1.8;fontColor=#6D7B84;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
429
+ <mxGeometry x="240" y="835" width="230" height="88" as="geometry" />
430
+ </mxCell>
431
+ <mxCell id="prompt_features" value="Prompt features" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1.8;fontColor=#6D7B84;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;verticalAlign=top;spacingTop=10;" vertex="1" parent="1">
432
+ <mxGeometry x="510" y="835" width="180" height="88" as="geometry" />
433
+ </mxCell>
434
+ <mxCell id="prompt_feature_strip_0" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="prompt_features">
435
+ <mxGeometry x="25" y="48" width="130" height="5" as="geometry" />
436
+ </mxCell>
437
+ <mxCell id="prompt_feature_strip_1" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="prompt_features">
438
+ <mxGeometry x="25" y="58" width="110" height="5" as="geometry" />
439
+ </mxCell>
440
+ <mxCell id="prompt_feature_strip_2" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="prompt_features">
441
+ <mxGeometry x="25" y="68" width="90" height="5" as="geometry" />
442
+ </mxCell>
443
+ <mxCell id="infer_mean_pool" value="Mean pool" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=1.8;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
444
+ <mxGeometry x="730" y="845" width="150" height="68" as="geometry" />
445
+ </mxCell>
446
+ <mxCell id="infer_request_router" value="Request router" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=1.8;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
447
+ <mxGeometry x="920" y="845" width="190" height="68" as="geometry" />
448
+ </mxCell>
449
+ <mxCell id="route_choice" value="Predicted&lt;br&gt;group d&lt;sub&gt;pred&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=2.2;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
450
+ <mxGeometry x="1150" y="835" width="130" height="88" as="geometry" />
451
+ </mxCell>
452
+ <mxCell id="route_lock" value="LOCK" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#4F8E83;strokeWidth=2.2;fontColor=#2B6D64;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
453
+ <mxGeometry x="1320" y="845" width="90" height="68" as="geometry" />
454
+ </mxCell>
455
+ <mxCell id="e_74" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.1;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_prompt" target="target_prefill">
456
+ <mxGeometry relative="1" as="geometry" />
457
+ </mxCell>
458
+ <mxCell id="e_75" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#6D7B84;strokeWidth=1.8;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="target_prefill" target="prompt_features">
459
+ <mxGeometry relative="1" as="geometry" />
460
+ </mxCell>
461
+ <mxCell id="e_76" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="prompt_features" target="infer_mean_pool">
462
+ <mxGeometry relative="1" as="geometry" />
463
+ </mxCell>
464
+ <mxCell id="e_77" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_mean_pool" target="infer_request_router">
465
+ <mxGeometry relative="1" as="geometry" />
466
+ </mxCell>
467
+ <mxCell id="e_78" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_request_router" target="route_choice">
468
+ <mxGeometry relative="1" as="geometry" />
469
+ </mxCell>
470
+ <mxCell id="e_79" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F8E83;strokeWidth=1.9;endArrow=none;endFill=0;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="route_choice" target="route_lock">
471
+ <mxGeometry relative="1" as="geometry" />
472
+ </mxCell>
473
+ <mxCell id="v_80" value="One decision per request" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=25;fontColor=#2B6D64;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
474
+ <mxGeometry x="1460" y="825" width="360" height="34" as="geometry" />
475
+ </mxCell>
476
+ <mxCell id="v_81" value="cycle 1 — cycle 2 — ⋯ — cycle T" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=23;fontColor=#2B6D64;fontStyle=0;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
477
+ <mxGeometry x="1460" y="866" width="520" height="32" as="geometry" />
478
+ </mxCell>
479
+ <mxCell id="v_82" value="Fixed for all layers and cycles" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#2B6D64;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
480
+ <mxGeometry x="1460" y="904" width="420" height="30" as="geometry" />
481
+ </mxCell>
482
+ <mxCell id="loaded_checkpoint" value="Trained MoS checkpoint" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FBFCFD;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#6D7C87;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
483
+ <mxGeometry x="2110" y="835" width="250" height="72" as="geometry" />
484
+ </mxCell>
485
+ <mxCell id="e_83" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#6D7C87;strokeWidth=1.6;endArrow=blockThin;endFill=1;endSize=9;dashed=1;dashPattern=8 6;exitX=0.75;exitY=1;exitDx=0;exitDy=0;entryX=0.75;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="mos_checkpoint" target="loaded_checkpoint">
486
+ <mxGeometry relative="1" as="geometry">
487
+ <Array as="points">
488
+ <mxPoint x="2300" y="690" />
489
+ <mxPoint x="2300" y="810" />
490
+ </Array>
491
+ </mxGeometry>
492
+ </mxCell>
493
+ <mxCell id="v_84" value="DATA PATH" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=23;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
494
+ <mxGeometry x="40" y="950" width="180" height="32" as="geometry" />
495
+ </mxCell>
496
+ <mxCell id="infer_context" value="Target context&lt;br&gt;&lt;b&gt;z&lt;sub&gt;t&lt;/sub&gt;&lt;/b&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.8;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
497
+ <mxGeometry x="40" y="1000" width="190" height="70" as="geometry" />
498
+ </mxCell>
499
+ <mxCell id="infer_masked" value="Masked block&lt;br&gt;&lt;b&gt;[M] [M] [M]&lt;/b&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
500
+ <mxGeometry x="40" y="1110" width="190" height="70" as="geometry" />
501
+ </mxCell>
502
+ <mxCell id="e_85" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#5F879C;strokeWidth=1.8;endArrow=blockThin;endFill=1;endSize=9;exitX=0.05;exitY=1;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="target_prefill" target="infer_context">
503
+ <mxGeometry relative="1" as="geometry">
504
+ <Array as="points">
505
+ <mxPoint x="250" y="975" />
506
+ <mxPoint x="250" y="1035" />
507
+ </Array>
508
+ </mxGeometry>
509
+ </mxCell>
510
+ <mxCell id="selected_path" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FBFCFD;strokeColor=#263746;strokeWidth=2.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
511
+ <mxGeometry x="290" y="950" width="1220" height="280" as="geometry" />
512
+ </mxCell>
513
+ <mxCell id="v_86" value="Selected MoS path" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=27;fontColor=#263746;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="selected_path">
514
+ <mxGeometry x="20" y="12" width="300" height="34" as="geometry" />
515
+ </mxCell>
516
+ <mxCell id="v_87" value="fixed group d&lt;sub&gt;pred&lt;/sub&gt; for the whole request" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=21;fontColor=#5C477B;fontStyle=1;align=right;verticalAlign=middle;spacing=0;" vertex="1" parent="selected_path">
517
+ <mxGeometry x="670" y="14" width="520" height="30" as="geometry" />
518
+ </mxCell>
519
+ <mxCell id="infer_1_layer" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="selected_path">
520
+ <mxGeometry x="20" y="62" width="340" height="170" as="geometry" />
521
+ </mxCell>
522
+ <mxCell id="v_88" value="Layer 1" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=25;fontColor=#263746;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="infer_1_layer">
523
+ <mxGeometry x="15" y="10" width="310" height="34" as="geometry" />
524
+ </mxCell>
525
+ <mxCell id="infer_1_shared" value="Shared&lt;br&gt;modules" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=2.0;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_1_layer">
526
+ <mxGeometry x="18" y="60" width="165" height="88" as="geometry" />
527
+ </mxCell>
528
+ <mxCell id="infer_1_selected" value="MLP&lt;sub&gt;1&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.2;fontColor=#5C477B;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_1_layer">
529
+ <mxGeometry x="205" y="64" width="115" height="56" as="geometry" />
530
+ </mxCell>
531
+ <mxCell id="infer_1_inactive_1" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_1_layer">
532
+ <mxGeometry x="215" y="132" width="95" height="7" as="geometry" />
533
+ </mxCell>
534
+ <mxCell id="infer_1_inactive_2" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_1_layer">
535
+ <mxGeometry x="215" y="145" width="95" height="7" as="geometry" />
536
+ </mxCell>
537
+ <mxCell id="e_89" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.3;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_1_shared" target="infer_1_selected">
538
+ <mxGeometry relative="1" as="geometry" />
539
+ </mxCell>
540
+ <mxCell id="infer_2_layer" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="selected_path">
541
+ <mxGeometry x="420" y="62" width="340" height="170" as="geometry" />
542
+ </mxCell>
543
+ <mxCell id="v_90" value="Layer 2" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=25;fontColor=#263746;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="infer_2_layer">
544
+ <mxGeometry x="15" y="10" width="310" height="34" as="geometry" />
545
+ </mxCell>
546
+ <mxCell id="infer_2_shared" value="Shared&lt;br&gt;modules" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=2.0;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_2_layer">
547
+ <mxGeometry x="18" y="60" width="165" height="88" as="geometry" />
548
+ </mxCell>
549
+ <mxCell id="infer_2_selected" value="MLP&lt;sub&gt;2&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.2;fontColor=#5C477B;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_2_layer">
550
+ <mxGeometry x="205" y="64" width="115" height="56" as="geometry" />
551
+ </mxCell>
552
+ <mxCell id="infer_2_inactive_1" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_2_layer">
553
+ <mxGeometry x="215" y="132" width="95" height="7" as="geometry" />
554
+ </mxCell>
555
+ <mxCell id="infer_2_inactive_2" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_2_layer">
556
+ <mxGeometry x="215" y="145" width="95" height="7" as="geometry" />
557
+ </mxCell>
558
+ <mxCell id="e_91" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.3;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_2_shared" target="infer_2_selected">
559
+ <mxGeometry relative="1" as="geometry" />
560
+ </mxCell>
561
+ <mxCell id="infer_l_layer" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="selected_path">
562
+ <mxGeometry x="820" y="62" width="340" height="170" as="geometry" />
563
+ </mxCell>
564
+ <mxCell id="v_92" value="Layer L" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=25;fontColor=#263746;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="infer_l_layer">
565
+ <mxGeometry x="15" y="10" width="310" height="34" as="geometry" />
566
+ </mxCell>
567
+ <mxCell id="infer_l_shared" value="Shared&lt;br&gt;modules" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=2.0;fontColor=#355F74;fontFamily=Helvetica;fontSize=22;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_l_layer">
568
+ <mxGeometry x="18" y="60" width="165" height="88" as="geometry" />
569
+ </mxCell>
570
+ <mxCell id="infer_l_selected" value="MLP&lt;sub&gt;L&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=2.2;fontColor=#5C477B;fontFamily=Helvetica;fontSize=20;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_l_layer">
571
+ <mxGeometry x="205" y="64" width="115" height="56" as="geometry" />
572
+ </mxCell>
573
+ <mxCell id="infer_l_inactive_1" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_l_layer">
574
+ <mxGeometry x="215" y="132" width="95" height="7" as="geometry" />
575
+ </mxCell>
576
+ <mxCell id="infer_l_inactive_2" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F7F5FA;strokeColor=#D7E0E5;strokeWidth=1.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="infer_l_layer">
577
+ <mxGeometry x="215" y="145" width="95" height="7" as="geometry" />
578
+ </mxCell>
579
+ <mxCell id="e_93" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.3;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_l_shared" target="infer_l_selected">
580
+ <mxGeometry relative="1" as="geometry" />
581
+ </mxCell>
582
+ <mxCell id="e_94" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#5F879C;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.3;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_context" target="infer_1_shared">
583
+ <mxGeometry relative="1" as="geometry">
584
+ <Array as="points">
585
+ <mxPoint x="260" y="1035" />
586
+ <mxPoint x="290" y="1035" />
587
+ </Array>
588
+ </mxGeometry>
589
+ </mxCell>
590
+ <mxCell id="e_95" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#4F9169;strokeWidth=2.0;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.75;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_masked" target="infer_1_shared">
591
+ <mxGeometry relative="1" as="geometry">
592
+ <Array as="points">
593
+ <mxPoint x="260" y="1145" />
594
+ <mxPoint x="290" y="1145" />
595
+ </Array>
596
+ </mxGeometry>
597
+ </mxCell>
598
+ <mxCell id="e_96" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.6;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_1_selected" target="infer_2_shared">
599
+ <mxGeometry relative="1" as="geometry" />
600
+ </mxCell>
601
+ <mxCell id="e_97" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.6;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_2_selected" target="infer_l_shared">
602
+ <mxGeometry relative="1" as="geometry" />
603
+ </mxCell>
604
+ <mxCell id="v_98" value="Other MLP groups are not evaluated or merged" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#6D7C87;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="selected_path">
605
+ <mxGeometry x="250" y="242" width="720" height="26" as="geometry" />
606
+ </mxCell>
607
+ <mxCell id="candidate_block" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#7A62A0;strokeWidth=2.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
608
+ <mxGeometry x="1550" y="970" width="340" height="210" as="geometry" />
609
+ </mxCell>
610
+ <mxCell id="v_99" value="Candidate block (parallel)" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=21;fontColor=#5C477B;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="candidate_block">
611
+ <mxGeometry x="15" y="12" width="310" height="34" as="geometry" />
612
+ </mxCell>
613
+ <mxCell id="candidate_tokens_0" value="t&lt;sub&gt;1&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="candidate_block">
614
+ <mxGeometry x="18" y="70" width="48" height="48" as="geometry" />
615
+ </mxCell>
616
+ <mxCell id="candidate_tokens_1" value="t&lt;sub&gt;2&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="candidate_block">
617
+ <mxGeometry x="76" y="70" width="48" height="48" as="geometry" />
618
+ </mxCell>
619
+ <mxCell id="candidate_tokens_2" value="t&lt;sub&gt;3&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="candidate_block">
620
+ <mxGeometry x="134" y="70" width="48" height="48" as="geometry" />
621
+ </mxCell>
622
+ <mxCell id="candidate_tokens_3" value="⋯" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="candidate_block">
623
+ <mxGeometry x="192" y="70" width="48" height="48" as="geometry" />
624
+ </mxCell>
625
+ <mxCell id="candidate_tokens_4" value="t&lt;sub&gt;16&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="candidate_block">
626
+ <mxGeometry x="250" y="70" width="48" height="48" as="geometry" />
627
+ </mxCell>
628
+ <mxCell id="candidate_parallel_bus" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#7A62A0;strokeColor=#7A62A0;strokeWidth=0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="candidate_block">
629
+ <mxGeometry x="35" y="166" width="270" height="3" as="geometry" />
630
+ </mxCell>
631
+ <mxCell id="e_100" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=1.6;endArrow=blockThin;endFill=1;endSize=9;exitX=0.16666666666666666;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="candidate_parallel_bus" target="candidate_tokens_0">
632
+ <mxGeometry relative="1" as="geometry" />
633
+ </mxCell>
634
+ <mxCell id="e_101" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=1.6;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="candidate_parallel_bus" target="candidate_tokens_2">
635
+ <mxGeometry relative="1" as="geometry" />
636
+ </mxCell>
637
+ <mxCell id="e_102" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=1.6;endArrow=blockThin;endFill=1;endSize=9;exitX=0.8333333333333334;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="candidate_parallel_bus" target="candidate_tokens_4">
638
+ <mxGeometry relative="1" as="geometry" />
639
+ </mxCell>
640
+ <mxCell id="e_103" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#7A62A0;strokeWidth=2.6;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="infer_l_selected" target="candidate_parallel_bus">
641
+ <mxGeometry relative="1" as="geometry">
642
+ <Array as="points">
643
+ <mxPoint x="1530" y="1110" />
644
+ </Array>
645
+ </mxGeometry>
646
+ </mxCell>
647
+ <mxCell id="target_verification" value="" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=2.0;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;container=1;pointerEvents=0;" vertex="1" parent="1">
648
+ <mxGeometry x="1910" y="950" width="320" height="230" as="geometry" />
649
+ </mxCell>
650
+ <mxCell id="v_104" value="Target verification" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=24;fontColor=#6D7B84;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="target_verification">
651
+ <mxGeometry x="15" y="12" width="290" height="36" as="geometry" />
652
+ </mxCell>
653
+ <mxCell id="verify_tokens_0" value="t&lt;sub&gt;1&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="target_verification">
654
+ <mxGeometry x="32" y="66" width="54" height="48" as="geometry" />
655
+ </mxCell>
656
+ <mxCell id="verify_tokens_1" value="t&lt;sub&gt;2&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="target_verification">
657
+ <mxGeometry x="96" y="66" width="54" height="48" as="geometry" />
658
+ </mxCell>
659
+ <mxCell id="verify_tokens_2" value="t&lt;sub&gt;3&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF4ED;strokeColor=#4F9169;strokeWidth=1.8;fontColor=#4F9169;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="target_verification">
660
+ <mxGeometry x="160" y="66" width="54" height="48" as="geometry" />
661
+ </mxCell>
662
+ <mxCell id="verify_tokens_3" value="t&lt;sub&gt;4&lt;/sub&gt;" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFF1DD;strokeColor=#C77E26;strokeWidth=1.8;fontColor=#C77E26;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="target_verification">
663
+ <mxGeometry x="224" y="66" width="54" height="48" as="geometry" />
664
+ </mxCell>
665
+ <mxCell id="v_105" value="✓ ✓ ✓" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=24;fontColor=#4F9169;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="target_verification">
666
+ <mxGeometry x="40" y="122" width="190" height="30" as="geometry" />
667
+ </mxCell>
668
+ <mxCell id="v_106" value="fix" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=19;fontColor=#C77E26;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="target_verification">
669
+ <mxGeometry x="245" y="122" width="45" height="30" as="geometry" />
670
+ </mxCell>
671
+ <mxCell id="v_107" value="Accept matching prefix" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#4F9169;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="target_verification">
672
+ <mxGeometry x="25" y="164" width="270" height="28" as="geometry" />
673
+ </mxCell>
674
+ <mxCell id="v_108" value="Correct first mismatch" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=20;fontColor=#C77E26;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="target_verification">
675
+ <mxGeometry x="25" y="198" width="270" height="28" as="geometry" />
676
+ </mxCell>
677
+ <mxCell id="e_109" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.1;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="candidate_block" target="target_verification">
678
+ <mxGeometry relative="1" as="geometry" />
679
+ </mxCell>
680
+ <mxCell id="response_output" value="Response" style="rounded=1;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#FFFFFF;strokeColor=#D7E0E5;strokeWidth=1.8;fontColor=#263746;fontFamily=Helvetica;fontSize=21;fontStyle=1;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
681
+ <mxGeometry x="2250" y="1025" width="140" height="72" as="geometry" />
682
+ </mxCell>
683
+ <mxCell id="e_110" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#263746;strokeWidth=2.1;endArrow=blockThin;endFill=1;endSize=9;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="target_verification" target="response_output">
684
+ <mxGeometry relative="1" as="geometry" />
685
+ </mxCell>
686
+ <mxCell id="cycle_note" value="Accepted or corrected tokens start the next verification cycle" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#6D7C87;fontStyle=1;align=center;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
687
+ <mxGeometry x="560" y="1260" width="900" height="32" as="geometry" />
688
+ </mxCell>
689
+ <mxCell id="e_111" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;convertToSvg=1;strokeColor=#6D7B84;strokeWidth=1.6;endArrow=blockThin;endFill=1;endSize=9;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="target_verification" target="infer_context">
690
+ <mxGeometry relative="1" as="geometry">
691
+ <Array as="points">
692
+ <mxPoint x="2070" y="1310" />
693
+ <mxPoint x="20" y="1310" />
694
+ <mxPoint x="20" y="1035" />
695
+ </Array>
696
+ </mxGeometry>
697
+ </mxCell>
698
+ <mxCell id="legend_swatch_0" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EAF2F6;strokeColor=#5F879C;strokeWidth=1.6;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
699
+ <mxGeometry x="40" y="1360" width="34" height="24" as="geometry" />
700
+ </mxCell>
701
+ <mxCell id="legend_label_0" value="shared" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=21;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
702
+ <mxGeometry x="86" y="1354" width="200" height="36" as="geometry" />
703
+ </mxCell>
704
+ <mxCell id="legend_swatch_1" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#EEEAF5;strokeColor=#7A62A0;strokeWidth=1.6;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
705
+ <mxGeometry x="300" y="1360" width="34" height="24" as="geometry" />
706
+ </mxCell>
707
+ <mxCell id="legend_label_1" value="selected MLP" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=21;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
708
+ <mxGeometry x="346" y="1354" width="200" height="36" as="geometry" />
709
+ </mxCell>
710
+ <mxCell id="legend_swatch_2" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#E9F3F1;strokeColor=#4F8E83;strokeWidth=1.6;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
711
+ <mxGeometry x="560" y="1360" width="34" height="24" as="geometry" />
712
+ </mxCell>
713
+ <mxCell id="legend_label_2" value="routing" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=21;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
714
+ <mxGeometry x="606" y="1354" width="200" height="36" as="geometry" />
715
+ </mxCell>
716
+ <mxCell id="legend_swatch_3" value="" style="rounded=0;arcSize=10;whiteSpace=wrap;html=1;convertToSvg=1;fillColor=#F1F4F5;strokeColor=#9AA7AF;strokeWidth=1.6;fontColor=#263746;fontFamily=Helvetica;fontSize=24;fontStyle=0;align=center;verticalAlign=middle;spacing=4;" vertex="1" parent="1">
717
+ <mxGeometry x="820" y="1360" width="34" height="24" as="geometry" />
718
+ </mxCell>
719
+ <mxCell id="legend_label_3" value="frozen / inactive" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=21;fontColor=#6D7C87;fontStyle=1;align=left;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
720
+ <mxGeometry x="866" y="1354" width="200" height="36" as="geometry" />
721
+ </mxCell>
722
+ <mxCell id="exactness_note" value="Exact verification preserves the target distribution" style="text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;fontFamily=Helvetica;fontSize=22;fontColor=#6D7C87;fontStyle=1;align=right;verticalAlign=middle;spacing=0;" vertex="1" parent="1">
723
+ <mxGeometry x="1500" y="1354" width="860" height="36" as="geometry" />
724
+ </mxCell>
725
+ </root>
726
+ </mxGraphModel>
727
+ </diagram>
728
+ </mxfile>
figures/rendered/paper-current-candidate/v1/fig_architecture_v8.png ADDED

Git LFS Details

  • SHA256: 3961c8a6ccc80992197b8746453cffd1d6f87ed158ce6103a72b4db361996f66
  • Pointer size: 132 Bytes
  • Size of remote file: 1.54 MB
figures/rendered/paper-current-candidate/v1/fig_architecture_v8.svg ADDED
figures/rendered/paper-current-candidate/v1/fig_main_results.png ADDED

Git LFS Details

  • SHA256: dc224065a687b7631cec8da84803ec6b8b1c5c34b737dfaa4e7077c9eb04318d
  • Pointer size: 131 Bytes
  • Size of remote file: 451 kB
figures/rendered/paper-current-candidate/v1/fig_qwen3_4b_matched.pdf ADDED
Binary file (23.7 kB). View file
 
figures/rendered/paper-current-candidate/v1/fig_qwen3_4b_matched.png ADDED

Git LFS Details

  • SHA256: 1243e3db541c0be5dbdacdabf6046ad065911ec2080bacd7d6e69bc9100689db
  • Pointer size: 131 Bytes
  • Size of remote file: 230 kB
licenses/extended-evidence-v1/LICENSE ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2025 sgl-project
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
manifests/extended-evidence-v1/artifact-manifest.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
manifests/extended-evidence-v1/release-summary.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "artifact_type_counts": {
3
+ "aggregate-al-curve": 249,
4
+ "aggregate-main-figure-evidence": 1,
5
+ "documentation": 2,
6
+ "environment-recipe": 1,
7
+ "figure-data": 3,
8
+ "license": 1,
9
+ "plotting-recipe": 15,
10
+ "rendered-figure": 22,
11
+ "rendered-figure-or-source": 6,
12
+ "verification-recipe": 7
13
+ },
14
+ "bytes": 5833027,
15
+ "files": 307,
16
+ "freeze_id": "extended-evidence-v1",
17
+ "freeze_time": "2026-07-23T20:26:58Z",
18
+ "license": "mit",
19
+ "safety_scan": {
20
+ "absolute_internal_paths": "pass",
21
+ "credentials": "pass",
22
+ "private_internal_material": "absent",
23
+ "raw_logs": "absent",
24
+ "raw_prompts_or_generations": "absent"
25
+ },
26
+ "transformations": {
27
+ "direct-copy": 293,
28
+ "generated-from-selected-script-imports": 1,
29
+ "generated-public-documentation": 2,
30
+ "sanitized-copy; replaced 1 hard-coded output path(s) with relative output path(s)": 9,
31
+ "sanitized-copy; replaced 2 hard-coded output path(s) with relative output path(s)": 1,
32
+ "sanitized-json-projection; retained aggregate panels and completion metadata only; removed cells, run_root, sidecars, prompt references, source checkpoints, and file paths": 1
33
+ }
34
+ }
recipes/plotting/v1/build_mos_architecture_drawio.py ADDED
@@ -0,0 +1,856 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Build a clean, editable draw.io source for the MoS architecture figure.
3
+
4
+ The script only writes draw.io XML. Export and visual verification are run on
5
+ the server so the local desktop environment never invokes the draw.io CLI.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ import argparse
11
+ from pathlib import Path
12
+ import xml.etree.ElementTree as ET
13
+
14
+
15
+ W, H = 2400, 1420
16
+
17
+ INK = "#263746"
18
+ MUTED = "#6D7C87"
19
+ RULE = "#D7E0E5"
20
+ SURFACE = "#FBFCFD"
21
+ WHITE = "#FFFFFF"
22
+
23
+ SHARED = "#5F879C"
24
+ SHARED_DARK = "#355F74"
25
+ SHARED_FILL = "#EAF2F6"
26
+
27
+ MLP = "#7A62A0"
28
+ MLP_DARK = "#5C477B"
29
+ MLP_FILL = "#EEEAF5"
30
+ MLP_FAINT = "#F7F5FA"
31
+
32
+ ROUTE = "#4F8E83"
33
+ ROUTE_DARK = "#2B6D64"
34
+ ROUTE_FILL = "#E9F3F1"
35
+
36
+ FROZEN = "#9AA7AF"
37
+ FROZEN_DARK = "#6D7B84"
38
+ FROZEN_FILL = "#F1F4F5"
39
+
40
+ GOOD = "#4F9169"
41
+ GOOD_FILL = "#EAF4ED"
42
+ AMBER = "#C77E26"
43
+ AMBER_FILL = "#FFF1DD"
44
+
45
+
46
+ def parse_args() -> argparse.Namespace:
47
+ parser = argparse.ArgumentParser(description=__doc__)
48
+ parser.add_argument("--output", type=Path, required=True)
49
+ return parser.parse_args()
50
+
51
+
52
+ class Diagram:
53
+ def __init__(self) -> None:
54
+ self.mxfile = ET.Element(
55
+ "mxfile",
56
+ {"host": "Electron", "modified": "2026-07-21T00:00:00.000Z", "version": "30.3.14"},
57
+ )
58
+ page = ET.SubElement(self.mxfile, "diagram", {"id": "mos-v8", "name": "MoS architecture"})
59
+ self.model = ET.SubElement(
60
+ page,
61
+ "mxGraphModel",
62
+ {
63
+ "dx": "0",
64
+ "dy": "0",
65
+ "grid": "1",
66
+ "gridSize": "10",
67
+ "guides": "1",
68
+ "tooltips": "1",
69
+ "connect": "1",
70
+ "arrows": "1",
71
+ "fold": "1",
72
+ "page": "1",
73
+ "pageScale": "1",
74
+ "pageWidth": str(W),
75
+ "pageHeight": str(H),
76
+ "math": "0",
77
+ "shadow": "0",
78
+ "background": WHITE,
79
+ },
80
+ )
81
+ self.root = ET.SubElement(self.model, "root")
82
+ ET.SubElement(self.root, "mxCell", {"id": "0"})
83
+ ET.SubElement(self.root, "mxCell", {"id": "1", "parent": "0"})
84
+ self.counter = 2
85
+
86
+ def new_id(self, prefix: str) -> str:
87
+ cell_id = f"{prefix}_{self.counter}"
88
+ self.counter += 1
89
+ return cell_id
90
+
91
+ def vertex(
92
+ self,
93
+ value: str,
94
+ x: int,
95
+ y: int,
96
+ w: int,
97
+ h: int,
98
+ style: str,
99
+ *,
100
+ cell_id: str | None = None,
101
+ parent: str = "1",
102
+ ) -> str:
103
+ cell_id = cell_id or self.new_id("v")
104
+ cell = ET.SubElement(
105
+ self.root,
106
+ "mxCell",
107
+ {"id": cell_id, "value": value, "style": style, "vertex": "1", "parent": parent},
108
+ )
109
+ ET.SubElement(
110
+ cell,
111
+ "mxGeometry",
112
+ {"x": str(x), "y": str(y), "width": str(w), "height": str(h), "as": "geometry"},
113
+ )
114
+ return cell_id
115
+
116
+ def edge(
117
+ self,
118
+ source: str,
119
+ target: str,
120
+ *,
121
+ color: str = INK,
122
+ width: float = 2.0,
123
+ dashed: bool = False,
124
+ exit_xy: tuple[float, float] | None = None,
125
+ entry_xy: tuple[float, float] | None = None,
126
+ points: list[tuple[int, int]] | None = None,
127
+ end_arrow: str = "blockThin",
128
+ cell_id: str | None = None,
129
+ ) -> str:
130
+ cell_id = cell_id or self.new_id("e")
131
+ style = [
132
+ "edgeStyle=orthogonalEdgeStyle",
133
+ "rounded=1",
134
+ "orthogonalLoop=1",
135
+ "jettySize=auto",
136
+ "html=1",
137
+ "convertToSvg=1",
138
+ f"strokeColor={color}",
139
+ f"strokeWidth={width}",
140
+ f"endArrow={end_arrow}",
141
+ "endFill=1" if end_arrow != "none" else "endFill=0",
142
+ "endSize=9",
143
+ ]
144
+ if dashed:
145
+ style.extend(["dashed=1", "dashPattern=8 6"])
146
+ if exit_xy is not None:
147
+ style.extend([f"exitX={exit_xy[0]}", f"exitY={exit_xy[1]}", "exitDx=0", "exitDy=0"])
148
+ if entry_xy is not None:
149
+ style.extend([f"entryX={entry_xy[0]}", f"entryY={entry_xy[1]}", "entryDx=0", "entryDy=0"])
150
+ cell = ET.SubElement(
151
+ self.root,
152
+ "mxCell",
153
+ {
154
+ "id": cell_id,
155
+ "value": "",
156
+ "style": ";".join(style) + ";",
157
+ "edge": "1",
158
+ "parent": "1",
159
+ "source": source,
160
+ "target": target,
161
+ },
162
+ )
163
+ geom = ET.SubElement(cell, "mxGeometry", {"relative": "1", "as": "geometry"})
164
+ if points:
165
+ array = ET.SubElement(geom, "Array", {"as": "points"})
166
+ for px, py in points:
167
+ ET.SubElement(array, "mxPoint", {"x": str(px), "y": str(py)})
168
+ return cell_id
169
+
170
+ def save(self, output: Path) -> None:
171
+ ET.indent(self.mxfile, space=" ")
172
+ output.parent.mkdir(parents=True, exist_ok=True)
173
+ ET.ElementTree(self.mxfile).write(output, encoding="utf-8", xml_declaration=True)
174
+
175
+
176
+ def rect_style(
177
+ fill: str = WHITE,
178
+ stroke: str = RULE,
179
+ *,
180
+ font: str = INK,
181
+ size: int = 24,
182
+ bold: bool = False,
183
+ rounded: int = 1,
184
+ stroke_width: float = 1.8,
185
+ align: str = "center",
186
+ dashed: bool = False,
187
+ extra: str = "",
188
+ ) -> str:
189
+ items = [
190
+ f"rounded={rounded}",
191
+ "arcSize=10",
192
+ "whiteSpace=wrap",
193
+ "html=1",
194
+ "convertToSvg=1",
195
+ f"fillColor={fill}",
196
+ f"strokeColor={stroke}",
197
+ f"strokeWidth={stroke_width}",
198
+ f"fontColor={font}",
199
+ "fontFamily=Helvetica",
200
+ f"fontSize={size}",
201
+ f"fontStyle={1 if bold else 0}",
202
+ f"align={align}",
203
+ "verticalAlign=middle",
204
+ "spacing=4",
205
+ ]
206
+ if dashed:
207
+ items.extend(["dashed=1", "dashPattern=8 6"])
208
+ if extra:
209
+ items.append(extra.rstrip(";"))
210
+ return ";".join(items) + ";"
211
+
212
+
213
+ def text_style(size: int = 24, *, font: str = INK, bold: bool = False, align: str = "left") -> str:
214
+ return (
215
+ "text;html=1;convertToSvg=1;strokeColor=none;fillColor=none;whiteSpace=wrap;"
216
+ f"fontFamily=Helvetica;fontSize={size};fontColor={font};"
217
+ f"fontStyle={1 if bold else 0};align={align};verticalAlign=middle;spacing=0;"
218
+ )
219
+
220
+
221
+ def panel_title(d: Diagram, letter: str, title: str, x: int, y: int, width: int) -> None:
222
+ d.vertex(
223
+ letter,
224
+ x,
225
+ y,
226
+ 46,
227
+ 46,
228
+ rect_style(INK, INK, font=WHITE, size=30, bold=True, extra="ellipse"),
229
+ cell_id=f"panel_{letter}",
230
+ )
231
+ d.vertex(title, x + 62, y - 2, width, 50, text_style(32, bold=True), cell_id=f"title_{letter}")
232
+
233
+
234
+ def add_separator(d: Diagram, x: int, y: int, w: int, h: int = 2) -> None:
235
+ d.vertex("", x, y, w, h, rect_style(RULE, RULE, rounded=0, stroke_width=0))
236
+
237
+
238
+ def token_row(
239
+ d: Diagram,
240
+ prefix: str,
241
+ x: int,
242
+ y: int,
243
+ labels: list[str],
244
+ kinds: list[str],
245
+ *,
246
+ cell_w: int = 56,
247
+ cell_h: int = 48,
248
+ gap: int = 8,
249
+ parent: str = "1",
250
+ font_size: int = 24,
251
+ ) -> list[str]:
252
+ palette = {
253
+ "plain": (WHITE, RULE, INK),
254
+ "shared": (SHARED_FILL, SHARED, SHARED_DARK),
255
+ "anchor": (AMBER_FILL, AMBER, AMBER),
256
+ "mask": (GOOD_FILL, GOOD, GOOD),
257
+ "frozen": (FROZEN_FILL, FROZEN, FROZEN_DARK),
258
+ "good": (GOOD_FILL, GOOD, GOOD),
259
+ "correct": (AMBER_FILL, AMBER, AMBER),
260
+ }
261
+ ids: list[str] = []
262
+ for idx, (label, kind) in enumerate(zip(labels, kinds)):
263
+ fill, stroke, font = palette[kind]
264
+ ids.append(
265
+ d.vertex(
266
+ label,
267
+ x + idx * (cell_w + gap),
268
+ y,
269
+ cell_w,
270
+ cell_h,
271
+ rect_style(fill, stroke, font=font, size=font_size, bold=True),
272
+ cell_id=f"{prefix}_{idx}",
273
+ parent=parent,
274
+ )
275
+ )
276
+ return ids
277
+
278
+
279
+ def document_card(d: Diagram, label: str, x: int, y: int, cell_id: str) -> str:
280
+ card = d.vertex(
281
+ label,
282
+ x,
283
+ y,
284
+ 120,
285
+ 78,
286
+ rect_style(
287
+ WHITE,
288
+ RULE,
289
+ size=19,
290
+ bold=True,
291
+ extra="container=1;pointerEvents=0;verticalAlign=top;spacingTop=22",
292
+ ),
293
+ cell_id=cell_id,
294
+ )
295
+ d.vertex("", 0, 0, 120, 9, rect_style(SHARED, SHARED, rounded=0, stroke_width=0), parent=card)
296
+ d.vertex("", 28, 60, 64, 3, rect_style(RULE, RULE, rounded=0, stroke_width=0), parent=card)
297
+ return card
298
+
299
+
300
+ def frozen_target(d: Diagram, x: int, y: int, w: int, h: int, cell_id: str) -> str:
301
+ box = d.vertex(
302
+ "",
303
+ x,
304
+ y,
305
+ w,
306
+ h,
307
+ rect_style(FROZEN_FILL, FROZEN, extra="container=1;pointerEvents=0"),
308
+ cell_id=cell_id,
309
+ )
310
+ d.vertex("Frozen target", 12, 10, w - 24, 30, text_style(22, font=FROZEN_DARK, bold=True, align="center"), parent=box)
311
+ for idx in range(3):
312
+ d.vertex(
313
+ "",
314
+ 28,
315
+ 52 + idx * 16,
316
+ w - 56,
317
+ 8,
318
+ rect_style(WHITE, RULE, rounded=0, stroke_width=1),
319
+ parent=box,
320
+ )
321
+ return box
322
+
323
+
324
+ def feature_stack(d: Diagram, x: int, y: int) -> str:
325
+ stack = d.vertex(
326
+ "",
327
+ x,
328
+ y,
329
+ 190,
330
+ 92,
331
+ rect_style(WHITE, RULE, extra="container=1;pointerEvents=0"),
332
+ cell_id="frozen_feature_stack",
333
+ )
334
+ d.vertex("Frozen features", 10, 8, 170, 28, text_style(20, font=FROZEN_DARK, bold=True, align="center"), parent=stack)
335
+ for idx, width in enumerate([150, 136, 122]):
336
+ d.vertex(
337
+ "",
338
+ 20,
339
+ 46 + idx * 13,
340
+ width,
341
+ 7,
342
+ rect_style(FROZEN_FILL, FROZEN, rounded=0, stroke_width=1),
343
+ parent=stack,
344
+ )
345
+ return stack
346
+
347
+
348
+ def draw_panel_a(d: Diagram) -> dict[str, str]:
349
+ panel_title(d, "A", "Construct training signals", 40, 28, 540)
350
+ d.vertex("TRAINING GROUPS", 40, 88, 400, 34, text_style(23, font=MUTED, bold=True))
351
+
352
+ cards = [
353
+ document_card(d, "Domain 1", 40, 130, "domain_1"),
354
+ document_card(d, "Domain 2", 200, 130, "domain_2"),
355
+ document_card(d, "⋯", 360, 130, "domain_mid"),
356
+ document_card(d, "Domain N", 520, 130, "domain_n"),
357
+ ]
358
+ pair = d.vertex(
359
+ "<b>Request–response</b><br>pair (x, y)",
360
+ 90,
361
+ 250,
362
+ 280,
363
+ 78,
364
+ rect_style(WHITE, RULE, size=22, bold=True),
365
+ cell_id="xy_pair",
366
+ )
367
+ assignment = d.vertex(
368
+ "<b>Prompt-only</b><br>training label d",
369
+ 400,
370
+ 250,
371
+ 250,
372
+ 78,
373
+ rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=21, bold=True, stroke_width=2.0),
374
+ cell_id="offline_assignment",
375
+ )
376
+ for idx, card in enumerate(cards):
377
+ d.edge(card, pair, width=1.5, exit_xy=(0.5, 1), entry_xy=((idx + 1) / 5, 0))
378
+ d.edge(pair, assignment, color=ROUTE, width=2.0, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
379
+
380
+ d.vertex("Response y", 40, 360, 130, 32, text_style(22, font=MUTED, bold=True))
381
+ response = token_row(
382
+ d,
383
+ "response",
384
+ 210,
385
+ 350,
386
+ ["y<sub>1</sub>", "y<sub>2</sub>", "y<sub>a</sub>", "y<sub>4</sub>", "⋯"],
387
+ ["plain", "plain", "anchor", "plain", "plain"],
388
+ cell_w=60,
389
+ gap=10,
390
+ font_size=24,
391
+ )
392
+ d.edge(pair, response[0], width=1.8, exit_xy=(0.5, 1), entry_xy=(0.5, 0), points=[(230, 340), (240, 340)])
393
+ d.vertex("sampled anchor", 340, 405, 150, 28, text_style(20, font=AMBER, bold=True, align="center"))
394
+
395
+ masked_box = d.vertex(
396
+ "",
397
+ 250,
398
+ 440,
399
+ 390,
400
+ 112,
401
+ rect_style(WHITE, GOOD, stroke_width=1.8, extra="container=1;pointerEvents=0"),
402
+ cell_id="masked_candidate_block",
403
+ )
404
+ d.vertex("Masked candidate block", 15, 10, 360, 30, text_style(22, font=GOOD, bold=True, align="center"), parent=masked_box)
405
+ token_row(
406
+ d,
407
+ "masked",
408
+ 28,
409
+ 52,
410
+ ["y<sub>a</sub>", "[M]", "[M]", "[M]"],
411
+ ["anchor", "mask", "mask", "mask"],
412
+ cell_w=68,
413
+ gap=12,
414
+ parent=masked_box,
415
+ font_size=24,
416
+ )
417
+ d.edge(response[2], masked_box, color=AMBER, width=2.0, exit_xy=(0.5, 1), entry_xy=(0.33, 0))
418
+
419
+ target = frozen_target(d, 40, 560, 180, 110, "frozen_target_train")
420
+ features = feature_stack(d, 250, 570)
421
+ z_port = d.vertex(
422
+ "Target context<br><b>z<sub>t</sub></b>",
423
+ 480,
424
+ 555,
425
+ 170,
426
+ 54,
427
+ rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=21, bold=True),
428
+ cell_id="train_zt_port",
429
+ )
430
+ q_port = d.vertex(
431
+ "Prompt features<br><b>q(x)</b>",
432
+ 480,
433
+ 620,
434
+ 170,
435
+ 54,
436
+ rect_style(FROZEN_FILL, FROZEN, font=FROZEN_DARK, size=21, bold=True),
437
+ cell_id="train_q_port",
438
+ )
439
+ d.edge(pair, target, color=FROZEN_DARK, width=1.7, exit_xy=(0, 0.55), entry_xy=(0.25, 0), points=[(20, 295), (20, 540)])
440
+ d.edge(target, features, color=FROZEN_DARK, width=1.7, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
441
+ d.edge(features, z_port, color=SHARED, width=1.8, exit_xy=(1, 0.35), entry_xy=(0, 0.5))
442
+ d.edge(features, q_port, color=FROZEN_DARK, width=1.6, dashed=True, exit_xy=(1, 0.75), entry_xy=(0, 0.5))
443
+ return {"assignment": assignment, "z": z_port, "q": q_port}
444
+
445
+
446
+ def mlp_bank(d: Diagram, x: int, y: int) -> tuple[str, str]:
447
+ bank = d.vertex(
448
+ "",
449
+ x,
450
+ y,
451
+ 300,
452
+ 260,
453
+ rect_style(WHITE, RULE, extra="container=1;pointerEvents=0"),
454
+ cell_id="train_mlp_bank",
455
+ )
456
+ d.vertex("MLP bank", 15, 10, 270, 34, text_style(25, bold=True, align="center"), parent=bank)
457
+ labels = ["MLP<sub>ℓ,1</sub>", "MLP<sub>ℓ,2</sub>", "MLP<sub>ℓ,d</sub>", "⋯", "MLP<sub>ℓ,N</sub>"]
458
+ selected = ""
459
+ for idx, label in enumerate(labels):
460
+ active = idx == 2
461
+ row = d.vertex(
462
+ label,
463
+ 18,
464
+ 54 + idx * 38,
465
+ 264,
466
+ 30,
467
+ rect_style(
468
+ MLP_FILL if active else MLP_FAINT,
469
+ MLP if active else RULE,
470
+ font=MLP_DARK if active else MUTED,
471
+ size=22,
472
+ bold=active,
473
+ stroke_width=2.2 if active else 1.1,
474
+ ),
475
+ cell_id=f"train_mlp_{idx + 1}",
476
+ parent=bank,
477
+ )
478
+ if active:
479
+ selected = row
480
+ return bank, selected
481
+
482
+
483
+ def draw_panel_b(d: Diagram) -> dict[str, str]:
484
+ panel_title(d, "B", "Jointly train MoS", 750, 28, 520)
485
+ d.vertex("ONE EXPANDED DRAFT LAYER", 750, 88, 500, 34, text_style(23, font=SHARED_DARK, bold=True))
486
+
487
+ h_in = d.vertex("h<sub>ℓ</sub>", 760, 250, 90, 66, rect_style(WHITE, RULE, size=30, bold=True), cell_id="train_h_in")
488
+ norm_1 = d.vertex("Norm", 890, 250, 110, 66, rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=25, bold=True), cell_id="train_norm_1")
489
+ attn = d.vertex(
490
+ "Shared<br>attention",
491
+ 1040,
492
+ 215,
493
+ 210,
494
+ 136,
495
+ rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=27, bold=True, stroke_width=2.2),
496
+ cell_id="train_attention",
497
+ )
498
+ plus_1 = d.vertex("+", 1280, 257, 52, 52, rect_style(WHITE, INK, size=32, bold=True, extra="ellipse"), cell_id="train_plus_1")
499
+ norm_2 = d.vertex("Norm", 1370, 250, 100, 66, rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=25, bold=True), cell_id="train_norm_2")
500
+ bank, selected = mlp_bank(d, 1500, 135)
501
+ plus_2 = d.vertex("+", 1840, 257, 52, 52, rect_style(WHITE, INK, size=32, bold=True, extra="ellipse"), cell_id="train_plus_2")
502
+ h_out = d.vertex("h<sub>ℓ+1</sub>", 1930, 250, 100, 66, rect_style(WHITE, RULE, size=28, bold=True), cell_id="train_h_out")
503
+
504
+ z_tokens = token_row(
505
+ d,
506
+ "zt_train",
507
+ 790,
508
+ 145,
509
+ ["z<sub>t</sub><sup>1</sup>", "z<sub>t</sub><sup>2</sup>", "⋯"],
510
+ ["shared", "shared", "shared"],
511
+ cell_w=56,
512
+ gap=8,
513
+ font_size=22,
514
+ )
515
+ projection = d.vertex(
516
+ "Target-context<br>projection",
517
+ 1040,
518
+ 130,
519
+ 210,
520
+ 66,
521
+ rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=23, bold=True),
522
+ cell_id="train_projection",
523
+ )
524
+ selector = d.vertex(
525
+ "Training label d",
526
+ 1280,
527
+ 120,
528
+ 180,
529
+ 44,
530
+ rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=21, bold=True, stroke_width=2.0),
531
+ cell_id="training_selector",
532
+ )
533
+
534
+ d.edge(h_in, norm_1, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
535
+ d.edge(norm_1, attn, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
536
+ d.edge(attn, plus_1, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
537
+ d.edge(plus_1, norm_2, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
538
+ d.edge(norm_2, selected, color=MLP, width=2.6, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
539
+ d.edge(selected, plus_2, color=MLP, width=2.6, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
540
+ d.edge(plus_2, h_out, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
541
+ d.edge(z_tokens[-1], projection, color=SHARED, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
542
+ d.edge(projection, attn, color=SHARED, width=1.9, exit_xy=(0.5, 1), entry_xy=(0.5, 0))
543
+ d.edge(
544
+ selector,
545
+ selected,
546
+ color=ROUTE,
547
+ width=1.9,
548
+ dashed=True,
549
+ exit_xy=(1, 0.5),
550
+ entry_xy=(0, 0.5),
551
+ points=[(1480, 142), (1480, 280)],
552
+ )
553
+
554
+ d.edge(h_in, plus_1, width=1.7, exit_xy=(0.5, 1), entry_xy=(0.5, 1), points=[(805, 380), (1305, 380)])
555
+ d.vertex("residual", 940, 390, 120, 28, text_style(20, font=MUTED, align="center"))
556
+ d.edge(plus_1, plus_2, width=1.7, exit_xy=(0.5, 1), entry_xy=(0.5, 1), points=[(1305, 420), (1865, 420)])
557
+ d.vertex("residual", 1540, 388, 120, 28, text_style(20, font=MUTED, align="center"))
558
+
559
+ d.vertex("Same d across layers", 760, 445, 240, 34, text_style(22, font=MLP_DARK, bold=True))
560
+ group_boxes = []
561
+ for idx, (x, label) in enumerate([(1060, "MLP<sub>1,d</sub>"), (1270, "MLP<sub>2,d</sub>"), (1550, "MLP<sub>L,d</sub>")]):
562
+ group_boxes.append(
563
+ d.vertex(
564
+ label,
565
+ x,
566
+ 438,
567
+ 160,
568
+ 52,
569
+ rect_style(MLP_FILL, MLP, font=MLP_DARK, size=22, bold=True, stroke_width=2.0),
570
+ cell_id=f"same_group_{idx}",
571
+ )
572
+ )
573
+ dots = d.vertex("⋯", 1455, 445, 60, 34, text_style(28, font=MLP_DARK, bold=True, align="center"))
574
+ d.edge(group_boxes[0], group_boxes[1], color=MLP, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
575
+ d.edge(group_boxes[1], dots, color=MLP, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5), end_arrow="none")
576
+ d.edge(dots, group_boxes[2], color=MLP, width=2.2, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
577
+
578
+ init = d.vertex(
579
+ "",
580
+ 2050,
581
+ 80,
582
+ 310,
583
+ 160,
584
+ rect_style(SURFACE, RULE, extra="container=1;pointerEvents=0"),
585
+ cell_id="initialization_inset",
586
+ )
587
+ d.vertex("Initialization", 15, 10, 280, 30, text_style(24, bold=True, align="center"), parent=init)
588
+ d.vertex("Public DFlash or trained generalist", 15, 50, 280, 30, text_style(19, font=MUTED, align="center"), parent=init)
589
+ d.vertex("↓", 135, 80, 40, 20, text_style(22, font=MUTED, bold=True, align="center"), parent=init)
590
+ d.vertex("Shared modules +<br>copied MLP groups", 15, 108, 280, 42, text_style(20, font=MLP_DARK, bold=True, align="center"), parent=init)
591
+
592
+ logits = d.vertex("Parallel predictions", 2070, 280, 270, 52, rect_style(MLP_FAINT, MLP, font=MLP_DARK, size=21, bold=True), cell_id="block_logits")
593
+ block_loss = d.vertex("Block-prediction loss", 2070, 360, 270, 52, rect_style(WHITE, MLP, font=MLP_DARK, size=21, bold=True, stroke_width=2.0), cell_id="block_loss")
594
+ block_update = d.vertex("Updates shared modules<br>and selected MLP", 2070, 440, 270, 62, rect_style(MLP_FILL, MLP, font=MLP_DARK, size=19, bold=True, stroke_width=1.8), cell_id="block_update")
595
+ d.edge(h_out, logits, color=MLP, width=2.0, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
596
+ d.edge(logits, block_loss, color=MLP, width=2.0, exit_xy=(0.5, 1), entry_xy=(0.5, 0))
597
+ d.edge(block_loss, block_update, color=MLP, width=2.0, exit_xy=(0.5, 1), entry_xy=(0.5, 0))
598
+
599
+ d.vertex("ROUTER SUPERVISION", 760, 535, 300, 30, text_style(22, font=ROUTE_DARK, bold=True))
600
+ detached = d.vertex("Prompt features<br>(no gradient)", 760, 575, 230, 64, rect_style(FROZEN_FILL, FROZEN, font=FROZEN_DARK, size=19, bold=True, dashed=True), cell_id="router_detached_features")
601
+ pool = d.vertex("Mean pool", 1020, 580, 130, 58, rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=21, bold=True), cell_id="router_pool")
602
+ router = d.vertex("Request router", 1190, 580, 170, 58, rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=20, bold=True), cell_id="request_router_train")
603
+ route_loss = d.vertex("Routing loss", 1390, 580, 150, 58, rect_style(WHITE, ROUTE, font=ROUTE_DARK, size=20, bold=True, stroke_width=2.0), cell_id="route_loss")
604
+ router_update = d.vertex("Router update", 1570, 580, 180, 58, rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=20, bold=True), cell_id="router_update")
605
+ d.edge(detached, pool, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
606
+ d.edge(pool, router, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
607
+ d.edge(router, route_loss, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
608
+ d.edge(route_loss, router_update, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
609
+
610
+ checkpoint = d.vertex(
611
+ "",
612
+ 2070,
613
+ 535,
614
+ 270,
615
+ 125,
616
+ rect_style(WHITE, INK, stroke_width=2.0, extra="container=1;pointerEvents=0"),
617
+ cell_id="mos_checkpoint",
618
+ )
619
+ d.vertex("MoS checkpoint", 15, 12, 240, 32, text_style(23, bold=True, align="center"), parent=checkpoint)
620
+ d.vertex("Shared modules · MLP bank<br>Request router", 15, 52, 240, 54, text_style(19, font=MUTED, align="center"), parent=checkpoint)
621
+ d.edge(block_update, checkpoint, color=MLP, width=1.8, exit_xy=(0.5, 1), entry_xy=(0.65, 0))
622
+ d.edge(router_update, checkpoint, color=ROUTE, width=1.8, exit_xy=(1, 0.5), entry_xy=(0, 0.75), points=[(1870, 609), (1870, 630)])
623
+ return {"checkpoint": checkpoint}
624
+
625
+
626
+ def inference_layer(d: Diagram, prefix: str, x: int, label: str, selected_label: str, *, parent: str) -> tuple[str, str, str]:
627
+ layer = d.vertex(
628
+ "",
629
+ x,
630
+ 62,
631
+ 340,
632
+ 170,
633
+ rect_style(WHITE, RULE, extra="container=1;pointerEvents=0"),
634
+ cell_id=f"{prefix}_layer",
635
+ parent=parent,
636
+ )
637
+ d.vertex(label, 15, 10, 310, 34, text_style(25, bold=True, align="center"), parent=layer)
638
+ shared = d.vertex(
639
+ "Shared<br>modules",
640
+ 18,
641
+ 60,
642
+ 165,
643
+ 88,
644
+ rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=22, bold=True, stroke_width=2.0),
645
+ cell_id=f"{prefix}_shared",
646
+ parent=layer,
647
+ )
648
+ selected = d.vertex(
649
+ selected_label,
650
+ 205,
651
+ 64,
652
+ 115,
653
+ 56,
654
+ rect_style(MLP_FILL, MLP, font=MLP_DARK, size=20, bold=True, stroke_width=2.2),
655
+ cell_id=f"{prefix}_selected",
656
+ parent=layer,
657
+ )
658
+ d.vertex("", 215, 132, 95, 7, rect_style(MLP_FAINT, RULE, rounded=0, stroke_width=1.0), cell_id=f"{prefix}_inactive_1", parent=layer)
659
+ d.vertex("", 215, 145, 95, 7, rect_style(MLP_FAINT, RULE, rounded=0, stroke_width=1.0), cell_id=f"{prefix}_inactive_2", parent=layer)
660
+ d.edge(shared, selected, color=MLP, width=2.3, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
661
+ return layer, shared, selected
662
+
663
+
664
+ def candidate_block(d: Diagram, x: int, y: int) -> tuple[str, str]:
665
+ box = d.vertex(
666
+ "",
667
+ x,
668
+ y,
669
+ 340,
670
+ 210,
671
+ rect_style(WHITE, MLP, stroke_width=2.0, extra="container=1;pointerEvents=0"),
672
+ cell_id="candidate_block",
673
+ )
674
+ d.vertex("Candidate block (parallel)", 15, 12, 310, 34, text_style(21, font=MLP_DARK, bold=True, align="center"), parent=box)
675
+ tokens = token_row(
676
+ d,
677
+ "candidate_tokens",
678
+ 18,
679
+ 70,
680
+ ["t<sub>1</sub>", "t<sub>2</sub>", "t<sub>3</sub>", "⋯", "t<sub>16</sub>"],
681
+ ["plain"] * 5,
682
+ cell_w=48,
683
+ gap=10,
684
+ parent=box,
685
+ font_size=21,
686
+ )
687
+ bus = d.vertex("", 35, 166, 270, 3, rect_style(MLP, MLP, rounded=0, stroke_width=0), cell_id="candidate_parallel_bus", parent=box)
688
+ for idx in [0, 2, 4]:
689
+ d.edge(bus, tokens[idx], color=MLP, width=1.6, exit_xy=((idx + 1) / 6, 0), entry_xy=(0.5, 1))
690
+ return box, bus
691
+
692
+
693
+ def verification_box(d: Diagram, x: int, y: int) -> str:
694
+ box = d.vertex(
695
+ "",
696
+ x,
697
+ y,
698
+ 320,
699
+ 230,
700
+ rect_style(FROZEN_FILL, FROZEN, stroke_width=2.0, extra="container=1;pointerEvents=0"),
701
+ cell_id="target_verification",
702
+ )
703
+ d.vertex("Target verification", 15, 12, 290, 36, text_style(24, font=FROZEN_DARK, bold=True, align="center"), parent=box)
704
+ token_row(
705
+ d,
706
+ "verify_tokens",
707
+ 32,
708
+ 66,
709
+ ["t<sub>1</sub>", "t<sub>2</sub>", "t<sub>3</sub>", "t<sub>4</sub>"],
710
+ ["good", "good", "good", "correct"],
711
+ cell_w=54,
712
+ gap=10,
713
+ parent=box,
714
+ font_size=21,
715
+ )
716
+ d.vertex("✓ ✓ ✓", 40, 122, 190, 30, text_style(24, font=GOOD, bold=True, align="center"), parent=box)
717
+ d.vertex("fix", 245, 122, 45, 30, text_style(19, font=AMBER, bold=True, align="center"), parent=box)
718
+ d.vertex("Accept matching prefix", 25, 164, 270, 28, text_style(20, font=GOOD, bold=True, align="center"), parent=box)
719
+ d.vertex("Correct first mismatch", 25, 198, 270, 28, text_style(20, font=AMBER, bold=True, align="center"), parent=box)
720
+ return box
721
+
722
+
723
+ def draw_panel_c(d: Diagram, checkpoint: str) -> None:
724
+ panel_title(d, "C", "Request-routed speculative decoding", 40, 730, 760)
725
+ d.vertex("ROUTE ONCE", 40, 792, 220, 32, text_style(23, font=ROUTE_DARK, bold=True))
726
+
727
+ prompt = d.vertex("Prompt x", 40, 845, 160, 68, rect_style(WHITE, RULE, size=26, bold=True), cell_id="infer_prompt")
728
+ prefill = d.vertex("Frozen target<br>prompt pass", 240, 835, 230, 88, rect_style(FROZEN_FILL, FROZEN, font=FROZEN_DARK, size=22, bold=True), cell_id="target_prefill")
729
+ feature_box = d.vertex(
730
+ "Prompt features",
731
+ 510,
732
+ 835,
733
+ 180,
734
+ 88,
735
+ rect_style(FROZEN_FILL, FROZEN, font=FROZEN_DARK, size=20, bold=True, extra="verticalAlign=top;spacingTop=10"),
736
+ cell_id="prompt_features",
737
+ )
738
+ for idx, width in enumerate([130, 110, 90]):
739
+ d.vertex(
740
+ "",
741
+ 25,
742
+ 48 + idx * 10,
743
+ width,
744
+ 5,
745
+ rect_style(WHITE, RULE, rounded=0, stroke_width=1),
746
+ cell_id=f"prompt_feature_strip_{idx}",
747
+ parent=feature_box,
748
+ )
749
+ pool = d.vertex("Mean pool", 730, 845, 150, 68, rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=22, bold=True), cell_id="infer_mean_pool")
750
+ router = d.vertex("Request router", 920, 845, 190, 68, rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=22, bold=True), cell_id="infer_request_router")
751
+ choice = d.vertex(
752
+ "Predicted<br>group d<sub>pred</sub>",
753
+ 1150,
754
+ 835,
755
+ 130,
756
+ 88,
757
+ rect_style(ROUTE_FILL, ROUTE, font=ROUTE_DARK, size=20, bold=True, stroke_width=2.2),
758
+ cell_id="route_choice",
759
+ )
760
+ lock = d.vertex(
761
+ "LOCK",
762
+ 1320,
763
+ 845,
764
+ 90,
765
+ 68,
766
+ rect_style(WHITE, ROUTE, font=ROUTE_DARK, size=20, bold=True, stroke_width=2.2),
767
+ cell_id="route_lock",
768
+ )
769
+ d.edge(prompt, prefill, width=2.1, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
770
+ d.edge(prefill, feature_box, color=FROZEN_DARK, width=1.8, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
771
+ d.edge(feature_box, pool, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
772
+ d.edge(pool, router, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
773
+ d.edge(router, choice, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
774
+ d.edge(choice, lock, color=ROUTE, width=1.9, exit_xy=(1, 0.5), entry_xy=(0, 0.5), end_arrow="none")
775
+
776
+ d.vertex("One decision per request", 1460, 825, 360, 34, text_style(25, font=ROUTE_DARK, bold=True))
777
+ d.vertex("cycle 1 — cycle 2 — ⋯ — cycle T", 1460, 866, 520, 32, text_style(23, font=ROUTE_DARK))
778
+ d.vertex("Fixed for all layers and cycles", 1460, 904, 420, 30, text_style(22, font=ROUTE_DARK, bold=True))
779
+
780
+ loaded = d.vertex("Trained MoS checkpoint", 2110, 835, 250, 72, rect_style(SURFACE, RULE, font=MUTED, size=21, bold=True), cell_id="loaded_checkpoint")
781
+ d.edge(checkpoint, loaded, color=MUTED, width=1.6, dashed=True, exit_xy=(0.75, 1), entry_xy=(0.75, 0), points=[(2300, 690), (2300, 810)])
782
+
783
+ d.vertex("DATA PATH", 40, 950, 180, 32, text_style(23, font=MUTED, bold=True))
784
+ context = d.vertex("Target context<br><b>z<sub>t</sub></b>", 40, 1000, 190, 70, rect_style(SHARED_FILL, SHARED, font=SHARED_DARK, size=22, bold=True), cell_id="infer_context")
785
+ masked = d.vertex("Masked block<br><b>[M] [M] [M]</b>", 40, 1110, 190, 70, rect_style(GOOD_FILL, GOOD, font=GOOD, size=21, bold=True), cell_id="infer_masked")
786
+ d.edge(
787
+ prefill,
788
+ context,
789
+ color=SHARED,
790
+ width=1.8,
791
+ exit_xy=(0.05, 1),
792
+ entry_xy=(1, 0.5),
793
+ points=[(250, 975), (250, 1035)],
794
+ )
795
+
796
+ path = d.vertex(
797
+ "",
798
+ 290,
799
+ 950,
800
+ 1220,
801
+ 280,
802
+ rect_style(SURFACE, INK, stroke_width=2.0, extra="container=1;pointerEvents=0"),
803
+ cell_id="selected_path",
804
+ )
805
+ d.vertex("Selected MoS path", 20, 12, 300, 34, text_style(27, bold=True), parent=path)
806
+ d.vertex("fixed group d<sub>pred</sub> for the whole request", 670, 14, 520, 30, text_style(21, font=MLP_DARK, bold=True, align="right"), parent=path)
807
+ layer_1, shared_1, selected_1 = inference_layer(d, "infer_1", 20, "Layer 1", "MLP<sub>1</sub>", parent=path)
808
+ layer_2, shared_2, selected_2 = inference_layer(d, "infer_2", 420, "Layer 2", "MLP<sub>2</sub>", parent=path)
809
+ layer_l, shared_l, selected_l = inference_layer(d, "infer_l", 820, "Layer L", "MLP<sub>L</sub>", parent=path)
810
+ d.edge(context, shared_1, color=SHARED, width=2.0, exit_xy=(1, 0.5), entry_xy=(0, 0.3), points=[(260, 1035), (290, 1035)])
811
+ d.edge(masked, shared_1, color=GOOD, width=2.0, exit_xy=(1, 0.5), entry_xy=(0, 0.75), points=[(260, 1145), (290, 1145)])
812
+ d.edge(selected_1, shared_2, color=MLP, width=2.6, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
813
+ d.edge(selected_2, shared_l, color=MLP, width=2.6, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
814
+ d.vertex("Other MLP groups are not evaluated or merged", 250, 242, 720, 26, text_style(20, font=MUTED, bold=True, align="center"), parent=path)
815
+
816
+ candidate, candidate_bus = candidate_block(d, 1550, 970)
817
+ d.edge(selected_l, candidate_bus, color=MLP, width=2.6, exit_xy=(1, 0.5), entry_xy=(0, 0.5), points=[(1530, 1110)])
818
+ verify = verification_box(d, 1910, 950)
819
+ d.edge(candidate, verify, width=2.1, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
820
+ response = d.vertex("Response", 2250, 1025, 140, 72, rect_style(WHITE, RULE, size=21, bold=True), cell_id="response_output")
821
+ d.edge(verify, response, width=2.1, exit_xy=(1, 0.5), entry_xy=(0, 0.5))
822
+
823
+ d.vertex("Accepted or corrected tokens start the next verification cycle", 560, 1260, 900, 32, text_style(22, font=MUTED, bold=True, align="center"), cell_id="cycle_note")
824
+ d.edge(verify, context, color=FROZEN_DARK, width=1.6, exit_xy=(0.5, 1), entry_xy=(0, 0.5), points=[(2070, 1310), (20, 1310), (20, 1035)])
825
+
826
+ roles = [
827
+ (SHARED_FILL, SHARED, "shared"),
828
+ (MLP_FILL, MLP, "selected MLP"),
829
+ (ROUTE_FILL, ROUTE, "routing"),
830
+ (FROZEN_FILL, FROZEN, "frozen / inactive"),
831
+ ]
832
+ for idx, (fill, stroke, label) in enumerate(roles):
833
+ x = 40 + idx * 260
834
+ d.vertex("", x, 1360, 34, 24, rect_style(fill, stroke, rounded=0, stroke_width=1.6), cell_id=f"legend_swatch_{idx}")
835
+ d.vertex(label, x + 46, 1354, 200, 36, text_style(21, font=MUTED, bold=True), cell_id=f"legend_label_{idx}")
836
+ d.vertex("Exact verification preserves the target distribution", 1500, 1354, 860, 36, text_style(22, font=MUTED, bold=True, align="right"), cell_id="exactness_note")
837
+
838
+
839
+ def build() -> Diagram:
840
+ diagram = Diagram()
841
+ add_separator(diagram, 700, 20, 2, 650)
842
+ add_separator(diagram, 30, 700, 2240, 2)
843
+ add_separator(diagram, 2330, 700, 40, 2)
844
+ draw_panel_a(diagram)
845
+ panel_b = draw_panel_b(diagram)
846
+ draw_panel_c(diagram, panel_b["checkpoint"])
847
+ return diagram
848
+
849
+
850
+ def main() -> None:
851
+ args = parse_args()
852
+ build().save(args.output)
853
+
854
+
855
+ if __name__ == "__main__":
856
+ main()
recipes/plotting/v1/fig_5arm_per_domain.py ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import matplotlib
2
+ matplotlib.use("Agg")
3
+ import matplotlib.pyplot as plt
4
+ import numpy as np
5
+
6
+ domains = ["code", "math", "factual_qa", "creative_writing", "general"]
7
+ nan = np.nan
8
+ series = [
9
+ ("D0 (base)", [2.44, 3.38, 2.23, 2.11, 2.43], "#cfd8dc"),
10
+ ("small-data spec.", [3.16, 4.49, 2.68, 2.54, 2.91], "#90a4ae"),
11
+ ("warm spec.", [3.20, 4.68, 2.86, 2.67, 3.06], "#607d8b"),
12
+ ("Generalist", [3.205, 4.698, 2.814, 2.651, 3.086], "#1565c0"),
13
+ ("big-data spec. 250k",[3.340, 5.190, 2.932, 2.861, 3.117], "#2e7d32"),
14
+ ]
15
+ x = np.arange(len(domains)); n = len(series); w = 0.16
16
+ fig, ax = plt.subplots(figsize=(10.5, 5.2))
17
+ for i, (name, vals, c) in enumerate(series):
18
+ off = (i - (n-1)/2) * w
19
+ bars = ax.bar(x + off, vals, w, label=name, color=c)
20
+ for b, v in zip(bars, vals):
21
+ if not np.isnan(v):
22
+ ax.text(b.get_x()+b.get_width()/2, v+0.02, f"{v:.2f}",
23
+ ha="center", va="bottom", fontsize=7, rotation=90)
24
+ # mark big-data wins (code, math)
25
+ ax.annotate("+0.135", xy=(x[0]+2*w, 3.34), xytext=(x[0]+2*w, 3.72),
26
+ ha="center", fontsize=10, fontweight="bold",
27
+ arrowprops=dict(arrowstyle="->", color="#2e7d32", lw=1.4))
28
+ ax.annotate("+0.49", xy=(x[1]+2*w, 5.19), xytext=(x[1]+2*w, 5.60),
29
+ ha="center", fontsize=10, fontweight="bold",
30
+ arrowprops=dict(arrowstyle="->", color="#2e7d32", lw=1.4))
31
+ ax.annotate("+0.118", xy=(x[2]+2*w, 2.93), xytext=(x[2]+2*w, 3.30),
32
+ ha="center", fontsize=10, fontweight="bold",
33
+ arrowprops=dict(arrowstyle="->", color="#2e7d32", lw=1.4))
34
+ ax.annotate("+0.21", xy=(x[3]+2*w, 2.86), xytext=(x[3]+2*w, 3.25),
35
+ ha="center", fontsize=10, fontweight="bold",
36
+ arrowprops=dict(arrowstyle="->", color="#2e7d32", lw=1.4))
37
+ ax.annotate("+0.03", xy=(x[4]+2*w, 3.12), xytext=(x[4]+2*w, 3.50),
38
+ ha="center", fontsize=9, color="#555",
39
+ arrowprops=dict(arrowstyle="->", color="#999", lw=1.0))
40
+ ax.set_xticks(x); ax.set_xticklabels(domains)
41
+ ax.set_ylabel("held-out accept length (AL)")
42
+ ax.set_ylim(2.0, 5.85)
43
+ ax.set_title("Per-domain AL: D0 / small-data / warm / Generalist / big-data(250k) specialist\n"
44
+ "(big-data 5/5: math +0.49, creative_writing +0.21, code +0.135, factual_qa +0.118, general +0.03)")
45
+ ax.legend(ncol=5, loc="upper center", fontsize=8.5, framealpha=0.9)
46
+ ax.grid(axis="y", ls=":", alpha=0.5)
47
+ fig.tight_layout()
48
+ fig.savefig("reasonmix_5arm_per_domain.png", dpi=130)
49
+ print("OK")
recipes/plotting/v1/fig_code250k_vs_gen.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import matplotlib
2
+ matplotlib.use("Agg")
3
+ import matplotlib.pyplot as plt
4
+ import numpy as np
5
+
6
+ epochs = ["ep0", "ep1", "ep2", "ep3"]
7
+ gen = [3.072, 3.150, 3.205, 3.204] # generalist on code held-out
8
+ spec = [3.191, 3.268, 3.340, 3.339] # code250k specialist on code held-out
9
+ x = np.arange(len(epochs)); w = 0.38
10
+
11
+ fig, ax = plt.subplots(figsize=(7.2, 4.6))
12
+ b1 = ax.bar(x - w/2, gen, w, label="generalist (mixed 250k, 91k code)", color="#9aa7b8")
13
+ b2 = ax.bar(x + w/2, spec, w, label="code specialist (from D0, 250k code)", color="#2e7d32")
14
+
15
+ ax.axhline(3.205, ls="--", lw=1.2, color="#9aa7b8")
16
+ ax.axhline(3.340, ls="--", lw=1.2, color="#2e7d32")
17
+ ax.annotate("", xy=(3.34, 3.340), xytext=(3.34, 3.205),
18
+ arrowprops=dict(arrowstyle="<->", color="black", lw=1.3))
19
+ ax.text(3.0, (3.205+3.340)/2, "+0.135", fontsize=12, fontweight="bold", va="center")
20
+
21
+ for b in list(b1)+list(b2):
22
+ ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.006,
23
+ f"{b.get_height():.3f}", ha="center", va="bottom", fontsize=8.5)
24
+
25
+ ax.set_xticks(x); ax.set_xticklabels(epochs)
26
+ ax.set_ylim(3.0, 3.42)
27
+ ax.set_ylabel("code held-out accept length (AL)")
28
+ ax.set_title("code: 250k single-domain specialist vs generalist (per-epoch, held-out=89)")
29
+ ax.legend(loc="lower right", fontsize=9)
30
+ ax.grid(axis="y", ls=":", alpha=0.5)
31
+ fig.tight_layout()
32
+ fig.savefig("code250k_vs_gen.png", dpi=130)
33
+ print("OK")
recipes/plotting/v1/fig_exp1_forgetting.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Exp 1 forgetting trajectories: continue-train the GENERALIST on ONE domain (math / code),
3
+ # full-param (B) vs MLP-only/frozen-attn (A), baseline (k5clean) data, eval every epoch on all 5 domains.
4
+ # Shows: target domain rises; OTHER domains drop (forgetting) EVEN WITH MLP-only -> forgetting lives in the MLP.
5
+ import matplotlib; matplotlib.use("Agg")
6
+ import matplotlib.pyplot as plt
7
+ import numpy as np
8
+
9
+ EP = list(range(6))
10
+ DOMS = ["code", "math", "factual_qa", "creative_writing", "general"]
11
+ GEN = {"code": 3.209, "math": 4.698, "factual_qa": 2.814, "creative_writing": 2.636, "general": 3.049}
12
+
13
+ # [trained_domain][arm][eval_domain] = per-epoch AL (ep0..ep5)
14
+ DATA = {
15
+ "math": {
16
+ "B": {"code":[3.183,3.163,3.143,3.166,3.161,3.157],"math":[4.777,4.758,4.843,4.915,4.907,4.912],
17
+ "factual_qa":[2.844,2.741,2.760,2.743,2.758,2.809],"creative_writing":[2.606,2.618,2.567,2.599,2.584,2.579],
18
+ "general":[3.040,3.029,3.031,3.033,3.064,3.048]},
19
+ "A": {"code":[3.177,3.183,3.153,3.178,3.169,3.188],"math":[4.748,4.781,4.798,4.800,4.842,4.847],
20
+ "factual_qa":[2.834,2.765,2.766,2.747,2.830,2.769],"creative_writing":[2.663,2.596,2.599,2.628,2.629,2.606],
21
+ "general":[3.067,3.046,3.039,3.075,3.090,3.056]},
22
+ },
23
+ "code": {
24
+ "B": {"code":[3.208,3.239,3.296,3.303,3.329,3.338],"math":[4.630,4.646,4.583,4.574,4.559,4.578],
25
+ "factual_qa":[2.781,2.739,2.820,2.747,2.753,2.744],"creative_writing":[2.602,2.569,2.572,2.590,2.633,2.598],
26
+ "general":[3.017,3.029,3.030,3.021,3.022,3.048]},
27
+ "A": {"code":[3.226,3.261,3.263,3.308,3.304,3.334],"math":[4.665,4.613,4.580,4.600,4.575,4.585],
28
+ "factual_qa":[2.815,2.839,2.766,2.767,2.746,2.812],"creative_writing":[2.630,2.631,2.622,2.617,2.613,2.609],
29
+ "general":[3.055,3.042,3.048,3.065,3.042,3.033]},
30
+ },
31
+ }
32
+
33
+ fig, axes = plt.subplots(2, 5, figsize=(18, 6.8), sharex=True)
34
+ for r, trained in enumerate(["math", "code"]):
35
+ for c, ed in enumerate(DOMS):
36
+ ax = axes[r][c]
37
+ is_target = (ed == trained)
38
+ ax.plot(EP, DATA[trained]["B"][ed], "o-", color="#2e7d32", lw=1.8, ms=4, label="full-param (B)")
39
+ ax.plot(EP, DATA[trained]["A"][ed], "s-", color="#e67e22", lw=1.8, ms=4, label="MLP-only / frozen-attn (A)")
40
+ ax.axhline(GEN[ed], ls="--", color="#888", lw=1.2, label="Generalist (start)")
41
+ ax.set_title(f"eval={ed}" + (" ◀ TARGET" if is_target else ""),
42
+ fontsize=9.5, fontweight=("bold" if is_target else "normal"),
43
+ color=("#1a1a1a" if is_target else "#555"))
44
+ ax.grid(alpha=0.3)
45
+ if is_target:
46
+ ax.set_facecolor("#eef7ee")
47
+ if c == 0:
48
+ ax.set_ylabel(f"train on {trained.upper()}\nheld-out AL", fontsize=10)
49
+ if r == 1:
50
+ ax.set_xlabel("epoch")
51
+ ax.tick_params(labelsize=8)
52
+ axes[0][0].legend(fontsize=7.5, loc="best")
53
+ fig.suptitle("Exp 1 — Forgetting trajectory: continue-train Generalist on ONE domain (baseline data), eval all 5 every epoch.\n"
54
+ "TARGET (green bg) rises; OTHER domains fall below Generalist (forgetting). Code→math forgetting is the same for full-param and MLP-only "
55
+ "→ forgetting lives in the MLP (router to per-domain MLP isolates it).", fontsize=11, y=1.02)
56
+ fig.tight_layout()
57
+ fig.savefig("fig_exp1_forgetting.png", dpi=135, bbox_inches="tight")
58
+ print("OK wrote /tmp/fig_exp1_forgetting.png")
recipes/plotting/v1/fig_exp1_three_recipes.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Exp1: three specialist recipes (big-data / small-data / warm-MLP) vs generalist, on each domain's own data.
3
+ # One grouped bar chart. Only big-data specialist beats generalist.
4
+ import matplotlib; matplotlib.use("Agg")
5
+ import matplotlib.pyplot as plt
6
+ import numpy as np
7
+
8
+ DOMS = ["math", "code", "fqa", "cw", "general"]
9
+ GEN = [4.698, 3.209, 2.814, 2.647, 3.086] # generalist (best single ckpt)
10
+ BIGDATA = [5.190, 3.340, 2.932, 2.861, 3.117] # big-data specialist (单域 250k), peak
11
+ SMALLDATA= [4.493, 3.162, 2.683, 2.536, 2.908] # small-data specialist (单域自然量), peak
12
+ WARM = [4.748, 3.215, 2.861, 2.671, 3.106] # warm MLP-only specialist, peak
13
+
14
+ x = np.arange(len(DOMS)); w = 0.2
15
+ fig, ax = plt.subplots(figsize=(11, 5.4))
16
+ bars = [
17
+ ax.bar(x - 1.5*w, GEN, w, label="generalist (monolithic baseline)", color="#9aa7b8"),
18
+ ax.bar(x - 0.5*w, BIGDATA, w, label="big-data specialist (250k/domain)", color="#1b5e20"),
19
+ ax.bar(x + 0.5*w, SMALLDATA, w, label="small-data specialist (natural share)", color="#c0392b"),
20
+ ax.bar(x + 1.5*w, WARM, w, label="warm specialist (MLP-only)", color="#e0a030"),
21
+ ]
22
+ for bs in bars:
23
+ for b in bs:
24
+ ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.02, f"{b.get_height():.2f}",
25
+ ha="center", va="bottom", fontsize=7)
26
+ ax.set_xticks(x); ax.set_xticklabels(DOMS)
27
+ ax.set_ylabel("held-out accept length (AL)")
28
+ ax.set_ylim(2.0, 5.7)
29
+ ax.set_title("Only the big-data specialist (250k/domain) beats the generalist on all 5 domains;\nsmall-data and warm specialists do not", fontsize=11)
30
+ ax.legend(loc="upper right", fontsize=9, ncol=2); ax.grid(axis="y", ls=":", alpha=0.4)
31
+ fig.tight_layout()
32
+ fig.savefig("fig_exp1_three_recipes.png", dpi=140, bbox_inches="tight")
33
+ print("OK wrote /tmp/fig_exp1_three_recipes.png")
recipes/plotting/v1/fig_exp4_inference.py ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Exp 4 inference cost: (A) end-to-end single-stream tok/s merged~specialist>gen; (B) serve-step component
3
+ # breakdown (decode regime) — self_attn dominates, the lm_head "giant" is only ~6.5%.
4
+ import matplotlib; matplotlib.use("Agg")
5
+ import matplotlib.pyplot as plt
6
+ import numpy as np
7
+
8
+ ARMS = ["generalist", "merged", "specialist"]
9
+ TOKS = [505.1, 567.3, 559.8] # single-stream tok/s (batch=1, fa3, math held-out)
10
+ AL = [4.69, 5.32, 5.24]
11
+ COL = {"generalist": "#9aa7b8", "merged": "#2e7d32", "specialist": "#b8860b"}
12
+
13
+ fig, (axA, axB) = plt.subplots(1, 2, figsize=(12.5, 5.0))
14
+
15
+ # --- Panel A: end-to-end tok/s ---
16
+ x = np.arange(len(ARMS))
17
+ bars = axA.bar(x, TOKS, width=0.6, color=[COL[a] for a in ARMS])
18
+ for i, b in enumerate(bars):
19
+ axA.text(b.get_x()+b.get_width()/2, b.get_height()+3, f"{TOKS[i]:.0f}\nAL {AL[i]:.2f}",
20
+ ha="center", va="bottom", fontsize=9)
21
+ axA.set_xticks(x); axA.set_xticklabels(ARMS)
22
+ axA.set_ylabel("single-stream throughput (tok/s)")
23
+ axA.set_ylim(0, 640)
24
+ axA.set_title("A. End-to-end speed (math, batch=1)\nmerged 567 ≈ specialist 560, +12% over generalist 505", fontsize=10.5)
25
+ axA.text(0.5, 0.04, "merged delivers specialist-level speed at single-model per-token cost",
26
+ transform=axA.transAxes, ha="center", fontsize=8.5, style="italic", color="#444")
27
+ axA.grid(axis="y", ls=":", alpha=0.4)
28
+
29
+ # --- Panel B: serve-step component breakdown (ms), all arms ~identical -> show one ---
30
+ comp_names = ["self_attn\n(5L)", "draft_other\n(embed/norm/\nresidual/cache)", "mlp\n(5L)", "lm_head\n(GIANT)"]
31
+ comp_ms = [2.806, 1.487, 0.641, 0.342]
32
+ comp_col = ["#c0392b", "#7f8c8d", "#2980b9", "#f1c40f"]
33
+ full = sum(comp_ms)
34
+ xb = np.arange(len(comp_names))
35
+ bb = axB.bar(xb, comp_ms, width=0.6, color=comp_col)
36
+ for i, b in enumerate(bb):
37
+ axB.text(b.get_x()+b.get_width()/2, b.get_height()+0.03, f"{comp_ms[i]:.2f}ms\n{100*comp_ms[i]/full:.0f}%",
38
+ ha="center", va="bottom", fontsize=8.5)
39
+ axB.set_xticks(xb); axB.set_xticklabels(comp_names, fontsize=8)
40
+ axB.set_ylabel("serve-step time (ms, decode block of 16)")
41
+ axB.set_ylim(0, 3.4)
42
+ axB.set_title("B. Where the drafter step spends time (decode regime)\nself_attn dominates (53%); the lm_head 'giant' is only 6.5%", fontsize=10.5)
43
+ axB.text(0.5, 0.92, "per-forward step ≈ identical across all 3 arms (within 1.5%)",
44
+ transform=axB.transAxes, ha="center", fontsize=8.5, style="italic", color="#444")
45
+ axB.grid(axis="y", ls=":", alpha=0.4)
46
+
47
+ fig.suptitle("Exp 4 — Merged drafter: single-model per-token cost, specialist-level throughput, negligible router (0.0002 ms/tok)",
48
+ fontsize=11.5, y=1.02)
49
+ fig.tight_layout()
50
+ fig.savefig("fig_exp4_inference.png", dpi=140, bbox_inches="tight")
51
+ print("OK wrote /tmp/fig_exp4_inference.png")
recipes/plotting/v1/fig_exp5_method_vs_data.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Exp6 method>data: at the SAME data budget, three tiers per domain —
3
+ # naive (from D0, before our fix; LOSES gen) < generalist < CorDA-MoS warm-from-gen (OURS; beats gen).
4
+ # Shows how much our method (warm-from-gen + CorDA fusion) advances over the naive same-data attempt.
5
+ import matplotlib; matplotlib.use("Agg")
6
+ import matplotlib.pyplot as plt
7
+ import numpy as np
8
+
9
+ # ascending by our method -> tallest (math) at the right. OURS = saturated (8-epoch) per-domain peaks.
10
+ DOMS = ["cw", "fqa", "general", "code", "math"]
11
+ NAIVE = [2.591, 2.775, 3.000, 3.211, 4.632] # naive same-data CorDA-MoS from D0 (per-domain peak) — loses gen
12
+ GEN = [2.647, 2.814, 3.049, 3.204, 4.698] # generalist, single best-avg checkpoint
13
+ MOS = [2.721, 2.907, 3.108, 3.338, 4.922] # CorDA-MoS warm-from-gen, SATURATED per-domain peak — OURS
14
+
15
+ x = np.arange(len(DOMS)); w = 0.27
16
+ fig, ax = plt.subplots(figsize=(10.5, 5.4))
17
+ b0 = ax.bar(x - w, NAIVE, w, label="naive same-data (from D0, before warm-start) — loses", color="#c0392b")
18
+ b1 = ax.bar(x, GEN, w, label="generalist (same 250k data)", color="#9aa7b8")
19
+ b2 = ax.bar(x + w, MOS, w, label="CorDA-MoS warm-from-gen (OURS, same data) — wins", color="#1b5e20")
20
+ for bars in (b0, b1, b2):
21
+ for b in bars:
22
+ ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.02, f"{b.get_height():.2f}", ha="center", va="bottom", fontsize=7.5)
23
+ # show the advance our method makes over the naive version
24
+ for j in range(len(DOMS)):
25
+ gain = MOS[j] - NAIVE[j]
26
+ ax.text(x[j]+w, MOS[j]+0.20, f"+{gain:.2f} vs naive", ha="center", fontsize=7, color="#1b5e20", fontweight="bold")
27
+ ax.set_xticks(x); ax.set_xticklabels(DOMS)
28
+ ax.set_ylabel("held-out accept length (AL)")
29
+ ax.set_ylim(2.0, 5.4)
30
+ ax.set_title("Method > Data (same 250k): naive same-data split (from D0) LOSES to gen;\n"
31
+ "our warm-from-gen CorDA-MoS BEATS gen on all 5 domains — the gap shows the method's contribution", fontsize=10.5)
32
+ ax.legend(loc="upper left", fontsize=8.5); ax.grid(axis="y", ls=":", alpha=0.4)
33
+ ax.text(0.58, 0.74, f"avg AL: naive {np.mean(NAIVE):.3f} < gen {np.mean(GEN):.3f} < ours {np.mean(MOS):.3f}",
34
+ transform=ax.transAxes, fontsize=9.5, va="top", ha="center",
35
+ bbox=dict(boxstyle="round,pad=0.3", fc="#e8f3e8", ec="#1b5e20"))
36
+ fig.tight_layout()
37
+ fig.savefig("fig_exp5_method_vs_data.png", dpi=140, bbox_inches="tight")
38
+ print("OK wrote /tmp/fig_exp5_method_vs_data.png")
recipes/plotting/v1/fig_fusion_combined.py ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Combined fusion figure (replaces separate Exp3 + Exp6 figs):
3
+ # per domain, three bars — generalist (baseline) -> small-data fusion (CorDA-MoS warm, SAME data as gen)
4
+ # -> big-data fusion (merged 5 big-data specialists). Shows the fusion ladder: method gain (same data),
5
+ # then method+data gain.
6
+ import matplotlib; matplotlib.use("Agg")
7
+ import matplotlib.pyplot as plt
8
+ import numpy as np
9
+ DOMS = ["cw", "fqa", "general", "code", "math"] # ascending -> math tallest at right
10
+ GEN = [2.647, 2.814, 3.049, 3.204, 4.698] # generalist (single ckpt) avg 3.282
11
+ SMALLFUS = [2.721, 2.907, 3.108, 3.338, 4.922] # CorDA-MoS warm, SAME 250k data avg 3.399
12
+ BIGFUS = [2.857, 3.061, 3.227, 3.392, 5.247] # merged big-data drafter (250k/dom) avg 3.557
13
+ x = np.arange(len(DOMS)); w = 0.27
14
+ fig, ax = plt.subplots(figsize=(11, 5.6))
15
+ b0 = ax.bar(x - w, GEN, w, label=f"generalist (baseline) avg {np.mean(GEN):.3f}", color="#9aa7b8")
16
+ b1 = ax.bar(x, SMALLFUS, w, label=f"small-data fusion · CorDA-MoS (SAME data as gen) avg {np.mean(SMALLFUS):.3f}", color="#2a7fb8")
17
+ b2 = ax.bar(x + w, BIGFUS, w, label=f"big-data fusion · merged drafter (250k/domain) avg {np.mean(BIGFUS):.3f}", color="#1b5e20")
18
+ for bars in (b0, b1, b2):
19
+ for b in bars:
20
+ ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.02, f"{b.get_height():.2f}", ha="center", va="bottom", fontsize=7.5)
21
+ ax.set_xticks(x); ax.set_xticklabels(DOMS)
22
+ ax.set_ylabel("held-out accept length (AL)"); ax.set_ylim(2.2, 5.6)
23
+ ax.set_title("Fusion ladder: same-data fusion already beats the generalist on all 5 domains (method),\n"
24
+ "more data per domain lifts it further — both share ONE attention (inference cost = one drafter)", fontsize=10.5)
25
+ ax.legend(loc="upper left", fontsize=8.6); ax.grid(axis="y", ls=":", alpha=0.4)
26
+ ax.text(0.60, 0.70, f"avg AL: gen {np.mean(GEN):.3f} < small-data fusion {np.mean(SMALLFUS):.3f} < big-data fusion {np.mean(BIGFUS):.3f}",
27
+ transform=ax.transAxes, fontsize=9.5, va="top", ha="center",
28
+ bbox=dict(boxstyle="round,pad=0.3", fc="#e8f3e8", ec="#1b5e20"))
29
+ fig.tight_layout()
30
+ fig.savefig("fig_fusion_combined.png", dpi=140, bbox_inches="tight")
31
+ print("OK wrote fig_fusion_combined.png")
recipes/plotting/v1/fig_matrix_and_arms.py ADDED
@@ -0,0 +1,118 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Forgetting matrix + per-arm epoch-matched comparisons (reasonmix DFlash).
3
+ # All numbers baked from same-protocol bench (DFLASH 8,1,1,16, ROUTED=0, thinking-on, reasonmix held-out).
4
+ import matplotlib; matplotlib.use("Agg")
5
+ import matplotlib.pyplot as plt
6
+ from matplotlib.colors import LinearSegmentedColormap
7
+ from matplotlib.patches import Rectangle
8
+ import numpy as np
9
+ import os
10
+
11
+ OUT = os.environ.get("MOS_FIG_OUT", ".")
12
+ DOM = ["code", "math", "factual_qa", "creative_writing", "general"]
13
+ SHORT = ["code", "math", "fqa", "cw", "general"]
14
+
15
+ # ---------- FIG 1: 5x5 forgetting matrix (same-protocol) ----------
16
+ SPECS = ["code", "math", "factual_qa", "creative_writing", "general"]
17
+ M = np.array([
18
+ [3.340, 4.094, 2.612, 2.419, 2.847], # code-spec
19
+ [2.853, 5.190, 2.501, 2.296, 2.842], # math-spec
20
+ [2.914, 4.278, 2.902, 2.491, 3.026], # factual_qa-spec
21
+ [2.805, 3.892, 2.707, 2.861, 2.948], # cw-spec
22
+ [2.992, 4.614, 2.773, 2.627, 3.117], # general-spec
23
+ ])
24
+ GEN = np.array([3.209, 4.698, 2.814, 2.636, 3.049]) # generalist (same protocol, ep3)
25
+ D = M - GEN[None, :] # delta vs generalist, per column
26
+
27
+ matrix_short = ["Code", "Math", "Fact.", "Creat.", "Gen."]
28
+ paper_fs = 9.6 # remains at least 9 pt after final single-column placement
29
+ paper_diverging = LinearSegmentedColormap.from_list(
30
+ "paper_diverging", ["#c6dbef", "#ffffff", "#fdd0a2"]
31
+ )
32
+ fig, ax = plt.subplots(figsize=(3.3, 3.0))
33
+ vmax = np.abs(D).max()
34
+ im = ax.imshow(D, cmap=paper_diverging, vmin=-vmax, vmax=vmax, aspect="auto")
35
+ for i in range(5):
36
+ for j in range(5):
37
+ delta = f"{D[i,j]:+.2f}".replace("+0.", "+.").replace("-0.", "-.")
38
+ ax.text(j, i, f"{M[i,j]:.2f}\n{delta}", ha="center", va="center",
39
+ fontsize=paper_fs, linespacing=0.95,
40
+ fontweight=("bold" if i == j else "normal"))
41
+ if i == j:
42
+ ax.add_patch(Rectangle((j - 0.46, i - 0.46), 0.92, 0.92,
43
+ fill=False, edgecolor="black", linewidth=1.0))
44
+ ax.set_xticks(range(5)); ax.set_xticklabels(matrix_short, fontsize=paper_fs)
45
+ ax.set_yticks(range(5)); ax.set_yticklabels(matrix_short, fontsize=paper_fs)
46
+ ax.set_xlabel("Evaluation domain", fontsize=paper_fs, labelpad=3)
47
+ ax.set_ylabel("Specialist", fontsize=paper_fs, labelpad=3)
48
+ ax.tick_params(axis="both", labelsize=paper_fs, width=0.6, length=2.5)
49
+ for spine in ax.spines.values():
50
+ spine.set_linewidth(0.6)
51
+ cb = fig.colorbar(im, ax=ax, fraction=0.050, pad=0.025)
52
+ cb.set_label(r"$\Delta$ AL vs. generalist", fontsize=paper_fs, labelpad=3)
53
+ cb.ax.tick_params(labelsize=paper_fs, width=0.6, length=2.5)
54
+ cb.outline.set_linewidth(0.6)
55
+ fig.tight_layout(pad=0.25)
56
+ fig.savefig(f"{OUT}/fig_forgetting_matrix.png", dpi=300, bbox_inches="tight")
57
+ plt.close(fig)
58
+
59
+ # ---------- generic per-arm grouped-bar (epoch-matched: arm@best vs gen@same epoch) ----------
60
+ def arm_vs_gen(fname, title, spec, gen, ep_lbl, spec_name, spec_color):
61
+ x = np.arange(5); w = 0.38
62
+ fig, ax = plt.subplots(figsize=(8.4, 4.8))
63
+ b1 = ax.bar(x - w/2, gen, w, label="Generalist (same epoch)", color="#9aa7b8")
64
+ b2 = ax.bar(x + w/2, spec, w, label=spec_name, color=spec_color)
65
+ for bars in (b1, b2):
66
+ for b in bars:
67
+ ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.02, f"{b.get_height():.2f}",
68
+ ha="center", va="bottom", fontsize=8)
69
+ for j in range(5):
70
+ d = spec[j] - gen[j]
71
+ ax.text(x[j], max(spec[j], gen[j]) + 0.16, f"{d:+.3f}", ha="center", fontsize=9,
72
+ fontweight="bold", color=("#2e7d32" if d > 0 else "#c62828"))
73
+ ax.text(x[j], min(spec[j], gen[j]) - 0.001, ep_lbl[j], ha="center", va="top", fontsize=7, color="#555")
74
+ ax.set_xticks(x); ax.set_xticklabels(SHORT)
75
+ ax.set_ylabel("held-out accept length (AL)")
76
+ ax.set_ylim(2.0, max(spec.max(), gen.max()) + 0.5)
77
+ ax.set_title(title, fontsize=11)
78
+ ax.legend(loc="upper left", fontsize=9); ax.grid(axis="y", ls=":", alpha=0.4)
79
+ fig.tight_layout(); fig.savefig(f"{OUT}/{fname}", dpi=140, bbox_inches="tight"); plt.close(fig)
80
+
81
+ # FIG 2: big-data specialist (250k, full params, from D0) — best epoch vs gen@same epoch
82
+ bd_spec = np.array([3.340, 5.190, 2.932, 2.861, 3.117]); bd_gen = np.array([3.205, 4.698, 2.767, 2.651, 3.075])
83
+ bd_ep = ["ep2", "ep3", "ep2", "ep3", "ep3"]
84
+ arm_vs_gen("fig_bigdata_vs_gen.png",
85
+ "Big-data specialist (250k single-domain, full params, from D0)\nspecialist@best-epoch vs Generalist@same-epoch",
86
+ bd_spec, bd_gen, bd_ep, "Big-data specialist", "#2e7d32")
87
+
88
+ # FIG 3: small-data specialist (oracle: baseline volume, full params, from D0) — SEPARATE
89
+ sd_spec = np.array([3.162, 4.493, 2.683, 2.536, 2.908]); sd_gen = np.array([3.205, 4.694, 2.814, 2.596, 3.075])
90
+ sd_ep = ["ep2", "ep2", "ep3", "ep1", "ep3"]
91
+ arm_vs_gen("fig_smalldata_vs_gen.png",
92
+ "Small-data specialist (baseline volume, full params, from D0)\nspecialist@best-epoch vs Generalist@same-epoch (loses on every domain)",
93
+ sd_spec, sd_gen, sd_ep, "Small-data specialist", "#607d8b")
94
+
95
+ # ---------- FIG 4: warm specialist (cleanA: MLP-only, frozen backbone, from generalist) saturation ----------
96
+ warm = {
97
+ "code": ([700, 1400, 2100, 2800, 2840], [3.210, 3.214, 3.208, 3.215, 3.198]),
98
+ "math": ([250, 500, 750, 984], [4.748, 4.690, 4.681, 4.675]),
99
+ "factual_qa": ([350, 700, 1050, 1390], [2.789, 2.843, 2.790, 2.861]),
100
+ "creative_writing": ([230, 460, 690, 913], [2.670, 2.654, 2.646, 2.671]),
101
+ "general": ([420, 840, 1260, 1674], [3.106, 3.093, 3.079, 3.058]),
102
+ }
103
+ warm_gen = {"code": 3.205, "math": 4.698, "factual_qa": 2.814, "creative_writing": 2.651, "general": 3.086}
104
+ fig, axes = plt.subplots(1, 5, figsize=(15, 3.4))
105
+ for ax, d, s in zip(axes, DOM, SHORT):
106
+ steps, al = warm[d]; frac = np.array(steps) / steps[-1]
107
+ ax.plot(frac, al, "o-", color="#b8860b", lw=1.8, label="warm spec (MLP-only)")
108
+ ax.axhline(warm_gen[d], ls="--", color="#1565c0", lw=1.3, label="Generalist (start)")
109
+ ax.set_title(s, fontsize=10); ax.set_xlabel("frac of 1 epoch"); ax.grid(alpha=0.3)
110
+ ax.set_xlim(0, 1.02)
111
+ lo = min(al + [warm_gen[d]]); hi = max(al + [warm_gen[d]])
112
+ ax.set_ylim(lo - 0.04, hi + 0.04)
113
+ axes[0].set_ylabel("held-out AL"); axes[0].legend(fontsize=7, loc="lower right")
114
+ fig.suptitle("Warm spec (continue Generalist's MLP only, backbone frozen): AL stays within ~±0.04 of Generalist "
115
+ "— flat / declining (math, general), peaks early. MLP already saturated → can't push AL up.", fontsize=10.5, y=1.04)
116
+ fig.tight_layout(); fig.savefig(f"{OUT}/fig_warm_saturation.png", dpi=140, bbox_inches="tight"); plt.close(fig)
117
+
118
+ print("OK wrote: fig_forgetting_matrix.png fig_bigdata_vs_gen.png fig_smalldata_vs_gen.png fig_warm_saturation.png")
recipes/plotting/v1/fig_merged_vs_specialist.py ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ # Headline: the merged drafter (1 shared CorDA-fused attention + per-domain MLP) vs 5 separate specialists vs generalist.
3
+ import matplotlib; matplotlib.use("Agg")
4
+ import matplotlib.pyplot as plt
5
+ import numpy as np
6
+
7
+ # ordered by merged AL ascending -> tallest (math) at the right end
8
+ DOMS = ["creative_writing", "factual_qa", "general", "code", "math"]
9
+ SHORT = ["cw", "fqa", "general", "code", "math"]
10
+ GEN = [2.636, 2.814, 3.049, 3.209, 4.698]
11
+ MERGED = [2.857, 3.061, 3.227, 3.392, 5.247] # all 5 domains: MLP retrained on the fused attention
12
+ SPEC = [2.861, 2.902, 3.117, 3.340, 5.190]
13
+ RETRAINED = [True, True, True, True, True] # all retrained -> all beat their specialist
14
+
15
+ x = np.arange(len(DOMS)); w = 0.26
16
+ fig, ax = plt.subplots(figsize=(9.5, 5.0))
17
+ b1 = ax.bar(x - w, GEN, w, label="Generalist (monolithic)", color="#9aa7b8")
18
+ b2 = ax.bar(x, MERGED, w, label="Merged drafter (1 shared attn + per-domain MLP)", color="#2e7d32")
19
+ b3 = ax.bar(x + w, SPEC, w, label="5 separate specialists", color="#b8860b")
20
+ for bars in (b1, b2, b3):
21
+ for b in bars:
22
+ ax.text(b.get_x()+b.get_width()/2, b.get_height()+0.02, f"{b.get_height():.2f}",
23
+ ha="center", va="bottom", fontsize=7.5)
24
+ for j in range(len(DOMS)):
25
+ if RETRAINED[j]:
26
+ ax.text(x[j], MERGED[j]+0.18, "retrained", ha="center", fontsize=6.5, color="#2e7d32")
27
+ ax.set_xticks(x); ax.set_xticklabels(SHORT)
28
+ ax.set_ylabel("held-out accept length (AL)")
29
+ ax.set_ylim(2.0, 5.6)
30
+ ax.set_title("Merged drafter > 5 separate specialists (avg 3.557 vs 3.482) with ONE shared attention, >> generalist (3.281)\n"
31
+ "merged = CorDA-fused shared attention + per-domain MLP (all 5 retrained on the fused attn; every domain beats its specialist)", fontsize=10.5)
32
+ ax.legend(loc="upper left", fontsize=9); ax.grid(axis="y", ls=":", alpha=0.4)
33
+ # avg annotation
34
+ ax.text(0.46, 0.82, f"avg AL: merged {np.mean(MERGED):.3f} | specialists {np.mean(SPEC):.3f} | gen {np.mean(GEN):.3f}",
35
+ transform=ax.transAxes, fontsize=9, va="top",
36
+ bbox=dict(boxstyle="round,pad=0.3", fc="#eef7ee", ec="#2e7d32"))
37
+ fig.tight_layout()
38
+ fig.savefig("fig_merged_vs_specialist.png", dpi=140, bbox_inches="tight")
39
+ print("OK wrote /tmp/fig_merged_vs_specialist.png")
recipes/plotting/v1/fig_serving_specialist.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import matplotlib; matplotlib.use("Agg")
2
+ import matplotlib.pyplot as plt
3
+
4
+ # ---- fig_serving: (a) single-stream tokens/s, (b) garbage tau tradeoff ----
5
+ fig, (a, b) = plt.subplots(1, 2, figsize=(12.6, 4.4), gridspec_kw={"width_ratios": [1, 1.15]})
6
+ for ax in (a, b):
7
+ for s in ["top", "right"]: ax.spines[s].set_visible(False)
8
+ for s in ["left", "bottom"]: ax.spines[s].set_color("#c9ced6")
9
+ ax.tick_params(colors="#444", labelsize=10.5)
10
+
11
+ names = ["target only", "target +\ngeneralist drafter", "MoS, real router\n(5 experts + router)"]
12
+ tps = [184, 391, 415]
13
+ cols = ["#8a8f98", "#4DABF7", "#9C36B5"]
14
+ bars = a.barh(names, tps, color=cols, height=0.62)
15
+ a.invert_yaxis()
16
+ for r, v, al in zip(bars, tps, ["", "AL 3.40", "AL 3.65 · acc 0.878"]):
17
+ a.text(v + 6, r.get_y() + r.get_height() / 2, f"{v}", va="center", fontsize=12, fontweight="bold", color=r.get_facecolor())
18
+ if al:
19
+ a.text(8, r.get_y() + r.get_height() / 2, al, va="center", fontsize=9.5, color="white", fontweight="bold")
20
+ a.set_xlim(0, 500)
21
+ a.set_xlabel("tokens/s (single stream, H200, thinking on)", fontsize=11)
22
+ a.set_title("Serving speed with the real router", fontsize=12, fontweight="bold", loc="left")
23
+
24
+ taus = [0.2, 0.3, 0.4, 0.5, 0.6, 0.7]
25
+ junk = [60.0, 66.7, 68.9, 73.3, 73.3, 75.6]
26
+ real = [3.5, 5.5, 6.0, 6.0, 6.5, 9.5]
27
+ b.axvspan(0.4, 0.5, color="#E9FAC8", alpha=0.7, zorder=0)
28
+ b.plot(taus, junk, "o-", color="#2F9E44", lw=2.2, ms=5, label="junk requests sent to garbage (%)")
29
+ b.plot(taus, real, "s-", color="#E8590C", lw=2.2, ms=5, label="real-domain requests mis-sent (%)")
30
+ for t, j in zip(taus, junk): b.text(t, j + 2.5, f"{j:.0f}", ha="center", fontsize=9, color="#2F9E44")
31
+ for t, r_ in zip(taus, real): b.text(t, r_ + 2.5, f"{r_:.0f}", ha="center", fontsize=9, color="#E8590C")
32
+ b.text(0.45, 96, "τ = 0.4–0.5", ha="center", fontsize=10, color="#5c940d", fontweight="bold")
33
+ b.set_ylim(0, 105); b.set_xlim(0.17, 0.73)
34
+ b.set_xlabel("garbage threshold τ (raw 4-domain max prob)", fontsize=11)
35
+ b.set_ylabel("% of requests", fontsize=11)
36
+ b.set_title("Garbage fallback v1 (no training): expected AL unchanged", fontsize=12, fontweight="bold", loc="left")
37
+ b.legend(frameon=False, fontsize=9.5, loc="center right")
38
+ plt.tight_layout()
39
+ plt.savefig("fig_serving.png", dpi=150, bbox_inches="tight")
40
+
41
+ # ---- fig_specialist_overall: weighted overall bars ----
42
+ fig2, c = plt.subplots(figsize=(8.6, 4.2))
43
+ for s in ["top", "right"]: c.spines[s].set_visible(False)
44
+ for s in ["left", "bottom"]: c.spines[s].set_color("#c9ced6")
45
+ c.tick_params(colors="#444", labelsize=10.5)
46
+ labels = ["generalist", "code specialist\n(from generalist)", "code specialist\n(from scratch)", "MoS\n(from D0)", "MoS\n(from generalist)"]
47
+ vals = [3.39, 3.40, 3.18, 3.59, 3.65]
48
+ ccols = ["#8a8f98", "#C92A2A", "#5F3DC4", "#2F9E44", "#9C36B5"]
49
+ bars = c.bar(labels, vals, color=ccols, width=0.62)
50
+ for r, v in zip(bars, vals):
51
+ c.text(r.get_x() + r.get_width() / 2, v + 0.012, f"{v:.2f}", ha="center", fontsize=12, fontweight="bold", color=r.get_facecolor())
52
+ c.axhline(3.39, ls=(0, (3, 3)), lw=1.1, color="#8a8f98", alpha=0.8)
53
+ c.set_ylim(3.0, 3.78)
54
+ c.set_ylabel("AL, weighted by traffic share", fontsize=11)
55
+ c.set_title("One specialist ≈ generalist at best; MoS beats both (same active params)", fontsize=12, fontweight="bold", loc="left")
56
+ plt.tight_layout()
57
+ plt.savefig("fig_specialist_overall.png", dpi=150, bbox_inches="tight")
58
+ print("saved both")
recipes/plotting/v1/plot_main_results.py ADDED
@@ -0,0 +1,380 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Render the three-panel MoS main-results figure from frozen evidence.
3
+
4
+ All three panels use the fixed-seed, five-domain R1 evaluation. Panel (a)
5
+ compares the matched-domain profiles of the Generalist and the two MoS
6
+ initializations; panels (b)--(c) show the corresponding MoS routing matrices.
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import argparse
12
+ import json
13
+ from pathlib import Path
14
+
15
+ import matplotlib as mpl
16
+ import matplotlib.pyplot as plt
17
+ import numpy as np
18
+ from matplotlib.colors import LinearSegmentedColormap, Normalize
19
+ from matplotlib.patches import Rectangle
20
+
21
+
22
+ REPO_ROOT = Path(__file__).resolve().parents[3]
23
+ DEFAULT_EVIDENCE = (
24
+ REPO_ROOT
25
+ / "paper"
26
+ / "submission"
27
+ / "evidence"
28
+ / "r1_mainfig_seed20260719_20260721T0602Z_cells_summary.json"
29
+ )
30
+ DEFAULT_OUTPUT = (
31
+ REPO_ROOT / "paper" / "submission" / "figures" / "fig_main_results.png"
32
+ )
33
+
34
+ DOMAINS = ["code", "math", "factual_qa", "creative_writing", "general"]
35
+ DOMAIN_LABELS = ["Code", "Math", "Factual QA", "Creative", "General"]
36
+
37
+ # Restrained, color-blind-safe palette. Shape and line style also distinguish
38
+ # methods, so the figure remains legible in grayscale.
39
+ INK = "#25313B"
40
+ MUTED = "#68747E"
41
+ GRID = "#E2E7EA"
42
+ GENERALIST = "#7F8790"
43
+ D0 = "#2F9E44"
44
+ WARM = "#9C36B5"
45
+ LIGHT_RULE = "#C8D0D5"
46
+
47
+
48
+ def parse_args() -> argparse.Namespace:
49
+ parser = argparse.ArgumentParser(description=__doc__)
50
+ parser.add_argument("--evidence", type=Path, default=DEFAULT_EVIDENCE)
51
+ parser.add_argument("--output", type=Path, default=DEFAULT_OUTPUT)
52
+ return parser.parse_args()
53
+
54
+
55
+ def configure_style() -> None:
56
+ mpl.rcParams.update(
57
+ {
58
+ "font.family": "sans-serif",
59
+ "font.sans-serif": [
60
+ "Arial",
61
+ "Helvetica",
62
+ "Liberation Sans",
63
+ "DejaVu Sans",
64
+ ],
65
+ "font.size": 8.0,
66
+ "axes.titlesize": 9.3,
67
+ "axes.labelsize": 8.3,
68
+ "xtick.labelsize": 7.4,
69
+ "ytick.labelsize": 7.4,
70
+ "legend.fontsize": 7.3,
71
+ "pdf.fonttype": 42,
72
+ "ps.fonttype": 42,
73
+ "axes.linewidth": 0.65,
74
+ "savefig.bbox": "tight",
75
+ "savefig.pad_inches": 0.035,
76
+ }
77
+ )
78
+
79
+
80
+ def matrix_from_evidence(evidence: dict, key: str) -> np.ndarray:
81
+ mapping = evidence[key]
82
+ matrix = np.asarray(
83
+ [[float(mapping[row][column]) for column in DOMAINS] for row in DOMAINS],
84
+ dtype=float,
85
+ )
86
+ for column in range(len(DOMAINS)):
87
+ if int(np.argmax(matrix[:, column])) != column:
88
+ raise ValueError(f"{key}: matched MLP is not best in column {DOMAINS[column]}")
89
+ return matrix
90
+
91
+
92
+ def generalist_from_evidence(evidence: dict) -> np.ndarray:
93
+ mapping = evidence["panel_d_generalist"]
94
+ return np.asarray([float(mapping[domain]) for domain in DOMAINS], dtype=float)
95
+
96
+
97
+ def panel_title(ax: plt.Axes, letter: str, title: str) -> None:
98
+ # Use a point-based offset so the letter-to-title gap is physically
99
+ # identical in the full-width trajectory and the half-width matrices.
100
+ origin = (-0.055, 1.075)
101
+ ax.text(
102
+ *origin,
103
+ letter,
104
+ transform=ax.transAxes,
105
+ ha="left",
106
+ va="bottom",
107
+ fontsize=9.8,
108
+ fontweight="bold",
109
+ color=INK,
110
+ )
111
+ ax.annotate(
112
+ title,
113
+ xy=origin,
114
+ xycoords="axes fraction",
115
+ xytext=(18, 0),
116
+ textcoords="offset points",
117
+ ha="left",
118
+ va="bottom",
119
+ fontsize=8.6,
120
+ fontweight="bold",
121
+ color=INK,
122
+ )
123
+
124
+
125
+ def quiet_axes(ax: plt.Axes) -> None:
126
+ ax.spines["top"].set_visible(False)
127
+ ax.spines["right"].set_visible(False)
128
+ ax.spines["left"].set_color(LIGHT_RULE)
129
+ ax.spines["bottom"].set_color(LIGHT_RULE)
130
+ ax.tick_params(color=LIGHT_RULE, labelcolor=INK, width=0.65, length=2.8)
131
+
132
+
133
+ def draw_profile_panel(
134
+ ax: plt.Axes,
135
+ generalist: np.ndarray,
136
+ d0_diag: np.ndarray,
137
+ warm_diag: np.ndarray,
138
+ ) -> None:
139
+ panel_title(ax, "A", "Matched-domain acceptance across five domains")
140
+ quiet_axes(ax)
141
+ ax.grid(axis="y", color=GRID, lw=0.6, alpha=0.9, zorder=0)
142
+ x = np.arange(len(DOMAINS))
143
+ ax.plot(
144
+ x,
145
+ generalist,
146
+ color=GENERALIST,
147
+ lw=1.65,
148
+ ls="-",
149
+ marker="o",
150
+ ms=4.2,
151
+ mfc="white",
152
+ mec=GENERALIST,
153
+ mew=1.0,
154
+ alpha=0.90,
155
+ label="Generalist",
156
+ zorder=3,
157
+ )
158
+ ax.plot(
159
+ x,
160
+ d0_diag,
161
+ color=D0,
162
+ lw=1.75,
163
+ marker="o",
164
+ ms=4.3,
165
+ mfc="white",
166
+ mec=D0,
167
+ mew=1.0,
168
+ label="D0-init MoS",
169
+ zorder=5,
170
+ )
171
+ ax.plot(
172
+ x,
173
+ warm_diag,
174
+ color=WARM,
175
+ lw=1.75,
176
+ marker="s",
177
+ ms=4.2,
178
+ mfc="white",
179
+ mec=WARM,
180
+ mew=1.0,
181
+ label="G-init MoS",
182
+ zorder=6,
183
+ )
184
+
185
+ for index, value in enumerate(generalist):
186
+ ax.annotate(
187
+ f"{value:.3f}",
188
+ xy=(x[index], value),
189
+ xytext=(0, -7),
190
+ textcoords="offset points",
191
+ ha="center",
192
+ va="top",
193
+ fontsize=5.7,
194
+ color=MUTED,
195
+ )
196
+ for index, value in enumerate(warm_diag):
197
+ ax.annotate(
198
+ f"{value:.3f}",
199
+ xy=(x[index], value),
200
+ xytext=(0, 6),
201
+ textcoords="offset points",
202
+ ha="center",
203
+ va="bottom",
204
+ fontsize=5.8,
205
+ color=INK,
206
+ fontweight="bold",
207
+ )
208
+
209
+ ax.set_xlim(-0.35, len(DOMAINS) - 0.65)
210
+ ax.set_ylim(2.55, 5.78)
211
+ ax.set_xticks(x, labels=DOMAIN_LABELS)
212
+ ax.set_yticks([2.8, 3.4, 4.0, 4.6, 5.2, 5.8])
213
+ ax.set_ylabel("Acceptance length")
214
+ ax.legend(
215
+ loc="upper right",
216
+ bbox_to_anchor=(1.0, 1.02),
217
+ frameon=False,
218
+ ncol=3,
219
+ handlelength=2.4,
220
+ borderaxespad=0.1,
221
+ columnspacing=1.15,
222
+ handletextpad=0.4,
223
+ labelspacing=0.25,
224
+ fontsize=5.8,
225
+ )
226
+
227
+
228
+ HEATMAP_D0_CMAP = LinearSegmentedColormap.from_list(
229
+ "d0_matched_regret",
230
+ ["#F7FAF7", "#DDEFE1", "#A7D7B1", "#68B97A", D0],
231
+ )
232
+ HEATMAP_WARM_CMAP = LinearSegmentedColormap.from_list(
233
+ "warm_matched_regret",
234
+ ["#FBF8FC", "#F0E0F4", "#D9B7E2", "#BC79CB", WARM],
235
+ )
236
+ HEATMAP_NORM = Normalize(vmin=-1.30, vmax=0.0)
237
+
238
+
239
+ def draw_matrix_panel(
240
+ ax: plt.Axes,
241
+ matrix: np.ndarray,
242
+ letter: str,
243
+ title: str,
244
+ cmap: LinearSegmentedColormap,
245
+ diagonal_edge: str,
246
+ ) -> mpl.image.AxesImage:
247
+ regret = matrix - np.diag(matrix)[None, :]
248
+ image = ax.imshow(regret, cmap=cmap, norm=HEATMAP_NORM, aspect="equal")
249
+ panel_title(ax, letter, title)
250
+ ax.set_xticks(range(len(DOMAINS)), labels=DOMAIN_LABELS)
251
+ ax.set_yticks(range(len(DOMAINS)), labels=DOMAIN_LABELS)
252
+ ax.tick_params(axis="x", rotation=29, length=0, pad=2.2, labelsize=6.2)
253
+ ax.tick_params(axis="y", length=0, pad=2.6, labelsize=6.5)
254
+ ax.set_ylabel("Selected MLP", labelpad=2.5, fontsize=7.0)
255
+
256
+ for row in range(len(DOMAINS)):
257
+ for column in range(len(DOMAINS)):
258
+ value = matrix[row, column]
259
+ normalized = HEATMAP_NORM(regret[row, column])
260
+ text_color = "white" if normalized > 0.68 else INK
261
+ ax.text(
262
+ column,
263
+ row,
264
+ f"{value:.3f}",
265
+ ha="center",
266
+ va="center",
267
+ fontsize=6.0,
268
+ color=text_color,
269
+ fontweight="bold" if row == column else "normal",
270
+ )
271
+ if row == column:
272
+ ax.add_patch(
273
+ Rectangle(
274
+ (column - 0.48, row - 0.48),
275
+ 0.96,
276
+ 0.96,
277
+ facecolor="none",
278
+ edgecolor=diagonal_edge,
279
+ linewidth=1.45,
280
+ )
281
+ )
282
+
283
+ ax.set_xticks(np.arange(-0.5, len(DOMAINS), 1), minor=True)
284
+ ax.set_yticks(np.arange(-0.5, len(DOMAINS), 1), minor=True)
285
+ ax.grid(which="minor", color="white", linestyle="-", linewidth=1.15)
286
+ ax.tick_params(which="minor", bottom=False, left=False)
287
+ for spine in ax.spines.values():
288
+ spine.set_visible(False)
289
+ return image
290
+
291
+
292
+ def main() -> None:
293
+ args = parse_args()
294
+ configure_style()
295
+ evidence = json.loads(args.evidence.read_text())
296
+ if not evidence.get("passed"):
297
+ raise ValueError("R1 evidence is not marked passed")
298
+ if evidence.get("cells_total") != 52 or evidence.get("cells_passed") != 52:
299
+ raise ValueError("R1 evidence is not complete (expected 52/52 cells)")
300
+
301
+ d0_matrix = matrix_from_evidence(evidence, "panel_b_matrix_dflash_init")
302
+ warm_matrix = matrix_from_evidence(evidence, "panel_c_matrix_warm_start")
303
+ generalist = generalist_from_evidence(evidence)
304
+
305
+ if not np.all(np.diag(d0_matrix) > generalist):
306
+ raise ValueError("DFlash-initialized MoS is not above Generalist in every domain")
307
+ if not np.all(np.diag(warm_matrix) > generalist):
308
+ raise ValueError("warm-started MoS is not above Generalist in every domain")
309
+
310
+ # Match the intended AAAI double-column physical width. Raising DPI, rather
311
+ # than drawing an oversized canvas and shrinking it in LaTeX, preserves the
312
+ # configured 7--10 pt typography at publication size.
313
+ fig = plt.figure(figsize=(7.15, 5.00), facecolor="white")
314
+ outer = fig.add_gridspec(
315
+ 2,
316
+ 1,
317
+ height_ratios=[0.82, 1.18],
318
+ hspace=0.46,
319
+ left=0.075,
320
+ right=0.985,
321
+ top=0.945,
322
+ bottom=0.180,
323
+ )
324
+ ax_a = fig.add_subplot(outer[0, 0])
325
+ matrices = outer[1, 0].subgridspec(1, 2, wspace=0.28)
326
+ ax_b = fig.add_subplot(matrices[0, 0])
327
+ ax_c = fig.add_subplot(matrices[0, 1])
328
+
329
+ draw_profile_panel(
330
+ ax_a,
331
+ generalist,
332
+ np.diag(d0_matrix),
333
+ np.diag(warm_matrix),
334
+ )
335
+ d0_image = draw_matrix_panel(
336
+ ax_b,
337
+ d0_matrix,
338
+ "B",
339
+ "DFlash-initialized MoS",
340
+ HEATMAP_D0_CMAP,
341
+ "#226F32",
342
+ )
343
+ warm_image = draw_matrix_panel(
344
+ ax_c,
345
+ warm_matrix,
346
+ "C",
347
+ "Generalist-warm-started MoS",
348
+ HEATMAP_WARM_CMAP,
349
+ "#6F277D",
350
+ )
351
+
352
+ # Separate color strips preserve the original green/purple recipe identity
353
+ # while keeping an identical quantitative scale in both matrices.
354
+ for image, position in (
355
+ (d0_image, [0.145, 0.065, 0.29, 0.010]),
356
+ (warm_image, [0.575, 0.065, 0.29, 0.010]),
357
+ ):
358
+ cbar_ax = fig.add_axes(position)
359
+ cbar = fig.colorbar(image, cax=cbar_ax, orientation="horizontal")
360
+ cbar.set_ticks([-1.2, -0.6, 0.0])
361
+ cbar.ax.tick_params(labelsize=5.7, length=1.8, color=LIGHT_RULE)
362
+ cbar.outline.set_visible(False)
363
+ fig.text(
364
+ 0.505,
365
+ 0.014,
366
+ r"Shade: column-wise $\Delta$AL from the matched MLP",
367
+ ha="center",
368
+ va="bottom",
369
+ fontsize=6.0,
370
+ color=INK,
371
+ )
372
+
373
+ args.output.parent.mkdir(parents=True, exist_ok=True)
374
+ fig.savefig(args.output, dpi=420, facecolor="white")
375
+ plt.close(fig)
376
+ print(f"saved {args.output}")
377
+
378
+
379
+ if __name__ == "__main__":
380
+ main()
recipes/plotting/v1/plot_mos_5x5_gains.py ADDED
@@ -0,0 +1,929 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Render separate 5x5 MoS routing matrices with Generalist gains.
3
+
4
+ The frozen R1 evidence contains two selected-checkpoint matrices:
5
+
6
+ 1. MoS initialized from the public DFlash drafter (D0-init).
7
+ 2. MoS warm-started from the trained Generalist (G-init).
8
+
9
+ The first two figures show all selected-MLP x evaluation-domain AL cells. The
10
+ right panel reports the matched-domain diagonal's absolute and relative
11
+ improvement over one fixed-seed evaluation of the selected Generalist
12
+ checkpoint. A third figure shows that Generalist baseline across the five
13
+ evaluation domains.
14
+ """
15
+
16
+ from __future__ import annotations
17
+
18
+ import argparse
19
+ import json
20
+ from pathlib import Path
21
+
22
+ import matplotlib as mpl
23
+ import matplotlib.pyplot as plt
24
+ import numpy as np
25
+ from matplotlib.colors import LinearSegmentedColormap, Normalize
26
+ from matplotlib.patches import Rectangle
27
+
28
+
29
+ REPO_ROOT = Path(__file__).resolve().parents[3]
30
+ DEFAULT_EVIDENCE = (
31
+ REPO_ROOT
32
+ / "paper"
33
+ / "submission"
34
+ / "evidence"
35
+ / "r1_mainfig_seed20260719_20260721T0602Z_cells_summary.json"
36
+ )
37
+ DEFAULT_OUTPUT_DIR = REPO_ROOT / "paper" / "submission" / "figures"
38
+
39
+ DOMAINS = ["code", "math", "factual_qa", "creative_writing", "general"]
40
+ DOMAIN_LABELS = ["Code", "Math", "Factual QA", "Creative", "General"]
41
+
42
+ INK = "#25313B"
43
+ MUTED = "#68747E"
44
+ RULE = "#D9DFE3"
45
+ ROW_FILL = "#F3F5F6"
46
+ D0 = "#2F9E44"
47
+ WARM = "#9C36B5"
48
+ GENERALIST = "#7F8790"
49
+
50
+ HEATMAP_NORM = Normalize(vmin=-1.30, vmax=0.0)
51
+ D0_CMAP = LinearSegmentedColormap.from_list(
52
+ "d0_regret", ["#F7FAF7", "#DDEFE1", "#A7D7B1", "#68B97A", D0]
53
+ )
54
+ WARM_CMAP = LinearSegmentedColormap.from_list(
55
+ "ginit_regret", ["#FBF8FC", "#F0E0F4", "#D9B7E2", "#BC79CB", WARM]
56
+ )
57
+ ABSOLUTE_CMAP = LinearSegmentedColormap.from_list(
58
+ "absolute_al", ["#F2F7FB", "#C9DEEE", "#80B7D5", "#3182BD", "#12538A"]
59
+ )
60
+ ABSOLUTE_NORM = Normalize(vmin=2.25, vmax=5.60)
61
+
62
+
63
+ def parse_args() -> argparse.Namespace:
64
+ parser = argparse.ArgumentParser(description=__doc__)
65
+ parser.add_argument("--evidence", type=Path, default=DEFAULT_EVIDENCE)
66
+ parser.add_argument("--output-dir", type=Path, default=DEFAULT_OUTPUT_DIR)
67
+ return parser.parse_args()
68
+
69
+
70
+ def configure_style() -> None:
71
+ mpl.rcParams.update(
72
+ {
73
+ "font.family": "sans-serif",
74
+ "font.sans-serif": [
75
+ "Arial",
76
+ "Helvetica",
77
+ "Liberation Sans",
78
+ "DejaVu Sans",
79
+ ],
80
+ "font.size": 8.0,
81
+ "axes.titlesize": 10.0,
82
+ "axes.labelsize": 8.2,
83
+ "xtick.labelsize": 7.4,
84
+ "ytick.labelsize": 7.4,
85
+ "pdf.fonttype": 42,
86
+ "ps.fonttype": 42,
87
+ "savefig.bbox": "tight",
88
+ "savefig.pad_inches": 0.035,
89
+ }
90
+ )
91
+
92
+
93
+ def load_evidence(path: Path) -> tuple[dict, np.ndarray]:
94
+ evidence = json.loads(path.read_text())
95
+ if not evidence.get("passed"):
96
+ raise ValueError("R1 evidence is not marked passed")
97
+ if evidence.get("cells_total") != 52 or evidence.get("cells_passed") != 52:
98
+ raise ValueError("R1 evidence is incomplete; expected 52/52 passed cells")
99
+ generalist = np.asarray(
100
+ [float(evidence["panel_d_generalist"][domain]) for domain in DOMAINS],
101
+ dtype=float,
102
+ )
103
+ return evidence, generalist
104
+
105
+
106
+ def matrix_from_evidence(evidence: dict, key: str) -> np.ndarray:
107
+ mapping = evidence[key]
108
+ matrix = np.asarray(
109
+ [[float(mapping[row][column]) for column in DOMAINS] for row in DOMAINS],
110
+ dtype=float,
111
+ )
112
+ for column, domain in enumerate(DOMAINS):
113
+ if int(np.argmax(matrix[:, column])) != column:
114
+ raise ValueError(f"{key}: matched MLP is not best for {domain}")
115
+ return matrix
116
+
117
+
118
+ def draw_matrix(
119
+ ax: plt.Axes,
120
+ matrix: np.ndarray,
121
+ cmap: LinearSegmentedColormap,
122
+ accent: str,
123
+ ) -> mpl.image.AxesImage:
124
+ regret = matrix - np.diag(matrix)[None, :]
125
+ image = ax.imshow(regret, cmap=cmap, norm=HEATMAP_NORM, aspect="equal")
126
+ ax.set_xticks(range(5), labels=DOMAIN_LABELS)
127
+ ax.set_yticks(range(5), labels=DOMAIN_LABELS)
128
+ ax.tick_params(axis="x", rotation=28, length=0, pad=3.0)
129
+ ax.tick_params(axis="y", length=0, pad=3.0)
130
+ ax.xaxis.set_label_position("top")
131
+ ax.set_xlabel("Evaluation domain", labelpad=8.5, fontweight="bold")
132
+ ax.set_ylabel("Selected MLP", labelpad=6.0, fontweight="bold")
133
+
134
+ for row in range(5):
135
+ for column in range(5):
136
+ value = matrix[row, column]
137
+ normalized = HEATMAP_NORM(regret[row, column])
138
+ text_color = "white" if normalized > 0.66 else INK
139
+ ax.text(
140
+ column,
141
+ row,
142
+ f"{value:.3f}",
143
+ ha="center",
144
+ va="center",
145
+ fontsize=7.7,
146
+ color=text_color,
147
+ fontweight="bold" if row == column else "normal",
148
+ )
149
+ if row == column:
150
+ ax.add_patch(
151
+ Rectangle(
152
+ (column - 0.48, row - 0.48),
153
+ 0.96,
154
+ 0.96,
155
+ facecolor="none",
156
+ edgecolor=accent,
157
+ linewidth=1.7,
158
+ )
159
+ )
160
+
161
+ ax.set_xticks(np.arange(-0.5, 5, 1), minor=True)
162
+ ax.set_yticks(np.arange(-0.5, 5, 1), minor=True)
163
+ ax.grid(which="minor", color="white", linewidth=1.25)
164
+ ax.tick_params(which="minor", bottom=False, left=False)
165
+ for spine in ax.spines.values():
166
+ spine.set_visible(False)
167
+ return image
168
+
169
+
170
+ def draw_gain_table(
171
+ ax: plt.Axes,
172
+ matrix: np.ndarray,
173
+ generalist: np.ndarray,
174
+ accent: str,
175
+ ) -> None:
176
+ diagonal = np.diag(matrix)
177
+ delta = diagonal - generalist
178
+ percent = 100.0 * delta / generalist
179
+ if not np.all(delta > 0):
180
+ raise ValueError("matched-domain MoS does not improve every domain")
181
+
182
+ mean_generalist = float(np.mean(generalist))
183
+ mean_diagonal = float(np.mean(diagonal))
184
+ mean_delta = mean_diagonal - mean_generalist
185
+ mean_percent = 100.0 * mean_delta / mean_generalist
186
+
187
+ labels = DOMAIN_LABELS + ["Mean"]
188
+ deltas = np.concatenate([delta, [mean_delta]])
189
+ percents = np.concatenate([percent, [mean_percent]])
190
+
191
+ ax.set_xlim(0.0, 1.0)
192
+ ax.set_ylim(0.0, 1.0)
193
+ ax.axis("off")
194
+ ax.text(
195
+ 0.02,
196
+ 0.965,
197
+ "Matched MLP gain vs Generalist",
198
+ ha="left",
199
+ va="top",
200
+ fontsize=9.1,
201
+ fontweight="bold",
202
+ color=INK,
203
+ )
204
+ ax.text(0.02, 0.855, "Domain", ha="left", va="center", color=MUTED, fontweight="bold")
205
+ ax.text(0.68, 0.855, "Δ AL", ha="right", va="center", color=MUTED, fontweight="bold")
206
+ ax.text(0.98, 0.855, "Δ %", ha="right", va="center", color=MUTED, fontweight="bold")
207
+ ax.plot([0.02, 0.98], [0.815, 0.815], color=RULE, lw=0.9)
208
+
209
+ ys = np.linspace(0.735, 0.175, len(labels))
210
+ for index, (label, value, pct, y) in enumerate(zip(labels, deltas, percents, ys)):
211
+ if index == len(labels) - 1:
212
+ ax.add_patch(
213
+ Rectangle(
214
+ (0.01, y - 0.050),
215
+ 0.98,
216
+ 0.100,
217
+ facecolor=ROW_FILL,
218
+ edgecolor="none",
219
+ zorder=0,
220
+ )
221
+ )
222
+ weight = "bold" if index == len(labels) - 1 else "normal"
223
+ ax.text(0.02, y, label, ha="left", va="center", color=INK, fontweight=weight)
224
+ ax.text(
225
+ 0.68,
226
+ y,
227
+ f"+{value:.3f}",
228
+ ha="right",
229
+ va="center",
230
+ color=accent,
231
+ fontweight="bold",
232
+ )
233
+ ax.text(
234
+ 0.98,
235
+ y,
236
+ f"+{pct:.1f}%",
237
+ ha="right",
238
+ va="center",
239
+ color=accent,
240
+ fontweight="bold",
241
+ )
242
+
243
+ ax.text(
244
+ 0.02,
245
+ 0.045,
246
+ "Mean is unweighted across the five domains.",
247
+ ha="left",
248
+ va="bottom",
249
+ fontsize=6.7,
250
+ color=MUTED,
251
+ )
252
+
253
+
254
+ def render_one(
255
+ matrix: np.ndarray,
256
+ generalist: np.ndarray,
257
+ title: str,
258
+ subtitle: str,
259
+ cmap: LinearSegmentedColormap,
260
+ accent: str,
261
+ output: Path,
262
+ ) -> None:
263
+ fig = plt.figure(figsize=(7.15, 3.55), facecolor="white")
264
+ grid = fig.add_gridspec(
265
+ 1,
266
+ 2,
267
+ width_ratios=[1.20, 0.92],
268
+ wspace=0.22,
269
+ left=0.085,
270
+ right=0.985,
271
+ top=0.755,
272
+ bottom=0.21,
273
+ )
274
+ ax_matrix = fig.add_subplot(grid[0, 0])
275
+ ax_gain = fig.add_subplot(grid[0, 1])
276
+
277
+ image = draw_matrix(ax_matrix, matrix, cmap, accent)
278
+ draw_gain_table(ax_gain, matrix, generalist, accent)
279
+
280
+ fig.text(0.03, 0.970, title, ha="left", va="top", fontsize=11.2, fontweight="bold", color=INK)
281
+ fig.text(0.03, 0.862, subtitle, ha="left", va="top", fontsize=7.2, color=MUTED)
282
+
283
+ cbar_ax = fig.add_axes([0.137, 0.095, 0.355, 0.018])
284
+ cbar = fig.colorbar(image, cax=cbar_ax, orientation="horizontal")
285
+ cbar.set_ticks([-1.2, -0.6, 0.0], labels=["−1.2", "−0.6", "0"])
286
+ cbar.ax.tick_params(labelsize=6.5, length=2.0, color=RULE, pad=1.5)
287
+ cbar.outline.set_visible(False)
288
+ fig.text(
289
+ 0.314,
290
+ 0.040,
291
+ "Cell shade: AL difference from the matched MLP in each column",
292
+ ha="center",
293
+ va="bottom",
294
+ fontsize=6.5,
295
+ color=MUTED,
296
+ )
297
+
298
+ output.parent.mkdir(parents=True, exist_ok=True)
299
+ fig.savefig(output, dpi=420, facecolor="white")
300
+ plt.close(fig)
301
+ print(f"saved {output}")
302
+
303
+
304
+ def render_generalist(
305
+ generalist: np.ndarray,
306
+ subtitle: str,
307
+ output: Path,
308
+ ) -> None:
309
+ mean_al = float(np.mean(generalist))
310
+ x = np.arange(len(DOMAINS))
311
+
312
+ fig, ax = plt.subplots(figsize=(7.15, 3.35), facecolor="white")
313
+ fig.subplots_adjust(left=0.095, right=0.975, top=0.755, bottom=0.205)
314
+ bars = ax.bar(
315
+ x,
316
+ generalist,
317
+ width=0.58,
318
+ color=GENERALIST,
319
+ edgecolor=INK,
320
+ linewidth=0.55,
321
+ zorder=3,
322
+ )
323
+ ax.bar_label(
324
+ bars,
325
+ labels=[f"{value:.3f}" for value in generalist],
326
+ padding=-16,
327
+ fontsize=8.1,
328
+ fontweight="bold",
329
+ color="white",
330
+ )
331
+ ax.axhline(
332
+ mean_al,
333
+ color=INK,
334
+ lw=1.15,
335
+ ls=(0, (4, 2)),
336
+ label=f"Five-domain mean = {mean_al:.3f}",
337
+ zorder=2,
338
+ )
339
+
340
+ ax.set_xlim(-0.55, len(DOMAINS) - 0.45)
341
+ ax.set_ylim(0.0, 5.55)
342
+ ax.set_xticks(x, labels=DOMAIN_LABELS)
343
+ ax.set_yticks(np.arange(0.0, 5.6, 1.0))
344
+ ax.set_ylabel("Acceptance length (AL)", fontweight="bold")
345
+ ax.grid(axis="y", color=RULE, linewidth=0.65, zorder=0)
346
+ ax.legend(loc="upper right", frameon=False, fontsize=7.4, handlelength=2.8)
347
+ ax.spines["top"].set_visible(False)
348
+ ax.spines["right"].set_visible(False)
349
+ ax.spines["left"].set_color(RULE)
350
+ ax.spines["bottom"].set_color(RULE)
351
+ ax.tick_params(color=RULE, labelcolor=INK, width=0.65, length=2.8)
352
+
353
+ fig.text(
354
+ 0.03,
355
+ 0.970,
356
+ "Generalist (DFlash baseline): AL across five domains",
357
+ ha="left",
358
+ va="top",
359
+ fontsize=11.2,
360
+ fontweight="bold",
361
+ color=INK,
362
+ )
363
+ fig.text(0.03, 0.862, subtitle, ha="left", va="top", fontsize=7.2, color=MUTED)
364
+
365
+ output.parent.mkdir(parents=True, exist_ok=True)
366
+ fig.savefig(output, dpi=420, facecolor="white")
367
+ plt.close(fig)
368
+ print(f"saved {output}")
369
+
370
+
371
+ def draw_compact_generalist(ax: plt.Axes, generalist: np.ndarray) -> None:
372
+ x = np.arange(len(DOMAINS))
373
+ bars = ax.bar(
374
+ x,
375
+ generalist,
376
+ width=0.66,
377
+ color=GENERALIST,
378
+ edgecolor=INK,
379
+ linewidth=0.45,
380
+ zorder=3,
381
+ )
382
+ ax.bar_label(
383
+ bars,
384
+ labels=[f"{value:.3f}" for value in generalist],
385
+ padding=-10,
386
+ fontsize=5.7,
387
+ fontweight="bold",
388
+ color="white",
389
+ )
390
+ ax.axhline(float(np.mean(generalist)), color=INK, lw=0.85, ls=(0, (3, 2)), zorder=2)
391
+ ax.set_xlim(-0.55, len(DOMAINS) - 0.45)
392
+ ax.set_ylim(0.0, 5.55)
393
+ ax.set_xticks(x, labels=["Code", "Math", "FQA", "Creat.", "Gen."])
394
+ ax.tick_params(axis="x", rotation=40, labelsize=5.5, pad=1.8)
395
+ ax.set_yticks([0, 2, 4], labels=["0", "2", "4"])
396
+ ax.tick_params(axis="y", labelsize=5.5)
397
+ ax.set_ylabel("AL", fontsize=6.5, fontweight="bold", labelpad=2.0)
398
+ ax.grid(axis="y", color=RULE, linewidth=0.5, zorder=0)
399
+ ax.spines["top"].set_visible(False)
400
+ ax.spines["right"].set_visible(False)
401
+ ax.spines["left"].set_color(RULE)
402
+ ax.spines["bottom"].set_color(RULE)
403
+ ax.tick_params(color=RULE, labelcolor=INK, width=0.5, length=2.0)
404
+ ax.text(
405
+ 0.98,
406
+ 0.96,
407
+ f"mean {np.mean(generalist):.3f}",
408
+ transform=ax.transAxes,
409
+ ha="right",
410
+ va="top",
411
+ fontsize=5.8,
412
+ color=INK,
413
+ fontweight="bold",
414
+ )
415
+
416
+
417
+ def draw_compact_matrix(
418
+ ax: plt.Axes,
419
+ matrix: np.ndarray,
420
+ cmap: LinearSegmentedColormap,
421
+ accent: str,
422
+ ) -> None:
423
+ regret = matrix - np.diag(matrix)[None, :]
424
+ ax.imshow(regret, cmap=cmap, norm=HEATMAP_NORM, aspect="equal")
425
+ short_labels = ["Code", "Math", "FQA", "Creat.", "Gen."]
426
+ ax.set_xticks(range(5), labels=short_labels)
427
+ ax.set_yticks(range(5), labels=short_labels)
428
+ ax.tick_params(axis="x", rotation=40, length=0, pad=1.8, labelsize=5.3)
429
+ ax.tick_params(axis="y", length=0, pad=2.0, labelsize=5.3)
430
+ ax.set_ylabel("Selected MLP", fontsize=6.1, fontweight="bold", labelpad=2.0)
431
+
432
+ for row in range(5):
433
+ for column in range(5):
434
+ normalized = HEATMAP_NORM(regret[row, column])
435
+ ax.text(
436
+ column,
437
+ row,
438
+ f"{matrix[row, column]:.2f}",
439
+ ha="center",
440
+ va="center",
441
+ fontsize=5.4,
442
+ color="white" if normalized > 0.66 else INK,
443
+ fontweight="bold" if row == column else "normal",
444
+ )
445
+ if row == column:
446
+ ax.add_patch(
447
+ Rectangle(
448
+ (column - 0.47, row - 0.47),
449
+ 0.94,
450
+ 0.94,
451
+ facecolor="none",
452
+ edgecolor=accent,
453
+ linewidth=1.15,
454
+ )
455
+ )
456
+
457
+ ax.set_xticks(np.arange(-0.5, 5, 1), minor=True)
458
+ ax.set_yticks(np.arange(-0.5, 5, 1), minor=True)
459
+ ax.grid(which="minor", color="white", linewidth=0.9)
460
+ ax.tick_params(which="minor", bottom=False, left=False)
461
+ for spine in ax.spines.values():
462
+ spine.set_visible(False)
463
+
464
+
465
+ def draw_compact_gains(
466
+ ax: plt.Axes,
467
+ matrix: np.ndarray,
468
+ generalist: np.ndarray,
469
+ accent: str,
470
+ ) -> None:
471
+ delta = np.diag(matrix) - generalist
472
+ percent = 100.0 * delta / generalist
473
+ mean_delta = float(np.mean(np.diag(matrix)) - np.mean(generalist))
474
+ mean_percent = 100.0 * mean_delta / float(np.mean(generalist))
475
+
476
+ ax.set_xlim(0.0, 1.0)
477
+ ax.set_ylim(4.5, -0.5)
478
+ ax.axis("off")
479
+ ax.text(0.43, 1.045, "ΔAL", transform=ax.transAxes, ha="right", va="bottom", fontsize=5.5, color=MUTED, fontweight="bold")
480
+ ax.text(0.98, 1.045, "Δ%", transform=ax.transAxes, ha="right", va="bottom", fontsize=5.5, color=MUTED, fontweight="bold")
481
+ for row, (value, pct) in enumerate(zip(delta, percent)):
482
+ ax.text(0.43, row, f"+{value:.2f}", ha="right", va="center", fontsize=5.4, color=accent, fontweight="bold")
483
+ ax.text(0.98, row, f"+{pct:.1f}", ha="right", va="center", fontsize=5.4, color=accent, fontweight="bold")
484
+ ax.text(
485
+ 0.98,
486
+ -0.16,
487
+ f"mean +{mean_delta:.2f} / +{mean_percent:.1f}%",
488
+ transform=ax.transAxes,
489
+ ha="right",
490
+ va="top",
491
+ fontsize=5.1,
492
+ color=accent,
493
+ fontweight="bold",
494
+ )
495
+
496
+
497
+ def render_three_panel(
498
+ generalist: np.ndarray,
499
+ d0_matrix: np.ndarray,
500
+ warm_matrix: np.ndarray,
501
+ output: Path,
502
+ ) -> None:
503
+ fig = plt.figure(figsize=(7.15, 2.48), facecolor="white")
504
+ outer = fig.add_gridspec(
505
+ 1,
506
+ 3,
507
+ width_ratios=[0.78, 1.36, 1.36],
508
+ wspace=0.30,
509
+ left=0.055,
510
+ right=0.992,
511
+ top=0.78,
512
+ bottom=0.23,
513
+ )
514
+ ax_a = fig.add_subplot(outer[0, 0])
515
+ grid_b = outer[0, 1].subgridspec(1, 2, width_ratios=[1.0, 0.42], wspace=0.04)
516
+ ax_b = fig.add_subplot(grid_b[0, 0])
517
+ ax_b_gain = fig.add_subplot(grid_b[0, 1])
518
+ grid_c = outer[0, 2].subgridspec(1, 2, width_ratios=[1.0, 0.42], wspace=0.04)
519
+ ax_c = fig.add_subplot(grid_c[0, 0])
520
+ ax_c_gain = fig.add_subplot(grid_c[0, 1])
521
+
522
+ draw_compact_generalist(ax_a, generalist)
523
+ draw_compact_matrix(ax_b, d0_matrix, D0_CMAP, D0)
524
+ draw_compact_gains(ax_b_gain, d0_matrix, generalist, D0)
525
+ draw_compact_matrix(ax_c, warm_matrix, WARM_CMAP, WARM)
526
+ draw_compact_gains(ax_c_gain, warm_matrix, generalist, WARM)
527
+
528
+ panel_titles = (
529
+ (0.055, "A", "Generalist (DFlash)"),
530
+ (0.305, "B", "DFlash-init MoS"),
531
+ (0.661, "C", "Generalist-warm-start MoS"),
532
+ )
533
+ for x, letter, title in panel_titles:
534
+ fig.text(x, 0.935, letter, ha="left", va="top", fontsize=8.8, fontweight="bold", color=INK)
535
+ fig.text(x + 0.025, 0.935, title, ha="left", va="top", fontsize=8.0, fontweight="bold", color=INK)
536
+
537
+ fig.text(
538
+ 0.63,
539
+ 0.055,
540
+ "Rows select MLPs; columns are evaluation domains. Bold diagonal = matched MLP; gains are vs Generalist.",
541
+ ha="center",
542
+ va="bottom",
543
+ fontsize=5.3,
544
+ color=MUTED,
545
+ )
546
+ fig.text(
547
+ 0.055,
548
+ 0.055,
549
+ "Qwen3-8B target · fixed seed",
550
+ ha="left",
551
+ va="bottom",
552
+ fontsize=5.3,
553
+ color=MUTED,
554
+ )
555
+
556
+ output.parent.mkdir(parents=True, exist_ok=True)
557
+ fig.savefig(output, dpi=480, facecolor="white")
558
+ plt.close(fig)
559
+ print(f"saved {output}")
560
+
561
+
562
+ def draw_baseline_aligned_panel(
563
+ ax_matrix: plt.Axes,
564
+ ax_gain: plt.Axes,
565
+ matrix: np.ndarray,
566
+ generalist: np.ndarray,
567
+ ) -> None:
568
+ aligned = np.vstack([generalist, matrix])
569
+ row_labels = ["Generalist", "Code MLP", "Math MLP", "FQA MLP", "Creat. MLP", "Gen. MLP"]
570
+ column_labels = ["Code", "Math", "FQA", "Creat.", "Gen."]
571
+ ax_matrix.imshow(aligned, cmap=ABSOLUTE_CMAP, norm=ABSOLUTE_NORM, aspect="equal")
572
+ ax_matrix.set_xticks(range(5), labels=column_labels)
573
+ ax_matrix.set_yticks(range(6), labels=row_labels)
574
+ ax_matrix.tick_params(axis="x", rotation=37, length=0, pad=2.0, labelsize=5.5)
575
+ ax_matrix.tick_params(axis="y", length=0, pad=2.4, labelsize=5.4)
576
+
577
+ for row in range(6):
578
+ for column in range(5):
579
+ value = aligned[row, column]
580
+ normalized = ABSOLUTE_NORM(value)
581
+ is_matched = row > 0 and row - 1 == column
582
+ ax_matrix.text(
583
+ column,
584
+ row,
585
+ f"{value:.2f}",
586
+ ha="center",
587
+ va="center",
588
+ fontsize=5.7,
589
+ color="white" if normalized > 0.58 else INK,
590
+ fontweight="bold" if is_matched else "normal",
591
+ )
592
+ if is_matched:
593
+ ax_matrix.add_patch(
594
+ Rectangle(
595
+ (column - 0.47, row - 0.47),
596
+ 0.94,
597
+ 0.94,
598
+ facecolor="none",
599
+ edgecolor=INK,
600
+ linewidth=1.0,
601
+ )
602
+ )
603
+
604
+ ax_matrix.axhline(0.5, color=INK, lw=1.15)
605
+ ax_matrix.set_xticks(np.arange(-0.5, 5, 1), minor=True)
606
+ ax_matrix.set_yticks(np.arange(-0.5, 6, 1), minor=True)
607
+ ax_matrix.grid(which="minor", color="white", linewidth=0.9)
608
+ ax_matrix.tick_params(which="minor", bottom=False, left=False)
609
+ for spine in ax_matrix.spines.values():
610
+ spine.set_visible(False)
611
+
612
+ delta = np.diag(matrix) - generalist
613
+ percent = 100.0 * delta / generalist
614
+ mean_delta = float(np.mean(np.diag(matrix)) - np.mean(generalist))
615
+ mean_percent = 100.0 * mean_delta / float(np.mean(generalist))
616
+ ax_gain.set_xlim(0.0, 1.0)
617
+ ax_gain.set_ylim(5.5, -0.5)
618
+ ax_gain.axis("off")
619
+ ax_gain.text(0.43, 1.04, "ΔAL", transform=ax_gain.transAxes, ha="right", va="bottom", fontsize=5.7, color=MUTED, fontweight="bold")
620
+ ax_gain.text(0.98, 1.04, "Δ%", transform=ax_gain.transAxes, ha="right", va="bottom", fontsize=5.7, color=MUTED, fontweight="bold")
621
+ ax_gain.text(0.43, 0, "—", ha="right", va="center", fontsize=5.4, color=MUTED)
622
+ ax_gain.text(0.98, 0, "—", ha="right", va="center", fontsize=5.4, color=MUTED)
623
+ for row, (value, pct) in enumerate(zip(delta, percent), start=1):
624
+ ax_gain.text(0.43, row, f"+{value:.2f}", ha="right", va="center", fontsize=5.5, color=INK, fontweight="bold")
625
+ ax_gain.text(0.98, row, f"+{pct:.1f}", ha="right", va="center", fontsize=5.5, color=INK, fontweight="bold")
626
+ ax_gain.axhline(0.5, color=INK, lw=1.15)
627
+ ax_gain.text(
628
+ 0.98,
629
+ -0.14,
630
+ f"mean +{mean_delta:.2f} / +{mean_percent:.1f}%",
631
+ transform=ax_gain.transAxes,
632
+ ha="right",
633
+ va="top",
634
+ fontsize=5.2,
635
+ color=INK,
636
+ fontweight="bold",
637
+ )
638
+
639
+
640
+ def render_baseline_aligned(
641
+ generalist: np.ndarray,
642
+ d0_matrix: np.ndarray,
643
+ warm_matrix: np.ndarray,
644
+ output: Path,
645
+ ) -> None:
646
+ fig = plt.figure(figsize=(7.15, 2.85), facecolor="white")
647
+ outer = fig.add_gridspec(
648
+ 1,
649
+ 2,
650
+ wspace=0.28,
651
+ left=0.105,
652
+ right=0.992,
653
+ top=0.72,
654
+ bottom=0.23,
655
+ )
656
+ grid_a = outer[0, 0].subgridspec(1, 2, width_ratios=[1.0, 0.35], wspace=0.04)
657
+ ax_a = fig.add_subplot(grid_a[0, 0])
658
+ ax_a_gain = fig.add_subplot(grid_a[0, 1])
659
+ grid_b = outer[0, 1].subgridspec(1, 2, width_ratios=[1.0, 0.35], wspace=0.04)
660
+ ax_b = fig.add_subplot(grid_b[0, 0])
661
+ ax_b_gain = fig.add_subplot(grid_b[0, 1])
662
+
663
+ draw_baseline_aligned_panel(ax_a, ax_a_gain, d0_matrix, generalist)
664
+ draw_baseline_aligned_panel(ax_b, ax_b_gain, warm_matrix, generalist)
665
+
666
+ fig.text(
667
+ 0.055,
668
+ 0.970,
669
+ "Generalist-aligned acceptance-length matrices · Qwen3-8B target",
670
+ ha="left",
671
+ va="top",
672
+ fontsize=9.2,
673
+ fontweight="bold",
674
+ color=INK,
675
+ )
676
+ fig.text(
677
+ 0.055,
678
+ 0.895,
679
+ f"Shared DFlash Generalist baseline mean = {np.mean(generalist):.3f}; fixed-seed selected-checkpoint evaluation",
680
+ ha="left",
681
+ va="top",
682
+ fontsize=6.0,
683
+ color=MUTED,
684
+ )
685
+ fig.text(0.105, 0.805, "A DFlash-init MoS", ha="left", va="top", fontsize=7.5, fontweight="bold", color=INK)
686
+ fig.text(0.563, 0.805, "B Generalist-warm-start MoS", ha="left", va="top", fontsize=7.5, fontweight="bold", color=INK)
687
+ fig.text(
688
+ 0.50,
689
+ 0.045,
690
+ "The shared Generalist row is repeated for direct comparison; it is one baseline, not five specialists. Bold boxes mark matched MLPs.",
691
+ ha="center",
692
+ va="bottom",
693
+ fontsize=5.2,
694
+ color=MUTED,
695
+ )
696
+
697
+ output.parent.mkdir(parents=True, exist_ok=True)
698
+ fig.savefig(output, dpi=480, facecolor="white")
699
+ plt.close(fig)
700
+ print(f"saved {output}")
701
+
702
+
703
+ def draw_summary_matrix(
704
+ ax: plt.Axes,
705
+ matrix: np.ndarray,
706
+ cmap: LinearSegmentedColormap,
707
+ accent: str,
708
+ ) -> None:
709
+ regret = matrix - np.diag(matrix)[None, :]
710
+ ax.imshow(regret, cmap=cmap, norm=HEATMAP_NORM, aspect="equal")
711
+ labels = ["Code", "Math", "FQA", "Creat.", "Gen."]
712
+ ax.set_xticks(range(5), labels=labels)
713
+ ax.set_yticks(range(5), labels=labels)
714
+ ax.tick_params(axis="x", rotation=38, length=0, pad=2.0, labelsize=5.4)
715
+ ax.tick_params(axis="y", length=0, pad=2.2, labelsize=5.4)
716
+ ax.set_ylabel("Selected MLP", fontsize=6.1, fontweight="bold", labelpad=2.2)
717
+
718
+ for row in range(5):
719
+ for column in range(5):
720
+ normalized = HEATMAP_NORM(regret[row, column])
721
+ is_matched = row == column
722
+ ax.text(
723
+ column,
724
+ row,
725
+ f"{matrix[row, column]:.3f}",
726
+ ha="center",
727
+ va="center",
728
+ fontsize=5.2,
729
+ color="white" if normalized > 0.66 else INK,
730
+ fontweight="bold" if is_matched else "normal",
731
+ )
732
+ if is_matched:
733
+ ax.add_patch(
734
+ Rectangle(
735
+ (column - 0.47, row - 0.47),
736
+ 0.94,
737
+ 0.94,
738
+ facecolor="none",
739
+ edgecolor=accent,
740
+ linewidth=1.15,
741
+ )
742
+ )
743
+
744
+ ax.set_xticks(np.arange(-0.5, 5, 1), minor=True)
745
+ ax.set_yticks(np.arange(-0.5, 5, 1), minor=True)
746
+ ax.grid(which="minor", color="white", linewidth=0.95)
747
+ ax.tick_params(which="minor", bottom=False, left=False)
748
+ for spine in ax.spines.values():
749
+ spine.set_visible(False)
750
+
751
+
752
+ def draw_three_method_table(
753
+ ax: plt.Axes,
754
+ generalist: np.ndarray,
755
+ d0_matrix: np.ndarray,
756
+ warm_matrix: np.ndarray,
757
+ ) -> None:
758
+ d0 = np.diag(d0_matrix)
759
+ warm = np.diag(warm_matrix)
760
+ labels = DOMAIN_LABELS + ["Mean"]
761
+ generalist_values = np.concatenate([generalist, [np.mean(generalist)]])
762
+ d0_values = np.concatenate([d0, [np.mean(d0)]])
763
+ warm_values = np.concatenate([warm, [np.mean(warm)]])
764
+
765
+ ax.set_xlim(0.0, 1.0)
766
+ ax.set_ylim(0.0, 1.0)
767
+ ax.axis("off")
768
+ header_y = 0.875
769
+ ax.text(0.01, header_y, "Domain", ha="left", va="center", fontsize=5.9, color=MUTED, fontweight="bold")
770
+ ax.text(0.48, header_y, "Generalist", ha="right", va="center", fontsize=5.7, color=MUTED, fontweight="bold")
771
+ ax.text(0.75, header_y, "D0 MoS", ha="right", va="center", fontsize=5.7, color=D0, fontweight="bold")
772
+ ax.text(0.99, header_y, "G-init", ha="right", va="center", fontsize=5.7, color=WARM, fontweight="bold")
773
+ ax.plot([0.01, 0.99], [0.825, 0.825], color=RULE, lw=0.8)
774
+
775
+ ys = np.linspace(0.745, 0.245, len(labels))
776
+ for index, (label, gen_value, d0_value, warm_value, y) in enumerate(
777
+ zip(labels, generalist_values, d0_values, warm_values, ys)
778
+ ):
779
+ is_mean = index == len(labels) - 1
780
+ if is_mean:
781
+ ax.add_patch(
782
+ Rectangle(
783
+ (0.0, y - 0.045),
784
+ 1.0,
785
+ 0.090,
786
+ facecolor=ROW_FILL,
787
+ edgecolor="none",
788
+ zorder=0,
789
+ )
790
+ )
791
+ weight = "bold" if is_mean else "normal"
792
+ ax.text(0.01, y, label, ha="left", va="center", fontsize=5.8, color=INK, fontweight=weight)
793
+ ax.text(0.48, y, f"{gen_value:.3f}", ha="right", va="center", fontsize=5.8, color=MUTED, fontweight=weight)
794
+ ax.text(0.75, y, f"{d0_value:.3f}", ha="right", va="center", fontsize=5.8, color=D0, fontweight="bold")
795
+ ax.text(0.99, y, f"{warm_value:.3f}", ha="right", va="center", fontsize=5.8, color=WARM, fontweight="bold")
796
+
797
+ d0_delta = float(np.mean(d0) - np.mean(generalist))
798
+ warm_delta = float(np.mean(warm) - np.mean(generalist))
799
+ d0_percent = 100.0 * d0_delta / float(np.mean(generalist))
800
+ warm_percent = 100.0 * warm_delta / float(np.mean(generalist))
801
+ ax.text(
802
+ 0.99,
803
+ 0.105,
804
+ f"D0 mean gain +{d0_delta:.3f} / +{d0_percent:.1f}%",
805
+ ha="right",
806
+ va="center",
807
+ fontsize=5.4,
808
+ color=D0,
809
+ fontweight="bold",
810
+ )
811
+ ax.text(
812
+ 0.99,
813
+ 0.035,
814
+ f"G-init mean gain +{warm_delta:.3f} / +{warm_percent:.1f}%",
815
+ ha="right",
816
+ va="center",
817
+ fontsize=5.4,
818
+ color=WARM,
819
+ fontweight="bold",
820
+ )
821
+
822
+
823
+ def render_matrices_summary(
824
+ generalist: np.ndarray,
825
+ d0_matrix: np.ndarray,
826
+ warm_matrix: np.ndarray,
827
+ output: Path,
828
+ ) -> None:
829
+ fig = plt.figure(figsize=(7.15, 2.52), facecolor="white")
830
+ grid = fig.add_gridspec(
831
+ 1,
832
+ 3,
833
+ width_ratios=[1.0, 1.0, 1.18],
834
+ wspace=0.28,
835
+ left=0.065,
836
+ right=0.992,
837
+ top=0.77,
838
+ bottom=0.22,
839
+ )
840
+ ax_d0 = fig.add_subplot(grid[0, 0])
841
+ ax_warm = fig.add_subplot(grid[0, 1])
842
+ ax_table = fig.add_subplot(grid[0, 2])
843
+
844
+ draw_summary_matrix(ax_d0, d0_matrix, D0_CMAP, D0)
845
+ draw_summary_matrix(ax_warm, warm_matrix, WARM_CMAP, WARM)
846
+ draw_three_method_table(ax_table, generalist, d0_matrix, warm_matrix)
847
+
848
+ titles = (
849
+ (0.065, "A", "DFlash-init MoS"),
850
+ (0.360, "B", "Generalist-warm-start MoS"),
851
+ (0.670, "C", "Matched-domain AL"),
852
+ )
853
+ for x, letter, title in titles:
854
+ fig.text(x, 0.940, letter, ha="left", va="top", fontsize=8.7, fontweight="bold", color=INK)
855
+ fig.text(x + 0.025, 0.940, title, ha="left", va="top", fontsize=7.5, fontweight="bold", color=INK)
856
+
857
+ fig.text(
858
+ 0.50,
859
+ 0.045,
860
+ "Qwen3-8B target · fixed-seed selected checkpoints · matrix columns are evaluation domains; bold diagonal cells select the matched MLP.",
861
+ ha="center",
862
+ va="bottom",
863
+ fontsize=5.2,
864
+ color=MUTED,
865
+ )
866
+
867
+ output.parent.mkdir(parents=True, exist_ok=True)
868
+ fig.savefig(output, dpi=480, facecolor="white")
869
+ plt.close(fig)
870
+ print(f"saved {output}")
871
+
872
+
873
+ def main() -> None:
874
+ args = parse_args()
875
+ configure_style()
876
+ evidence, generalist = load_evidence(args.evidence)
877
+
878
+ d0_matrix = matrix_from_evidence(evidence, "panel_b_matrix_dflash_init")
879
+ warm_matrix = matrix_from_evidence(evidence, "panel_c_matrix_warm_start")
880
+
881
+ subtitle = (
882
+ "Qwen3-8B target · selected-checkpoint, fixed-seed evaluation · "
883
+ "rows: selected MLP; columns: evaluation domain"
884
+ )
885
+ render_one(
886
+ d0_matrix,
887
+ generalist,
888
+ "DFlash-initialized MoS: 5×5 routing matrix",
889
+ subtitle,
890
+ D0_CMAP,
891
+ D0,
892
+ args.output_dir / "fig_mos_d0_matrix_gains.png",
893
+ )
894
+ render_one(
895
+ warm_matrix,
896
+ generalist,
897
+ "Generalist-warm-started MoS: 5×5 routing matrix",
898
+ subtitle,
899
+ WARM_CMAP,
900
+ WARM,
901
+ args.output_dir / "fig_mos_ginit_matrix_gains.png",
902
+ )
903
+ render_generalist(
904
+ generalist,
905
+ "Qwen3-8B target · selected-checkpoint, fixed-seed evaluation · standard single-model DFlash",
906
+ args.output_dir / "fig_generalist_domain_al.png",
907
+ )
908
+ render_three_panel(
909
+ generalist,
910
+ d0_matrix,
911
+ warm_matrix,
912
+ args.output_dir / "fig_mos_three_panel.png",
913
+ )
914
+ render_baseline_aligned(
915
+ generalist,
916
+ d0_matrix,
917
+ warm_matrix,
918
+ args.output_dir / "fig_mos_baseline_aligned.png",
919
+ )
920
+ render_matrices_summary(
921
+ generalist,
922
+ d0_matrix,
923
+ warm_matrix,
924
+ args.output_dir / "fig_mos_matrices_summary.png",
925
+ )
926
+
927
+
928
+ if __name__ == "__main__":
929
+ main()