Auto Upload Agent commited on
Commit
f773b24
·
1 Parent(s): eb9c86c

v5: 移除臨時診斷;A/B 驗證 512/256/128MB 全部 all_passed=true

Browse files
patches/0001-st-expert-pager.patch CHANGED
@@ -53,7 +53,7 @@ index 1112ad885..e335a9d5f 100644
53
 
54
  if (weight_before_ffn) {
55
  diff --git a/src/llama-model.cpp b/src/llama-model.cpp
56
- index 1f3b80b08..662491537 100644
57
  --- a/src/llama-model.cpp
58
  +++ b/src/llama-model.cpp
59
  @@ -1,5 +1,7 @@
@@ -73,22 +73,11 @@ index 1f3b80b08..662491537 100644
73
  const auto & split_mode = params.split_mode;
74
  const bool use_mlock = params.load_mode == LLAMA_LOAD_MODE_MLOCK || params.load_mode == LLAMA_LOAD_MODE_MMAP_MLOCK;
75
  const auto & tensor_split = params.tensor_split;
76
- @@ -1821,7 +1825,24 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
77
  // per-tensor activation precision policy
78
  prec_policy.load(ml, *this);
79
 
80
  - ml.init_mappings(true, use_mlock ? &pimpl->mlock_mmaps : nullptr);
81
- + if (getenv("ST_VERBOSE")) {
82
- + FILE * f = fopen("/proc/self/status", "r");
83
- + char line[256];
84
- + while (f && fgets(line, sizeof line, f)) {
85
- + if (!strncmp(line, "VmRSS:", 6)) { fprintf(stderr, "[st] init_mappings 前 VmRSS%s", line + 6); break; }
86
- + }
87
- + if (f) fclose(f);
88
- + fprintf(stderr, " (prefetch=%d use_mmap=%d check_tensors=%d)\n",
89
- + (int) st::will_page(arch_name().c_str()), (int) ml.use_mmap, (int) ml.check_tensors);
90
- + }
91
- +
92
  + // ST expert pager:開著分頁時**不能** prefetch。
93
  + // llama.cpp 預設 prefetch=true 會用 MAP_POPULATE 把整個 GGUF(2.45 GiB)
94
  + // 在「載入模型」那一瞬间全部 fault 進 page cache —— 那一刻的 RSS 峰值
@@ -99,24 +88,7 @@ index 1f3b80b08..662491537 100644
99
  pimpl->mappings.reserve(ml.mappings.size());
100
 
101
  // create the backend buffers
102
- @@ -1956,6 +1977,16 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
103
- });
104
- }
105
-
106
- + if (getenv("ST_VERBOSE")) {
107
- + FILE * f = fopen("/proc/self/status", "r");
108
- + char line[256];
109
- + while (f && fgets(line, sizeof line, f)) {
110
- + if (!strncmp(line, "VmRSS:", 6)) { fprintf(stderr, "[st] load_all_data 前 VmRSS%s", line + 6); break; }
111
- + }
112
- + if (f) fclose(f);
113
- + fprintf(stderr, "\n");
114
- + }
115
- +
116
- // load tensor data
117
- for (auto & [ctx, buf_map] : ctx_buf_maps) {
118
- if (!ml.load_all_data(ctx, buf_map, use_mlock ? &pimpl->mlock_mmaps : NULL, params.progress_callback, params.progress_callback_user_data)) {
119
- @@ -1969,6 +2000,48 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
120
  }
121
  }
122
 
@@ -140,19 +112,6 @@ index 1f3b80b08..662491537 100644
140
  + by_name.emplace(nm, t);
141
  + }
142
  +
143
- + if (getenv("ST_VERBOSE")) {
144
- + FILE * f = fopen("/proc/self/status", "r");
145
- + char line[256];
146
- + while (f && fgets(line, sizeof line, f)) {
147
- + if (!strncmp(line, "VmRSS:", 6)) {
148
- + fprintf(stderr, "[st] 模型載入完成後 VmRSS%s", line + 6);
149
- + break;
150
- + }
151
- + }
152
- + if (f) fclose(f);
153
- + fprintf(stderr, "\n");
154
- + }
155
- +
156
  + if (getenv("ST_VERBOSE") && !map_base) {
157
  + LLAMA_LOG_INFO("%s: [st] 沒有 mapping(mappings=%zu files=%zu),無法分頁\n",
158
  + __func__, pimpl->mappings.size(), ml.files.size());
 
53
 
54
  if (weight_before_ffn) {
55
  diff --git a/src/llama-model.cpp b/src/llama-model.cpp
56
+ index 1f3b80b08..c7b77476e 100644
57
  --- a/src/llama-model.cpp
58
  +++ b/src/llama-model.cpp
59
  @@ -1,5 +1,7 @@
 
73
  const auto & split_mode = params.split_mode;
74
  const bool use_mlock = params.load_mode == LLAMA_LOAD_MODE_MLOCK || params.load_mode == LLAMA_LOAD_MODE_MMAP_MLOCK;
75
  const auto & tensor_split = params.tensor_split;
76
+ @@ -1821,7 +1825,13 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
77
  // per-tensor activation precision policy
78
  prec_policy.load(ml, *this);
79
 
80
  - ml.init_mappings(true, use_mlock ? &pimpl->mlock_mmaps : nullptr);
 
 
 
 
 
 
 
 
 
 
 
81
  + // ST expert pager:開著分頁時**不能** prefetch。
82
  + // llama.cpp 預設 prefetch=true 會用 MAP_POPULATE 把整個 GGUF(2.45 GiB)
83
  + // 在「載入模型」那一瞬间全部 fault 進 page cache —— 那一刻的 RSS 峰值
 
88
  pimpl->mappings.reserve(ml.mappings.size());
89
 
90
  // create the backend buffers
91
+ @@ -1969,6 +1979,35 @@ bool llama_model_base::load_tensors(llama_model_loader & ml) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  }
93
  }
