Преглед изворни кода

bench: --no-depth flag — skip the 16K..256K depth suite (quick-grasp campaigns: scenarios + typical-depth perf only)

Alexander Korolev пре 1 недеља
родитељ
комит
f93a151d40
3 измењених фајлова са 30 додато и 16 уклоњено
  1. 24 16
      src/bench.rs
  2. 4 0
      src/cli.rs
  3. 2 0
      src/main.rs

+ 24 - 16
src/bench.rs

@@ -33,6 +33,9 @@ pub struct Args {
     pub parallel: Option<u32>,
     /// Skip the scenario phase (tool `--perf-only`).
     pub perf_only: bool,
+    /// Skip the context-depth suite (16K..256K) — run only the main pass
+    /// (scenarios + the typical-depth perf rows).
+    pub no_depth: bool,
     /// Local tokenizer source for llama-benchy (tool `--tokenizer`): a
     /// tokenizer.json or a dir holding one. Needed when the served model
     /// id is not resolvable in the local HF cache (custom export lanes).
@@ -295,24 +298,29 @@ pub async fn run(config: &Config, a: &Args, dry_run: bool) -> Result<()> {
     // Phase 2 — context-depth suite (16K..256K @ c2, 2 repeats): appended
     // to the same log so `parse_perf_rows` picks its rows up too. A depth
     // failure must not cost the finished quality run — warn, keep going.
-    eprintln!(
-        "bench: depth suite: {} @ c{}, {} repeats{}",
-        crate::bench_depth::DEPTHS,
-        crate::bench_depth::CONCURRENCY,
-        crate::bench_depth::RUNS,
-        if a.tokenizer.is_some() {
-            " (+tokenizer)"
-        } else {
-            ""
-        }
-    );
-    fs::create_dir_all(&depth_scratch)?;
-    let dcode = run_tool(&bin, &depth_args, &depth_scratch, &log_path, true, ssh_host)?;
-    if dcode != 0 {
+    // `--no-depth` skips the whole phase (quick-grasp campaigns).
+    if !a.no_depth {
         eprintln!(
-            "bench: WARNING depth suite exited with {dcode} — main report unaffected ({})",
-            log_path.display()
+            "bench: depth suite: {} @ c{}, {} repeats{}",
+            crate::bench_depth::DEPTHS,
+            crate::bench_depth::CONCURRENCY,
+            crate::bench_depth::RUNS,
+            if a.tokenizer.is_some() {
+                " (+tokenizer)"
+            } else {
+                ""
+            }
         );
+        fs::create_dir_all(&depth_scratch)?;
+        let dcode = run_tool(&bin, &depth_args, &depth_scratch, &log_path, true, ssh_host)?;
+        if dcode != 0 {
+            eprintln!(
+                "bench: WARNING depth suite exited with {dcode} — main report unaffected ({})",
+                log_path.display()
+            );
+        }
+    } else {
+        eprintln!("bench: depth suite skipped (--no-depth)");
     }
 
     // Remote host: download the json + the md from the remote scratch dir so

+ 4 - 0
src/cli.rs

@@ -195,6 +195,10 @@ pub enum Commands {
         /// (use to re-baseline the perf table after a cold first row).
         #[arg(long)]
         perf_only: bool,
+        /// Skip the context-depth suite (16K..256K) — run only the main pass
+        /// (scenarios + typical-depth perf rows).
+        #[arg(long)]
+        no_depth: bool,
         /// Run tool-eval-bench on a remote host over SSH instead of locally,
         /// so the bench client's own network (a WiFi laptop) stays off the
         /// measurement path. The tokenizer is uploaded to the host; the

+ 2 - 0
src/main.rs

@@ -209,6 +209,7 @@ async fn main() -> Result<()> {
             seed,
             parallel,
             perf_only,
+            no_depth,
             tokenizer,
             ssh_host,
         } => {
@@ -220,6 +221,7 @@ async fn main() -> Result<()> {
                 seed,
                 parallel,
                 perf_only,
+                no_depth,
                 tokenizer,
                 ssh_host,
             };