Gemini 3.7 Flash · Training

T04 · Training joint

Correctness rejected

Qwen3-8B system training 4dev · Joint Optimization

—PERFORMANCE RATIO
115TOOL EVENTS
1TEXT PATCHES
0BINARY NAMES

01 / PROCESS MAP

Tool activity

Each row shows one agent’s tool events in its own recorded order. Colors show broad activities; bar widths do not represent duration.

Main agentGemini 3.7 Flash · 115 visible calls

InspectEditValidateExecuteBuildProfileRollbackOther
83Inspect
3Edit
13Validate
16Other

02 / EVENT SEQUENCE

Event timeline

Requests are grouped by agent, activity and topic. Delegations open into child branches. Summaries describe visible requests; tool errors and missing responses are flagged. A recorded response does not establish command success or a performance improvement.

Show event timelineHide event timeline58 groups · 115 calls

Scroll within this panel to view all events. Command sketches retain familiar programs and options. Values become <val> or <n>; paths, addresses and script bodies are hidden as <path>, <url> and <script>.

Main agent

  1. Inspect · Task requirements

    Requested workspace inspection and file and log inspection related to task requirements.

    3 calls · #0001–#0003

    echo <val>find <path> -maxdepth <n> -name <val> -o -name <val> <n> > <path>Read <path>
  2. Inspect · Source & workspace

    1 tool error

    Requested workspace inspection and file and log inspection related to source & workspace.

    7 calls · #0004–#0010

    ls -l -a <path>find <path> -type <val>Read <path>
  3. Inspect · Task requirements

    Requested file and log inspection related to task requirements.

    3 calls · #0011–#0013

    Read <path>
  4. Other · Device memory

    Requested environment setup or inspection and runtime inspection related to device memory.

    1 call · #0014–#0014

    envsortnpu-smi infotrue
  5. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0015–#0015

    bash <script>
  6. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0016–#0016

    bash <script>
  7. Other · Source & workspace

    Requested task coordination related to source & workspace.

    1 call · #0017–#0017

    Manage task <task>
  8. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0018–#0018

    bash <script>
  9. Inspect · Source & workspace

    Requested workspace inspection related to source & workspace.

    2 calls · #0019–#0020

    Find <pattern>
  10. Inspect · Benchmark & validation setup

    Requested workspace inspection and file and log inspection related to benchmark & validation setup.

    1 call · #0021–#0021

    ls -l -a <path>cat <path>
  11. Other · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0022–#0022

    bash <script>
  12. Inspect · Source & workspace

    Requested workspace inspection and file and log inspection related to source & workspace.

    2 calls · #0023–#0024

    Find <pattern>Read <path>
  13. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0025–#0026

    Read <path>
  14. Inspect · Source & workspace

    1 tool error

    Requested source searches, file and log inspection and workspace inspection related to source & workspace.

    29 calls · #0027–#0055

    Search <pattern> <path>Read <path>Find <pattern>
  15. Edit · Source & workspace

    1 tool error

    Requested code edits related to source & workspace.

    1 call · #0056–#0056

    Write <path>
  16. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0057–#0057

    cat <script>
  17. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0058–#0058

    bash <script>
  18. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0059–#0059

    bash <script>
  19. Other · Source & workspace

    Requested script or workload execution and workspace file updates related to source & workspace.

    1 call · #0060–#0060

    bash <script>rm -rf <path> <path>
  20. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0061–#0061

    bash <script>
  21. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    4 calls · #0062–#0065

    Read <path>
  22. Inspect · Source & workspace

    Requested source searches and file and log inspection related to source & workspace.

    4 calls · #0066–#0069

    Search <pattern> <path>Read <path>
  23. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0070–#0070

    cat <script>
  24. Other · Source & workspace

    Requested script or workload execution, workspace file updates and source searches related to source & workspace.

    2 calls · #0071–#0072

    bash <script>rm -rf <path> <path><command> <args>grep <n>
  25. Inspect · Source & workspace

    Requested runtime inspection and source searches related to source & workspace.

    1 call · #0073–#0073

    ps <flag>grep -E <val>
  26. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    2 calls · #0074–#0075

    python3 -c <script><command> <args>true
  27. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0076–#0076

    cat <path>
  28. Other · Source & workspace

    Requested script or workload execution related to source & workspace.

    1 call · #0077–#0077

    python3 -c <script>
  29. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0078–#0078

    bash <script>
  30. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0079–#0079

    Read <path>
  31. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0080–#0080

    Edit <path>
  32. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0081–#0081

    cat <script>
  33. Other · Source & workspace

    Requested script or workload execution and workspace file updates related to source & workspace.

    2 calls · #0082–#0083

    bash <script>rm -rf <path> <path>python3 -c <script>
  34. Validate · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0084–#0084

    bash <script>
  35. Other · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0085–#0085

    bash <script>
  36. Inspect · Source & workspace

    Requested source searches, workspace inspection and file and log inspection related to source & workspace.

    3 calls · #0086–#0088

    Search <pattern> <path>Find <pattern>Read <path>
  37. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0089–#0089

    cat <script>
  38. Validate · Benchmark & validation setup

    Requested script or workload execution and workspace file updates related to benchmark & validation setup.

    1 call · #0090–#0090

    bash <script>rm -rf <path> <path> <val> <path>
  39. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0091–#0091

    Read <path>
  40. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0092–#0092

    Read <path>
  41. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0093–#0093

    cat <script>
  42. Validate · Benchmark & validation setup

    Requested script or workload execution and workspace file updates related to benchmark & validation setup.

    2 calls · #0094–#0095

    bash <script>rm -rf <path> <path> <val> <path>
  43. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0096–#0096

    cat <path>
  44. Other · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0097–#0097

    bash <script>
  45. Inspect · Source & workspace

    Requested source searches and workspace inspection related to source & workspace.

    3 calls · #0098–#0100

    Search <pattern> <path>Find <pattern>
  46. Inspect · Parallelism & communication

    Requested file and log inspection related to parallelism & communication.

    1 call · #0101–#0101

    Read <path>
  47. Inspect · Source & workspace

    Requested source searches related to source & workspace.

    1 call · #0102–#0102

    Search <pattern> <path>
  48. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0103–#0103

    cat <script>
  49. Validate · Benchmark & validation setup

    Requested script or workload execution and workspace file updates related to benchmark & validation setup.

    1 call · #0104–#0104

    bash <script>rm -rf <path> <path> <val> <path>
  50. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    2 calls · #0105–#0106

    Read <path>
  51. Inspect · Source & workspace

    Requested file and log inspection related to source & workspace.

    1 call · #0107–#0107

    Read <path>
  52. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0108–#0108

    cat <script>
  53. Validate · Benchmark & validation setup

    Requested script or workload execution and workspace file updates related to benchmark & validation setup.

    2 calls · #0109–#0110

    bash <script>rm -rf <path> <path> <val> <path>
  54. Inspect · Benchmark & validation setup

    Requested file and log inspection related to benchmark & validation setup.

    1 call · #0111–#0111

    cat <path>
  55. Other · Benchmark & validation setup

    Requested script or workload execution related to benchmark & validation setup.

    1 call · #0112–#0112

    bash <script>
  56. Edit · Source & workspace

    Requested code edits related to source & workspace.

    1 call · #0113–#0113

    Edit <path>
  57. Inspect · Runtime processes

    Requested file and log inspection related to runtime processes.

    1 call · #0114–#0114

    cat <script>
  58. Validate · Benchmark & validation setup

    1 missing return

    Requested script or workload execution and workspace file updates related to benchmark & validation setup.

    1 call · #0115–#0115

    bash <script>rm -rf <path> <path> <val> <path>