94
 
 
112
  + by_name.emplace(nm, t);
113
  + }
114
  +
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  + if (getenv("ST_VERBOSE") && !map_base) {
116
  + LLAMA_LOG_INFO("%s: [st] 沒有 mapping(mappings=%zu files=%zu),無法分頁\n",
117
  + __func__, pimpl->mappings.size(), ml.files.size());
validate/ab-test.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "when": "2026-10-07T16:26:13+0200",
3
  "model": "/root/work/models/SmallThinker-4B-A0.6B-Instruct.Q4_K.gguf",
4
  "model_size_mib": 2508,
5
  "prompt": "Hello, who are you?",
@@ -12,590 +12,582 @@
12
  "ST_PAGER": "0"
13
  },
14
  "rc": 0,
15
- "seconds": 9.03,
16
  "peak": {
17
- "total_rss_gb": 2.5644,
18
  "anon_rss_gb": 0.1033,
19
- "file_rss_gb": 2.5587,
20
  "peak_swap_gb": 0.0,
21
- "hwm_rss_gb": 2.5644
22
  },
23
  "decode": {
24
- "total_rss_gb": 2.5644,
25
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
26
  },
27
  "rss_timeline_mib": [
28
  [
29
- 0.0,
30
- 0.6
31
  ],
32
  [
33
  0.207,
34
- 72.8
35
  ],
36
  [
37
- 0.413,
38
- 71.3
39
  ],
40
  [
41
  0.618,
42
- 117.7
43
  ],
44
  [
45
- 0.824,
46
- 187.4
47
  ],
48
  [
49
- 1.03,
50
- 255.4
51
  ],
52
  [
53
- 1.238,
54
- 326.7
55
  ],
56
  [
57
  1.451,
58
- 396.2
59
- ],
60
- [
61
- 1.66,
62
- 467.0
63
- ],
64
- [
65
- 1.87,
66
- 537.0
67
  ],
68
  [
69
- 2.08,
70
- 608.5
71
  ],
72
  [
73
- 2.291,
74
- 680.3
75
  ],
76
  [
77
- 2.504,
78
- 752.1
79
  ],
80
  [
81
- 2.723,
82
- 826.1
83
  ],
84
  [
85
- 2.938,
86
- 899.4
87
  ],
88
  [
89
- 3.154,
90
- 971.1
91
  ],
92
  [
93
- 3.37,
94
- 1044.4
95
  ],
96
  [
97
- 3.586,
98
- 1118.2
99
  ],
100
  [
101
- 3.803,
102
- 1191.2
103
  ],
104
  [
105
- 4.022,
106
- 1264.2
107
  ],
108
  [
109
- 4.241,
110
- 1338.3
111
  ],
112
  [
113
- 4.462,
114
- 1412.8
115
  ],
116
  [
117
- 4.695,
118
- 1489.0
119
  ],
120
  [
121
- 4.924,
122
- 1565.8
123
  ],
124
  [
125
- 5.154,
126
- 1642.8
127
  ],
128
  [
129
- 5.382,
130
- 1718.1
131
  ],
132
  [
133
- 5.608,
134
- 1795.6
135
  ],
136
  [
137
- 5.835,
138
- 1871.4
139
  ],
140
  [
141
- 6.063,
142
- 1947.9
143
  ],
144
  [
145
- 6.291,
146
- 2024.5
147
  ],
148
  [
149
- 6.522,
150
- 2100.2
151
  ],
152
  [
153
- 6.755,
154
- 2177.5
155
  ],
156
  [
157
- 6.987,
158
- 2255.8
159
  ],
160
  [
161
- 7.221,
162
- 2334.3
163
  ],
164
  [
165
- 7.459,
166
- 2411.6
167
  ],
168
  [
169
- 7.696,
170
- 2487.6
171
  ],
172
  [
173
- 7.934,
174
- 2566.1
175
  ],
176
  [
177
- 8.173,
178
- 2620.2
179
  ],
180
  [
181
- 8.414,
182
- 2626.0
183
  ],
184
  [
185
- 8.665,
186
- 2626.0
187
  ],
188
  [
189
- 8.918,
190
- 2626.0
191
  ]
192
  ],
193
  "io_delta": {},
194
- "timing_line": "[ Prompt: 198.1 t/s | Generation: 55.6 t/s ]",
195
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
196
  "output_matches_baseline": true,
197
  "swap_zero": true,
198
  "rc_ok": true
199
  },
200
- "budget1024mb": {
201
  "env": {
202
  "ST_PAGER": "1",
203
- "ST_RAM_BUDGET_MB": "1024",
204
  "ST_RESERVE_MB": "200"
205
  },
206
  "rc": 0,
207
- "seconds": 7.6,
208
  "peak": {
209
- "total_rss_gb": 1.3011,
210
  "anon_rss_gb": 0.103,
211
- "file_rss_gb": 1.3028,
212
  "peak_swap_gb": 0.0,
213
- "hwm_rss_gb": 1.3011
214
  },
215
  "decode": {
216
- "total_rss_gb": 1.3011,
217
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
218
  },
219
  "rss_timeline_mib": [
220
  [
221
  0.0,
222
- 0.5
223
- ],
224
- [
225
- 0.205,
226
- 75.9
227
  ],
228
  [
229
- 0.41,
230
- 72.6
231
  ],
232
  [
233
- 0.623,
234
- 135.2
235
  ],
236
  [
237
- 0.831,
238
- 189.9
239
  ],
240
  [
241
- 1.041,
242
- 247.8
243
  ],
244
  [
245
- 1.251,
246
- 306.1
247
  ],
248
  [
249
- 1.463,
250
- 364.3
251
  ],
252
  [
253
- 1.676,
254
- 424.6
255
  ],
256
  [
257
- 1.892,
258
- 482.6
259
  ],
260
  [
261
- 2.117,
262
- 604.1
263
  ],
264
  [
265
- 2.341,
266
- 688.7
267
  ],
268
  [
269
- 2.564,
270
- 746.2
271
  ],
272
  [
273
- 2.787,
274
- 828.9
275
  ],
276
  [
277
- 3.025,
278
- 913.8
279
  ],
280
  [
281
- 3.254,
282
- 994.6
283
  ],
284
  [
285
- 3.481,
286
- 1080.7
287
  ],
288
  [
289
- 3.711,
290
- 1166.4
291
  ],
292
  [
293
- 3.941,
294
- 1236.5
295
  ],
296
  [
297
- 4.18,
298
- 1228.6
299
  ],
300
  [
301
- 4.416,
302
- 1241.3
303
  ],
304
  [
305
- 4.65,
306
- 1204.6
307
  ],
308
  [
309
- 4.888,
310
- 1212.4
311
  ],
312
  [
313
- 5.128,
314
- 1250.3
315
  ],
316
  [
317
- 5.368,
318
- 1211.6
319
  ],
320
  [
321
- 5.605,
322
- 1218.1
323
  ],
324
  [
325
- 5.837,
326
- 1200.6
327
  ],
328
  [
329
- 6.07,
330
- 1248.6
331
  ],
332
  [
333
- 6.304,
334
- 1271.8
335
  ],
336
  [
337
- 6.55,
338
- 1315.0
339
  ],
340
  [
341
- 6.794,
342
- 1322.1
343
  ],
344
  [
345
- 7.043,
346
- 1329.8
347
  ],
348
  [
349
- 7.304,
350
- 1326.6
351
  ],
352
  [
353
- 7.553,
354
- 475.5
355
  ]
356
  ],
357
  "io_delta": {},
358
- "timing_line": "[ Prompt: 8.1 t/s | Generation: 24.2 t/s ]",
359
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
360
  "pager": {
361
  "routing_calls": 8448,
362
  "expert_touches": 64544,
363
- "hits": 37015,
364
- "misses": 2273,
365
- "evictions": 2894,
366
- "evicted_bytes": 6197382144,
367
- "sweeps": 864,
368
- "resident_bytes": 863972352,
369
- "budget_bytes": 864026624,
370
- "hit_rate": 0.5735,
371
- "proc_self_read_bytes": 2429562880,
372
  "proc_self_rchar": 11947223
373
  },
374
  "output_matches_baseline": true,
375
  "swap_zero": true,
376
  "rc_ok": true,
377
- "rss_vs_baseline": -1.2633,
378
- "decode_rss_vs_baseline": -1.2633,
379
  "decode_rss_lower_than_baseline": true,
380
  "rss_lower_than_baseline": true,
381
- "ssd_reads_mib": 2317.0,
382
  "cold_weights_really_read_from_ssd": true,
383
- "pager_hit_rate": 0.5735,
384
- "pager_evictions": 2894,
385
- "pager_misses": 2273,
386
- "pager_resident_mib": 823.9,
387
- "pager_budget_mib": 824.0
388
  },