03 / CANDIDATE ARTIFACT

Text patches & binary names

Read code changes as Git diffs. Identifying strings are masked; binary files are listed by their full relative names.

mindspeed_llm · 2 changed files

Base commit: 72c49a6260c73669678b8f39b1ba41a4789bb555

diff --git a/mindspeed_llm/training/qwen3_8b_4dev.py b/mindspeed_llm/training/qwen3_8b_4dev.pynew file mode 100755index 0000000000000000000000000000000000000000..ec0d54a94bceeb1d8e60d450b50bb11afba472a9--- /dev/null+++ b/mindspeed_llm/training/qwen3_8b_4dev.py@@ -0,0 +1,275 @@+#!/usr/bin/env python3+"""Framework entrypoint for 4-device Qwen3-8B training system."""++from __future__ import annotations++import argparse+import json+import os+import signal+import subprocess+import sys+import threading+from pathlib import Path+++def parse_args():+    parser = argparse.ArgumentParser(description="4-device Qwen3-8B Training Launcher")+    parser.add_argument("--run-spec", type=str, required=True, help="Path to run spec JSON")+    parser.add_argument("--device-ids", type=str, required=True, help="Comma-separated device IDs")+    parser.add_argument("--master-addr", type=str, default="127.0.0.1", help="Master address")+    parser.add_argument("--master-port", type=int, required=True, help="Master port")+    parser.add_argument("--runtime-dir", type=str, required=True, help="Runtime directory")+    parser.add_argument("--output-dir", type=str, required=True, help="Output directory")+    parser.add_argument("--checkpoint-dir", type=str, default=None, help="Checkpoint directory")+    parser.add_argument("--save-at", type=int, default=None, help="Save checkpoint at iteration")+    parser.add_argument("--resume", action="store_true", default=False, help="Resume from checkpoint")+    return parser.parse_args()+++def build_worker_argv(+    spec: dict,+    master_port: int,+    checkpoint: str | None = None,+    save_at: int | None = None,+    resume: bool = False,+) -> list[str]:+    model = spec["model"]+    optimizer = spec["optimizer"]+    work = spec["work"]+    train_iters = int(work["optimizer_updates"])+    global_batch_size = int(work["global_batch_size"])++    script_path = Path(__file__).resolve().parent.parent.parent / "pretrain_gpt.py"++    argv = [+        sys.executable,+        "-B",+        str(script_path),+        "--use-mcore-models",+        "--spec",+        "mindspeed_llm.tasks.models.spec.qwen3_spec",+        "layer_spec",+        "--transformer-impl",+        "local",+        "--distributed-backend",+        "nccl",+        "--tensor-model-parallel-size",+        "1",+        "--pipeline-model-parallel-size",+        "2",+        "--num-layers-per-virtual-pipeline-stage",+        "9",+        "--context-parallel-size",+        "1",+        "--num-layers",+        str(model["num_layers"]),+        "--hidden-size",+        str(model["model_width"]),+        "--ffn-hidden-size",+        str(model["ffn_width"]),+        "--num-attention-heads",+        str(model["num_attention_heads"]),+        "--group-query-attention",+        "--num-query-groups",+        str(model["num_query_groups"]),+        "--kv-channels",+        str(model["kv_channels"]),+        "--qk-layernorm",+        "--seq-length",+        str(work["sequence_length"]),+        "--max-position-embeddings",+        str(work["sequence_length"]),+        "--micro-batch-size",+        "1",+        "--global-batch-size",+        str(global_batch_size),+        "--train-iters",+        str(train_iters),+        "--lr",+        str(optimizer["learning_rate"]),+        "--min-lr",+        str(optimizer["minimum_learning_rate"]),+        "--lr-decay-style",+        str(optimizer["learning_rate_decay_style"]),+        "--weight-decay",+        str(optimizer["weight_decay"]),+        "--adam-beta1",+        str(optimizer["adam_beta1"]),+        "--adam-beta2",+        str(optimizer["adam_beta2"]),+        "--clip-grad",+        str(optimizer["clip_grad"]),+        "--attention-dropout",+        "0.0",+        "--hidden-dropout",+        "0.0",+        "--seed",+        str(spec["seed"]),+        "--bf16",+        "--mock-data",+        "--tokenizer-type",+        "NullTokenizer",+        "--vocab-size",+        str(model["vocab_size"]),+        "--make-vocab-size-divisible-by",+        "1",+        "--position-embedding-type",+        "rope",+        "--use-rotary-position-embeddings",+        "--rotary-base",+        str(model["rotary_base"]),+        "--disable-bias-linear",+        "--normalization",+        "RMSNorm",+        "--norm-epsilon",+        "1e-6",+        "--swiglu",+        "--attention-softmax-in-fp32",+        "--use-flash-attn",+        "--use-fused-rotary-pos-emb",+        "--use-fused-swiglu",+        "--use-fused-rmsnorm",+        "--no-masked-softmax-fusion",+        "--no-gradient-accumulation-fusion",+        "--use-distributed-optimizer",+        "--reuse-fp32-param",+        "--overlap-grad-reduce",+        "--overlap-param-gather",+        "--disable-gloo-group",+        "--use-ascend-coc",+        "--log-interval",+        "1",+        "--eval-iters",+        "0",+        "--eval-interval",+        str(train_iters),+    ]++    if checkpoint is not None and resume:+        argv.extend(("--load", str(checkpoint)))+    elif checkpoint is not None and save_at is not None:+        argv.extend(+            (+                "--save",+                str(checkpoint),+                "--save-interval",+                str(save_at),+                "--exit-interval",+                str(save_at),+            )+        )++    return argv+++def main():+    args = parse_args()++    with open(args.run_spec, "r", encoding="utf-8") as f:+        spec = json.load(f)++    device_list = [d.strip() for d in args.device_ids.split(",") if d.strip()]+    world_size = len(device_list)+    assert world_size == 4, f"Expected 4 devices, got {world_size}"++    worker_argv = build_worker_argv(+        spec=spec,+        master_port=args.master_port,+        checkpoint=args.checkpoint_dir,+        save_at=args.save_at,+        resume=args.resume,+    )++    processes: list[subprocess.Popen] = []+    threads: list[threading.Thread] = []+    stdout_lock = threading.Lock()+    stderr_lock = threading.Lock()++    def kill_children():+        for p in processes:+            try:+                p.terminate()+            except OSError:+                pass+        for p in processes:+            try:+                p.kill()+            except OSError:+                pass++    def handle_signal(sig, frame):+        kill_children()+        sys.exit(1)++    signal.signal(signal.SIGINT, handle_signal)+    signal.signal(signal.SIGTERM, handle_signal)++    base_env = dict(os.environ)++    for rank in range(world_size):+        proc_env = dict(base_env)+        proc_env.update(+            {+                "RANK": str(rank),+                "WORLD_SIZE": str(world_size),+                "LOCAL_RANK": str(rank),+                "LOCAL_WORLD_SIZE": str(world_size),+                "MASTER_ADDR": args.master_addr,+                "MASTER_PORT": str(args.master_port),+                "OMP_NUM_THREADS": "1",+                "PYTHONUNBUFFERED": "1",+            }+        )++        p = subprocess.Popen(+            worker_argv,+            cwd=str(Path(__file__).resolve().parent.parent.parent),+            env=proc_env,+            stdin=subprocess.DEVNULL,+            stdout=subprocess.PIPE,+            stderr=subprocess.PIPE,+        )+        processes.append(p)++        def forward_stdout(proc=p):+            assert proc.stdout is not None+            for line in iter(proc.stdout.readline, b""):+                with stdout_lock:+                    sys.stdout.buffer.write(line)+                    sys.stdout.buffer.flush()++        def forward_stderr(proc=p):+            assert proc.stderr is not None+            for line in iter(proc.stderr.readline, b""):+                with stderr_lock:+                    sys.stderr.buffer.write(line)+                    sys.stderr.buffer.flush()++        t_out = threading.Thread(target=forward_stdout, daemon=True)+        t_out.start()+        threads.append(t_out)++        t_err = threading.Thread(target=forward_stderr, daemon=True)+        t_err.start()+        threads.append(t_err)++    returncodes = []+    for p in processes:+        rc = p.wait()+        returncodes.append(rc)++    for t in threads:+        t.join(timeout=0.5)++    if any(rc != 0 for rc in returncodes):+        kill_children()+        sys.exit(1)++    sys.stdout.flush()+    sys.stderr.flush()+    os._exit(0)+++if __name__ == "__main__":+    main()diff --git a/pretrain_gpt.py b/pretrain_gpt.pyindex 5a8506bb3f73e23ca5e1c1e2562d0a861c433cfb..0248992f8fc6df73ee057a26e8c06b983e42282e 100644--- a/pretrain_gpt.py+++ b/pretrain_gpt.py@@ -304,6 +304,22 @@ def main():              ModelType.encoder_or_decoder,              forward_step) +    sys.stdout.flush()+    sys.stderr.flush()+    try:+        if torch.distributed.is_initialized():+            torch.distributed.barrier()+            rank = torch.distributed.get_rank()+            if rank > 0:+                os._exit(0)+            else:+                import time+                time.sleep(0.05)+                os._exit(0)+    except Exception:+        pass+    os._exit(0)+  if __name__ == "__main__":     main()