389
- "budget512mb": {
390
  "env": {
391
  "ST_PAGER": "1",
392
- "ST_RAM_BUDGET_MB": "512",
393
  "ST_RESERVE_MB": "200"
394
  },
395
  "rc": 0,
396
- "seconds": 7.79,
397
  "peak": {
398
- "total_rss_gb": 0.8316,
399
- "anon_rss_gb": 0.103,
400
- "file_rss_gb": 0.8276,
401
  "peak_swap_gb": 0.0,
402
- "hwm_rss_gb": 0.8316
403
  },
404
  "decode": {
405
- "total_rss_gb": 0.8316,
406
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
407
  },
408
  "rss_timeline_mib": [
409
  [
410
  0.0,
411
- 0.6
412
  ],
413
  [
414
- 0.205,
415
- 75.8
416
  ],
417
  [
418
- 0.409,
419
- 76.5
420
  ],
421
  [
422
- 0.627,
423
- 141.0
424
  ],
425
  [
426
- 0.834,
427
- 202.7
428
  ],
429
  [
430
- 1.043,
431
- 261.2
432
  ],
433
  [
434
- 1.252,
435
- 319.1
436
  ],
437
  [
438
- 1.464,
439
- 372.0
440
  ],
441
  [
442
- 1.679,
443
- 425.2
444
  ],
445
  [
446
- 1.894,
447
- 479.1
448
  ],
449
  [
450
- 2.113,
451
- 602.5
452
  ],
453
  [
454
- 2.334,
455
- 686.2
456
  ],
457
  [
458
- 2.559,
459
- 721.0
460
  ],
461
  [
462
- 2.781,
463
- 694.2
464
  ],
465
  [
466
- 3.008,
467
- 729.6
468
  ],
469
  [
470
- 3.231,
471
- 711.1
472
  ],
473
  [
474
- 3.456,
475
- 740.1
476
  ],
477
  [
478
- 3.69,
479
- 738.7
480
  ],
481
  [
482
- 3.92,
483
- 721.3
484
  ],
485
  [
486
- 4.143,
487
- 712.6
488
  ],
489
  [
490
- 4.367,
491
- 711.4
492
  ],
493
  [
494
- 4.595,
495
- 728.2
496
  ],
497
  [
498
- 4.825,
499
- 728.1
500
  ],
501
  [
502
- 5.049,
503
- 726.2
504
  ],
505
  [
506
- 5.274,
507
- 724.0
508
  ],
509
  [
510
- 5.5,
511
- 722.1
512
  ],
513
  [
514
- 5.749,
515
- 729.2
516
  ],
517
  [
518
- 5.981,
519
- 711.0
520
  ],
521
  [
522
- 6.208,
523
- 748.3
524
  ],
525
  [
526
- 6.436,
527
- 770.3
528
  ],
529
  [
530
- 6.667,
531
- 817.9
532
  ],
533
  [
534
- 6.898,
535
- 837.3
536
  ],
537
  [
538
- 7.127,
539
- 843.5
540
  ],
541
  [
542
- 7.356,
543
- 840.8
544
  ],
545
  [
546
- 7.584,
547
- 844.6
 
 
 
 
548
  ]
549
  ],
550
  "io_delta": {},
551
- "timing_line": "[ Prompt: 7.9 t/s | Generation: 23.3 t/s ]",
552
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
553
  "pager": {
554
  "routing_calls": 8448,
555
  "expert_touches": 64544,
556
- "hits": 35587,
557
- "misses": 3701,
558
- "evictions": 4572,
559
- "evicted_bytes": 9822062592,
560
- "sweeps": 1046,
561
- "resident_bytes": 327075840,
562
- "budget_bytes": 327155712,
563
- "hit_rate": 0.5514,
564
- "proc_self_read_bytes": 2427265024,
565
  "proc_self_rchar": 11947223
566
  },
567
  "output_matches_baseline": true,
568
  "swap_zero": true,
569
  "rc_ok": true,
570
- "rss_vs_baseline": -1.7328,
571
- "decode_rss_vs_baseline": -1.7328,
572
  "decode_rss_lower_than_baseline": true,
573
  "rss_lower_than_baseline": true,
574
- "ssd_reads_mib": 2314.8,
575
  "cold_weights_really_read_from_ssd": true,
576
- "pager_hit_rate": 0.5514,
577
- "pager_evictions": 4572,
578
- "pager_misses": 3701,
579
- "pager_resident_mib": 311.9,
580
- "pager_budget_mib": 312.0
581
  },
582
- "budget256mb": {
583
  "env": {
584
  "ST_PAGER": "1",
585
- "ST_RAM_BUDGET_MB": "256",
586
  "ST_RESERVE_MB": "200"
587
  },
588
  "rc": 0,
589
- "seconds": 7.97,
590
  "peak": {
591
- "total_rss_gb": 0.5875,
592
  "anon_rss_gb": 0.1029,
593
- "file_rss_gb": 0.5864,
594
  "peak_swap_gb": 0.0,
595
- "hwm_rss_gb": 0.5875
596
  },
597
  "decode": {
598
- "total_rss_gb": 0.5875,
599
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
600
  },
601
  "rss_timeline_mib": [
@@ -605,176 +597,164 @@
605
  ],
606
  [
607
  0.206,
608
- 76.1
609
  ],
610
  [
611
- 0.411,
612
- 72.7
613
  ],
614
  [
615
  0.618,
616
- 140.0
617
- ],
618
- [
619
- 0.826,
620
- 192.9
621
- ],
622
- [
623
- 1.034,
624
- 214.1
625
  ],
626
  [
627
- 1.244,
628
- 233.8
629
  ],
630
  [
631
- 1.456,
632
- 250.4
633
  ],
634
  [
635
- 1.667,
636
- 271.8
637
- ],
638
- [
639
- 1.881,
640
- 284.4
641
  ],
642
  [
643
- 2.094,
644
- 371.8
645
  ],
646
  [
647
- 2.312,
648
- 482.8
649
  ],
650
  [
651
- 2.531,
652
- 471.7
653
  ],
654
  [
655
- 2.753,
656
- 439.1
657
  ],
658
  [
659
- 2.976,
660
- 468.5
661
  ],
662
  [
663
- 3.2,
664
- 444.3
665
  ],
666
  [
667
- 3.425,
668
- 486.4
669
  ],
670
  [
671
- 3.649,
672
- 478.2
673
  ],
674
  [
675
- 3.883,
676
- 459.5
677
  ],
678
  [
679
- 4.105,
680
- 448.2
681
  ],
682
  [
683
- 4.33,
684
- 440.3
685
  ],
686
  [
687
- 4.553,
688
- 448.0
689
  ],
690
  [
691
- 4.784,
692
- 452.0
693
  ],
694
  [
695
- 5.024,
696
- 452.2
697
  ],
698
  [
699
- 5.244,
700
- 438.6
701
  ],
702
  [
703
- 5.465,
704
- 436.2
705
  ],
706
  [
707
- 5.686,
708
- 438.4
709
  ],
710
  [
711
- 5.909,
712
- 484.5
713
  ],
714
  [
715
- 6.139,
716
- 460.0
717
  ],
718
  [
719
- 6.365,
720
- 489.1
721
  ],
722
  [
723
- 6.596,
724
- 558.0
725
  ],
726
  [
727
- 6.834,
728
- 576.9
729
  ],
730
  [
731
- 7.071,
732
- 592.4
733
  ],
734
  [
735
- 7.325,
736
- 594.1
737
  ],
738
  [
739
- 7.561,
740
- 599.6
741
  ],
742
  [
743
- 7.798,
744
- 594.5
745
  ]
746
  ],
747
  "io_delta": {},
748
- "timing_line": "[ Prompt: 7.9 t/s | Generation: 20.3 t/s ]",
749
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
750
  "pager": {
751
  "routing_calls": 8448,
752
  "expert_touches": 64544,
753
- "hits": 34660,
754
- "misses": 4628,
755
- "evictions": 5625,
756
- "evicted_bytes": 12070591488,
757
- "sweeps": 1280,
758
- "resident_bytes": 57701376,
759
- "budget_bytes": 58720256,
760
- "hit_rate": 0.537,
761
- "proc_self_read_bytes": 2428882944,
762
  "proc_self_rchar": 11947223
763
  },
764
  "output_matches_baseline": true,
765
  "swap_zero": true,
766
  "rc_ok": true,
767
- "rss_vs_baseline": -1.9769,
768
- "decode_rss_vs_baseline": -1.9769,
769
  "decode_rss_lower_than_baseline": true,
770
  "rss_lower_than_baseline": true,
771
- "ssd_reads_mib": 2316.4,
772
  "cold_weights_really_read_from_ssd": true,
773
- "pager_hit_rate": 0.537,
774
- "pager_evictions": 5625,
775
- "pager_misses": 4628,
776
- "pager_resident_mib": 55.0,
777
- "pager_budget_mib": 56.0
778
  }
779
  },
780
  "all_passed": true
 
1
  {
2
+ "when": "2026-10-07T16:27:36+0200",
3
  "model": "/root/work/models/SmallThinker-4B-A0.6B-Instruct.Q4_K.gguf",
4
  "model_size_mib": 2508,
5
  "prompt": "Hello, who are you?",
 
12
  "ST_PAGER": "0"
13
  },
14
  "rc": 0,
15
+ "seconds": 8.77,
16
  "peak": {
17
+ "total_rss_gb": 2.5642,
18
  "anon_rss_gb": 0.1033,
19
+ "file_rss_gb": 2.5584,
20
  "peak_swap_gb": 0.0,
21
+ "hwm_rss_gb": 2.5642
22
  },
23
  "decode": {
24
+ "total_rss_gb": 2.5642,
25
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
26
  },
27
  "rss_timeline_mib": [
28
  [
29
+ 0.001,
30
+ 0.9
31
  ],
32
  [
33
  0.207,
34
+ 75.7
35
  ],
36
  [
37
+ 0.412,
38
+ 76.6
39
  ],
40
  [
41
  0.618,
42
+ 131.8
43
  ],
44
  [
45
+ 0.825,
46
+ 201.6
47
  ],
48
  [
49
+ 1.034,
50
+ 272.6
51
  ],
52
  [
53
+ 1.243,
54
+ 344.4
55
  ],
56
  [
57
  1.451,
58
+ 415.4
 
 
 
 
 
 
 
 
59
  ],
60
  [
61
+ 1.661,
62
+ 486.4
63
  ],
64
  [
65
+ 1.871,
66
+ 558.2
67
  ],
68
  [
69
+ 2.082,
70
+ 628.2
71
  ],
72
  [
73
+ 2.294,
74
+ 700.2
75
  ],
76
  [
77
+ 2.507,
78
+ 772.2
79
  ],
80
  [
81
+ 2.725,
82
+ 845.8
83
  ],
84
  [
85
+ 2.945,
86
+ 919.8
87
  ],
88
  [
89
+ 3.167,
90
+ 995.3
91
  ],
92
  [
93
+ 3.4,
94
+ 1072.8
95
  ],
96
  [
97
+ 3.618,
98
+ 1147.3
99
  ],
100
  [
101
+ 3.836,
102
+ 1220.1
103
  ],
104
  [
105
+ 4.056,
106
+ 1293.9
107
  ],
108
  [
109
+ 4.276,
110
+ 1367.7
111
  ],
112
  [
113
+ 4.509,
114
+ 1444.9
115
  ],
116
  [
117
+ 4.735,
118
+ 1519.7
119
  ],
120
  [
121
+ 4.966,
122
+ 1597.7
123
  ],
124
  [
125
+ 5.198,
126
+ 1675.3
127
  ],
128
  [
129
+ 5.438,
130
+ 1754.3
131
  ],
132
  [
133
+ 5.665,
134
+ 1830.3
135
  ],
136
  [
137
+ 5.894,
138
+ 1907.3
139
  ],
140
  [
141
+ 6.123,
142
+ 1984.9
143
  ],
144
  [
145
+ 6.357,
146
+ 2061.1
147
  ],
148
  [
149
+ 6.59,
150
+ 2140.4
151
  ],
152
  [
153
+ 6.821,
154
+ 2218.9
155
  ],
156
  [
157
+ 7.052,
158
+ 2295.9
159
  ],
160
  [
161
+ 7.284,
162
+ 2372.7
163
  ],
164
  [
165
+ 7.524,
166
+ 2452.5
167
  ],
168
  [
169
+ 7.782,
170
+ 2537.0
171
  ],
172
  [
173
+ 8.03,
174
+ 2620.0
175
  ],
176
  [
177
+ 8.276,
178
+ 2625.7
179
  ],
180
  [
181
+ 8.525,
182
+ 2625.7
183
  ]
184
  ],
185
  "io_delta": {},
186
+ "timing_line": "[ Prompt: 190.1 t/s | Generation: 61.3 t/s ]",
187
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
188
  "output_matches_baseline": true,
189
  "swap_zero": true,
190
  "rc_ok": true
191
  },
192
+ "budget512mb": {
193
  "env": {
194
  "ST_PAGER": "1",
195
+ "ST_RAM_BUDGET_MB": "512",
196
  "ST_RESERVE_MB": "200"
197
  },
198
  "rc": 0,
199
+ "seconds": 7.54,
200
  "peak": {
201
+ "total_rss_gb": 0.8332,
202
  "anon_rss_gb": 0.103,
203
+ "file_rss_gb": 0.8308,
204
  "peak_swap_gb": 0.0,
205
+ "hwm_rss_gb": 0.8332
206
  },
207
  "decode": {
208
+ "total_rss_gb": 0.8332,
209
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
210
  },
211
  "rss_timeline_mib": [
212
  [
213
  0.0,
214
+ 0.6
 
 
 
 
215
  ],
216
  [
217
+ 0.208,
218
+ 75.7
219
  ],
220
  [
221
+ 0.414,
222
+ 76.2
223
  ],
224
  [
225
+ 0.622,
226
+ 141.0
227
  ],
228
  [
229
+ 0.834,
230
+ 200.4
231
  ],
232
  [
233
+ 1.047,
234
+ 261.3
235
  ],
236
  [
237
+ 1.261,
238
+ 317.8
239
  ],
240
  [
241
+ 1.477,
242
+ 380.5
243
  ],
244
  [
245
+ 1.694,
246
+ 439.4
247
  ],
248
  [
249
+ 1.914,
250
+ 509.0
251
  ],
252
  [
253
+ 2.144,
254
+ 646.4
255
  ],
256
  [
257
+ 2.395,
258
+ 739.6
259
  ],
260
  [
261
+ 2.645,
262
+ 731.2
263
  ],
264
  [
265
+ 2.889,
266
+ 716.3
267
  ],
268
  [
269
+ 3.136,
270
+ 703.3
271
  ],
272
  [
273
+ 3.406,
274
+ 714.2
275
  ],
276
  [
277
+ 3.662,
278
+ 709.8
279
  ],
280
  [
281
+ 3.907,
282
+ 707.7
283
  ],
284
  [
285
+ 4.133,
286
+ 706.1
287
  ],
288
  [
289
+ 4.357,
290
+ 714.0
291
  ],
292
  [
293
+ 4.582,
294
+ 717.4
295
  ],
296
  [
297
+ 4.806,
298
+ 714.7
299
  ],
300
  [
301
+ 5.031,
302
+ 711.4
303
  ],
304
  [
305
+ 5.258,
306
+ 709.2
307
  ],
308
  [
309
+ 5.486,
310
+ 711.9
311
  ],
312
  [
313
+ 5.709,
314
+ 691.6
315
  ],
316
  [
317
+ 5.933,
318
+ 732.7
319
  ],
320
  [
321
+ 6.156,
322
+ 756.3
323
  ],
324
  [
325
+ 6.389,
326
+ 812.4
327
  ],
328
  [
329
+ 6.627,
330
+ 834.9
331
  ],
332
  [
333
+ 6.865,
334
+ 846.6
335
  ],
336
  [
337
+ 7.1,
338
+ 847.0
339
  ],
340
  [
341
+ 7.356,
342
+ 852.7
343
  ]
344
  ],
345
  "io_delta": {},
346
+ "timing_line": "[ Prompt: 7.9 t/s | Generation: 23.1 t/s ]",
347
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
348
  "pager": {
349
  "routing_calls": 8448,
350
  "expert_touches": 64544,
351
+ "hits": 35587,
352
+ "misses": 3701,
353
+ "evictions": 4572,
354
+ "evicted_bytes": 9822062592,
355
+ "sweeps": 1046,
356
+ "resident_bytes": 327075840,
357
+ "budget_bytes": 327155712,
358
+ "hit_rate": 0.5514,
359
+ "proc_self_read_bytes": 2426560512,
360
  "proc_self_rchar": 11947223
361
  },
362
  "output_matches_baseline": true,
363
  "swap_zero": true,
364
  "rc_ok": true,
365
+ "rss_vs_baseline": -1.731,
366
+ "decode_rss_vs_baseline": -1.731,
367
  "decode_rss_lower_than_baseline": true,
368
  "rss_lower_than_baseline": true,
369
+ "ssd_reads_mib": 2314.1,
370
  "cold_weights_really_read_from_ssd": true,
371
+ "pager_hit_rate": 0.5514,
372
+ "pager_evictions": 4572,
373
+ "pager_misses": 3701,
374
+ "pager_resident_mib": 311.9,
375
+ "pager_budget_mib": 312.0
376
  },
377
+ "budget256mb": {
378
  "env": {
379
  "ST_PAGER": "1",
380
+ "ST_RAM_BUDGET_MB": "256",
381
  "ST_RESERVE_MB": "200"
382
  },
383
  "rc": 0,
384
+ "seconds": 7.77,
385
  "peak": {
386
+ "total_rss_gb": 0.6013,
387
+ "anon_rss_gb": 0.1029,
388
+ "file_rss_gb": 0.6017,
389
  "peak_swap_gb": 0.0,
390
+ "hwm_rss_gb": 0.6013
391
  },
392
  "decode": {
393
+ "total_rss_gb": 0.6013,
394
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
395
  },
396
  "rss_timeline_mib": [
397
  [
398
  0.0,
399
+ 0.4
400
  ],
401
  [
402
+ 0.206,
403
+ 76.1
404
  ],
405
  [
406
+ 0.412,
407
+ 71.5
408
  ],
409
  [
410
+ 0.619,
411
+ 133.1
412
  ],
413
  [
414
+ 0.828,
415
+ 188.8
416
  ],
417
  [
418
+ 1.039,
419
+ 211.1
420
  ],
421
  [
422
+ 1.25,
423
+ 224.4
424
  ],
425
  [
426
+ 1.46,
427
+ 246.7
428
  ],
429
  [
430
+ 1.671,
431
+ 270.4
432
  ],
433
  [
434
+ 1.885,
435
+ 285.9
436
  ],
437
  [
438
+ 2.102,
439
+ 363.2
440
  ],
441
  [
442
+ 2.325,
443
+ 483.0
444
  ],
445
  [
446
+ 2.549,
447
+ 480.7
448
  ],
449
  [
450
+ 2.769,
451
+ 456.0
452
  ],
453
  [
454
+ 2.986,
455
+ 435.9
456
  ],
457
  [
458
+ 3.205,
459
+ 481.1
460
  ],
461
  [
462
+ 3.423,
463
+ 462.3
464
  ],
465
  [
466
+ 3.64,
467
+ 444.1
468
  ],
469
  [
470
+ 3.858,
471
+ 477.7
472
  ],
473
  [
474
+ 4.077,
475
+ 464.8
476
  ],
477
  [
478
+ 4.3,
479
+ 461.9
480
  ],
481
  [
482
+ 4.524,
483
+ 470.7
484
  ],
485
  [
486
+ 4.743,
487
+ 470.7
488
  ],
489
  [
490
+ 4.963,
491
+ 465.0
492
  ],
493
  [
494
+ 5.185,
495
+ 457.7
496
  ],
497
  [
498
+ 5.404,
499
+ 456.4
500
  ],
501
  [
502
+ 5.623,
503
+ 460.3
504
  ],
505
  [
506
+ 5.841,
507
+ 444.7
508
  ],
509
  [
510
+ 6.06,
511
+ 483.1
512
  ],
513
  [
514
+ 6.28,
515
+ 511.2
516
  ],
517
  [
518
+ 6.51,
519
+ 563.8
520
  ],
521
  [
522
+ 6.743,
523
+ 593.6
524
  ],
525
  [
526
+ 6.987,
527
+ 603.9
528
  ],
529
  [
530
+ 7.234,
531
+ 608.2
532
  ],
533
  [
534
+ 7.479,
535
+ 614.6
536
+ ],
537
+ [
538
+ 7.733,
539
+ 77.2
540
  ]
541
  ],
542
  "io_delta": {},
543
+ "timing_line": "[ Prompt: 8.1 t/s | Generation: 21.6 t/s ]",
544
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
545
  "pager": {
546
  "routing_calls": 8448,
547
  "expert_touches": 64544,
548
+ "hits": 34660,
549
+ "misses": 4628,
550
+ "evictions": 5625,
551
+ "evicted_bytes": 12070591488,
552
+ "sweeps": 1280,
553
+ "resident_bytes": 57701376,
554
+ "budget_bytes": 58720256,
555
+ "hit_rate": 0.537,
556
+ "proc_self_read_bytes": 2432499712,
557
  "proc_self_rchar": 11947223
558
  },
559
  "output_matches_baseline": true,
560
  "swap_zero": true,
561
  "rc_ok": true,
562
+ "rss_vs_baseline": -1.9629,
563
+ "decode_rss_vs_baseline": -1.9629,
564
  "decode_rss_lower_than_baseline": true,
565
  "rss_lower_than_baseline": true,
566
+ "ssd_reads_mib": 2319.8,
567
  "cold_weights_really_read_from_ssd": true,
568
+ "pager_hit_rate": 0.537,
569
+ "pager_evictions": 5625,
570
+ "pager_misses": 4628,
571
+ "pager_resident_mib": 55.0,
572
+ "pager_budget_mib": 56.0
573
  },
574
+ "budget128mb": {
575
  "env": {
576
  "ST_PAGER": "1",
577
+ "ST_RAM_BUDGET_MB": "128",
578
  "ST_RESERVE_MB": "200"
579
  },
580
  "rc": 0,
581
+ "seconds": 7.69,
582
  "peak": {
583
+ "total_rss_gb": 0.6643,
584
  "anon_rss_gb": 0.1029,
585
+ "file_rss_gb": 0.6689,
586
  "peak_swap_gb": 0.0,
587
+ "hwm_rss_gb": 0.6643
588
  },
589
  "decode": {
590
+ "total_rss_gb": 0.6643,
591
  "note": "prefill 後的峰值;prefill 會摸遍全部 expert,所以 peak 不代表 decode"
592
  },
593
  "rss_timeline_mib": [
 
597
  ],
598
  [
599
  0.206,
600
+ 76.2
601
  ],
602
  [
603
+ 0.412,
604
+ 71.5
605
  ],
606
  [
607
  0.618,
608
+ 134.8
 
 
 
 
 
 
 
 
609
  ],
610
  [
611
+ 0.827,
612
+ 189.1
613
  ],
614
  [
615
+ 1.038,
616
+ 248.9
617
  ],
618
  [
619
+ 1.251,
620
+ 306.3
 
 
 
 
621
  ],
622
  [
623
+ 1.464,
624
+ 319.8
625
  ],
626
  [
627
+ 1.681,
628
+ 346.8
629
  ],
630
  [
631
+ 1.903,
632
+ 361.4
633
  ],
634
  [
635
+ 2.128,
636
+ 489.9
637
  ],
638
  [
639
+ 2.364,
640
+ 555.3
641
  ],
642
  [
643
+ 2.601,
644
+ 557.8
645
  ],
646
  [
647
+ 2.84,
648
+ 555.9
649
  ],
650
  [
651
+ 3.077,
652
+ 539.4
653
  ],
654
  [
655
+ 3.316,
656
+ 528.6
657
  ],
658
  [
659
+ 3.56,
660
+ 535.8
661
  ],
662
  [
663
+ 3.801,
664
+ 538.3
665
  ],
666
  [
667
+ 4.038,
668
+ 530.6
669
  ],
670
  [
671
+ 4.276,
672
+ 542.2
673
  ],
674
  [
675
+ 4.515,
676
+ 525.9
677
  ],
678
  [
679
+ 4.755,
680
+ 529.8
681
  ],
682
  [
683
+ 4.997,
684
+ 522.7
685
  ],
686
  [
687
+ 5.239,
688
+ 538.4
689
  ],
690
  [
691
+ 5.482,
692
+ 543.8
693
  ],
694
  [
695
+ 5.724,
696
+ 546.0
697
  ],
698
  [
699
+ 5.967,
700
+ 536.0
701
  ],
702
  [
703
+ 6.211,
704
+ 581.3
705
  ],
706
  [
707
+ 6.46,
708
+ 637.1
709
  ],
710
  [
711
+ 6.713,
712
+ 660.9
713
  ],
714
  [
715
+ 6.968,
716
+ 669.3
717
  ],
718
  [
719
+ 7.222,
720
+ 679.7
721
  ],
722
  [
723
+ 7.473,
724
+ 675.8
725
  ]
726
  ],
727
  "io_delta": {},
728
+ "timing_line": "[ Prompt: 8.3 t/s | Generation: 21.8 t/s ]",
729
  "output": "Hello! 😊 I'm DeepSeek-R1, your friendly AI assistant. I'm here to help with all kinds of questions, learning, and creative tasks",
730
  "pager": {
731
  "routing_calls": 8448,
732
  "expert_touches": 64544,
733
+ "hits": 34952,
734
+ "misses": 4336,
735
+ "evictions": 5298,
736
+ "evicted_bytes": 11377677312,
737
+ "sweeps": 1054,
738
+ "resident_bytes": 132240384,
739
+ "budget_bytes": 134217728,
740
+ "hit_rate": 0.5415,
741
+ "proc_self_read_bytes": 2429865984,
742
  "proc_self_rchar": 11947223
743
  },
744
  "output_matches_baseline": true,
745
  "swap_zero": true,
746
  "rc_ok": true,
747
+ "rss_vs_baseline": -1.8999,
748
+ "decode_rss_vs_baseline": -1.8999,
749
  "decode_rss_lower_than_baseline": true,
750
  "rss_lower_than_baseline": true,
751
+ "ssd_reads_mib": 2317.3,
752
  "cold_weights_really_read_from_ssd": true,
753
+ "pager_hit_rate": 0.5415,
754
+ "pager_evictions": 5298,
755
+ "pager_misses": 4336,
756
+ "pager_resident_mib": 126.1,
757
+ "pager_budget_mib": 128.0
758
  }
759
  },
760
  "all_passed": true