a7v4p: last two checkpoints + eval/deploy files + training records
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/cache_cosmos_reason2.pyAdded+60
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/check_reason2_offline.pyAdded+26
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/g1_feedback76_h16.pyAdded+27
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/g1_joint47_h40.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/groot_chain.pyAdded+139
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_aug_v2.pyAdded+163
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_inloop_eval.pyAdded+347
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_j47.pyAdded+39
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch.pyAdded+121
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch_v.pyAdded+102
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_offline_fix.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_data.pyAdded+212
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_j47.pyAdded+127
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/upload_groot_j47.pyAdded+66
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/verify_groot_cpu.pyAdded+57
- a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/verify_j47_cpu.pyAdded+59
- a7-cabinet-close-v4/b512-trim3f/step-003200/config.jsonAdded+90
- a7-cabinet-close-v4/b512-trim3f/step-003200/dataset_meta/hb-dataset-receipt.jsonAdded+45
- a7-cabinet-close-v4/b512-trim3f/step-003200/dataset_meta/modality.jsonAdded+74
- a7-cabinet-close-v4/b512-trim3f/step-003200/embodiment_id.jsonAdded+57
- a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/conf.yamlAdded+234
- a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/config.yamlAdded+232
- a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/dataset_statistics.jsonAdded+883
- a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/final_model_config.jsonAdded+58
- a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/final_processor_config.jsonAdded
- a7-cabinet-close-v4/b512-trim3f/step-003200/model-00001-of-00002.safetensorsAdded+3
- a7-cabinet-close-v4/b512-trim3f/step-003200/model-00002-of-00002.safetensorsAdded+3
- a7-cabinet-close-v4/b512-trim3f/step-003200/model.safetensors.index.jsonAdded
- a7-cabinet-close-v4/b512-trim3f/step-003200/processor_config.jsonAdded+1137
- a7-cabinet-close-v4/b512-trim3f/step-003200/protocol.jsonAdded+104
- a7-cabinet-close-v4/b512-trim3f/step-003200/statistics.jsonAdded
- a7-cabinet-close-v4/b512-trim3f/step-003200/train.logAdded
- a7-cabinet-close-v4/b512-trim3f/step-003200/trainer_state.jsonAdded+1954
- a7-cabinet-close-v4/b512-trim3f/step-003200/training_args.binAdded+3
- a7-cabinet-close-v4/b512-trim3f/step-003200/training_plan.jsonAdded+21
- a7-cabinet-close-v4/b512-trim3f/step-003200/wandb_config.jsonAdded+1
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/cache_cosmos_reason2.pyAdded+60
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/check_reason2_offline.pyAdded+26
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/g1_feedback76_h16.pyAdded+27
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/g1_joint47_h40.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/groot_chain.pyAdded+139
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
- a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/hb_aug_v2.pyAdded+163
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960"""Put the full gated nvidia/Cosmos-Reason2-2B (pinned 9ce19a1) into the shared HF hub cache $G/hf-home/hub.
GR00T N1.7 builds its backbone with Qwen3VLForConditionalGeneration.from_pretrained("nvidia/Cosmos-Reason2-2B") andits processor with Qwen3VLProcessor.from_pretrained(same name) before loading the GR00T checkpoint, so every node needsthe whole repo resolvable by name. groot_node.sh runs with HF_HUB_OFFLINE=1, so nodes read this cache and never needthe token. refs/main is pinned to the verified revision.
Usage (token from stdin, kept in-process only): $G/envs/groot-py312/bin/python cache_cosmos_reason2.py $G/hf-home/hub < /root/.hb-secrets/hf_token"""import hashlibimport jsonimport osimport sysimport time
from huggingface_hub import HfApi, snapshot_download
REPO = "nvidia/Cosmos-Reason2-2B"REV = "9ce19a195e423419c349abfc86fd07178b230561"cache = os.path.abspath(sys.argv[1])token = sys.stdin.readline().strip()if not token.startswith("hf_"): raise SystemExit("token format rejected")api = HfApi(endpoint="https://huggingface.co", token=token)info = api.model_info(REPO, revision=REV, files_metadata=True)assert info.sha == REV, info.shat0 = time.monotonic()for attempt in range(1, 21): try: path = snapshot_download(REPO, revision=REV, cache_dir=cache, token=token, max_workers=8) break except Exception as error: # transient stalls if any(k in str(error).lower() for k in ("gated", "401", "403")): raise print(f"retry {attempt}: {type(error).__name__}: {str(error)[:200]}", flush=True) time.sleep(10)else: raise SystemExit("download did not finish")token = Nonecount, size = 0, 0for s in info.siblings: f = os.path.join(path, s.rfilename) assert os.path.isfile(f), s.rfilename if s.size is not None: assert os.path.getsize(f) == s.size, s.rfilename if s.lfs is not None: h = hashlib.sha256() with open(f, "rb") as stream: for chunk in iter(lambda: stream.read(1 << 22), b""): h.update(chunk) assert h.hexdigest() == s.lfs.sha256, s.rfilename count += 1 size += s.size or 0refs = os.path.join(cache, "models--" + REPO.replace("/", "--"), "refs")os.makedirs(refs, exist_ok=True)with open(os.path.join(refs, "main"), "w") as f: f.write(REV)print("CACHE_OK", json.dumps({"repo": REPO, "revision": REV, "snapshot": path, "files": count, "bytes": size, "seconds": round(time.monotonic() - t0, 1)}), flush=True)1234567891011121314151617181920212223242526"""CPU check that GR00T's Cosmos-Reason2-2B pieces load offline from $G/hf-home exactly as groot_node.sh will.
Usage: HF_HOME=$G/hf-home HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 $G/envs/groot-py312/bin/python check_reason2_offline.py"""import jsonimport osimport sysfrom pathlib import Path
import torch
sys.path.insert(0, str(Path(__file__).resolve().parent))import hb_offline_fix # noqa: E402,F401from transformers import AutoConfig, Qwen3VLForConditionalGeneration, Qwen3VLProcessor
assert os.environ.get("HF_HUB_OFFLINE") == "1", "run with HF_HUB_OFFLINE=1"name = "nvidia/Cosmos-Reason2-2B"torch.set_num_threads(8)proc = Qwen3VLProcessor.from_pretrained(name, trust_remote_code=True)cfg = AutoConfig.from_pretrained(name, trust_remote_code=True)ids = proc.tokenizer("pick up the trash and drop it in the bin")["input_ids"]model = Qwen3VLForConditionalGeneration.from_pretrained(name, torch_dtype=torch.bfloat16)n = sum(p.numel() for p in model.parameters())print("REASON2_OFFLINE_OK", json.dumps({"processor": type(proc).__name__, "tokens": len(ids), "model_type": cfg.model_type, "params_M": round(n / 1e6, 1), "llm_layers": len(model.model.language_model.layers)}), flush=True)123456789101112131415161718192021222324252627"""G1 feedback76 / H16 GR00T modality config (copy of HumanWAM configs/humanwam/groot/feedback76_h16.py @ c76527b).
The matching modality.json is generated per dataset from the recorded joint names (prepare_groot_data.py);HumanWAM's feedback76_modality.json has right_arm at observation.state[29:36] (left-hand fingers), which is wrongfor our G1 exports (right arm is [22:29])."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
feedback76_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["ego_view", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["motion_token", "left_hand_joints", "right_hand_joints"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(feedback76_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324"""G1 joint47 / H40 stride-2 GR00T modality config (2026-11-18 user: joint-angle action experiment, aligned withHumanWAM joint47 v2): action rows at source offsets 0,2,...,78 of body29 | Inspire left6 | right6 | root rotation6D(current-heading relative, hb_j47.py). State44 and cameras as feedback76."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
g1_joint47_h40 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["ego_view", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(0, 80, 2)), modality_keys=["body29", "left_hand_target", "right_hand_target", "root_rot6d"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(4)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(g1_joint47_h40, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139"""Per-node GR00T relay: per-layout batch-size probe (largest that fits), then 20-epoch production per task.
Run on every node (nohup), node rank from the DLC env RANK: python groot_chain.py [task ...]Default tasks: b6 a3 a7 a18 (basket postponed). A phase succeeds only if all 4 node launchers exit 0.
Batch (user rule: as large as memory allows, 2026-11-10): descending CANDIDATES, 4 steps each on all 32 GPUs; acandidate fits when all launchers exit 0 AND the peak reserved memory of every rank (written by hb_launch.py tologs/peak-<phase>-rank<r>.json) is <= MAX_FRAC of the GPU. Node 0 alone judges each probe and writes a verdict filethe other nodes wait for, so all nodes take the same decision. One decision per robot layout (g1 / h2).Outputs: $G/groot-runs-bmax/ (the earlier per-GPU-64 runs stay in $G/groot-runs/)."""import fcntlimport jsonimport mathimport osimport shutilimport subprocessimport sysimport timefrom pathlib import Path
H = Path(__file__).resolve().parentG = H.parentRUNS = G / os.environ.get("HB_GROOT_RUNS_NAME", "groot-runs-bmax")NODE = int(os.environ["RANK"])TASKS = sys.argv[1:] or ["b6", "a3", "a7", "a18"] # basket postponed (user plan 2026-11-10)CANDIDATES = [320, 288, 256, 224, 192, 160, 128, 96, 64, 48, 32]MAX_FRAC = 0.92EPOCHS = 20PORT_BASE = int(os.environ.get("HB_GROOT_PORT_BASE", "32500")) # probe PORT_BASE+i, production PORT_BASE+50+kRUNS.mkdir(parents=True, exist_ok=True)os.environ["HB_GROOT_RUNS"] = str(RUNS) # read by groot_node.shlock = (RUNS / f"chain-node-{NODE}.lock").open("a")fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
def log(msg): line = f"{time.strftime('%Y-%m-%d %H:%M:%S')} node{NODE} {msg}" print(line, flush=True) with (RUNS / f"chain-node-{NODE}.log").open("a") as f: f.write(line + "\n")
def run_phase(task, phase, bs, steps, save, port): logs = RUNS / task / "logs" exits = [logs / f"{phase}-node-{r}.exit" for r in range(4)] if all(p.is_file() for p in exits): return all(p.read_text().strip() == "0" for p in exits) subprocess.run(["bash", str(H / "groot_node.sh"), task, phase, str(bs), str(steps), str(save), str(port)]) deadline = time.monotonic() + 600 while not all(p.is_file() for p in exits): if time.monotonic() > deadline: log(f"{task}/{phase}: timed out waiting for peer exit files") return False time.sleep(5) ok = all(p.read_text().strip() == "0" for p in exits) log(f"{task}/{phase}: bs={bs} steps={steps} -> {'OK' if ok else 'FAIL'}") return ok
def peak_frac(task, phase): """Max over ranks of peak reserved / total; None when no rank reported.""" fracs = [] for f in (RUNS / task / "logs").glob(f"peak-{phase}-rank*.json"): try: d = json.loads(f.read_text()) fracs.append(d["peak_reserved_gb"] / d["total_gb"]) except (ValueError, KeyError, OSError): continue return (max(fracs), len(fracs)) if fracs else (None, 0)
def probe_verdict(task, cand, port): phase = f"probe-bs{cand}" verdict = RUNS / task / "logs" / f"{phase}.verdict.json" ok = run_phase(task, phase, cand, 4, 1000000, port) if NODE == 0 and not verdict.is_file(): time.sleep(10) # let peak files from the other nodes become visible on NAS frac, n = peak_frac(task, phase) if ok else (None, 0) fits = bool(ok and frac is not None and frac <= MAX_FRAC) verdict.write_text(json.dumps({"per_gpu_batch": cand, "ran_ok": ok, "peak_frac": frac, "ranks_reported": n, "max_frac": MAX_FRAC, "fits": fits}) + "\n") deadline = time.monotonic() + 600 while not verdict.is_file(): if time.monotonic() > deadline: log(f"{task}/{phase}: no verdict from node 0") return False time.sleep(5) v = json.loads(verdict.read_text()) log(f"{task}/{phase}: verdict {v}") return v["fits"]
def prune_resume_state(out): """Keep weights of every checkpoint but resume state (DeepSpeed optimizer shards, scheduler, RNG) only in the latest.""" ckpts = sorted((p for p in out.glob("checkpoint-*") if p.name.split("-")[-1].isdigit()), key=lambda p: int(p.name.split("-")[-1])) for c in ckpts[:-1]: for p in list(c.glob("global_step*")) + list(c.glob("optimizer*.pt")) + list(c.glob("scheduler.pt")) \ + list(c.glob("rng_state*.pth")) + list(c.glob("latest")) + list(c.glob("zero_to_fp32.py")): if p.is_dir(): shutil.rmtree(p, ignore_errors=True) else: p.unlink(missing_ok=True) log(f"{c.name}: resume state dropped (weights kept)")
def batch_for(task): layout = "h2" if task in ("a17", "a18") else "g1" decision = RUNS / f"batch-decision-{layout}.json" if decision.is_file(): return json.loads(decision.read_text())["per_gpu_batch"] for i, cand in enumerate(CANDIDATES): if probe_verdict(task, cand, PORT_BASE + i + (20 if layout == "h2" else 0)): if NODE == 0: decision.write_text(json.dumps({"per_gpu_batch": cand, "global_batch": cand * 32, "probe_task": task, "layout": layout, "candidates": CANDIDATES, "max_frac": MAX_FRAC}) + "\n") return cand time.sleep(20) log(f"{layout}: no batch size fit; stopping") sys.exit(1)
for k, task in enumerate(TASKS): bs = batch_for(task) log(f"{task}: per-GPU batch {bs} (global {bs * 32})") receipt = json.loads((G / "groot-data" / task / "hb-dataset-receipt.json").read_text()) steps = math.ceil(EPOCHS * receipt["frames"] / (bs * 32)) save = math.ceil(steps / 2) if not run_phase(task, "production", bs, steps, save, PORT_BASE + 50 + k): log(f"{task}: production failed; stopping chain") sys.exit(1) if NODE == 0: prune_resume_state(RUNS / task / "production") (RUNS / task / "production-complete.json").write_text(json.dumps( {"task": task, "frames": receipt["frames"], "epochs": EPOCHS, "per_gpu_batch": bs, "global_batch": bs * 32, "max_steps": steps, "save_steps": save}) + "\n")log("all tasks done")123456789101112131415161718192021222324"""A18 H2 (Sharpa hands) GR00T modality config, same protocol as the A18 Delta-flow run(schema a18-h2-sharpa-body31-hand44-state78-chunk16-v1): cameras head+chest, state = 75 joints + projectedgravity, action = action.body_target (31) + action.hands (44), horizon 16, absolute targets."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2_body31_hand44_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["body_target", "left_hand_target", "right_hand_target"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2_body31_hand44_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324"""2026-11-15 user: action horizon 32 copy of h2_body31_hand44_h16.py. A18 H2 (Sharpa hands) GR00T modality config, same protocol as the A18 Delta-flow run(schema a18-h2-sharpa-body31-hand44-state78-chunk16-v1): cameras head+chest, state = 75 joints + projectedgravity, action = action.body_target (31) + action.hands (44), horizon 16, absolute targets."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2_body31_hand44_h32 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(32)), modality_keys=["body_target", "left_hand_target", "right_hand_target"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2_body31_hand44_h32, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)12345678910111213141516171819202122232425"""A14 v2 H2 (Sharpa hands) GR00T modality config (H2 training guide hb_training/docs/h2/a14_training_guide.md 4.1):cameras head + chest, state78 = 75 joints + projected gravity, action82 = action.body_target (31) + action.hands (44)+ action.planner (7, the SONIC planner command), horizon 16, absolute targets. Identical to h2_body31_hand44_h16.pyexcept the added `planner` action modality."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2_body31_hand44_planner7_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["body_target", "left_hand_target", "right_hand_target", "planner"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(4)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2_body31_hand44_planner7_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324"""A14 H2 (Sharpa hands) GR00T modality config with THREE cameras head + chest + wrist (user 2026-11-12; the third-person camera is never a model input). Otherwise identical to h2_body31_hand44_h16.py:, same protocol as the A18 Delta-flow run(schema a18-h2-sharpa-body31-hand44-state78-chunk16-v1): cameras head+chest, state = 75 joints + projectedgravity, action = action.body_target (31) + action.hands (44), horizon 16, absolute targets."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2w3_body31_hand44_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest", "wrist"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["body_target", "left_hand_target", "right_hand_target"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2w3_body31_hand44_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163"""Humanoid Benchmark data augmentation v2 (project CLAUDE.md), model-agnostic torch implementation.
augment(x, rng, obs_mask=None) takes x: float [T, V, 3, H, W] in [0, 1] (T frames, V cameras) and returns theaugmented tensor. Each call is one training sample: one of the 15 effects is chosen uniformly and its magnitudeis scaled by 1.5 around identity; the rest stay at x1. Colour is shared across cameras and time; geometry, lightpatches and white balance are drawn per camera and fixed over time; sensor/optics effects (noise, gaussian blur,JPEG, motion blur, sharpen, defocus) apply only to observation frames (obs_mask True).Pixel-size parameters are defined at 224 px and scaled by H / 224.perturb_joints(q, rng) applies the proprio spec: per-joint bias +-2 deg plus N(0, 0.25 deg) clipped at 3 sigma."""import ioimport math
import numpy as npimport torchimport torch.nn.functional as Ffrom PIL import Imagefrom torchvision.transforms import InterpolationModefrom torchvision.transforms import functional as TF
EFFECTS = ("exposure", "contrast", "saturation", "hue", "gamma", "temperature", "rotation_crop", "noise", "gaussian_blur", "jpeg", "motion_blur", "sharpen", "defocus", "light_shadow", "wb_channel")CENTER = {"exposure": 0.0, "contrast": 1.0, "saturation": 1.0, "hue": 0.0, "gamma": 1.0, "temperature": 0.0}RANGE = {"exposure": (-0.22, 0.22), "contrast": (0.88, 1.12), "saturation": (0.76, 1.24), "hue": (-0.015, 0.015), "gamma": (0.89, 1.11), "temperature": (-0.066, 0.066)}VERSION = "hb-aug-v2-20261109"
def sample(rng, views, height): boost = EFFECTS[int(rng.integers(len(EFFECTS)))]
def k(name): return 1.5 if boost == name else 1.0
px = height / 224.0 p = {"boost": boost} for name, (a, b) in RANGE.items(): c = CENTER[name] p[name] = float(rng.uniform(c + k(name) * (a - c), c + k(name) * (b - c))) p["geometry"] = [] for _ in range(views): angle = float(rng.uniform(-1.5 * k("rotation_crop"), 1.5 * k("rotation_crop"))) p["geometry"].append((angle, 1.0 + abs(angle) * 0.015 + float(rng.uniform(0, 0.02 * k("rotation_crop"))))) p["noise"] = 4.0 / 255.0 * k("noise") if rng.random() < 0.5 else 0.0 p["gaussian_blur"] = float(rng.uniform(0.25, 0.65)) * k("gaussian_blur") if rng.random() < 0.15 else 0.0 if rng.random() < 0.35: lo = int(round(100 - k("jpeg") * 30)) hi = int(round(100 - k("jpeg") * 5)) p["jpeg"] = int(rng.integers(lo, hi + 1)) else: p["jpeg"] = None p["motion_blur"] = ((float(rng.uniform(3, 7)) * k("motion_blur") * px, float(rng.uniform(0, 180))) if rng.random() < 0.15 else None) p["sharpen"] = float(rng.uniform(0.2, 0.6)) * k("sharpen") if rng.random() < 0.15 else 0.0 p["defocus"] = float(rng.uniform(1, 2)) * k("defocus") * px if rng.random() < 0.10 else 0.0 if rng.random() < 0.30: g = 0.30 * k("light_shadow") p["light_shadow"] = [[(float(rng.uniform(0.1, 0.9)), float(rng.uniform(0.1, 0.9)), float(rng.uniform(0.15, 0.35)), float(rng.uniform(1 - g, 1 + g))) for _ in range(int(rng.integers(1, 3)))] for _ in range(views)] else: p["light_shadow"] = None if rng.random() < 0.30: g = 0.10 * k("wb_channel") gains = [] for _ in range(views): row = [1.0, 1.0, 1.0] row[int(rng.integers(0, 3))] = float(rng.uniform(1 - g, 1 + g)) gains.append(row) p["wb_channel"] = gains else: p["wb_channel"] = None return p
def _conv(x, kernel): n, c, h, w = x.shape k = kernel.to(x)[None, None].repeat(c, 1, 1, 1) pad = kernel.shape[-1] // 2 return F.conv2d(F.pad(x, (pad, pad, pad, pad), mode="reflect"), k, groups=c)
def motion_kernel(length, angle_deg): size = max(3, int(round(length)) | 1) k = torch.zeros(size, size) c = size // 2 th = math.radians(angle_deg) for s in np.linspace(-(length - 1) / 2, (length - 1) / 2, 8 * size): k[int(round(c - s * math.sin(th))), int(round(c + s * math.cos(th)))] = 1.0 return k / k.sum()
def disk_kernel(r): size = 2 * int(math.ceil(r)) + 1 c = size // 2 yy, xx = torch.meshgrid(torch.arange(size), torch.arange(size), indexing="ij") k = (((yy - c) ** 2 + (xx - c) ** 2) <= (r + 0.5) ** 2).float() return k / k.sum()
def apply(x, p, obs_mask=None, noise_seed=0): t, v, c, h, w = x.shape x = x.clone().clamp(0, 1) for vi, (angle, scale) in enumerate(p["geometry"]): x[:, vi] = TF.affine(x[:, vi], angle=angle, translate=[0, 0], scale=scale, shear=[0, 0], interpolation=InterpolationMode.BILINEAR) if p["light_shadow"] is not None: yy, xx = torch.meshgrid(torch.linspace(0, 1, h), torch.linspace(0, 1, w), indexing="ij") for vi, blobs in enumerate(p["light_shadow"]): m = torch.ones(h, w) for cx, cy, s, g in blobs: m = m + (g - 1.0) * torch.exp(-((xx - cx) ** 2 + (yy - cy) ** 2) / (2 * s * s)) x[:, vi] = (x[:, vi] * m.clamp(min=0).to(x)).clamp(0, 1) if p["wb_channel"] is not None: for vi, g in enumerate(p["wb_channel"]): x[:, vi] = (x[:, vi] * torch.tensor(g, dtype=x.dtype).view(1, 3, 1, 1)).clamp(0, 1) y = x.reshape(t * v, c, h, w) y = (y * float(2.0 ** p["exposure"])).clamp(0, 1) d = p["temperature"] y = (y * y.new_tensor([1.0 + d, 1.0, 1.0 - d]).view(1, 3, 1, 1)).clamp(0, 1) y = ((y - 0.5) * p["contrast"] + 0.5).clamp(0, 1) y = TF.adjust_saturation(y, p["saturation"]) y = TF.adjust_hue(y, p["hue"]) y = y.clamp(0, 1).pow(p["gamma"]) x = y.reshape(t, v, c, h, w) mask = torch.ones(t, dtype=torch.bool) if obs_mask is None else torch.as_tensor(obs_mask, dtype=torch.bool) if bool(mask.any()): o = x[mask].reshape(-1, c, h, w) if p["gaussian_blur"] > 0: o = TF.gaussian_blur(o, [3, 3], [p["gaussian_blur"]] * 2) if p["motion_blur"] is not None: o = _conv(o, motion_kernel(*p["motion_blur"])) if p["defocus"] > 0: o = _conv(o, disk_kernel(p["defocus"])) if p["sharpen"] > 0: o = o + p["sharpen"] * (o - TF.gaussian_blur(o, [5, 5], [1.0, 1.0])) o = o.clamp(0, 1) if p["noise"] > 0: gen = torch.Generator().manual_seed(int(noise_seed)) o = (o + torch.randn(o.shape, generator=gen, dtype=o.dtype) * p["noise"]).clamp(0, 1) if p["jpeg"] is not None: for i in range(o.shape[0]): buf = io.BytesIO() TF.to_pil_image(o[i]).save(buf, format="JPEG", quality=int(p["jpeg"])) buf.seek(0) with Image.open(buf) as im: o[i] = TF.pil_to_tensor(im.convert("RGB")).to(o.dtype).div(255.0) x[mask] = o.reshape(-1, v, c, h, w) return x.clamp(0, 1)
def augment(x, rng, obs_mask=None): p = sample(rng, x.shape[1], x.shape[-2]) return apply(x, p, obs_mask, noise_seed=int(rng.integers(0, 2 ** 62))), p
def perturb_joints(q, rng): q = np.asarray(q, dtype=np.float64) d = q.shape[-1] bias = rng.uniform(-math.radians(2.0), math.radians(2.0), size=d) sigma = math.radians(0.25) noise = np.clip(rng.normal(0.0, sigma, size=q.shape), -3 * sigma, 3 * sigma) return (q + bias + noise).astype(np.float32)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347"""GR00T in-training open-loop action MSE (2026-11-15 user: every 250 training steps).
Imported by hb_groot/hb_launch.py (hb_launch_v.py runs hb_launch.py). It wraps Gr00tTrainer.__init__ so that everytrainer gets a TrainerCallback. At global_step % HB_INLOOP_EVERY == 0 (default 250; 0 = off) every rank evaluates itsshard of the benchmark eval cache (eval-action-mse/cache) with the weights being trained right now, exactly as deployed: * Gr00tPolicy pipeline: eval processor from <output_dir>/processor (the files every checkpoint ships), parse_observation_gr00t inputs, bf16 inputs, model.get_action under inference_mode, processor.decode_action; * same protocol and metrics as the post-hoc eval (hb_eval_common): queries every 16 frames, first 16 predicted steps vs the recorded actions, nMSE with the training-frame std, per group / per step; * split: "heldout" when the task has recorded episodes that are never trained on (B6, trolley, B7), else "train10".Training is not changed: module train/eval modes are restored module by module, torch CPU + CUDA (this device), numpyand python RNG states are restored after each eval; the flow-matching noise uses a fixed seed (rank, batch) so everyeval sees the same noise (smoother curve). ZeRO-2 keeps the full bf16 weights on every rank, so ranks run independently;partial sums are all-reduced once. Results: <run>/logs/inloop-mse.jsonl (rank 0), one json line per eval, and an"HB_INLOOP" log line. Failures never stop training: an exception on any rank disables further evals on all ranks(error flag in the same all-reduce, so no rank waits on another).Env: HB_INLOOP_EVERY (250), HB_INLOOP_BATCH (8 queries per forward), HB_INLOOP_MAX_QUERIES (0 = all; tests only), HB_INLOOP_SPLIT (override), HB_INLOOP_PROCESSOR_DIR (tests only)."""import jsonimport osimport randomimport sysimport timeimport tracebackfrom contextlib import nullcontextfrom pathlib import Path
import numpy as npimport torch
EVERY = int(os.environ.get("HB_INLOOP_EVERY", "250"))BATCH = int(os.environ.get("HB_INLOOP_BATCH", "8"))MAX_Q = int(os.environ.get("HB_INLOOP_MAX_QUERIES", "0"))SEED = 1234G = Path(__file__).resolve().parent.parentEVAL_DIR = G / "eval-action-mse"for _p in (str(EVAL_DIR), str(EVAL_DIR / "adapters")): if _p not in sys.path: sys.path.insert(0, _p)import hb_eval_common as E # noqa: E402import ad_groot as AG # noqa: E402 (canonical state -> GR00T state groups, same mapping as the post-hoc eval)
RANK = int(os.environ.get("RANK", "0"))WORLD = int(os.environ.get("WORLD_SIZE", "1"))
def say(*a): if RANK == 0: print("HB_INLOOP", *a, flush=True)
def _argv(name): a = sys.argv for i, x in enumerate(a): if x == name and i + 1 < len(a): return a[i + 1] if x.startswith(name + "="): return x.split("=", 1)[1] return None
def resolve(dataset_path): """groot-data/<view> -> (benchmark task, split, view dir) or raises with the reason""" view = Path(dataset_path) rec = json.loads((view / "hb-dataset-receipt.json").read_text()) task = E.task_for_source(rec["source"]) if task is None: raise LookupError(f"no benchmark task for source {rec['source']}") split = os.environ.get("HB_INLOOP_SPLIT") if not split: split = "heldout" if (E.split_dir(task, "heldout") / "meta.json").exists() else "train10" if not (E.split_dir(task, split) / "meta.json").exists(): raise FileNotFoundError(f"eval cache {task}/{split} missing (build_cache.py {task} {split})") return task, split, view
class InLoopMSE: """transformers TrainerCallback (duck-typed: the callback handler only calls the hooks that exist)"""
def __init__(self, task, split, view, processor_dir=None): self.task, self.split, self.view = task, split, view self.processor_dir = processor_dir self.disabled = False self.ready = False self.results = []
# ---------------------------------------------------------------- setup (first eval; needs the live model) def _setup(self, model, output_dir): from transformers import AutoProcessor from gr00t.data.embodiment_tags import EmbodimentTag from gr00t.policy.gr00t_policy import Gr00tPolicy from gr00t.policy.policy import BasePolicy
meta = E.load_meta(self.task, self.split) self.meta = meta self.lay = E.LAYOUTS[meta["layout"]] self.std = E.norm_std(E.load_stats(self.task)) # the Gr00tPolicy of a checkpoint, built around the live model instead of loading weights from disk pol = Gr00tPolicy.__new__(Gr00tPolicy) BasePolicy.__init__(pol, strict=True) pdir = Path(self.processor_dir or os.environ.get("HB_INLOOP_PROCESSOR_DIR") or Path(output_dir) / "processor") proc = AutoProcessor.from_pretrained(str(pdir)) proc.eval() proc.validate_strict_action_padding_mask(model.config) tag = EmbodimentTag.NEW_EMBODIMENT pol.model, pol.processor, pol.embodiment_tag = model, proc, tag pol.modality_configs = {k: v for k, v in proc.get_modality_configs()[tag.value].items() if k != "rl_info"} pol.collate_fn = proc.collator pol.language_key = pol.modality_configs["language"].modality_keys[0] self.policy = pol self.mod = pol.modality_configs self.state_map = AG.H2_STATE if meta["layout"].startswith("h2") else AG.G1_STATE self.video_keys = list(self.mod["video"].modality_keys) self.state_keys = list(self.mod["state"].modality_keys) self.action_keys = list(self.mod["action"].modality_keys) missing = [k for k in self.state_keys if k not in self.state_map] + \ [k for k in self.video_keys if k not in meta["cams"]] if missing: raise KeyError(f"model expects {missing}, not in the benchmark state / cache cameras {meta['cams']}") tj = self.view / "meta/tasks.jsonl" self.prompts = {str(r["task_index"]): r["task"] for r in E.jl(tj)} if tj.exists() else {} # all queries of the split in a fixed order; this rank keeps every WORLD-th one (images only for those) allq = [] for ep in meta["episodes"]: with np.load(E.split_dir(self.task, self.split) / f"ep_{ep:06d}.npz") as z: allq += [(ep, qi, int(t)) for qi, t in enumerate(z["query_t"])] if MAX_Q: allq = allq[:MAX_Q] self.n_total = len(allq) mine = [q for i, q in enumerate(allq) if i % WORLD == RANK] self.eps = list(meta["episodes"]) self.q = [] # (ep, t, T, state[t], prompt, {cam: img}, gt(16, Da), valid(16)) by_ep = {} for ep, qi, t in mine: by_ep.setdefault(ep, []).append((qi, t)) for ep, lst in by_ep.items(): with np.load(E.split_dir(self.task, self.split) / f"ep_{ep:06d}.npz") as z: state, action = z["state"], z["action"] prompt = meta["prompts"][str(int(z["task_index"]))] imgs = {c: z[f"img_{c}"] for c in self.video_keys} for qi, t in lst: gt, valid = E.gt_chunk(action, t) self.q.append((ep, t, len(action), state[t].copy(), prompt, {c: imgs[c][qi].copy() for c in self.video_keys}, gt, valid)) self.ready = True say(f"ready: task {self.task} split {self.split} queries {self.n_total} (rank {RANK}: {len(self.q)}), " f"every {EVERY} steps, batch {BATCH}, cams {self.video_keys}, processor {pdir}")
# ---------------------------------------------------------------- one forward on a batch of queries def _obs(self, q): from gr00t.data.utils import parse_observation_gr00t ep, t, T, st, prompt, imgs, _, _ = q o = {} for k in self.state_keys: a, b = self.state_map[k] o[f"state.{k}"] = np.asarray(st[a:b], dtype=np.float32)[None] for k in self.video_keys: o[f"video.{k}"] = imgs[k][None] o[self.language_key()] = self.prompts.get("0", prompt) if len(self.prompts) == 1 else prompt return parse_observation_gr00t(o, self.mod)
def language_key(self): return self.policy.language_key
@staticmethod def _merge(obs_list): out = {} for m in obs_list[0]: out[m] = {} for k, v in obs_list[0][m].items(): vals = [o[m][k] for o in obs_list] out[m][k] = np.concatenate(vals, axis=0) if isinstance(v, np.ndarray) else sum(vals, []) return out
def _predict(self, batch, model): obs = self._merge([self._obs(q) for q in batch]) dtype = next(model.parameters()).dtype ctx = torch.autocast("cuda", dtype=torch.bfloat16) if (dtype != torch.bfloat16 and torch.cuda.is_available()) \ else nullcontext() with ctx: act, _ = self.policy.get_action(obs) return np.concatenate([np.asarray(act[k], dtype=np.float64) for k in self.action_keys], axis=-1)
# ---------------------------------------------------------------- the eval def evaluate(self, step, model, output_dir): t0 = time.time() D = self.lay["action_dim"] if self.ready else 0 err, msg = 0.0, "" acc = None nq = 0 infer = 0.0 modes = [(m, m.training) for m in model.modules()] dev = torch.cuda.current_device() if torch.cuda.is_available() else None np_state, py_state = np.random.get_state(), random.getstate() try: with torch.random.fork_rng(devices=[dev] if dev is not None else []): if not self.ready: self._setup(model, output_dir) D = self.lay["action_dim"] model.eval() acc = E.Accumulator(self.std, self.lay["groups"]) for bi in range(0, len(self.q), BATCH): batch = self.q[bi:bi + BATCH] torch.default_generator.manual_seed(SEED + 1000 * RANK + bi) if dev is not None: torch.cuda.manual_seed(SEED + 1000 * RANK + bi) s = time.time() pred = self._predict(batch, model) infer += time.time() - s if pred.shape[0] != len(batch) or pred.shape[1] < E.HORIZON or pred.shape[2] != D: raise ValueError(f"prediction {pred.shape}, need ({len(batch)}, >={E.HORIZON}, {D})") for q, p in zip(batch, pred): acc.add(q[0], p[:E.HORIZON], q[6], q[7]) nq += 1 except Exception as e: # noqa: BLE001 - never stop training err, msg = 1.0, f"{type(e).__name__}: {e}" print(f"HB_INLOOP rank {RANK} step {step} FAILED: {msg}\n{traceback.format_exc()}", file=sys.stderr, flush=True) finally: for m, tr in modes: m.training = tr np.random.set_state(np_state) random.setstate(py_state) # ---- one all-reduce of all partial sums (+ error flag); D / eps are identical on every rank once ready H = E.HORIZON eps = self.eps if self.ready else [] nE = len(eps) vec = np.zeros(3 * D + 1 + 2 * H + 2 * nE + 3) if acc is not None and not err: o = 0 vec[o:o + D] = acc.sse_raw; o += D vec[o:o + D] = acc.sae_raw; o += D vec[o:o + D] = acc.sse_n; o += D vec[o] = acc.rows; o += 1 vec[o:o + H] = acc.step_sse_n; o += H vec[o:o + H] = acc.step_rows; o += H for j, ep in enumerate(eps): s, c = acc.per_episode.get(int(ep), (0.0, 0)) vec[o + j], vec[o + nE + j] = s, c o += 2 * nE vec[o], vec[o + 1] = nq, infer vec[-1] = err tot = self._allreduce(vec) if tot is None: # ranks disagree on the vector length (setup failed somewhere) -> stop for good self.disabled = True self._write(output_dir, {"step": step, "error": "length mismatch across ranks / collective failed"}) return if tot[-1] > 0 or not self.ready: self.disabled = True self._write(output_dir, {"step": step, "error": msg or "failed on another rank", "ranks_failed": tot[-1]}) say(f"step {step}: eval failed on {int(tot[-1])} rank(s) -> in-training eval disabled ({msg})") return o = 0 acc = E.Accumulator(self.std, self.lay["groups"]) acc.sse_raw = tot[o:o + D]; o += D acc.sae_raw = tot[o:o + D]; o += D acc.sse_n = tot[o:o + D]; o += D acc.rows = int(round(tot[o])); o += 1 acc.step_sse_n = tot[o:o + H]; o += H acc.step_rows = tot[o:o + H]; o += H acc.per_episode = {int(ep): [float(tot[o + j]), int(round(tot[o + nE + j]))] for j, ep in enumerate(eps) if tot[o + nE + j] > 0} o += 2 * nE n_q, infer_sum = int(round(tot[o])), float(tot[o + 1]) res = acc.result() res.pop("nmse_by_dim", None) rec = {"step": step, "utc": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()), "task": self.task, "split": self.split, "queries": n_q, "ranks": WORLD, "wall_s": round(time.time() - t0, 1), "infer_s_per_query": round(infer_sum / max(n_q, 1), 4), "denoising_steps": int(getattr(model.action_head, "num_inference_timesteps", -1)) if hasattr(model, "action_head") else None, "seed": SEED, **res} self.results.append(rec) self._write(output_dir, rec) g = " ".join(f"{k} {v['nmse']:.4f}" for k, v in res["groups"].items()) say(f"step {step}: {self.task}/{self.split} nMSE {res['nmse']:.4f} ({g}) on {n_q} queries, " f"{rec['wall_s']} s")
def _allreduce(self, vec): import torch.distributed as dist if not (dist.is_available() and dist.is_initialized()) or WORLD == 1: return vec try: dev = "cuda" if dist.get_backend() == "nccl" else "cpu" n = torch.tensor([float(len(vec))], dtype=torch.float64, device=dev) mx = n.clone() dist.all_reduce(mx, op=dist.ReduceOp.MAX) mn = n.clone() dist.all_reduce(mn, op=dist.ReduceOp.MIN) if mx.item() != mn.item(): return None t = torch.from_numpy(vec).to(device=dev, dtype=torch.float64) dist.all_reduce(t) return t.cpu().numpy() except Exception as e: # noqa: BLE001 print(f"HB_INLOOP rank {RANK} all_reduce failed: {e!r}", file=sys.stderr, flush=True) return None
def _write(self, output_dir, rec): if RANK != 0: return try: out = Path(output_dir).parent / "logs" / "inloop-mse.jsonl" out.parent.mkdir(parents=True, exist_ok=True) with open(out, "a") as f: f.write(json.dumps(rec) + "\n") except Exception as e: # noqa: BLE001 print(f"HB_INLOOP write failed: {e!r}", flush=True)
# ---------------------------------------------------------------- TrainerCallback hooks def on_step_end(self, args, state, control, model=None, **kw): step = int(state.global_step) if self.disabled or EVERY <= 0 or step <= 0 or step % EVERY or model is None: return control self.evaluate(step, model, args.output_dir) return control
def _install(): if EVERY <= 0: say("disabled (HB_INLOOP_EVERY=0)") return ds = _argv("--dataset_path") or _argv("--dataset-path") if not ds: say("disabled: no --dataset_path in argv") return try: task, split, view = resolve(ds) except Exception as e: # noqa: BLE001 say(f"disabled: {e}") return from transformers import TrainerCallback from gr00t.experiment.trainer import Gr00tTrainer
cb_cls = type("HBInLoopMSE", (InLoopMSE, TrainerCallback), {}) _orig_init = Gr00tTrainer.__init__
def __init__(self, *a, **k): _orig_init(self, *a, **k) self.add_callback(cb_cls(task, split, view))
Gr00tTrainer.__init__ = __init__ say(f"installed: task {task} split {split} every {EVERY} steps (view {view.name})")
if os.environ.get("HB_INLOOP_NO_INSTALL") != "1": _install()123456789101112131415161718192021222324252627282930313233343536373839"""joint47 root orientation for GR00T (2026-11-18 user experiment).
The dataset stores world-frame rotation6D per frame (action.root_rot6d_world). Every sample's action chunk isconverted to rotation6D relative to the heading of its CURRENT frame (row 0 = source offset 0 = the observationframe), exactly as HumanWAM joint47 v2: R_relative[k] = Rz(-yaw(current)) @ R_world[k], using HumanWAM's ownjoint_reference_rotation.py. Applied before normalization (fixed [-1, 1] bounds). Imported by hb_launch.py whenHB_J47_ROOT_KEY is set."""import importlib.utilimport osfrom pathlib import Path
import numpy as npfrom gr00t.model.gr00t_n1d7 import processing_gr00t_n1d7 as P
_default = Path(__file__).resolve().parents[2] / "HumanWAM-joint/src/imagewam/joint_reference_rotation.py"_spec = importlib.util.spec_from_file_location("hb_jrr", os.environ.get("HB_J47_ROTATION_PY", str(_default)))jrr = importlib.util.module_from_spec(_spec)_spec.loader.exec_module(jrr)KEY = os.environ["HB_J47_ROOT_KEY"]IDENT = np.array([1.0, 0.0, 0.0, 0.0])
def to_current_heading(world6d): q = jrr.heading_relative_rotation6d_to_world_quaternion(np.asarray(world6d, dtype=np.float64), IDENT) return jrr.world_quaternion_to_heading_relative_rotation6d(q, q[0].astype(np.float64)).astype(np.float32)
_prev = P.Gr00tN1d7Processor.__call__
def _call(self, messages): acts = getattr(messages[0]["content"], "actions", None) if acts and KEY in acts: acts[KEY] = to_current_heading(acts[KEY]) return _prev(self, messages)
P.Gr00tN1d7Processor.__call__ = _call123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121"""GR00T N1.7 fine-tuning entry with Humanoid Benchmark augmentation v2.
Patches Gr00tN1d7Processor in training mode only:- images: native random crop / colour jitter / rotation are bypassed (the deterministic eval resize+center-crop is used), then hb_aug_v2 is applied jointly to all cameras of the sample;- proprio: the body-joint state groups (HB_BODY_STATE_KEYS) get the v2 bias + noise before normalization.Then runs the pinned upstream gr00t/experiment/launch_finetune.py unchanged."""import jsonimport osimport runpyimport sysfrom pathlib import Path
import numpy as npimport torch
HERE = Path(__file__).resolve().parentsys.path.insert(0, str(HERE))import hb_offline_fix # noqa: E402,F401 (tokenizer load under HF_HUB_OFFLINE=1, see module docstring)import hb_aug_v2 as A # noqa: E402from gr00t.model.gr00t_n1d7 import processing_gr00t_n1d7 as P # noqa: E402
Proc = P.Gr00tN1d7ProcessorBODY_KEYS = [k for k in os.environ.get("HB_BODY_STATE_KEYS", "left_leg,right_leg,waist,left_arm,right_arm").split(",") if k]LOG = os.environ.get("HB_AUG_LOG")_state = {"rng": None, "count": 0, "pid": None}
def _worker_id(): info = torch.utils.data.get_worker_info() return 0 if info is None else info.id + 1
# 2026-11-23 user (hb_training/REPRODUCIBILITY.md section 3): with HB_AUG_SEED set -- the training entry sets it# for every run it starts -- the augmentation stream is derived from (training seed, torch.initial_seed() of this# process / DataLoader worker, global rank, worker id), so a rerun with the same seed and layout draws the same# augmentations. Processes started before this change have no HB_AUG_SEED and keep the old pid/urandom stream.def _rng(): pid = os.getpid() if _state["rng"] is None or _state["pid"] != pid: if os.environ.get("HB_AUG_SEED") is not None: _state["rng"] = np.random.default_rng([int(os.environ["HB_AUG_SEED"]), torch.initial_seed() % (2 ** 63), int(os.environ.get("RANK", "0")), _worker_id()]) else: _state["rng"] = np.random.default_rng([pid, int.from_bytes(os.urandom(8), "little")]) _state["pid"] = pid return _state["rng"]
_orig_get, _orig_apply, _orig_call = Proc._get_vlm_inputs, Proc._apply_vlm_processing, Proc.__call__
def _get_vlm_inputs(self, image_keys, images, masks, image_transform, language): if getattr(self, "training", False): self._hb_views = len(image_keys) try: return _orig_get(self, image_keys, images, masks, self.eval_image_transform, language) finally: self._hb_views = None return _orig_get(self, image_keys, images, masks, image_transform, language)
def _apply_vlm_processing(self, images, language): views = getattr(self, "_hb_views", None) if views and isinstance(images, torch.Tensor): shape = images.shape x = images.reshape(-1, views, *shape[1:]).float().div(255.0) x, p = A.augment(x, _rng()) images = (x * 255.0 + 0.5).clamp(0, 255).to(torch.uint8).reshape(shape) _state["count"] += 1 if LOG and _state["count"] in (1, 50): with open(f"{LOG}.{os.getpid()}", "a") as f: f.write(json.dumps({"count": _state["count"], "views": views, "hw": list(shape[-2:]), "boost": p["boost"], "version": A.VERSION}) + "\n") return _orig_apply(self, images, language)
def _call(self, messages): if getattr(self, "training", False) and BODY_KEYS: states = messages[0]["content"].states for key in BODY_KEYS: if key in states: states[key] = A.perturb_joints(states[key], _rng()) return _orig_call(self, messages)
Proc._get_vlm_inputs = _get_vlm_inputsProc._apply_vlm_processing = _apply_vlm_processingProc.__call__ = _call
# 2026-11-18 user: joint47 experiment (hb_j47.py turns the world root rotation6D chunk into current-heading relative)if os.environ.get("HB_J47_ROOT_KEY"): import hb_j47 # noqa: E402,F401
# 2026-11-15 user: in-training open-loop action MSE every 250 steps (hb_inloop_eval.py adds a TrainerCallback to# Gr00tTrainer; HB_INLOOP_EVERY=0 turns it off). It never blocks training: any setup problem only disables it.if os.environ.get("HB_PATCH_ONLY") != "1": try: import hb_inloop_eval # noqa: E402,F401 except Exception as _e: # noqa: BLE001 print(f"HB_INLOOP disabled: {_e!r}", flush=True)
if os.environ.get("HB_PATCH_ONLY") != "1": os.environ.setdefault("HB_AUG_SEED", "42") # = the GR00T training seed (gr00t data_config seed 42); see _rng() print(f"HB_AUG_SEED={os.environ['HB_AUG_SEED']} (seeded augmentation stream, REPRODUCIBILITY.md section 3)", file=sys.stderr, flush=True) entry = Path(os.environ["GROOT_SRC"]) / "gr00t/experiment/launch_finetune.py" sys.argv = [str(entry)] + sys.argv[1:] try: runpy.run_path(str(entry), run_name="__main__") finally: # batch probe: report this rank's peak reserved memory (groot_chain.py compares it with MAX_FRAC) _peak = os.environ.get("HB_PEAK_FILE") if _peak and torch.cuda.is_available(): try: _dev = torch.cuda.current_device() with open(f"{_peak}-rank{os.environ.get('RANK', '0')}.json", "w") as _f: json.dump({"rank": int(os.environ.get("RANK", "0")), "peak_reserved_gb": torch.cuda.max_memory_reserved(_dev) / 1e9, "total_gb": torch.cuda.get_device_properties(_dev).total_memory / 1e9}, _f) except Exception: # noqa: BLE001 - never mask the training result pass123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102"""2026-11-15 user: GR00T variant launcher = hb_launch.py (HB aug v2 + A20 proprio + processor patch, then the pinnedupstream launch_finetune.py) plus, from environment variables, before the run starts: HB_GROOT_MODEL_OVERRIDES JSON {"attn_dropout": 0.0, "diffusion_model_cfg.dropout": 0.0, "num_inference_timesteps": 16, ...}: set on config.model (dotted keys go into nested dicts / attributes) HB_GROOT_LR_GROUPS JSON {"language": 1e-6, "vision": 1e-5, "projector": 1e-4, "rest": 1e-4}: layer-wise learning rates (Psi-Zero style) through Gr00tTrainer.create_optimizer: language = backbone ... language_model.* and lm_head vision = backbone ... visual.* except the vision->language mergers projector = visual.merger.* and visual.deepstack_merger_list.* rest = action head (DiT, VL self-attention, VLLN, encoders / decoders) weight decay as HF Trainer (no decay on biases / norms); cosine + warmup scale every group.Prints HB_LAUNCH_V lines (overrides applied, parameter count and lr per group) on rank 0 for verification."""import jsonimport osimport runpyimport sysfrom pathlib import Path
H = Path(__file__).resolve().parentsys.path.insert(0, str(H))RANK0 = os.environ.get("RANK", "0") == "0"
def say(*a): if RANK0: print("HB_LAUNCH_V", *a, flush=True)
OV = json.loads(os.environ.get("HB_GROOT_MODEL_OVERRIDES", "{}") or "{}")LRG = json.loads(os.environ.get("HB_GROOT_LR_GROUPS", "{}") or "{}")
import gr00t.experiment.experiment as E # noqa: E402
_run = E.run
def _set(obj, dotted, value): parts = dotted.split(".") for p in parts[:-1]: obj = obj[p] if isinstance(obj, dict) else getattr(obj, p) last = parts[-1] if isinstance(obj, dict): if last not in obj: raise KeyError(f"model override {dotted}: no key {last}") old = obj[last] obj[last] = value else: if not hasattr(obj, last): raise AttributeError(f"model override {dotted}: no attribute {last}") old = getattr(obj, last) setattr(obj, last, value) say(f"override model.{dotted}: {old!r} -> {value!r}")
def run(config): for k, v in OV.items(): _set(config.model, k, v) return _run(config)
E.run = run
if LRG: from transformers import Trainer from gr00t.experiment.trainer import Gr00tTrainer
def group_of(name): if ".language_model." in name or "lm_head" in name: return "language" if ".visual." in name: return "projector" if (".visual.merger." in name or ".visual.deepstack_merger_list." in name) else "vision" return "rest"
def create_optimizer(self): if self.optimizer is not None: return self.optimizer model = self.model decay = set(self.get_decay_parameter_names(model)) groups, stats = {}, {} for n, p in model.named_parameters(): if not p.requires_grad: continue g = group_of(n) lr = float(LRG.get(g, LRG.get("rest", self.args.learning_rate))) wd = self.args.weight_decay if n in decay else 0.0 groups.setdefault((g, lr, wd), []).append(p) s = stats.setdefault(g, [lr, 0, 0]) s[1] += 1 s[2] += p.numel() opt_cls, opt_kwargs = Trainer.get_optimizer_cls_and_kwargs(self.args, model) opt_kwargs.pop("lr", None) self.optimizer = opt_cls([{"params": ps, "lr": lr, "weight_decay": wd} for (g, lr, wd), ps in groups.items()], lr=self.args.learning_rate, **opt_kwargs) for g, (lr, n_t, n_p) in sorted(stats.items()): say(f"lr group {g}: lr {lr:g}, {n_t} tensors, {n_p / 1e6:.1f} M params") return self.optimizer
Gr00tTrainer.create_optimizer = create_optimizer say("layer-wise lr groups installed", json.dumps(LRG))
say("model overrides", json.dumps(OV))runpy.run_path(str(H / "hb_launch.py"), run_name="__main__")123456789101112131415161718192021222324"""Make tokenizer loading work with HF_HUB_OFFLINE=1 on transformers 4.57.x.
PreTrainedTokenizerBase._patch_mistral_regex calls huggingface_hub.model_info() for every hub-named tokenizer with avocab > 100k (to detect Mistral base models). With HF_HUB_OFFLINE=1 that raises OfflineModeIsEnabled even though allfiles are in the cache. GR00T's Cosmos-Reason2-2B / Qwen3-VL tokenizer is not a Mistral tokenizer, so when offline thecheck is skipped and the tokenizer is returned unchanged. Online behaviour is untouched."""import os
from transformers.tokenization_utils_base import PreTrainedTokenizerBase as _PTB
if not getattr(_PTB, "_hb_offline_fix", False): _orig = _PTB._patch_mistral_regex.__func__
def _patch_mistral_regex(cls, tokenizer, *args, **kwargs): try: return _orig(cls, tokenizer, *args, **kwargs) except Exception as error: if os.environ.get("HF_HUB_OFFLINE") == "1" or type(error).__name__ == "OfflineModeIsEnabled": return tokenizer raise
_PTB._patch_mistral_regex = classmethod(_patch_mistral_regex) _PTB._hb_offline_fix = True123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212"""Build GR00T dataset views (symlinked episodes + rewritten meta + stats) for the G1 tasks.
Usage: <groot python> prepare_groot_data.py <task> [<task> ...] (tasks: b6 basket a3 a7)B6 always uses the fixed first 100 episodes (0-99) of b6-v5t7-ready-start-20261109."""import hashlibimport jsonimport osimport subprocessimport sysfrom pathlib import Path
H = Path(__file__).resolve().parentG = H.parentP = G.parentOUT = G / "groot-data"TASKS = { "b6": (P / "b6-v5t7-ready-start-60ep-20261109/data/deliveries/g1/b6-v5t7-ready-start-20261109", 100), "basket": (P / "basket-current-dynamics-100-v21-b0ff522/data", None), # HF basket-transfer-expert-v1 @current-dynamics-100-v21 b0ff522 (old ed77719 retired) "basketv2": (P / "basket-trimv2-c4df4d4/data", None), # HF a20-basket-transfer-pre-reach-trim-expert-v2 @c4df4d40 (user 2026-11-14) "basketv2p": (P / "basket-trimv2-c4df4d4/data", None), # 2026-11-23 user: basket v2 (A20 final data) from the base model, 4000 steps (no v1 stage) "trolley": (P / "trolley-push-expert-v1-20261110/data/trolley_push", 100), # HF trolley-push-expert-v1 @ef9024a: fixed first 100 of 103 "b7": (P / "b7-black-clothes-hamper-v1-1bb002a/data", 100), # HF b7-black-clothes-hamper-expert-v1 @1bb002a, first 100 of 107 "a6": (P / "a6-door-pull-v1-cf3ee9b/data/door_pull", None), # HF door-pull-expert-v1 @cf3ee9b (A6) "b7green": (P / "b7-green-clothes-hamper-v1-ada288c/data", None), # HF b7-green-clothes-hamper-expert-v1 @ada288c, 100 episodes (user 2026-11-13) "a7v2": (P / "a7-cabinet-close-v2-aecf070/data", None), # HF a7-cabinet-close-expert-v2 @aecf070, 100 episodes (user 2026-11-14) "b8": (P / "b8-table-wipe-v1-3b2e618/data", None), # HF b8-table-wipe-expert-v1 @3b2e618, 100 episodes (user 2026-11-14) "b1": (P / "b1-riceball-microwave-v1-36da298/data", None), # HF b1-riceball-microwave-expert-v1 @36da298, all 115 episodes (user 2026-11-14) "a10v3": (P / "a10-trolley-push-v3-6e410c5/data", None), # HF a10-trolley-push-expert-v3 @6e410c5, all 148 episodes (user 2026-11-15) "a3v3": (P / "a3-fridge-open-v3-24882d5/data", None), # HF a3-fridge-open-expert-v3 @24882d5, all 125 episodes, measured hands (user 2026-11-15) "a7v3": (P / "a7-cabinet-close-v3-c2e15b0/data", None), # HF a7-cabinet-close-expert-v3 @c2e15b0, all 100 episodes, measured hands (user 2026-11-15) "b6v6": (P / "b6-pedal-bin-v6-ad2f5bf/data", None), # HF b6-pedal-bin @ad2f5bf0 (v6 at the repo root), all 542 episodes (user 2026-11-15) "b6v6p": (P / "b6-pedal-bin-v6-ad2f5bf/data", None), # 2026-11-23 user: pure v6 from the base model, all 542 (exception to the first-500 rule) "b5": (P / "b5-chair-push-v1-b85b7e9/data", None), # HF b5-chair-push-expert-v1 @b85b7e9, all 100 episodes (user 2026-11-15) "a3v4": (P / "a3-fridge-open-v4-6393d4a/data", None), # HF a3-fridge-open-expert-v4 @6393d4a, all 125 episodes (user 2026-11-15: v4 replaces v3) "a7v4": (P / "a7-cabinet-close-v4-90cc2b5/data", None), # HF a7-cabinet-close-expert-v4 @90cc2b5, all 100 episodes (user 2026-11-15: v4 replaces v3) "b7greenv2": (P / "b7-green-clothes-hamper-v2-c12757e/data", None), # HF b7-green-clothes-hamper @c12757e (v2 at the repo root), all 120 episodes (user 2026-11-14) "a10v2": (P / "a10-trolley-push-v2-d3abb4c/data", None), # HF a10-trolley-push-expert-v2 @d3abb4c, all 150 episodes (user 2026-11-13) "a1": (P / "a1-ground-object-pickup-v1-f47f07e/data", None), # HF a1-ground-object-pickup-expert-v1 @f47f07e (A1) "c6t": (P / "c6-test8-06c231d/data", None), # c6 8-episode adaptation test only "c6": (P / "c6-bathroom-door-fetch-v1-3afba69/data", None), # HF c6-bathroom-door-fetch-expert-v1 @3afba69 (C6) "a3": (P / "a3-a7-20261109/a3-fridge-open-expert-v1/780fcf1e4bd7db947a8c2d8f7b92e61f24f71b45", None), "a7": (P / "a3-a7-20261109/a7-cabinet-close-expert-v1/1935a98e8f55d4d1d2d1615ddb97c2679713595c", None), "a18": (P / "a18-h2-dataset-audit-8e956a10/dataset", None), "a17": (P / "a17-unscrew-bottle-v1-407e6e2/data", None), # HF a17-unscrew-bottle-expert-v1 @407e6e2 "a18c2": (P / "a18-h2-dataset-audit-8e956a10/dataset", None), # A18, 2 cameras head + chest (user 2026-11-14 18:2x) "a17c2": (P / "a17-unscrew-bottle-v1-407e6e2/data", None), # A17, 2 cameras head + chest (user 2026-11-14 18:2x) "a18cr2": (P / "a18-pour-water-cropped-v2-44cdd57/data", None), # HF a18-pour-water-expert-cropped-v2 @44cdd57, head + chest (user 2026-11-15) "a17cr2": (P / "a17-unscrew-bottle-cropped-v2-3520b70/data", None), # HF a17-unscrew-bottle-expert-cropped-v2 @3520b70, head + chest (user 2026-11-15) "a14": (P / "a14-unscrew-bulb-v1-b4390fc/data", None), # HF a14-unscrew-bulb-expert-v1 @b4390fc (H2, 3 cameras) "a14v2": (P / "a14-unscrew-bulb-v2-8411a6d/data", None), # HF a14-unscrew-bulb-expert-v2 @8411a6da: + action.planner (H2 guide 2026-11-14) "a14cr3": (P / "a14-screw-bulb-cropped-v3-79fe08a/data", None), # HF a14-screw-bulb-expert-cropped-v3 @79fe08a (trimmed from v2 @8411a6d; user 2026-11-20: newest A14) "b7t": (P / "b7-black-clothes-hamper-trim-949da46/data", 100), # HF b7-black-clothes-hamper @949da46 trimmed, first 100 of 107 as FastWAM / DF / pi0.5 (user 2026-11-22) "b7gt": (P / "b7-green-clothes-hamper-v2trim-22e3b83/data", None), # HF b7-green-clothes-hamper @22e3b83 trimmed v2, all 421 (user 2026-11-22) "b7td": (P / "b7-black-clothes-hamper-leaddrop-619f342/data", 100), # 2026-11-24 user: B7 black, lead-in still frames dropped (HF @619f3427, 107 ep), first 100 as before "b7gtd": (P / "b7-green-clothes-hamper-v2leaddrop-4d2c613/data", None), # 2026-11-24 user: B7 green v2, lead-in still frames dropped (HF @4d2c613c, all 421) "b5ss": (P / "b5-chair-push-standing-start-v1-913f5a1/data", None), # HF b5-chair-push-standing-start-expert-v1 @913f5a1, all 100 (user 2026-11-22) "a9": (P / "a9-pedal-open-8d43206/data", None), # 2026-11-24 user: A9 pedal bin lid open (HF a9-pedal-open-expert-v1 @8d432063, all 100 ep, G1, 30 Hz) "b1v2": (P / "b1-riceball-microwave-v2-30hz-b58f043/data", None), # 2026-11-25 user: B1 v2 (HF b1-riceball-microwave-expert-v2-30hz @b58f0434, all 200 ep, G1, 30 Hz) "b4": (P / "b4-cushion-194e7cd/data", None), # 2026-11-25 user: B4 cushion bed -> sofa (HF b4-cushion @194e7cde, v2 at the repo root, all 302 ep, G1, 30 Hz) "a29": (P / "a29-drawer-close-black-marble-30hz-d03c19e/data", None), # 2026-11-25 user: A29 drawer close, black-marble kitchen 30 Hz (HF a29-drawer-close-black-marble-30hz-v1 @d03c19e6, all 100 ep, G1, ego_view + chest) "a21": (P / "a21-floor-transfer-basket-682f2bf/data", None), # 2026-11-26 user: A21 floor basket transfer (HF a21-floor-transfer-basket-trim-raw-head-expert-v1 @682f2bfc, all 100 ep, G1, ego_view + chest, idle-trimmed) "a3v4p": (P / "a3-fridge-open-v4p-fe89f5b/data", None), # 2026-11-27 user: newest pause-trim (a29_trim_stationary 3 frames) data, all 7 baselines retrain: HF a3-fridge-open-expert-v4 @fe89f5b3 "a7v4p": (P / "a7-cabinet-close-v4p-d3ec805/data", None), # 2026-11-27 user: newest pause-trim (a29_trim_stationary 3 frames) data, all 7 baselines retrain: HF a7-cabinet-close-expert-v4 @d3ec8057 "b1v2p": (P / "b1-riceball-microwave-v2-30hz-p-276ceb9/data", None), # 2026-11-27 user: newest pause-trim (a29_trim_stationary 3 frames) data, all 7 baselines retrain: HF b1-riceball-microwave-expert-v2-30hz @276ceb91 "a14cr5": (P / "a14-screw-bulb-cropped-v5-33beae7/data", None), # 2026-11-27 user: newest pause-trim (a29_trim_stationary 3 frames) data, all 7 baselines retrain: HF a14-screw-bulb @33beae7c, head + chest, + planner "a17cr4": (P / "a17-unscrew-bottle-cropped-v4-f710531/data", None), # 2026-11-27 user: newest pause-trim (a29_trim_stationary 3 frames) data, all 7 baselines retrain: HF a17-unscrew-bottle @f7105314, head + chest "a18cr4": (P / "a18-pour-water-cropped-v4-73fd522/data", None), # 2026-11-27 user: newest pause-trim (a29_trim_stationary 3 frames) data, all 7 baselines retrain: HF a18-pour-water @73fd5225, head + chest "a20kosmo": (P / "a20-basket-transfer-kosmo-30hz-v1-7324dbe/data", None), # 2026-11-25 user: A20 basket v2 re-rendered in the Kosmo-scanned EAI room (HF a20-basket-transfer-kosmo-30hz-v1 @7324dbeb; data/ sim/ byte-identical to basketv2), GR00T only, same recipe as basketv2p}CONFIG = {"a18": "h2w3_body31_hand44_h16.py", "a17": "h2w3_body31_hand44_h16.py", "a14": "h2w3_body31_hand44_h16.py", "a18c2": "h2_body31_hand44_h16.py", "a17c2": "h2_body31_hand44_h16.py", "a18cr2": "h2_body31_hand44_h16.py", "a17cr2": "h2_body31_hand44_h16.py", "a14v2": "h2_body31_hand44_planner7_h16.py", "a14cr3": "h2_body31_hand44_planner7_h16.py", "a18cr4": "h2_body31_hand44_h16.py", "a17cr4": "h2_body31_hand44_h16.py", "a14cr5": "h2_body31_hand44_planner7_h16.py"} # 2026-11-14 H2 guide: action82 incl. the planner command# model-input cameras per H2 task (user 2026-11-12 22:0x: EVERY H2 task uses head + chest + wrist; third_person never)CAMS = {"a18": ("head", "chest", "wrist"), "a17": ("head", "chest", "wrist"), "a14": ("head", "chest", "wrist"), "a18c2": ("head", "chest"), "a17c2": ("head", "chest"), "a18cr2": ("head", "chest"), "a17cr2": ("head", "chest"), "a14v2": ("head", "chest"), "a14cr3": ("head", "chest"), "a18cr4": ("head", "chest"), "a17cr4": ("head", "chest"), "a14cr5": ("head", "chest")} # 2026-11-14: 2-camera re-train (user)PLANNER = {"a14v2", "a14cr3", "a14cr5"} # tasks whose action adds action.planner (7) after body_target + hands (H2 guide a14 2.2)H2_GROUPS = {"left_leg": (0, 6), "right_leg": (6, 12), "waist": (12, 15), "left_arm": (15, 22), "right_arm": (22, 29), "head": (29, 31), "left_hand": (31, 53), "right_hand": (53, 75)}
def h2_modality(info, cams=("head", "chest")): f = info["features"] names = f["observation.state"]["names"] assert len(names) == 75 and names[:31] == f["action.body_target"]["names"] and names[31:] == f["action.hands"]["names"] assert f["observation.projected_gravity"]["shape"] == [3] state = {g: {"original_key": "observation.state", "start": a, "end": b} for g, (a, b) in H2_GROUPS.items()} state["projected_gravity"] = {"original_key": "observation.projected_gravity", "start": 0, "end": 3} return {"state": state, "action": {"body_target": {"original_key": "action.body_target", "start": 0, "end": 31}, "left_hand_target": {"original_key": "action.hands", "start": 0, "end": 22}, "right_hand_target": {"original_key": "action.hands", "start": 22, "end": 44}}, "video": {c: {"original_key": f"observation.images.{c}"} for c in cams}, "annotation": {"human.task_description": {"original_key": "task_index"}}}BODY = ["left_hip_pitch_joint", "left_hip_roll_joint", "left_hip_yaw_joint", "left_knee_joint", "left_ankle_pitch_joint", "left_ankle_roll_joint", "right_hip_pitch_joint", "right_hip_roll_joint", "right_hip_yaw_joint", "right_knee_joint", "right_ankle_pitch_joint", "right_ankle_roll_joint", "waist_yaw_joint", "waist_roll_joint", "waist_pitch_joint", "left_shoulder_pitch_joint", "left_shoulder_roll_joint", "left_shoulder_yaw_joint", "left_elbow_joint", "left_wrist_roll_joint", "left_wrist_pitch_joint", "left_wrist_yaw_joint", "right_shoulder_pitch_joint", "right_shoulder_roll_joint", "right_shoulder_yaw_joint", "right_elbow_joint", "right_wrist_roll_joint", "right_wrist_pitch_joint", "right_wrist_yaw_joint"]GROUPS = {"left_leg": (0, 6), "right_leg": (6, 12), "waist": (12, 15), "left_arm": (15, 22), "right_arm": (22, 29)}
def jl(path): return [json.loads(x) for x in Path(path).read_text().splitlines() if x.strip()]
def wl(path, rows): Path(path).write_text("".join(json.dumps(r) + "\n" for r in rows))
def build(task): src, limit = TASKS[task] info = json.loads((src / "meta/info.json").read_text()) names = info["features"]["observation.state"]["names"] if task in CONFIG: idx = list(range(31)) else: idx = [names.index(n) for n in BODY] for g, (a, b) in GROUPS.items(): assert idx[a:b] == list(range(idx[a], idx[a] + (b - a))), (task, g, idx[a:b]) for key, dim in (("action.motion_token", 64), ("observation.inspire_left_hand_state", 6), ("observation.inspire_right_hand_state", 6), ("observation.projected_gravity", 3), ("observation.images.ego_view", None), ("observation.images.chest", None)): assert key in info["features"], (task, key) if dim: assert info["features"][key]["shape"] == [dim], (task, key) episodes = jl(src / "meta/episodes.jsonl") stats = jl(src / "meta/episodes_stats.jsonl") n = len(episodes) if limit is None else limit episodes, stats = episodes[:n], stats[:n] assert [e["episode_index"] for e in episodes] == list(range(n)) == [s["episode_index"] for s in stats] frames = sum(int(e["length"]) for e in episodes) dst = OUT / task if dst.exists(): raise SystemExit(f"{dst} exists") (dst / "meta").mkdir(parents=True) vkeys = [k for k, f in info["features"].items() if f.get("dtype") == "video"] for e in episodes: i = e["episode_index"] chunk = i // int(info["chunks_size"]) rel = info["data_path"].format(episode_chunk=chunk, episode_index=i) (dst / rel).parent.mkdir(parents=True, exist_ok=True) os.symlink(src / rel, dst / rel) for k in vkeys: relv = info["video_path"].format(episode_chunk=chunk, video_key=k, episode_index=i) (dst / relv).parent.mkdir(parents=True, exist_ok=True) os.symlink(src / relv, dst / relv) if task in CONFIG: # stats.py computes stats for every low-dim feature in info.json and cannot handle e.g. observation.tactile # [10,24,24]; keep only what the H2 modality uses (parquet columns stay untouched behind the symlinks). keep = {"observation.state", "observation.projected_gravity", "action.body_target", "action.hands", "timestamp", "frame_index", "episode_index", "index", "task_index"} keep |= {f"observation.images.{c}" for c in CAMS[task]} keep |= {"action.planner"} if task in PLANNER else set() info["features"] = {k: v for k, v in info["features"].items() if k in keep} vkeys = [k for k in vkeys if k in keep] stats = [{**s, "stats": {k: v for k, v in s["stats"].items() if k in keep}} if "stats" in s else s for s in stats] info.update(total_episodes=n, total_frames=frames, total_videos=n * len(vkeys), total_chunks=(n - 1) // int(info["chunks_size"]) + 1, splits={"train": f"0:{n}"}) (dst / "meta/info.json").write_text(json.dumps(info, indent=2)) wl(dst / "meta/episodes.jsonl", episodes) wl(dst / "meta/episodes_stats.jsonl", stats) (dst / "meta/tasks.jsonl").write_text((src / "meta/tasks.jsonl").read_text()) if task in CONFIG: modality = h2_modality(info, CAMS[task]) if task in PLANNER: assert info["features"]["action.planner"]["shape"] == [7] modality["action"]["planner"] = {"original_key": "action.planner", "start": 0, "end": 7} else: state = {g: {"original_key": "observation.state", "start": idx[a], "end": idx[a] + (b - a)} for g, (a, b) in GROUPS.items()} state.update(left_hand={"original_key": "observation.inspire_left_hand_state", "start": 0, "end": 6}, right_hand={"original_key": "observation.inspire_right_hand_state", "start": 0, "end": 6}, projected_gravity={"original_key": "observation.projected_gravity", "start": 0, "end": 3}) modality = {"state": state, "action": {"motion_token": {"original_key": "action.motion_token", "start": 0, "end": 64}, "left_hand_joints": {"original_key": "observation.inspire_left_hand_state", "start": 0, "end": 6}, "right_hand_joints": {"original_key": "observation.inspire_right_hand_state", "start": 0, "end": 6}}, "video": {"ego_view": {"original_key": "observation.images.ego_view"}, "chest": {"original_key": "observation.images.chest"}}, "annotation": {"human.task_description": {"original_key": "task_index"}}} (dst / "meta/modality.json").write_text(json.dumps(modality, indent=2)) py = sys.executable src_g = G / "HumanWAM/third_party/Isaac-GR00T" env = dict(os.environ, PYTHONPATH=f"{src_g}:{H}") done = None for tag in ("NEW_EMBODIMENT", "new_embodiment"): r = subprocess.run([py, str(src_g / "gr00t/data/stats.py"), "--dataset-path", str(dst), "--embodiment-tag", tag, "--modality-config-path", str(H / CONFIG.get(task, "g1_feedback76_h16.py"))], env=env, cwd=src_g, capture_output=True, text=True) if r.returncode == 0: done = tag break last = r.stdout[-1500:] + r.stderr[-1500:] if done is None: raise SystemExit(f"stats failed for {task}:\n{last}") assert (dst / "meta/stats.json").is_file() receipt = dict(task=task, source=str(src), episodes=n, frames=frames, video_keys=vkeys, state_dim_raw=len(names), body_index=idx, stats_tag=done, modality_sha256=hashlib.sha256((dst / "meta/modality.json").read_bytes()).hexdigest(), stats_sha256=hashlib.sha256((dst / "meta/stats.json").read_bytes()).hexdigest()) (dst / "hb-dataset-receipt.json").write_text(json.dumps(receipt, indent=2) + "\n") print("DATASET_OK", json.dumps(receipt)[:400], flush=True)
for t in sys.argv[1:]: build(t)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127"""2026-11-18 user: GR00T joint47 experiment on B6 v5 (all 150 episodes of HF humanoid-benchmark/b6-pedal-bin v5/).
Aligned with HumanWAM joint47 v2 (docs/G1_JOINT_REFERENCE_DELTA.md, HumanWAM-joint @ bai-joint): action47 = body29 (measured observation.state, by joint name) | left Inspire6 | right Inspire6 (measured) | root rotation6D relative to the CURRENT heading (computed per sample in hb_j47.py).The parquet files get one extra column, action.root_rot6d_world = world-frame rotation6D ofobservation.root_orientation (wxyz), columns [R00,R10,R20,R01,R11,R21] (HumanWAM's own conversion with an identityanchor). Its normalization bounds are fixed to [-1, 1] (as in HumanWAM). Videos are symlinked; source data untouched.Usage: <groot python> prepare_groot_j47.py <src v5 dir> <dst dir>"""import hashlibimport importlib.utilimport jsonimport osimport subprocessimport sysfrom pathlib import Path
import numpy as npimport pyarrow as paimport pyarrow.parquet as pq
H = Path(__file__).resolve().parentG = H.parentP = G.parentspec = importlib.util.spec_from_file_location("jrr", P / "HumanWAM-joint/src/imagewam/joint_reference_rotation.py")jrr = importlib.util.module_from_spec(spec)spec.loader.exec_module(jrr)BODY = ["left_hip_pitch_joint", "left_hip_roll_joint", "left_hip_yaw_joint", "left_knee_joint", "left_ankle_pitch_joint", "left_ankle_roll_joint", "right_hip_pitch_joint", "right_hip_roll_joint", "right_hip_yaw_joint", "right_knee_joint", "right_ankle_pitch_joint", "right_ankle_roll_joint", "waist_yaw_joint", "waist_roll_joint", "waist_pitch_joint", "left_shoulder_pitch_joint", "left_shoulder_roll_joint", "left_shoulder_yaw_joint", "left_elbow_joint", "left_wrist_roll_joint", "left_wrist_pitch_joint", "left_wrist_yaw_joint", "right_shoulder_pitch_joint", "right_shoulder_roll_joint", "right_shoulder_yaw_joint", "right_elbow_joint", "right_wrist_roll_joint", "right_wrist_pitch_joint", "right_wrist_yaw_joint"]GROUPS = {"left_leg": (0, 6), "right_leg": (6, 12), "waist": (12, 15), "left_arm": (15, 22), "right_arm": (22, 29)}ROT = "action.root_rot6d_world"IDENT = np.array([1.0, 0.0, 0.0, 0.0])
def jl(path): return [json.loads(x) for x in Path(path).read_text().splitlines() if x.strip()]
def wl(path, rows): Path(path).write_text("".join(json.dumps(r) + "\n" for r in rows))
def main(src, dst): src, dst = Path(src), Path(dst) info = json.loads((src / "meta/info.json").read_text()) f = info["features"] names = f["observation.state"]["names"] idx = [names.index(n) for n in BODY] assert idx == list(range(idx[0], idx[0] + 29)), idx # body29 contiguous in our G1 exports assert f["observation.root_orientation"]["shape"] == [4] for k in ("observation.inspire_left_hand_state", "observation.inspire_right_hand_state"): assert f[k]["shape"] == [6], k episodes = jl(src / "meta/episodes.jsonl") stats = jl(src / "meta/episodes_stats.jsonl") n = len(episodes) assert [e["episode_index"] for e in episodes] == list(range(n)) == [s["episode_index"] for s in stats] if dst.exists(): raise SystemExit(f"{dst} exists") (dst / "meta").mkdir(parents=True) vkeys = [k for k, v in f.items() if v.get("dtype") == "video"] frames = 0 for e, s in zip(episodes, stats): i = e["episode_index"] chunk = i // int(info["chunks_size"]) rel = info["data_path"].format(episode_chunk=chunk, episode_index=i) t = pq.read_table(src / rel) q = np.stack(t.column("observation.root_orientation").to_numpy(zero_copy_only=False)).astype(np.float64) r6 = jrr.world_quaternion_to_heading_relative_rotation6d(q, IDENT) # identity anchor = world frame assert r6.shape == (len(q), 6) and np.isfinite(r6).all() t = t.append_column(ROT, pa.array(list(r6.astype(np.float32)), type=pa.list_(pa.float32()))) (dst / rel).parent.mkdir(parents=True, exist_ok=True) pq.write_table(t, dst / rel) frames += len(q) s["stats"][ROT] = {"min": r6.min(0).tolist(), "max": r6.max(0).tolist(), "mean": r6.mean(0).tolist(), "std": r6.std(0).tolist(), "count": [len(q)]} for k in vkeys: relv = info["video_path"].format(episode_chunk=chunk, video_key=k, episode_index=i) (dst / relv).parent.mkdir(parents=True, exist_ok=True) os.symlink(src / relv, dst / relv) assert frames == sum(int(e["length"]) for e in episodes) f[ROT] = {"dtype": "float32", "shape": [6], "names": ["r00", "r10", "r20", "r01", "r11", "r21"]} info.update(total_episodes=n, total_frames=frames, total_videos=n * len(vkeys), splits={"train": f"0:{n}"}) (dst / "meta/info.json").write_text(json.dumps(info, indent=2)) wl(dst / "meta/episodes.jsonl", episodes) wl(dst / "meta/episodes_stats.jsonl", stats) (dst / "meta/tasks.jsonl").write_text((src / "meta/tasks.jsonl").read_text()) state = {g: {"original_key": "observation.state", "start": idx[a], "end": idx[a] + (b - a)} for g, (a, b) in GROUPS.items()} state.update(left_hand={"original_key": "observation.inspire_left_hand_state", "start": 0, "end": 6}, right_hand={"original_key": "observation.inspire_right_hand_state", "start": 0, "end": 6}, projected_gravity={"original_key": "observation.projected_gravity", "start": 0, "end": 3}) modality = {"state": state, "action": {"body29": {"original_key": "observation.state", "start": idx[0], "end": idx[0] + 29}, "left_hand_target": {"original_key": "observation.inspire_left_hand_state", "start": 0, "end": 6}, "right_hand_target": {"original_key": "observation.inspire_right_hand_state", "start": 0, "end": 6}, "root_rot6d": {"original_key": ROT, "start": 0, "end": 6}}, "video": {"ego_view": {"original_key": "observation.images.ego_view"}, "chest": {"original_key": "observation.images.chest"}}, "annotation": {"human.task_description": {"original_key": "task_index"}}} (dst / "meta/modality.json").write_text(json.dumps(modality, indent=2)) src_g = G / "HumanWAM/third_party/Isaac-GR00T" env = dict(os.environ, PYTHONPATH=f"{src_g}:{H}") r = subprocess.run([sys.executable, str(src_g / "gr00t/data/stats.py"), "--dataset-path", str(dst), "--embodiment-tag", "NEW_EMBODIMENT", "--modality-config-path", str(H / "g1_joint47_h40.py")], env=env, cwd=src_g, capture_output=True, text=True) if r.returncode: raise SystemExit("stats failed:\n" + r.stdout[-2000:] + r.stderr[-2000:]) st = json.loads((dst / "meta/stats.json").read_text()) fixed = {"mean": [0.0] * 6, "std": [1.0] * 6, "min": [-1.0] * 6, "max": [1.0] * 6, "q01": [-1.0] * 6, "q99": [1.0] * 6} st[ROT] = {k: fixed[k] for k in st.get(ROT, fixed)} if ROT in st else fixed (dst / "meta/stats.json").write_text(json.dumps(st, indent=2)) receipt = dict(task="b6v5j47", source=str(src), episodes=n, frames=frames, video_keys=vkeys, body_index=idx, action47="body29 | inspire_left6 | inspire_right6 | root_rot6d (current-heading relative, hb_j47.py)", action_delta_indices=list(range(0, 80, 2)), rot6d_bounds=[-1, 1], humanwam_rotation="HumanWAM-joint src/imagewam/joint_reference_rotation.py", modality_sha256=hashlib.sha256((dst / "meta/modality.json").read_bytes()).hexdigest(), stats_sha256=hashlib.sha256((dst / "meta/stats.json").read_bytes()).hexdigest()) (dst / "hb-dataset-receipt.json").write_text(json.dumps(receipt, indent=2) + "\n") print("DATASET_OK", json.dumps(receipt)[:600], flush=True)
main(sys.argv[1], sys.argv[2])123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566"""2026-11-18 user: upload the GR00T joint47 B6 v5 run (groot-runs-j47/b6v5j47) to the public humanoid-benchmark/grootunder b6-pedal-bin/joint47-v5-150/step-NNNNNN (the last two checkpoints, weights + processor + a protocol.json; nooptimizer / resume state), with the data receipt, modality, the training code and the logs; sha256-verified."""import hashlibimport jsonimport timefrom pathlib import Path
from huggingface_hub import CommitOperationAdd, HfApi
G = Path('/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109')R = G / 'groot-runs-j47/b6v5j47'D = G / 'groot-data/b6v5j47'H = G / 'hb_groot'REPO, BASE = 'humanoid-benchmark/groot', 'b6-pedal-bin/joint47-v5-150'FILES = ('config.json', 'model.safetensors.index.json', 'model-00001-of-00002.safetensors', 'model-00002-of-00002.safetensors', 'processor_config.json', 'statistics.json', 'embodiment_id.json', 'trainer_state.json')api = HfApi(token=Path('/root/.hb-secrets/hf_token').read_text().strip())
def sha(p): h = hashlib.sha256() with open(p, 'rb') as f: for b in iter(lambda: f.read(16 << 20), b''): h.update(b) return h.hexdigest()
done = json.loads((R / 'production-complete.json').read_text())receipt = json.loads((D / 'hb-dataset-receipt.json').read_text())ops, check = [], {}for step in (3500, 4000): ck = R / f'production/checkpoint-{step}' dst = f'{BASE}/step-{step:06d}' files = {n: dict(size=(ck / n).stat().st_size, sha256=sha(ck / n)) for n in FILES} proto = dict(model='GR00T N1.7 (Gr00tN1d7), full fine-tune (tune_llm, tune_visual)', task='B6 pedal-bin (G1)', task_dir=dst, robot='Unitree G1', global_step=step, epoch_completed=None, training_data='b6-pedal-bin v5/ (HF humanoid-benchmark/b6-pedal-bin @ad2f5bf0), all 150 episodes', episodes=receipt['episodes'], frames=receipt['frames'], action_contract='HumanWAM joint47 v2: body29 (measured joints) | Inspire left6 | right6 | root rotation6D ' 'relative to the current heading; 40 rows at offsets 0,2,...,78 (stride 2); execute 16', action_groups=dict(body29=29, left_hand_target=6, right_hand_target=6, root_rot6d=6), action_chunk=40, embodiment_tag='new_embodiment', state_groups=dict(left_leg=6, right_leg=6, waist=3, left_arm=7, right_arm=7, left_hand=6, right_hand=6, projected_gravity=3), cameras=['observation.images.ego_view', 'observation.images.chest'], training=done, augmentation='Humanoid Benchmark augmentation spec v2 + proprio perturbation (hb_aug_v2)', files=files, uploaded_utc=time.strftime('%FT%TZ', time.gmtime())) pj = R / f'protocol-{step}.json' pj.write_text(json.dumps(proto, indent=1)) check[dst] = files ops += [CommitOperationAdd(f'{dst}/{n}', str(ck / n)) for n in FILES] ops.append(CommitOperationAdd(f'{dst}/protocol.json', str(pj)))extra = {'dataset_meta/hb-dataset-receipt.json': D / 'hb-dataset-receipt.json', 'dataset_meta/modality.json': D / 'meta/modality.json', 'dataset_meta/info.json': D / 'meta/info.json', 'production-complete.json': R / 'production-complete.json', 'code/hb_j47.py': H / 'hb_j47.py', 'code/g1_joint47_h40.py': H / 'g1_joint47_h40.py', 'code/prepare_groot_j47.py': H / 'prepare_groot_j47.py', 'code/groot_quad16_j47.sh': H / 'groot_quad16_j47.sh', 'code/verify_j47_cpu.py': H / 'verify_j47_cpu.py', 'code/hb_launch.py': H / 'hb_launch.py', 'code/hb_aug_v2.py': H / 'hb_aug_v2.py', 'logs/production.log': R / 'logs/production.log'}ops += [CommitOperationAdd(f'{BASE}/{k}', str(v)) for k, v in extra.items() if Path(v).is_file()]c = api.create_commit(REPO, operations=ops, commit_message=f'{BASE}: GR00T joint47 on B6 v5 (150 episodes), steps 3500 and 4000')tree = {f.path: f for f in api.list_repo_tree(REPO, path_in_repo=BASE, recursive=True, expand=True) if hasattr(f, 'size')}bad = [f'{d}/{n}' for d, files in check.items() for n, v in files.items() if f'{d}/{n}' not in tree or tree[f'{d}/{n}'].size != v['size'] or (tree[f'{d}/{n}'].lfs is not None and tree[f'{d}/{n}'].lfs.sha256 != v['sha256'])]print('UPLOADED' if not bad else 'VERIFY_FAILED', c.oid, bad, flush=True)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657"""CPU check of the GR00T data path for one task view: loader shapes, v2 augmentation, processor patch import."""import jsonimport osimport sysfrom pathlib import Path
import numpy as npimport torch
H = Path(__file__).resolve().parentsys.path.insert(0, str(H))os.environ["HB_PATCH_ONLY"] = "1"import hb_launch # noqa: E402,F401 (applies the processor patch)import hb_aug_v2 as A # noqa: E402from gr00t.data.dataset.lerobot_episode_loader import LeRobotEpisodeLoader # noqa: E402from gr00t.model.gr00t_n1d7.processing_gr00t_n1d7 import Gr00tN1d7Processor # noqa: E402
view = Path(sys.argv[1])if view.name in ("a14v2", "a14cr3", "a14cr5"): # 2026-11-14 H2 guide: head + chest, action82 = body_target + hands + planner import h2_body31_hand44_planner7_h16 as C # noqa: E402 cfg = C.h2_body31_hand44_planner7_h16elif view.name in ("a18c2", "a17c2", "a18cr2", "a17cr2", "a18cr4", "a17cr4"): # 2026-11-14: H2 2-camera re-train (head + chest) import h2_body31_hand44_h16 as C # noqa: E402 cfg = next(v for k, v in vars(C).items() if isinstance(v, dict) and "video" in v)elif view.name in ("a14", "a18", "a17"): # every H2 task: 3 cameras head + chest + wrist (user 2026-11-12) import h2w3_body31_hand44_h16 as C # noqa: E402 cfg = C.h2w3_body31_hand44_h16else: import g1_feedback76_h16 as C # noqa: E402 cfg = C.feedback76_h16loader = LeRobotEpisodeLoader(view, cfg)df = loader[0]cols = list(df.columns)row = df.iloc[20]out = {"episodes": len(loader), "columns": cols[:40], "rows_ep0": len(df)}state_dims = {c: int(np.asarray(row[c]).size) for c in cols if c.startswith("state.")}action_dims = {c: int(np.asarray(row[c]).size) for c in cols if c.startswith("action.")}out.update(state_dims=state_dims, action_dims=action_dims, state_total=sum(state_dims.values()), action_total=sum(action_dims.values()))vids = [c for c in cols if c.startswith("video.")]imgs = [np.asarray(row[c]) for c in vids]out["video"] = {c: list(i.shape) for c, i in zip(vids, imgs)}x = torch.stack([torch.from_numpy(i).permute(2, 0, 1).float().div(255) for i in imgs])[None]rng = np.random.default_rng(0)boosts = {}for _ in range(60): y, p = A.augment(x, rng) boosts[p["boost"]] = boosts.get(p["boost"], 0) + 1 assert y.shape == x.shape and torch.isfinite(y).all() and float(y.min()) >= 0 and float(y.max()) <= 1out["aug_boost_counts_60"] = boostsout["mean_abs_change_last"] = round(float((y - x).abs().mean()), 4)q = np.zeros((1, 29))dq = A.perturb_joints(q, rng)out["proprio_max_abs_deg"] = round(float(np.degrees(np.abs(dq).max())), 3)out["patched"] = Gr00tN1d7Processor._get_vlm_inputs.__name__ == "_get_vlm_inputs" and \ Gr00tN1d7Processor.__call__.__module__ == "hb_launch"print("CPU_VERIFY", json.dumps(out), flush=True)1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859"""CPU check of the GR00T joint47 data path (2026-11-18): loader dims (state44, action47), the stride-2 chunk, thecurrent-heading root rotation (hb_j47 vs HumanWAM computed directly from the recorded quaternions), the processorpatches and the v2 augmentation. Usage: <groot python> verify_j47_cpu.py <groot-data/b6v5j47>"""import jsonimport osimport sysfrom pathlib import Path
import numpy as np
H = Path(__file__).resolve().parentsys.path.insert(0, str(H))os.environ["HB_PATCH_ONLY"] = "1"os.environ.setdefault("HB_J47_ROOT_KEY", "root_rot6d")import hb_launch # noqa: E402,F401 (applies the processor patches, incl. hb_j47)import hb_j47 # noqa: E402import hb_aug_v2 as A # noqa: E402import g1_joint47_h40 as C # noqa: E402from gr00t.data.dataset.lerobot_episode_loader import LeRobotEpisodeLoader # noqa: E402from gr00t.model.gr00t_n1d7.processing_gr00t_n1d7 import Gr00tN1d7Processor # noqa: E402import pyarrow.parquet as pq # noqa: E402
view = Path(sys.argv[1])cfg = C.g1_joint47_h40loader = LeRobotEpisodeLoader(view, cfg)out = {"episodes": len(loader)}ep = 3df = loader[ep]cols = list(df.columns)row = df.iloc[20]state = {c: int(np.asarray(row[c]).size) for c in cols if c.startswith("state.")}action = {c: int(np.asarray(row[c]).size) for c in cols if c.startswith("action.")}out.update(state_dims=state, action_dims=action, state_total=sum(state.values()), action_total=sum(action.values()))assert out["state_total"] == 44 and out["action_total"] == 47, outinfo = json.loads((view / "meta/info.json").read_text())assert not any("vel" in k for k in info["features"] if k.startswith("observation.state")), "velocity feature"t = 100offsets = cfg["action"].delta_indicesassert offsets == list(range(0, 80, 2))world6 = np.stack([np.asarray(df["action.root_rot6d"].iloc[t + k]) for k in offsets])rel = hb_j47.to_current_heading(world6)tab = pq.read_table(view / "data/chunk-000/episode_000003.parquet").to_pandas()q = np.stack(tab["observation.root_orientation"].to_numpy()).astype(np.float64)direct = hb_j47.jrr.world_quaternion_to_heading_relative_rotation6d(q[[t + k for k in offsets]], q[t])out["rot_max_abs_diff_vs_humanwam"] = float(np.abs(rel - direct).max())out["rot_row0_heading_deg"] = float(np.degrees(np.arctan2(rel[0, 1], rel[0, 0])))out["rot_range"] = [float(rel.min()), float(rel.max())]assert out["rot_max_abs_diff_vs_humanwam"] < 1e-5 and abs(out["rot_row0_heading_deg"]) < 1e-3body = np.stack([np.asarray(df["action.body29"].iloc[t + k]) for k in offsets])names = info["features"]["observation.state"]["names"]assert np.allclose(body[0], np.stack(tab["observation.state"].to_numpy())[t][names.index("left_hip_pitch_joint"):][:29])stats = json.loads((view / "meta/stats.json").read_text())out["rot_stats"] = {k: stats["action.root_rot6d_world"][k][:2] for k in ("min", "max")}rng = np.random.default_rng(0)dq = A.perturb_joints(np.zeros((1, 29)), rng)out["proprio_max_abs_deg"] = round(float(np.degrees(np.abs(dq).max())), 3)out["patched"] = Gr00tN1d7Processor.__call__.__module__ == "hb_j47" and Gr00tN1d7Processor._get_vlm_inputs.__name__ == "_get_vlm_inputs"assert out["patched"], "processor patches missing"print("J47_CPU_VERIFY_OK", json.dumps(out), flush=True)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990{ "action_horizon": 40, "add_pos_embed": true, "apply_sincos_state_encoding": false, "architectures": [ "Gr00tN1d7" ], "attn_dropout": 0.2, "attn_implementation": null, "backbone_embedding_dim": 2048, "backbone_trainable_params_fp32": true, "color_jitter_params": { "brightness": 0.3, "contrast": 0.4, "hue": 0.08, "saturation": 0.5 }, "crop_fraction": 0.95, "diffusion_model_cfg": { "attention_head_dim": 48, "dropout": 0.2, "final_dropout": true, "interleave_self_attention": true, "norm_type": "ada_norm", "num_attention_heads": 32, "num_layers": 32, "output_dim": 1024, "positional_embeddings": null }, "dtype": "bfloat16", "exclude_state": false, "formalize_language": true, "hidden_size": 1024, "image_crop_size": [ 230, 230 ], "image_target_size": [ 256, 256 ], "letter_box_transform": false, "load_bf16": false, "max_action_dim": 132, "max_num_embodiments": 32, "max_seq_len": 1024, "max_state_dim": 132, "model_dtype": "bfloat16", "model_name": "nvidia/Cosmos-Reason2-2B", "model_type": "Gr00tN1d7", "noise_beta_alpha": 1.5, "noise_beta_beta": 1.0, "noise_s": 0.999, "num_inference_timesteps": 4, "num_timestep_buckets": 1000, "random_history_crop": true, "random_rotation_angle": 0, "reproject_vision": false, "rtc_ramp_rate": 6.0, "select_layer": 16, "shortest_image_edge": 256, "state_dropout_prob": 0.2, "state_gaussian_noise_std": 0.0, "strict_action_padding_mask": false, "strict_vl_padding_mask": false, "transformers_version": "4.57.3", "tune_diffusion_model": true, "tune_linear": true, "tune_llm": true, "tune_projector": true, "tune_top_llm_layers": 0, "tune_visual": true, "tune_vlln": true, "use_albumentations": true, "use_alternate_vl_dit": true, "use_flash_attention": true, "use_future_tokens": false, "use_mean_std": false, "use_percentiles": true, "use_vl_self_attention": true, "use_vlln": true, "vl_self_attention_cfg": { "attention_head_dim": 64, "dropout": 0.2, "final_dropout": true, "num_attention_heads": 32, "num_layers": 4, "positional_embeddings": null }}123456789101112131415161718192021222324252627282930313233343536373839404142434445{ "task": "a7v4p", "source": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a7-cabinet-close-v4p-d3ec805/data", "episodes": 100, "frames": 24241, "video_keys": [ "observation.images.ego_view", "observation.images.chest" ], "state_dim_raw": 41, "body_index": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28 ], "stats_tag": "NEW_EMBODIMENT", "modality_sha256": "aea724f383cf0aa4d74349163ac73ec7b1f6f30cf5a66efce0a12c50dfabf823", "stats_sha256": "41507f89f6b6e990f2e974c9c5595965afe4bc88b91bed20b03d7a0f9ee2b961"}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374{ "state": { "left_leg": { "original_key": "observation.state", "start": 0, "end": 6 }, "right_leg": { "original_key": "observation.state", "start": 6, "end": 12 }, "waist": { "original_key": "observation.state", "start": 12, "end": 15 }, "left_arm": { "original_key": "observation.state", "start": 15, "end": 22 }, "right_arm": { "original_key": "observation.state", "start": 22, "end": 29 }, "left_hand": { "original_key": "observation.inspire_left_hand_state", "start": 0, "end": 6 }, "right_hand": { "original_key": "observation.inspire_right_hand_state", "start": 0, "end": 6 }, "projected_gravity": { "original_key": "observation.projected_gravity", "start": 0, "end": 3 } }, "action": { "motion_token": { "original_key": "action.motion_token", "start": 0, "end": 64 }, "left_hand_joints": { "original_key": "observation.inspire_left_hand_state", "start": 0, "end": 6 }, "right_hand_joints": { "original_key": "observation.inspire_right_hand_state", "start": 0, "end": 6 } }, "video": { "ego_view": { "original_key": "observation.images.ego_view" }, "chest": { "original_key": "observation.images.chest" } }, "annotation": { "human.task_description": { "original_key": "task_index" } }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657{ "robocasa_panda_omron": 13, "oxe_droid": 17, "oxe_fractal": 18, "oxe_language_table": 19, "oxe_bridge": 20, "unknown": 22, "gr1_unified": 20, "agibot": 26, "sim_behavior_r1_pro": 23, "xdof": 24, "xdof_oss_data": 25, "unitree_g1_full_body_with_waist_height_nav_cmd": 25, "real_r1_pro_sharpa": 27, "real_r1_pro_sharpa_add_view": 27, "real_r1_pro_sharpa_relative_arm_joint": 26, "real_r1_pro_sharpa_delta_eef": 26, "real_r1_pro_sharpa_absolute_eef": 26, "real_r1_pro_sharpa_meanstd": 26, "real_r1_pro_sharpa_relative_eef": 26, "real_r1_pro_sharpa_relative_eef_add_view": 26, "real_r1_pro_sharpa_relative_eef_relative_hand": 26, "real_r1_pro_sharpa_relative_eef_human": 26, "real_r1_pro_sharpa_relative_eef_human_add_view": 26, "real_r1_pro_sharpa_relative_eef_human_relative_hand": 26, "real_r1_pro_sharpa_relative_eef_egodex": 26, "real_r1_pro_sharpa_relative_eef_egodex_relative_hand": 26, "real_r1_pro_sharpa_relative_eef_egodex_wrist_only": 26, "real_r1_pro_sharpa_relative_eef_maxinsights": 26, "real_r1_pro_sharpa_relative_eef_maxinsights_relative_hand": 26, "real_r1_pro_sharpa_relative_eef_mecka": 26, "real_r1_pro_sharpa_relative_eef_mecka_relative_hand": 26, "real_g1_relative_eef_absolute_joints": 25, "real_g1_relative_eef_absolute_joints_wrist_cam": 25, "real_g1_relative_eef_relative_joints": 25, "real_r1_pro_sharpa_relative_eef_relative_hand_relative_joint": 26, "real_r1_pro_sharpa_relative_joint": 29, "oxe_droid_relative_eef_relative_joint": 24, "oxe_droid_relative_eef_relative_joint_swapped": 24, "oxe_droid_relative_eef_relative_joint_upweight_z": 24, "oxe_droid_relative_eef_relative_joint_upweight_z_swapped": 24, "oxe_droid_relative_eef_relative_joint_3view": 24, "oxe_droid_relative_eef_relative_joint_3view_swapped": 24, "oxe_droid_relative_eef": 24, "oxe_droid_joint_position_relative": 24, "xdof_relative_eef_relative_joint": 27, "xdof_relative_eef_relative_joint_subtask": 27, "xdof_relative_eef": 27, "xdof_relative_joint": 28, "simpler_env_google": 0, "simpler_env_widowx": 1, "libero_sim": 2, "droid_sim": 3, "robocasa_gr1_tabletop": 10, "new_embodiment": 10, "unitree_g1_sonic": 11}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234load_config_path: nullmodel: model_type: Gr00tN1d7 model_dtype: bfloat16 model_name: nvidia/Cosmos-Reason2-2B backbone_model_type: qwen model_revision: null tune_top_llm_layers: 0 backbone_embedding_dim: 2048 tune_llm: true tune_visual: true select_layer: 12 reproject_vision: false use_flash_attention: true load_bf16: false backbone_trainable_params_fp32: true image_crop_size: - 230 - 230 image_target_size: - 256 - 256 shortest_image_edge: null crop_fraction: null random_rotation_angle: null color_jitter_params: null use_albumentations_transforms: true letter_box_transform: false extra_augmentation_config: null formalize_language: true apply_sincos_state_encoding: false use_percentiles: true use_relative_action: true max_state_dim: 132 max_action_dim: 132 action_horizon: 40 strict_action_padding_mask: null hidden_size: 1024 input_embedding_dim: 1536 state_history_length: 1 add_pos_embed: true attn_dropout: 0.2 use_vlln: true strict_vl_padding_mask: null max_seq_len: 1024 use_alternate_vl_dit: true attend_text_every_n_blocks: 2 diffusion_model_cfg: positional_embeddings: null num_layers: 16 num_attention_heads: 32 attention_head_dim: 48 norm_type: ada_norm dropout: 0.2 final_dropout: true output_dim: 1024 interleave_self_attention: true num_inference_timesteps: 4 noise_beta_alpha: 1.5 noise_beta_beta: 1.0 noise_s: 0.999 num_timestep_buckets: 1000 tune_projector: true tune_diffusion_model: true tune_vlln: true state_dropout_prob: 0.2 exclude_state: false use_mean_std: false max_num_embodiments: 32data: datasets: - dataset_paths: - /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/groot-data/a7v4p embodiment_tag: new_embodiment mix_ratio: 1.0 dataset_type: physical_embodiment val_dataset_path: null modality_configs: new_embodiment: video: delta_indices: - 0 modality_keys: - ego_view - chest sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: null state: delta_indices: - 0 modality_keys: - left_leg - right_leg - waist - left_arm - right_arm - left_hand - right_hand - projected_gravity sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: null action: delta_indices: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 modality_keys: - motion_token - left_hand_joints - right_hand_joints sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: - rep: ABSOLUTE type: NON_EEF format: DEFAULT state_key: null - rep: ABSOLUTE type: NON_EEF format: DEFAULT state_key: null - rep: ABSOLUTE type: NON_EEF format: DEFAULT state_key: null language: delta_indices: - 0 modality_keys: - annotation.human.task_description sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: null download_cache: false shard_size: 1024 episode_sampling_rate: 0.1 num_shards_per_epoch: 100000 ds_weights_alpha: null override_pretraining_statistics: true mode: single_turn random_chop: 0.0 mock_dataset_mode: false shuffle: true seed: 42 multiprocessing_context: fork allow_padding: false subsample_ratio: 1.0 loader: fast fast_loader: decode_threads: 2 ffmpeg_threads: 1 shuffle_buffer: 0 min_fill: 0 image_crop_size: - 244 - 244 image_target_size: - 224 - 224training: output_dir: /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/groot-runs-2x32/a7v4p/production experiment_name: null max_steps: 4000 global_batch_size: 512 per_gpu_batch_size: null gradient_accumulation_steps: 1 learning_rate: 0.0001 lr_scheduler_type: cosine weight_decay: 1.0e-05 warmup_ratio: 0.05 warmup_steps: 0 max_grad_norm: 1.0 optim: adamw_torch start_from_checkpoint: /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/models/groot-n17-base skip_weight_loading: false tf32: true fp16: false bf16: true eval_bf16: true logging_steps: 10 save_steps: 3200 save_total_limit: 2 save_vl_model: false save_only_model: false resume_from_checkpoint: false upload_checkpoints: false upload_every: 1000 upload_last_n_checkpoints: 5 max_concurrent_uploads: 2 eval_strategy: 'no' eval_steps: 500 eval_set_split_ratio: 0.1 eval_batch_size: 2 save_best_eval_metric_name: '' save_best_eval_metric_greater_is_better: true deepspeed_stage: 2 gradient_checkpointing: false transformers_trust_remote_code: true transformers_local_files_only: false transformers_cache_dir: null transformers_access_token: null use_ddp: false ddp_bucket_cap_mb: 100 num_gpus: 16 dataloader_num_workers: 8 remove_unused_columns: false use_wandb: false wandb_project: finetune-gr00t-n1d7 enable_profiling: false max_retries: 3 assert_loss_less_than: null add_rl_callback: false enable_open_loop_eval: false open_loop_eval_traj_ids: - 0 open_loop_eval_steps_per_traj: 100 open_loop_eval_plot_indices: nullmax_steps: 4000save_steps: 3200123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232load_config_path: nullmodel: model_type: Gr00tN1d7 model_dtype: bfloat16 model_name: nvidia/Cosmos-Reason2-2B backbone_model_type: qwen model_revision: null tune_top_llm_layers: 0 backbone_embedding_dim: 2048 tune_llm: true tune_visual: true select_layer: 12 reproject_vision: false use_flash_attention: true load_bf16: false backbone_trainable_params_fp32: true image_crop_size: - 230 - 230 image_target_size: - 256 - 256 shortest_image_edge: null crop_fraction: null random_rotation_angle: null color_jitter_params: null use_albumentations_transforms: true letter_box_transform: false extra_augmentation_config: null formalize_language: true apply_sincos_state_encoding: false use_percentiles: true use_relative_action: true max_state_dim: 132 max_action_dim: 132 action_horizon: 40 strict_action_padding_mask: null hidden_size: 1024 input_embedding_dim: 1536 state_history_length: 1 add_pos_embed: true attn_dropout: 0.2 use_vlln: true strict_vl_padding_mask: null max_seq_len: 1024 use_alternate_vl_dit: true attend_text_every_n_blocks: 2 diffusion_model_cfg: positional_embeddings: null num_layers: 16 num_attention_heads: 32 attention_head_dim: 48 norm_type: ada_norm dropout: 0.2 final_dropout: true output_dim: 1024 interleave_self_attention: true num_inference_timesteps: 4 noise_beta_alpha: 1.5 noise_beta_beta: 1.0 noise_s: 0.999 num_timestep_buckets: 1000 tune_projector: true tune_diffusion_model: true tune_vlln: true state_dropout_prob: 0.2 exclude_state: false use_mean_std: false max_num_embodiments: 32data: datasets: - dataset_paths: - /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/groot-data/a7v4p embodiment_tag: new_embodiment mix_ratio: 1.0 dataset_type: physical_embodiment val_dataset_path: null modality_configs: new_embodiment: video: delta_indices: - 0 modality_keys: - ego_view - chest sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: null state: delta_indices: - 0 modality_keys: - left_leg - right_leg - waist - left_arm - right_arm - left_hand - right_hand - projected_gravity sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: null action: delta_indices: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 modality_keys: - motion_token - left_hand_joints - right_hand_joints sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: - rep: absolute type: non_eef format: default state_key: null - rep: absolute type: non_eef format: default state_key: null - rep: absolute type: non_eef format: default state_key: null language: delta_indices: - 0 modality_keys: - annotation.human.task_description sin_cos_embedding_keys: null mean_std_embedding_keys: null action_configs: null download_cache: false shard_size: 1024 episode_sampling_rate: 0.1 num_shards_per_epoch: 100000 ds_weights_alpha: null override_pretraining_statistics: true mode: single_turn random_chop: 0.0 mock_dataset_mode: false shuffle: true seed: 42 multiprocessing_context: fork allow_padding: false subsample_ratio: 1.0 loader: fast fast_loader: decode_threads: 2 ffmpeg_threads: 1 shuffle_buffer: 0 min_fill: 0 image_crop_size: - 244 - 244 image_target_size: - 224 - 224training: output_dir: /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/groot-runs-2x32/a7v4p/production experiment_name: null max_steps: 4000 global_batch_size: 512 per_gpu_batch_size: null gradient_accumulation_steps: 1 learning_rate: 0.0001 lr_scheduler_type: cosine weight_decay: 1.0e-05 warmup_ratio: 0.05 warmup_steps: 0 max_grad_norm: 1.0 optim: adamw_torch start_from_checkpoint: /mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/models/groot-n17-base skip_weight_loading: false tf32: true fp16: false bf16: true eval_bf16: true logging_steps: 10 save_steps: 3200 save_total_limit: 2 save_vl_model: false save_only_model: false resume_from_checkpoint: false upload_checkpoints: false upload_every: 1000 upload_last_n_checkpoints: 5 max_concurrent_uploads: 2 eval_strategy: 'no' eval_steps: 500 eval_set_split_ratio: 0.1 eval_batch_size: 2 save_best_eval_metric_name: '' save_best_eval_metric_greater_is_better: true deepspeed_stage: 2 gradient_checkpointing: false transformers_trust_remote_code: true transformers_local_files_only: false transformers_cache_dir: null transformers_access_token: null use_ddp: false ddp_bucket_cap_mb: 100 num_gpus: 16 dataloader_num_workers: 8 remove_unused_columns: false use_wandb: false wandb_project: finetune-gr00t-n1d7 enable_profiling: false max_retries: 3 assert_loss_less_than: null add_rl_callback: false enable_open_loop_eval: false open_loop_eval_traj_ids: - 0 open_loop_eval_steps_per_traj: 100 open_loop_eval_plot_indices: null123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883{ "new_embodiment": { "state": { "left_leg": { "min": [ -0.3318883776664734, -0.18867924809455872, -0.3471716344356537, 0.12305106222629547, -0.4423419237136841, -0.1505083590745926 ], "max": [ 0.3131643235683441, 0.2792203724384308, 0.41320568323135376, 1.1717963218688965, 0.06070102006196976, 0.1980297863483429 ], "mean": [ 0.025353537872433662, 0.07391797006130219, 0.11360633373260498, 0.25872501730918884, -0.18262749910354614, -0.026260558515787125 ], "std": [ 0.10767440497875214, 0.0668383315205574, 0.09203985333442688, 0.1872337907552719, 0.07898265868425369, 0.05671079456806183 ], "q01": [ -0.27295748591423036, -0.12009284645318985, -0.20274818539619446, 0.13343366980552673, -0.400729238986969, -0.10922747403383255 ], "q99": [ 0.23808407783508292, 0.2076905757188793, 0.29838588833808893, 1.065434122085571, 0.001197137683629905, 0.13890523910522448 ] }, "right_leg": { "min": [ -0.4013932943344116, -0.3697676360607147, -0.4442036747932434, 0.11405918747186661, -0.3064219653606415, -0.1582489162683487 ], "max": [ 0.210605651140213, 0.14194956421852112, 0.20860861241817474, 1.0160499811172485, 0.0985625758767128, 0.2269126921892166 ], "mean": [ -0.07235954701900482, -0.042249999940395355, -0.17035961151123047, 0.2523265779018402, -0.10894425958395004, -0.017675617709755898 ], "std": [ 0.10488980263471603, 0.08057494461536407, 0.0756467804312706, 0.1456732153892517, 0.06457678228616714, 0.0535920113325119 ], "q01": [ -0.3487854480743408, -0.30502442717552186, -0.3549183666706085, 0.14245356023311614, -0.26660172939300536, -0.10557621419429779 ], "q99": [ 0.12949770689010592, 0.07676884233951566, -0.011380883865058878, 0.8320273995399469, 0.04446029812097542, 0.17755928337573987 ] }, "waist": { "min": [ -0.14158011972904205, -0.09456266462802887, -0.07829515635967255 ], "max": [ 0.18820630013942719, 0.058198828250169754, 0.11557569354772568 ], "mean": [ -0.017328202724456787, -0.013022864237427711, 0.015441122464835644 ], "std": [ 0.045467790216207504, 0.017507221549749374, 0.0228327214717865 ], "q01": [ -0.11379682272672653, -0.05902852192521095, -0.03617992922663689 ], "q99": [ 0.12103297263383858, 0.024172018840908985, 0.07798523306846614 ] }, "left_arm": { "min": [ -0.29342028498649597, -0.17412547767162323, -0.337660014629364, -0.5029557347297668, -0.14447779953479767, -0.4488157033920288, -0.3777517080307007 ], "max": [ 0.5089795589447021, 0.22034788131713867, 0.426727831363678, 0.5924623012542725, 0.3211643397808075, 0.20641294121742249, 0.06786169856786728 ], "mean": [ 0.2261515110731125, 0.11961736530065536, 0.051841676235198975, -0.22995714843273163, 0.004706581123173237, 0.03294483572244644, -0.048932261765003204 ], "std": [ 0.0576050691306591, 0.05898808687925339, 0.05860148370265961, 0.06211398169398308, 0.0383717380464077, 0.035807691514492035, 0.043882135301828384 ], "q01": [ 0.05732562392950058, -0.13947642147541045, -0.053408751636743544, -0.4037809669971466, -0.04943663701415062, -0.057011527568101884, -0.23453081548213958 ], "q99": [ 0.37039834260940546, 0.20300655364990228, 0.30194712877273544, -0.026125138625502878, 0.1692625522613524, 0.15228801667690273, 0.024593834951519948 ] }, "right_arm": { "min": [ -1.1479331254959106, -0.6308519244194031, -0.46671637892723083, -0.692054271697998, -0.22141939401626587, -0.5100125074386597, -0.5820447206497192 ], "max": [ 1.0974578857421875, 0.1836947351694107, 0.351199746131897, 1.8045769929885864, 0.48667168617248535, 1.0126416683197021, 0.20773224532604218 ], "mean": [ 0.17498347163200378, -0.09269630908966064, -0.036198873072862625, 0.07455439120531082, 0.07243956625461578, 0.055031318217515945, -0.048036132007837296 ], "std": [ 0.40651801228523254, 0.111655592918396, 0.10887321829795837, 0.511978030204773, 0.09233450889587402, 0.09783940017223358, 0.10285625606775284 ], "q01": [ -0.9039213299751282, -0.4217124044895172, -0.36394616961479187, -0.6481893181800842, -0.10214968621730805, -0.1258791506290436, -0.28383107781410216 ], "q99": [ 0.9877871751785278, 0.162188571691513, 0.19337741732597322, 1.5323092937469478, 0.30615819692611673, 0.36020473241805834, 0.13759558498859406 ] }, "left_hand": { "min": [ 0.982670783996582, 0.9997360110282898, 0.9996581077575684, 0.9996314644813538, 0.9841338992118835, 0.0 ], "max": [ 1.0, 1.0, 0.9999949932098389, 0.9999926090240479, 1.0, 0.006604325026273727 ], "mean": [ 0.9999908208847046, 0.9999864101409912, 0.9999809861183167, 0.9999830722808838, 0.9999943375587463, 8.713000170246232e-07 ], "std": [ 0.00020427467822091005, 9.02671961286028e-05, 0.00010474755230186294, 9.829784525901405e-05, 0.00020065571881547667, 7.359815208474174e-05 ], "q01": [ 0.9998604536056519, 0.9998100757598877, 0.9997796058654785, 0.9997966647148132, 0.9998050451278686, 0.0 ], "q99": [ 0.9999857664108276, 0.9999774813652038, 0.9999687552452088, 0.9999687433242798, 1.0, 0.0 ] }, "right_hand": { "min": [ 0.0, 0.024566490203142166, 0.38868504762649536, 0.4255327880382538, 0.23970049619674683, 0.0 ], "max": [ 0.999997615814209, 1.0, 1.0, 1.0, 1.0, 1.0 ], "mean": [ 0.8762709498405457, 0.8801263570785522, 0.8795225620269775, 0.879898190498352, 0.9881516695022583, 0.5294981002807617 ], "std": [ 0.12574191391468048, 0.11311323940753937, 0.11509290337562561, 0.11394851654767965, 0.04988079145550714, 0.47926953434944153 ], "q01": [ 0.6074255824089051, 0.6800014972686768, 0.6794875979423523, 0.6799349784851074, 0.7575788497924805, 0.0 ], "q99": [ 0.9999783396720886, 0.9999686241149902, 0.9999589681625366, 0.9999612331390381, 1.0, 1.0 ] }, "projected_gravity": { "min": [ -0.17753742635250092, -0.06764741986989975, -0.9999997019767761 ], "max": [ 0.07596693187952042, 0.06492460519075394, -0.9835565090179443 ], "mean": [ -0.05233399197459221, 0.00938214547932148, -0.9980663061141968 ], "std": [ 0.02921624481678009, 0.015795525163412094, 0.0020274517591974102 ], "q01": [ -0.13482938706874847, -0.04431423470377922, -0.9999598383903503 ], "q99": [ 0.006752153299748827, 0.04273579940199847, -0.9903084516525269 ] } }, "action": { "motion_token": { "min": [ -0.1875, -0.4677450358867645, -0.59443199634552, -0.3125, -0.4499850273132324, -0.2808462381362915, -0.3279152810573578, -0.22046983242034912, -0.3736708462238312, -0.6207590103149414, -0.6254265308380127, -0.49026891589164734, -0.45626699924468994, -0.0625, -0.0625, -0.3069382309913635, -0.3396984338760376, -0.5586915016174316, -0.5951465964317322, -0.36002016067504883, -0.459393709897995, -0.6348609328269958, -0.3770151138305664, -0.125, -0.32587942481040955, -0.24062499403953552, -0.3904280662536621, -0.25, -0.16591010987758636, -0.26109442114830017, -0.34805411100387573, -0.4221264123916626, -0.25, -0.10879248380661011, -0.35565152764320374, -0.09822927415370941, -0.30367353558540344, -0.8057757019996643, 0.0, -0.2770389914512634, -0.4560856819152832, -0.34894782304763794, -0.2894587516784668, -0.6959632635116577, -0.24528804421424866, -0.3861391842365265, -0.41007697582244873, -1.0054044723510742, -0.34237661957740784, -0.7376538515090942, -0.25, -0.28777071833610535, -0.625, -0.37551775574684143, -0.1490398794412613, -0.4375, -0.43027377128601074, -0.29004374146461487, -0.14074864983558655, -0.2760152518749237, -0.4161926507949829, -0.3372493386268616, -0.1989026665687561, -0.5231741666793823 ], "max": [ 0.36710453033447266, 0.25, 0.38087087869644165, 0.323863685131073, 0.5915436744689941, 0.555425226688385, 0.505102276802063, 0.396976113319397, 0.33383190631866455, -0.0625, 0.125, 0.07536973059177399, 0.375, 0.7194473743438721, 0.6608389019966125, 0.3333401083946228, 0.2551370859146118, 0.3031249940395355, 0.2980329692363739, 0.33814147114753723, 0.2364196926355362, 0.4032847285270691, 0.49871164560317993, 0.7099018692970276, 0.1875, 0.51251620054245, 0.18135406076908112, 0.7407556772232056, 0.5961400270462036, 0.2099418044090271, 0.521298348903656, 0.20529641211032867, 0.5105381011962891, 0.4344106912612915, 0.36900466680526733, 0.47679901123046875, 0.4375, 0.4231131970882416, 0.6014497876167297, 0.44574490189552307, 0.19816084206104279, 0.3125, 0.4280446171760559, 0.24704863131046295, 0.4375, 0.375, 0.375, 0.25, 0.5704270005226135, 0.40073931217193604, 0.4343797564506531, 0.27812498807907104, 0.45166218280792236, 0.2977639436721802, 0.47198736667633057, 0.4463895857334137, 0.375, 0.3533511757850647, 0.7534816265106201, 0.2472686469554901, 0.2955014109611511, 0.1875, 0.5042632222175598, 0.2502821087837219 ], "mean": [ 0.07638531178236008, 0.03264981880784035, -0.13316291570663452, -0.05025482177734375, 0.04173359274864197, 0.1467728465795517, 0.059517115354537964, 0.08631863445043564, 0.03796111419796944, -0.23501789569854736, -0.10610327124595642, -0.17341668903827667, 0.00595658365637064, 0.16732735931873322, 0.23145191371440887, 0.02068081684410572, 0.10765204578638077, -0.008892569690942764, -0.0816902443766594, -0.0744020864367485, -0.10027708113193512, -0.08030252903699875, -0.012988582253456116, 0.12146589905023575, 0.04109388217329979, -0.031248411163687706, -0.13104170560836792, 0.11893600225448608, 0.13569718599319458, 0.02583172731101513, 0.10388648509979248, -0.1404457837343216, 0.039965394884347916, 0.14461736381053925, 0.061626236885786057, 0.10004056990146637, -0.006619780324399471, 0.02331172674894333, 0.1766108274459839, -0.08153432607650757, -0.06523196399211884, -0.041245292872190475, 0.0378899909555912, -0.16937021911144257, 0.14134220778942108, -0.0313895046710968, 0.05207139626145363, -0.15766744315624237, -0.05401328206062317, -0.09724694490432739, 0.062217697501182556, 0.10311444848775864, -0.10828439891338348, -0.11062365025281906, 0.03730815649032593, -0.0020534733776003122, -0.020901648327708244, 0.1567501723766327, 0.16626153886318207, -0.11296907812356949, -0.13737176358699799, 0.006531452294439077, 0.16276991367340088, -0.09412339329719543 ], "std": [ 0.07390561699867249, 0.1255936324596405, 0.11892803013324738, 0.08946090191602707, 0.13957978785037994, 0.09607460349798203, 0.12728804349899292, 0.10366103053092957, 0.06337931752204895, 0.04691695049405098, 0.09848660975694656, 0.0861186608672142, 0.10754351317882538, 0.09428656101226807, 0.09487379342317581, 0.06979217380285263, 0.05949728563427925, 0.1522337943315506, 0.12967832386493683, 0.08770209550857544, 0.0735984519124031, 0.12502416968345642, 0.10536100715398788, 0.08649413287639618, 0.06435313075780869, 0.1129184439778328, 0.06580150127410889, 0.13606920838356018, 0.09387669712305069, 0.08663004636764526, 0.11717648804187775, 0.08354078233242035, 0.1040291115641594, 0.07826748490333557, 0.04973331093788147, 0.07719515264034271, 0.11615598946809769, 0.1472889482975006, 0.0881248190999031, 0.06381504982709885, 0.06785844266414642, 0.11159815639257431, 0.08277105540037155, 0.06586699187755585, 0.09065573662519455, 0.08100666105747223, 0.0839008241891861, 0.19439087808132172, 0.11419467628002167, 0.15053783357143402, 0.09559903293848038, 0.08158966898918152, 0.13894043862819672, 0.07906368374824524, 0.05549664422869682, 0.10853631794452667, 0.10300876945257187, 0.06002059951424599, 0.12184454500675201, 0.07231547683477402, 0.06731913983821869, 0.08025253564119339, 0.06109413504600525, 0.10133737325668335 ], "q01": [ -0.0804404616355896, -0.2323697865009308, -0.43941155076026917, -0.25, -0.25, -0.0625, -0.25, -0.125, -0.08810055553913117, -0.38228676915168763, -0.40043954849243163, -0.35486988425254823, -0.25841131806373596, 0.0, 0.0, -0.125, -0.0625, -0.32549777030944826, -0.3708981156349182, -0.25, -0.2668213129043579, -0.3719940185546875, -0.2276866316795349, -0.0625, -0.09918829202651977, -0.1875, -0.30103373527526855, -0.1875, -0.0625, -0.15331764221191407, -0.13319729268550873, -0.3125, -0.125, 0.0, -0.0625, -0.046371126919984816, -0.1875, -0.32543513774871824, 0.0625, -0.1875, -0.1990238606929779, -0.2695709228515625, -0.1418774038553238, -0.36064607501029966, -0.0625, -0.2441564083099365, -0.18750645220279694, -0.6646399736404419, -0.25, -0.4643701195716858, -0.1875, -0.07604325711727142, -0.36224427819252014, -0.3125, -0.0625, -0.1875, -0.3125, 0.0, -0.0625, -0.25, -0.25, -0.1532229244709015, 0.028738699853420258, -0.3645707964897156 ], "q99": [ 0.25, 0.25, 0.15303336083888974, 0.17211228013038618, 0.2775875926017761, 0.3990589678287497, 0.2885741889476776, 0.3125, 0.1696799576282497, -0.1483777016401291, 0.0625, 0.0, 0.22240597009658813, 0.3934289813041687, 0.45318246483802704, 0.1875, 0.25, 0.25, 0.1875, 0.1181974813342094, 0.0625, 0.19912956953048616, 0.31001287102699276, 0.35122562646865824, 0.1875, 0.2515941977500913, 0.03138159662485101, 0.46615058183670044, 0.33315105438232395, 0.1875, 0.32117750048637367, 0.0625, 0.3411381244659417, 0.3125, 0.1791100740432738, 0.2953594982624053, 0.375, 0.3125, 0.4306508123874664, 0.09187825471162768, 0.07024821788072577, 0.1875, 0.1875, -0.029096393287185388, 0.375, 0.14128464460372925, 0.1965207457542415, 0.1875, 0.300176739692688, 0.25, 0.3125, 0.25, 0.2778011083602905, 0.0625, 0.1827239692211151, 0.2694895327091215, 0.16072219014167743, 0.25, 0.4436876654624935, 0.0625, 0.07950039952993314, 0.1875, 0.3223212003707878, 0.125 ] }, "left_hand_joints": { "min": [ 0.982670783996582, 0.9997360110282898, 0.9996581077575684, 0.9996314644813538, 0.9841338992118835, 0.0 ], "max": [ 1.0, 1.0, 0.9999949932098389, 0.9999926090240479, 1.0, 0.006604325026273727 ], "mean": [ 0.9999908208847046, 0.9999864101409912, 0.9999809861183167, 0.9999830722808838, 0.9999943375587463, 8.713000170246232e-07 ], "std": [ 0.00020427467822091005, 9.02671961286028e-05, 0.00010474755230186294, 9.829784525901405e-05, 0.00020065571881547667, 7.359815208474174e-05 ], "q01": [ 0.9998604536056519, 0.9998100757598877, 0.9997796058654785, 0.9997966647148132, 0.9998050451278686, 0.0 ], "q99": [ 0.9999857664108276, 0.9999774813652038, 0.9999687552452088, 0.9999687433242798, 1.0, 0.0 ] }, "right_hand_joints": { "min": [ 0.0, 0.024566490203142166, 0.38868504762649536, 0.4255327880382538, 0.23970049619674683, 0.0 ], "max": [ 0.999997615814209, 1.0, 1.0, 1.0, 1.0, 1.0 ], "mean": [ 0.8762709498405457, 0.8801263570785522, 0.8795225620269775, 0.879898190498352, 0.9881516695022583, 0.5294981002807617 ], "std": [ 0.12574191391468048, 0.11311323940753937, 0.11509290337562561, 0.11394851654767965, 0.04988079145550714, 0.47926953434944153 ], "q01": [ 0.6074255824089051, 0.6800014972686768, 0.6794875979423523, 0.6799349784851074, 0.7575788497924805, 0.0 ], "q99": [ 0.9999783396720886, 0.9999686241149902, 0.9999589681625366, 0.9999612331390381, 1.0, 1.0 ] } }, "relative_action": {} }}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758{ "model_type": "Gr00tN1d7", "model_dtype": "bfloat16", "model_name": "nvidia/Cosmos-Reason2-2B", "backbone_model_type": "qwen", "model_revision": null, "tune_top_llm_layers": 0, "backbone_embedding_dim": 2048, "tune_llm": true, "tune_visual": true, "select_layer": 16, "reproject_vision": false, "use_flash_attention": true, "load_bf16": false, "backbone_trainable_params_fp32": true, "letter_box_transform": false, "extra_augmentation_config": null, "apply_sincos_state_encoding": false, "use_percentiles": true, "use_relative_action": false, "max_state_dim": 132, "max_action_dim": 132, "action_horizon": 40, "strict_action_padding_mask": false, "hidden_size": 1024, "input_embedding_dim": 1536, "state_history_length": 1, "add_pos_embed": true, "attn_dropout": 0.2, "use_vlln": true, "strict_vl_padding_mask": false, "max_seq_len": 1024, "use_alternate_vl_dit": true, "attend_text_every_n_blocks": 2, "diffusion_model_cfg": { "attention_head_dim": 48, "dropout": 0.2, "final_dropout": true, "interleave_self_attention": true, "norm_type": "ada_norm", "num_attention_heads": 32, "num_layers": 32, "output_dim": 1024, "positional_embeddings": null }, "num_inference_timesteps": 4, "noise_beta_alpha": 1.5, "noise_beta_beta": 1.0, "noise_s": 0.999, "num_timestep_buckets": 1000, "tune_projector": true, "tune_diffusion_model": true, "tune_vlln": true, "state_dropout_prob": 0.2, "exclude_state": false, "use_mean_std": false, "max_num_embodiments": 32}123version https://git-lfs.github.com/spec/v1oid sha256:55af62f7d9284be169ec52eba38099fe902271cc4e2193fb4c353b8d288b0881size 4990519232123version https://git-lfs.github.com/spec/v1oid sha256:176178c446fcb054e7a367de960684b192c6c47bc9aabd0abaa10b2e69c9cdd9size 1919980184123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137{ "processor_class": "Gr00tN1d7Processor", "processor_kwargs": { "modality_configs": { "real_g1_relative_eef_relative_joints": { "video": { "delta_indices": [ -20, 0 ], "modality_keys": [ "ego_view" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef_9d", "right_wrist_eef_9d", "left_hand", "right_hand", "left_arm", "right_arm", "waist" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef_9d", "right_wrist_eef_9d", "left_hand", "right_hand", "left_arm", "right_arm", "waist", "base_height_command", "navigate_command" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef_9d" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef_9d" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_hand" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_hand" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_arm" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_arm" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "waist" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "base_height_command" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "navigate_command" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.human.task_description" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "real_r1_pro_sharpa_relative_eef_mecka": { "video": { "delta_indices": [ -30, 0 ], "modality_keys": [ "ego_view_cropratio_res320x240_freq30" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_hand_joints" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_hand_joints" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.human.coarse_action" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "real_r1_pro_sharpa_relative_eef_human": { "video": { "delta_indices": [ -20, 0 ], "modality_keys": [ "ego_view_res320x240_freq20", "left_wrist_view_res320x240_freq20", "right_wrist_view_res320x240_freq20" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_hand_joints" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_hand_joints" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.human.coarse_action" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "real_r1_pro_sharpa_relative_eef": { "video": { "delta_indices": [ -20, 0 ], "modality_keys": [ "ego_view_res320x240_freq20", "left_wrist_view_res320x240_freq20", "right_wrist_view_res320x240_freq20" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_hand_joints" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_hand_joints" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.human.coarse_action" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "xdof_relative_eef_relative_joint": { "video": { "delta_indices": [ -30, 0 ], "modality_keys": [ "top_camera-images-rgb_320_240", "left_camera-images-rgb_320_240", "right_camera-images-rgb_320_240" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_gripper_pos", "right_gripper_pos", "left_joint_pos", "right_joint_pos" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_gripper_pos", "right_gripper_pos", "left_joint_pos", "right_joint_pos" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_gripper_pos" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_gripper_pos" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_joint_pos" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_joint_pos" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.task" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "real_r1_pro_sharpa_relative_eef_maxinsights": { "video": { "delta_indices": [ -30, 0 ], "modality_keys": [ "ego_view_cropratio_res320x240_freq30" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_hand_joints" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_hand_joints" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.human.coarse_action" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "xdof_relative_eef_relative_joint_subtask": { "video": { "delta_indices": [ -30, 0 ], "modality_keys": [ "top_camera-images-rgb_320_240", "left_camera-images-rgb_320_240", "right_camera-images-rgb_320_240" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_gripper_pos", "right_gripper_pos", "left_joint_pos", "right_joint_pos" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "left_wrist_eef", "right_wrist_eef", "left_gripper_pos", "right_gripper_pos", "left_joint_pos", "right_joint_pos" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "left_wrist_eef" }, { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "right_wrist_eef" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_gripper_pos" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_gripper_pos" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "left_joint_pos" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "right_joint_pos" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.sub_task" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "oxe_droid_relative_eef_relative_joint": { "video": { "delta_indices": [ -15, 0 ], "modality_keys": [ "exterior_image_1_left", "wrist_image_left" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "eef_9d", "gripper_position", "joint_position" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39 ], "modality_keys": [ "eef_9d", "gripper_position", "joint_position" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "RELATIVE", "type": "EEF", "format": "XYZ_ROT6D", "state_key": "eef_9d" }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "gripper_position" }, { "rep": "RELATIVE", "type": "NON_EEF", "format": "DEFAULT", "state_key": "joint_position" } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.language.language_instruction" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } }, "new_embodiment": { "video": { "delta_indices": [ 0 ], "modality_keys": [ "ego_view", "chest" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "state": { "delta_indices": [ 0 ], "modality_keys": [ "left_leg", "right_leg", "waist", "left_arm", "right_arm", "left_hand", "right_hand", "projected_gravity" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null }, "action": { "delta_indices": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 ], "modality_keys": [ "motion_token", "left_hand_joints", "right_hand_joints" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": [ { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": null }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": null }, { "rep": "ABSOLUTE", "type": "NON_EEF", "format": "DEFAULT", "state_key": null } ] }, "language": { "delta_indices": [ 0 ], "modality_keys": [ "annotation.human.task_description" ], "sin_cos_embedding_keys": null, "mean_std_embedding_keys": null, "action_configs": null } } }, "image_crop_size": [ 230, 230 ], "image_target_size": [ 256, 256 ], "use_albumentations": true, "random_rotation_angle": 0, "color_jitter_params": { "brightness": 0.3, "contrast": 0.4, "saturation": 0.5, "hue": 0.08 }, "shortest_image_edge": 256, "crop_fraction": 0.95, "letter_box_transform": false, "model_name": "nvidia/Cosmos-Reason2-2B", "model_type": "qwen", "formalize_language": true, "max_state_dim": 132, "max_action_dim": 132, "max_action_horizon": 40, "strict_action_padding_mask": false, "use_percentiles": true, "use_mean_std": false, "clip_outliers": true, "apply_sincos_state_encoding": false, "use_relative_action": true, "exclude_state": false, "state_dropout_prob": 0.2 }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104{ "model": "GR00T N1.7 (Gr00tN1d7), full fine-tune: all modules (tune_llm, tune_visual, projector, diffusion action head, VLLN)", "task": "A7 close cabinet door v4 (G1), pause-trim data (3-frame stationary trim)", "task_dir": "a7-cabinet-close-v4/b512-trim3f", "robot": "Unitree G1", "training_data": "a7-cabinet-close-expert-v4 @d3ec8057 (all 100 episodes; pause-trim: 3-frame stationary trim, a29_trim_stationary.py be2caba1)", "episodes": 100, "epoch_completed": null, "global_step": 3200, "augmentation": "Humanoid Benchmark online augmentation spec v2 (2026-11-09): 15 visual effects, one effect per training sample at 1.5x; proprioception aligned with the GR00T A20 recipe (2026-11-12): per-sample joint bias +-2 deg + Gaussian noise 0.25 deg (hb_aug_v2.perturb_joints), no proprio delay, no history drop; model-native image augmentation off", "epochs": null, "total_steps": 4000, "save_steps": [ 3200, 4000 ], "global_batch": 512, "per_gpu_batch": 32, "num_gpus": 16, "lr": 0.0001, "lr_schedule": "cosine, warmup_ratio 0.05", "weight_decay": 1e-05, "proprio_augmentation": "per-sample joint bias +-2 deg + noise 0.25 deg (hb_aug_v2.perturb_joints); no proprio delay / history drop (the GR00T A20 recipe)", "config": "experiment_cfg/conf.yaml", "normalization": "statistics.json", "inference": "NVIDIA Isaac-GR00T N1.7 policy loader with embodiment_tag new_embodiment and experiment_cfg/conf.yaml; VLM nvidia/Cosmos-Reason2-2B from its own repository.", "epochs_equivalent": 84.48, "recipe": "full fine-tune (tune_llm, tune_visual, projector, diffusion, vlln), fixed steps, 2 nodes x 8 x 32, no accumulation", "gradient_accumulation_steps": 1, "num_nodes": 2, "frames": 24241, "trainable": "all modules (tune_llm, tune_visual, projector, diffusion action head, VLLN)", "training_records_included": true, "resume_state_included": false, "seed": 42, "reproducibility": { "protocol": "https://github.com/zuo-kuangji/HumanWAM/blob/bai/hb_training/REPRODUCIBILITY.md", "protocol_commit": "ef6c628c26da", "training_seed": 42, "training_seed_source": "upstream Isaac-GR00T default (gr00t/configs/data/data_config.py seed=42 -> set_seed; HF TrainingArguments.seed=42)", "training_seed_verified_from_run_files": true, "augmentation_random_stream": "seeded: HB_AUG_SEED=42 (= training seed); numpy Generator from (seed, torch.initial_seed() of the process / DataLoader worker, global rank, worker id) - reproducible for the same seed and layout", "inloop_mse_seed": 1234, "layout": { "num_nodes": 2, "num_gpus": 16, "per_gpu_batch": 32, "global_batch": 512, "gradient_accumulation_steps": 1 }, "environment": { "name": "groot-py312", "package_snapshot": "hb_training/envs/groot-py312.txt", "python": "3.12.12", "torch": "2.9.0" }, "hardware": "Alibaba PAI DLC, 4 nodes x 8 NVIDIA A800-SXM4-80GB, driver 570.133.20, CUDA 12.8", "upstream_code": "NVIDIA Isaac-GR00T @ 7aa0bca", "adapter_code": "code/ in this folder (snapshot of the HumanWAM hb_training adapters used for this run)", "determinism": "statistical reproducibility: same data commit, config, seed and layout give the same curves within run-to-run noise; GPU kernels (bf16, NCCL reductions) are not bitwise deterministic", "exceptions": "see the exception registry, REPRODUCIBILITY.md section 7" }, "files": { "code/hb_groot/cache_cosmos_reason2.py": 2542, "code/hb_groot/check_reason2_offline.py": 1283, "code/hb_groot/g1_feedback76_h16.py": 1474, "code/hb_groot/g1_joint47_h40.py": 1409, "code/hb_groot/groot_chain.py": 6325, "code/hb_groot/h2_body31_hand44_h16.py": 1395, "code/hb_groot/h2_body31_hand44_h32.py": 1463, "code/hb_groot/h2_body31_hand44_planner7_h16.py": 1531, "code/hb_groot/h2w3_body31_hand44_h16.py": 1563, "code/hb_groot/hb_aug_v2.py": 7475, "code/hb_groot/hb_inloop_eval.py": 16620, "code/hb_groot/hb_j47.py": 1579, "code/hb_groot/hb_launch.py": 5705, "code/hb_groot/hb_launch_v.py": 4184, "code/hb_groot/hb_offline_fix.py": 1138, "code/hb_groot/prepare_groot_data.py": 17999, "code/hb_groot/prepare_groot_j47.py": 7913, "code/hb_groot/upload_groot_j47.py": 4426, "code/hb_groot/verify_groot_cpu.py": 2806, "code/hb_groot/verify_j47_cpu.py": 3249, "config.json": 2219, "dataset_meta/hb-dataset-receipt.json": 771, "dataset_meta/modality.json": 1537, "embodiment_id.json": 2226, "experiment_cfg/conf.yaml": 5799, "experiment_cfg/config.yaml": 5766, "experiment_cfg/dataset_statistics.json": 22875, "experiment_cfg/final_model_config.json": 1584, "experiment_cfg/final_processor_config.json": 2548329, "model-00001-of-00002.safetensors": 4990519232, "model-00002-of-00002.safetensors": 1919980184, "model.safetensors.index.json": 104985, "processor_config.json": 26945, "statistics.json": 4315968, "train.log": 401074, "trainer_state.json": 45026, "training_args.bin": 8017, "training_plan.json": 638, "wandb_config.json": 58 }}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954{ "best_global_step": null, "best_metric": null, "best_model_checkpoint": null, "epoch": 0.8, "eval_steps": 500, "global_step": 3200, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "grad_norm": 0.24138575792312622, "learning_rate": 4.5e-06, "loss": 1.2729, "step": 10 }, { "grad_norm": 0.44862616062164307, "learning_rate": 9.5e-06, "loss": 1.2441, "step": 20 }, { "grad_norm": 0.350279301404953, "learning_rate": 1.45e-05, "loss": 1.2036, "step": 30 }, { "grad_norm": 0.45816770195961, "learning_rate": 1.9500000000000003e-05, "loss": 1.1536, "step": 40 }, { "grad_norm": 0.5029612183570862, "learning_rate": 2.45e-05, "loss": 1.1331, "step": 50 }, { "grad_norm": 0.3046541213989258, "learning_rate": 2.95e-05, "loss": 1.1046, "step": 60 }, { "grad_norm": 0.4630725681781769, "learning_rate": 3.45e-05, "loss": 1.0972, "step": 70 }, { "grad_norm": 0.6026091575622559, "learning_rate": 3.9500000000000005e-05, "loss": 1.0921, "step": 80 }, { "grad_norm": 0.36543354392051697, "learning_rate": 4.4500000000000004e-05, "loss": 1.0611, "step": 90 }, { "grad_norm": 0.5879210233688354, "learning_rate": 4.9500000000000004e-05, "loss": 1.0362, "step": 100 }, { "grad_norm": 0.5880864858627319, "learning_rate": 5.45e-05, "loss": 0.9789, "step": 110 }, { "grad_norm": 0.737858235836029, "learning_rate": 5.95e-05, "loss": 0.9141, "step": 120 }, { "grad_norm": 0.8316690325737, "learning_rate": 6.450000000000001e-05, "loss": 0.8623, "step": 130 }, { "grad_norm": 0.8802237510681152, "learning_rate": 6.95e-05, "loss": 0.8276, "step": 140 }, { "grad_norm": 0.8904045820236206, "learning_rate": 7.450000000000001e-05, "loss": 0.7919, "step": 150 }, { "grad_norm": 0.7649126052856445, "learning_rate": 7.950000000000001e-05, "loss": 0.7703, "step": 160 }, { "grad_norm": 0.7464289665222168, "learning_rate": 8.450000000000001e-05, "loss": 0.7446, "step": 170 }, { "grad_norm": 1.0204414129257202, "learning_rate": 8.950000000000001e-05, "loss": 0.7355, "step": 180 }, { "grad_norm": 0.769744873046875, "learning_rate": 9.449999999999999e-05, "loss": 0.7119, "step": 190 }, { "grad_norm": 0.7598676681518555, "learning_rate": 9.95e-05, "loss": 0.7132, "step": 200 }, { "grad_norm": 0.688759446144104, "learning_rate": 9.999861593790126e-05, "loss": 0.7058, "step": 210 }, { "grad_norm": 0.677753746509552, "learning_rate": 9.999383162408304e-05, "loss": 0.6914, "step": 220 }, { "grad_norm": 0.8199146389961243, "learning_rate": 9.998563029828259e-05, "loss": 0.6736, "step": 230 }, { "grad_norm": 0.9334569573402405, "learning_rate": 9.997401252104962e-05, "loss": 0.6462, "step": 240 }, { "grad_norm": 0.9399493932723999, "learning_rate": 9.995897908644378e-05, "loss": 0.6266, "step": 250 }, { "grad_norm": 0.8284084796905518, "learning_rate": 9.994053102198034e-05, "loss": 0.6005, "step": 260 }, { "grad_norm": 0.7773727178573608, "learning_rate": 9.991866958856003e-05, "loss": 0.5967, "step": 270 }, { "grad_norm": 0.8946465849876404, "learning_rate": 9.989339628038276e-05, "loss": 0.5671, "step": 280 }, { "grad_norm": 1.054863452911377, "learning_rate": 9.98647128248456e-05, "loss": 0.5625, "step": 290 }, { "grad_norm": 0.9033761024475098, "learning_rate": 9.98326211824246e-05, "loss": 0.5326, "step": 300 }, { "grad_norm": 0.907745361328125, "learning_rate": 9.979712354654091e-05, "loss": 0.5253, "step": 310 }, { "grad_norm": 1.0007925033569336, "learning_rate": 9.975822234341079e-05, "loss": 0.4971, "step": 320 }, { "grad_norm": 0.9110075831413269, "learning_rate": 9.97159202318798e-05, "loss": 0.4876, "step": 330 }, { "grad_norm": 0.9469376802444458, "learning_rate": 9.967022010324105e-05, "loss": 0.4609, "step": 340 }, { "grad_norm": 0.9130021929740906, "learning_rate": 9.962112508103765e-05, "loss": 0.4399, "step": 350 }, { "grad_norm": 0.9595957398414612, "learning_rate": 9.956863852084914e-05, "loss": 0.4278, "step": 360 }, { "grad_norm": 0.9754731059074402, "learning_rate": 9.951276401006221e-05, "loss": 0.4234, "step": 370 }, { "grad_norm": 1.1136338710784912, "learning_rate": 9.945350536762543e-05, "loss": 0.3979, "step": 380 }, { "grad_norm": 0.9317739009857178, "learning_rate": 9.939086664378829e-05, "loss": 0.3858, "step": 390 }, { "grad_norm": 1.2658789157867432, "learning_rate": 9.932485211982437e-05, "loss": 0.3647, "step": 400 }, { "grad_norm": 1.1645039319992065, "learning_rate": 9.92554663077387e-05, "loss": 0.353, "step": 410 }, { "grad_norm": 0.9496312737464905, "learning_rate": 9.918271394995935e-05, "loss": 0.3372, "step": 420 }, { "grad_norm": 1.1986181735992432, "learning_rate": 9.910660001901335e-05, "loss": 0.3311, "step": 430 }, { "grad_norm": 1.0548006296157837, "learning_rate": 9.902712971718675e-05, "loss": 0.308, "step": 440 }, { "grad_norm": 1.1762791872024536, "learning_rate": 9.894430847616915e-05, "loss": 0.2978, "step": 450 }, { "grad_norm": 1.0731894969940186, "learning_rate": 9.885814195668232e-05, "loss": 0.2827, "step": 460 }, { "grad_norm": 1.4059127569198608, "learning_rate": 9.876863604809344e-05, "loss": 0.2769, "step": 470 }, { "grad_norm": 1.3089512586593628, "learning_rate": 9.867579686801245e-05, "loss": 0.2534, "step": 480 }, { "grad_norm": 1.2121045589447021, "learning_rate": 9.8579630761874e-05, "loss": 0.2383, "step": 490 }, { "grad_norm": 1.2159154415130615, "learning_rate": 9.848014430250367e-05, "loss": 0.2217, "step": 500 }, { "grad_norm": 1.1430144309997559, "learning_rate": 9.837734428966885e-05, "loss": 0.2222, "step": 510 }, { "grad_norm": 1.084146499633789, "learning_rate": 9.827123774961383e-05, "loss": 0.2092, "step": 520 }, { "grad_norm": 1.0826913118362427, "learning_rate": 9.816183193457968e-05, "loss": 0.2107, "step": 530 }, { "grad_norm": 1.1633726358413696, "learning_rate": 9.804913432230856e-05, "loss": 0.1934, "step": 540 }, { "grad_norm": 1.0397950410842896, "learning_rate": 9.793315261553252e-05, "loss": 0.1863, "step": 550 }, { "grad_norm": 1.245688796043396, "learning_rate": 9.781389474144717e-05, "loss": 0.1744, "step": 560 }, { "grad_norm": 1.045377254486084, "learning_rate": 9.76913688511698e-05, "loss": 0.1656, "step": 570 }, { "grad_norm": 1.2023371458053589, "learning_rate": 9.756558331918227e-05, "loss": 0.1628, "step": 580 }, { "grad_norm": 0.9973235130310059, "learning_rate": 9.743654674275855e-05, "loss": 0.1645, "step": 590 }, { "grad_norm": 1.5349886417388916, "learning_rate": 9.730426794137727e-05, "loss": 0.1538, "step": 600 }, { "grad_norm": 1.0510761737823486, "learning_rate": 9.716875595611879e-05, "loss": 0.1698, "step": 610 }, { "grad_norm": 0.9325612783432007, "learning_rate": 9.703002004904729e-05, "loss": 0.1401, "step": 620 }, { "grad_norm": 1.0668447017669678, "learning_rate": 9.688806970257773e-05, "loss": 0.1253, "step": 630 }, { "grad_norm": 1.065563678741455, "learning_rate": 9.674291461882774e-05, "loss": 0.1325, "step": 640 }, { "grad_norm": 1.1581813097000122, "learning_rate": 9.659456471895445e-05, "loss": 0.139, "step": 650 }, { "grad_norm": 1.0643259286880493, "learning_rate": 9.644303014247648e-05, "loss": 0.1326, "step": 660 }, { "grad_norm": 1.0442875623703003, "learning_rate": 9.628832124658085e-05, "loss": 0.1543, "step": 670 }, { "grad_norm": 1.0466489791870117, "learning_rate": 9.613044860541507e-05, "loss": 0.1363, "step": 680 }, { "grad_norm": 1.1575757265090942, "learning_rate": 9.596942300936445e-05, "loss": 0.1302, "step": 690 }, { "grad_norm": 1.0558456182479858, "learning_rate": 9.580525546431459e-05, "loss": 0.1313, "step": 700 }, { "grad_norm": 1.0135363340377808, "learning_rate": 9.563795719089911e-05, "loss": 0.1447, "step": 710 }, { "grad_norm": 0.9334138035774231, "learning_rate": 9.546753962373281e-05, "loss": 0.1267, "step": 720 }, { "grad_norm": 0.9072825312614441, "learning_rate": 9.529401441062997e-05, "loss": 0.1267, "step": 730 }, { "grad_norm": 1.0790739059448242, "learning_rate": 9.511739341180842e-05, "loss": 0.1045, "step": 740 }, { "grad_norm": 0.9549826383590698, "learning_rate": 9.493768869907886e-05, "loss": 0.1255, "step": 750 }, { "grad_norm": 0.974427342414856, "learning_rate": 9.475491255501968e-05, "loss": 0.1102, "step": 760 }, { "grad_norm": 0.8831864595413208, "learning_rate": 9.456907747213748e-05, "loss": 0.1173, "step": 770 }, { "grad_norm": 1.0158758163452148, "learning_rate": 9.438019615201336e-05, "loss": 0.1169, "step": 780 }, { "grad_norm": 0.8933230638504028, "learning_rate": 9.418828150443469e-05, "loss": 0.1107, "step": 790 }, { "grad_norm": 0.9139942526817322, "learning_rate": 9.399334664651262e-05, "loss": 0.1166, "step": 800 }, { "grad_norm": 1.0141180753707886, "learning_rate": 9.379540490178581e-05, "loss": 0.1239, "step": 810 }, { "grad_norm": 1.0875388383865356, "learning_rate": 9.359446979930955e-05, "loss": 0.1162, "step": 820 }, { "grad_norm": 1.173936367034912, "learning_rate": 9.33905550727312e-05, "loss": 0.1187, "step": 830 }, { "grad_norm": 0.9807372689247131, "learning_rate": 9.318367465935142e-05, "loss": 0.1066, "step": 840 }, { "grad_norm": 1.0332298278808594, "learning_rate": 9.29738426991717e-05, "loss": 0.126, "step": 850 }, { "grad_norm": 1.0897698402404785, "learning_rate": 9.276107353392774e-05, "loss": 0.114, "step": 860 }, { "grad_norm": 0.8991732597351074, "learning_rate": 9.254538170610938e-05, "loss": 0.1125, "step": 870 }, { "grad_norm": 0.9612804651260376, "learning_rate": 9.232678195796654e-05, "loss": 0.1035, "step": 880 }, { "grad_norm": 1.0521858930587769, "learning_rate": 9.210528923050164e-05, "loss": 0.1005, "step": 890 }, { "grad_norm": 0.9691341519355774, "learning_rate": 9.188091866244834e-05, "loss": 0.1198, "step": 900 }, { "grad_norm": 0.9003984928131104, "learning_rate": 9.165368558923695e-05, "loss": 0.0939, "step": 910 }, { "grad_norm": 0.9639463424682617, "learning_rate": 9.142360554194618e-05, "loss": 0.1147, "step": 920 }, { "grad_norm": 1.0247269868850708, "learning_rate": 9.119069424624163e-05, "loss": 0.0995, "step": 930 }, { "grad_norm": 1.1321992874145508, "learning_rate": 9.0954967621301e-05, "loss": 0.0941, "step": 940 }, { "grad_norm": 1.0144312381744385, "learning_rate": 9.071644177872594e-05, "loss": 0.1149, "step": 950 }, { "grad_norm": 1.0536564588546753, "learning_rate": 9.047513302144095e-05, "loss": 0.092, "step": 960 }, { "grad_norm": 0.985260546207428, "learning_rate": 9.023105784257906e-05, "loss": 0.0936, "step": 970 }, { "grad_norm": 1.0207887887954712, "learning_rate": 8.998423292435454e-05, "loss": 0.1083, "step": 980 }, { "grad_norm": 0.9504262804985046, "learning_rate": 8.973467513692265e-05, "loss": 0.1046, "step": 990 }, { "grad_norm": 1.0220154523849487, "learning_rate": 8.94824015372267e-05, "loss": 0.1005, "step": 1000 }, { "grad_norm": 0.9081030488014221, "learning_rate": 8.922742936783207e-05, "loss": 0.0886, "step": 1010 }, { "grad_norm": 1.10207200050354, "learning_rate": 8.896977605574788e-05, "loss": 0.0964, "step": 1020 }, { "grad_norm": 0.9493905901908875, "learning_rate": 8.870945921123576e-05, "loss": 0.0948, "step": 1030 }, { "grad_norm": 0.9392439126968384, "learning_rate": 8.844649662660624e-05, "loss": 0.1019, "step": 1040 }, { "grad_norm": 0.9934952259063721, "learning_rate": 8.818090627500266e-05, "loss": 0.089, "step": 1050 }, { "grad_norm": 1.0433669090270996, "learning_rate": 8.791270630917275e-05, "loss": 0.1127, "step": 1060 }, { "grad_norm": 0.9163152575492859, "learning_rate": 8.764191506022795e-05, "loss": 0.1027, "step": 1070 }, { "grad_norm": 0.8264257907867432, "learning_rate": 8.736855103639037e-05, "loss": 0.0957, "step": 1080 }, { "grad_norm": 0.9436381459236145, "learning_rate": 8.709263292172794e-05, "loss": 0.0745, "step": 1090 }, { "grad_norm": 0.9446991086006165, "learning_rate": 8.681417957487729e-05, "loss": 0.0918, "step": 1100 }, { "grad_norm": 1.054206132888794, "learning_rate": 8.653321002775478e-05, "loss": 0.1011, "step": 1110 }, { "grad_norm": 0.9777696132659912, "learning_rate": 8.624974348425574e-05, "loss": 0.0929, "step": 1120 }, { "grad_norm": 0.813370406627655, "learning_rate": 8.596379931894188e-05, "loss": 0.105, "step": 1130 }, { "grad_norm": 1.0996127128601074, "learning_rate": 8.567539707571703e-05, "loss": 0.0991, "step": 1140 }, { "grad_norm": 0.9169588088989258, "learning_rate": 8.538455646649146e-05, "loss": 0.0988, "step": 1150 }, { "grad_norm": 0.881459653377533, "learning_rate": 8.509129736983446e-05, "loss": 0.0926, "step": 1160 }, { "grad_norm": 0.9764841198921204, "learning_rate": 8.479563982961571e-05, "loss": 0.0907, "step": 1170 }, { "grad_norm": 0.98268061876297, "learning_rate": 8.449760405363539e-05, "loss": 0.0901, "step": 1180 }, { "grad_norm": 0.930583655834198, "learning_rate": 8.419721041224287e-05, "loss": 0.0933, "step": 1190 }, { "grad_norm": 0.9285994172096252, "learning_rate": 8.389447943694451e-05, "loss": 0.0972, "step": 1200 }, { "grad_norm": 0.9495022892951965, "learning_rate": 8.358943181900032e-05, "loss": 0.0944, "step": 1210 }, { "grad_norm": 0.8563241362571716, "learning_rate": 8.328208840800981e-05, "loss": 0.0817, "step": 1220 }, { "grad_norm": 1.1514328718185425, "learning_rate": 8.297247021048686e-05, "loss": 0.0918, "step": 1230 }, { "grad_norm": 0.785199761390686, "learning_rate": 8.266059838842396e-05, "loss": 0.0841, "step": 1240 }, { "grad_norm": 0.9003179669380188, "learning_rate": 8.23464942578459e-05, "loss": 0.0934, "step": 1250 }, { "grad_norm": 0.774814784526825, "learning_rate": 8.203017928735277e-05, "loss": 0.0834, "step": 1260 }, { "grad_norm": 0.9533666372299194, "learning_rate": 8.17116750966526e-05, "loss": 0.0976, "step": 1270 }, { "grad_norm": 0.8687354922294617, "learning_rate": 8.139100345508377e-05, "loss": 0.0905, "step": 1280 }, { "grad_norm": 0.9661436676979065, "learning_rate": 8.106818628012697e-05, "loss": 0.0949, "step": 1290 }, { "grad_norm": 0.9120314121246338, "learning_rate": 8.074324563590736e-05, "loss": 0.0833, "step": 1300 }, { "grad_norm": 1.0066149234771729, "learning_rate": 8.041620373168628e-05, "loss": 0.0843, "step": 1310 }, { "grad_norm": 0.9549501538276672, "learning_rate": 8.008708292034349e-05, "loss": 0.0958, "step": 1320 }, { "grad_norm": 0.8261533975601196, "learning_rate": 7.975590569684925e-05, "loss": 0.0769, "step": 1330 }, { "grad_norm": 0.823553740978241, "learning_rate": 7.942269469672687e-05, "loss": 0.0843, "step": 1340 }, { "grad_norm": 0.9268839359283447, "learning_rate": 7.908747269450558e-05, "loss": 0.0762, "step": 1350 }, { "grad_norm": 0.8875033259391785, "learning_rate": 7.875026260216393e-05, "loss": 0.0821, "step": 1360 }, { "grad_norm": 0.8522126078605652, "learning_rate": 7.841108746756382e-05, "loss": 0.0649, "step": 1370 }, { "grad_norm": 0.9935515522956848, "learning_rate": 7.806997047287516e-05, "loss": 0.0811, "step": 1380 }, { "grad_norm": 0.9024367332458496, "learning_rate": 7.772693493299138e-05, "loss": 0.0747, "step": 1390 }, { "grad_norm": 0.7972972989082336, "learning_rate": 7.7382004293936e-05, "loss": 0.0871, "step": 1400 }, { "grad_norm": 0.8068444132804871, "learning_rate": 7.703520213126e-05, "loss": 0.0704, "step": 1410 }, { "grad_norm": 0.8236463069915771, "learning_rate": 7.66865521484305e-05, "loss": 0.0861, "step": 1420 }, { "grad_norm": 0.8196406364440918, "learning_rate": 7.633607817521074e-05, "loss": 0.0788, "step": 1430 }, { "grad_norm": 0.881615161895752, "learning_rate": 7.598380416603119e-05, "loss": 0.0827, "step": 1440 }, { "grad_norm": 0.7496666312217712, "learning_rate": 7.562975419835247e-05, "loss": 0.0856, "step": 1450 }, { "grad_norm": 0.8125892281532288, "learning_rate": 7.527395247101956e-05, "loss": 0.0756, "step": 1460 }, { "grad_norm": 0.8664445281028748, "learning_rate": 7.491642330260789e-05, "loss": 0.08, "step": 1470 }, { "grad_norm": 0.7897967100143433, "learning_rate": 7.45571911297612e-05, "loss": 0.0863, "step": 1480 }, { "grad_norm": 0.7779093384742737, "learning_rate": 7.419628050552131e-05, "loss": 0.0716, "step": 1490 }, { "grad_norm": 0.8163575530052185, "learning_rate": 7.383371609764999e-05, "loss": 0.0922, "step": 1500 }, { "grad_norm": 0.7760795950889587, "learning_rate": 7.346952268694288e-05, "loss": 0.0773, "step": 1510 }, { "grad_norm": 0.9165164828300476, "learning_rate": 7.310372516553585e-05, "loss": 0.0813, "step": 1520 }, { "grad_norm": 0.8285760283470154, "learning_rate": 7.273634853520356e-05, "loss": 0.079, "step": 1530 }, { "grad_norm": 0.6653105616569519, "learning_rate": 7.236741790565072e-05, "loss": 0.0869, "step": 1540 }, { "grad_norm": 0.7864812612533569, "learning_rate": 7.199695849279576e-05, "loss": 0.0785, "step": 1550 }, { "grad_norm": 0.7626294493675232, "learning_rate": 7.162499561704747e-05, "loss": 0.0753, "step": 1560 }, { "grad_norm": 0.9687061905860901, "learning_rate": 7.125155470157429e-05, "loss": 0.069, "step": 1570 }, { "grad_norm": 0.8533851504325867, "learning_rate": 7.087666127056675e-05, "loss": 0.0663, "step": 1580 }, { "grad_norm": 0.7232632040977478, "learning_rate": 7.050034094749286e-05, "loss": 0.0745, "step": 1590 }, { "grad_norm": 0.798611581325531, "learning_rate": 7.012261945334683e-05, "loss": 0.0764, "step": 1600 }, { "grad_norm": 0.7934339642524719, "learning_rate": 6.974352260489103e-05, "loss": 0.0632, "step": 1610 }, { "grad_norm": 0.9388439059257507, "learning_rate": 6.936307631289148e-05, "loss": 0.0631, "step": 1620 }, { "grad_norm": 0.7328180074691772, "learning_rate": 6.898130658034685e-05, "loss": 0.0661, "step": 1630 }, { "grad_norm": 0.8331693410873413, "learning_rate": 6.859823950071127e-05, "loss": 0.0716, "step": 1640 }, { "grad_norm": 0.9343909621238708, "learning_rate": 6.821390125611078e-05, "loss": 0.0823, "step": 1650 }, { "grad_norm": 0.658543050289154, "learning_rate": 6.782831811555385e-05, "loss": 0.0571, "step": 1660 }, { "grad_norm": 0.7693973183631897, "learning_rate": 6.744151643313597e-05, "loss": 0.0723, "step": 1670 }, { "grad_norm": 0.8283786177635193, "learning_rate": 6.705352264623828e-05, "loss": 0.0785, "step": 1680 }, { "grad_norm": 0.7442424893379211, "learning_rate": 6.666436327372078e-05, "loss": 0.0738, "step": 1690 }, { "grad_norm": 0.6868252754211426, "learning_rate": 6.62740649141096e-05, "loss": 0.0702, "step": 1700 }, { "grad_norm": 0.8741525411605835, "learning_rate": 6.588265424377919e-05, "loss": 0.0681, "step": 1710 }, { "grad_norm": 0.621032178401947, "learning_rate": 6.549015801512895e-05, "loss": 0.0766, "step": 1720 }, { "grad_norm": 0.6654764413833618, "learning_rate": 6.509660305475468e-05, "loss": 0.0725, "step": 1730 }, { "grad_norm": 0.7072033286094666, "learning_rate": 6.47020162616152e-05, "loss": 0.0659, "step": 1740 }, { "grad_norm": 0.7646650671958923, "learning_rate": 6.430642460519365e-05, "loss": 0.0703, "step": 1750 }, { "grad_norm": 0.8185666799545288, "learning_rate": 6.390985512365426e-05, "loss": 0.0753, "step": 1760 }, { "grad_norm": 0.8202099800109863, "learning_rate": 6.351233492199431e-05, "loss": 0.0695, "step": 1770 }, { "grad_norm": 0.7319624423980713, "learning_rate": 6.311389117019155e-05, "loss": 0.068, "step": 1780 }, { "grad_norm": 0.8132781386375427, "learning_rate": 6.271455110134713e-05, "loss": 0.0771, "step": 1790 }, { "grad_norm": 0.7760844826698303, "learning_rate": 6.231434200982428e-05, "loss": 0.0692, "step": 1800 }, { "grad_norm": 0.7073867321014404, "learning_rate": 6.191329124938285e-05, "loss": 0.0677, "step": 1810 }, { "grad_norm": 0.7873943448066711, "learning_rate": 6.15114262313095e-05, "loss": 0.0609, "step": 1820 }, { "grad_norm": 0.7163444757461548, "learning_rate": 6.110877442254444e-05, "loss": 0.0643, "step": 1830 }, { "grad_norm": 0.7490527033805847, "learning_rate": 6.0705363343803946e-05, "loss": 0.0609, "step": 1840 }, { "grad_norm": 0.6529465317726135, "learning_rate": 6.030122056769934e-05, "loss": 0.0648, "step": 1850 }, { "grad_norm": 0.860027551651001, "learning_rate": 5.989637371685257e-05, "loss": 0.0771, "step": 1860 }, { "grad_norm": 0.6855329871177673, "learning_rate": 5.949085046200808e-05, "loss": 0.0725, "step": 1870 }, { "grad_norm": 0.7241048216819763, "learning_rate": 5.908467852014169e-05, "loss": 0.059, "step": 1880 }, { "grad_norm": 0.6235964298248291, "learning_rate": 5.867788565256607e-05, "loss": 0.0533, "step": 1890 }, { "grad_norm": 0.6385053396224976, "learning_rate": 5.827049966303335e-05, "loss": 0.0774, "step": 1900 }, { "grad_norm": 0.7063818573951721, "learning_rate": 5.786254839583478e-05, "loss": 0.0686, "step": 1910 }, { "grad_norm": 0.7696298956871033, "learning_rate": 5.745405973389757e-05, "loss": 0.0646, "step": 1920 }, { "grad_norm": 0.647362470626831, "learning_rate": 5.7045061596879134e-05, "loss": 0.0659, "step": 1930 }, { "grad_norm": 0.7364215850830078, "learning_rate": 5.6635581939258855e-05, "loss": 0.0672, "step": 1940 }, { "grad_norm": 0.703386664390564, "learning_rate": 5.622564874842742e-05, "loss": 0.068, "step": 1950 }, { "grad_norm": 0.87401282787323, "learning_rate": 5.5815290042773836e-05, "loss": 0.054, "step": 1960 }, { "grad_norm": 0.7383897304534912, "learning_rate": 5.540453386977058e-05, "loss": 0.0745, "step": 1970 }, { "grad_norm": 0.6335952877998352, "learning_rate": 5.4993408304056425e-05, "loss": 0.0766, "step": 1980 }, { "grad_norm": 0.8003796339035034, "learning_rate": 5.458194144551768e-05, "loss": 0.0609, "step": 1990 }, { "grad_norm": 0.7482972145080566, "learning_rate": 5.417016141736756e-05, "loss": 0.0539, "step": 2000 }, { "grad_norm": 0.6769192218780518, "learning_rate": 5.375809636422399e-05, "loss": 0.0539, "step": 2010 }, { "grad_norm": 0.6882005929946899, "learning_rate": 5.334577445018599e-05, "loss": 0.0635, "step": 2020 }, { "grad_norm": 0.7897913455963135, "learning_rate": 5.293322385690867e-05, "loss": 0.0644, "step": 2030 }, { "grad_norm": 0.7553768754005432, "learning_rate": 5.252047278167709e-05, "loss": 0.0697, "step": 2040 }, { "grad_norm": 0.64678555727005, "learning_rate": 5.210754943547893e-05, "loss": 0.0635, "step": 2050 }, { "grad_norm": 0.6295294761657715, "learning_rate": 5.169448204107643e-05, "loss": 0.0535, "step": 2060 }, { "grad_norm": 0.5676808953285217, "learning_rate": 5.128129883107729e-05, "loss": 0.0509, "step": 2070 }, { "grad_norm": 0.5997950434684753, "learning_rate": 5.086802804600505e-05, "loss": 0.0507, "step": 2080 }, { "grad_norm": 0.6715337038040161, "learning_rate": 5.045469793236892e-05, "loss": 0.0541, "step": 2090 }, { "grad_norm": 0.6665021181106567, "learning_rate": 5.00413367407331e-05, "loss": 0.0523, "step": 2100 }, { "grad_norm": 0.7515039443969727, "learning_rate": 4.9627972723785964e-05, "loss": 0.0528, "step": 2110 }, { "grad_norm": 0.4618587791919708, "learning_rate": 4.921463413440898e-05, "loss": 0.0506, "step": 2120 }, { "grad_norm": 0.6050736904144287, "learning_rate": 4.8801349223745654e-05, "loss": 0.059, "step": 2130 }, { "grad_norm": 0.7644361257553101, "learning_rate": 4.838814623927067e-05, "loss": 0.0577, "step": 2140 }, { "grad_norm": 0.728640615940094, "learning_rate": 4.797505342285912e-05, "loss": 0.0716, "step": 2150 }, { "grad_norm": 0.7134841680526733, "learning_rate": 4.756209900885628e-05, "loss": 0.0563, "step": 2160 }, { "grad_norm": 0.5887670516967773, "learning_rate": 4.714931122214781e-05, "loss": 0.0485, "step": 2170 }, { "grad_norm": 0.8147952556610107, "learning_rate": 4.673671827623058e-05, "loss": 0.0651, "step": 2180 }, { "grad_norm": 0.7236719727516174, "learning_rate": 4.632434837128443e-05, "loss": 0.0499, "step": 2190 }, { "grad_norm": 0.5390884876251221, "learning_rate": 4.591222969224453e-05, "loss": 0.049, "step": 2200 }, { "grad_norm": 0.46872031688690186, "learning_rate": 4.550039040687518e-05, "loss": 0.0496, "step": 2210 }, { "grad_norm": 0.5933330655097961, "learning_rate": 4.508885866384446e-05, "loss": 0.0494, "step": 2220 }, { "grad_norm": 0.7009124755859375, "learning_rate": 4.4677662590800355e-05, "loss": 0.06, "step": 2230 }, { "grad_norm": 0.6255108118057251, "learning_rate": 4.426683029244825e-05, "loss": 0.0488, "step": 2240 }, { "grad_norm": 0.5721331834793091, "learning_rate": 4.385638984863e-05, "loss": 0.0602, "step": 2250 }, { "grad_norm": 0.6206778883934021, "learning_rate": 4.3446369312404745e-05, "loss": 0.0598, "step": 2260 }, { "grad_norm": 0.6360893845558167, "learning_rate": 4.3036796708131474e-05, "loss": 0.0471, "step": 2270 }, { "grad_norm": 0.734744131565094, "learning_rate": 4.262770002955363e-05, "loss": 0.0631, "step": 2280 }, { "grad_norm": 0.6111730337142944, "learning_rate": 4.221910723788578e-05, "loss": 0.054, "step": 2290 }, { "grad_norm": 0.5612404942512512, "learning_rate": 4.1811046259902474e-05, "loss": 0.0456, "step": 2300 }, { "grad_norm": 0.49811699986457825, "learning_rate": 4.140354498602952e-05, "loss": 0.0627, "step": 2310 }, { "grad_norm": 0.6916558146476746, "learning_rate": 4.099663126843769e-05, "loss": 0.0474, "step": 2320 }, { "grad_norm": 0.7687953114509583, "learning_rate": 4.059033291913902e-05, "loss": 0.0598, "step": 2330 }, { "grad_norm": 0.6381025910377502, "learning_rate": 4.0184677708086014e-05, "loss": 0.0515, "step": 2340 }, { "grad_norm": 0.5844581723213196, "learning_rate": 3.977969336127348e-05, "loss": 0.0563, "step": 2350 }, { "grad_norm": 0.5773027539253235, "learning_rate": 3.937540755884357e-05, "loss": 0.0487, "step": 2360 }, { "grad_norm": 0.5324381589889526, "learning_rate": 3.897184793319384e-05, "loss": 0.0493, "step": 2370 }, { "grad_norm": 0.5942630171775818, "learning_rate": 3.856904206708863e-05, "loss": 0.0461, "step": 2380 }, { "grad_norm": 0.6254673600196838, "learning_rate": 3.8167017491773847e-05, "loss": 0.0592, "step": 2390 }, { "grad_norm": 0.6005262732505798, "learning_rate": 3.776580168509516e-05, "loss": 0.0577, "step": 2400 }, { "grad_norm": 0.5831274390220642, "learning_rate": 3.736542206962e-05, "loss": 0.0474, "step": 2410 }, { "grad_norm": 0.6414012908935547, "learning_rate": 3.696590601076326e-05, "loss": 0.0499, "step": 2420 }, { "grad_norm": 0.5520442724227905, "learning_rate": 3.656728081491686e-05, "loss": 0.0472, "step": 2430 }, { "grad_norm": 0.6214146614074707, "learning_rate": 3.6169573727583405e-05, "loss": 0.0577, "step": 2440 }, { "grad_norm": 0.6708138585090637, "learning_rate": 3.5772811931514036e-05, "loss": 0.0501, "step": 2450 }, { "grad_norm": 0.6047825813293457, "learning_rate": 3.5377022544850505e-05, "loss": 0.0601, "step": 2460 }, { "grad_norm": 0.6275774240493774, "learning_rate": 3.498223261927158e-05, "loss": 0.0512, "step": 2470 }, { "grad_norm": 0.6267045140266418, "learning_rate": 3.4588469138144295e-05, "loss": 0.0539, "step": 2480 }, { "grad_norm": 0.5789631605148315, "learning_rate": 3.419575901467952e-05, "loss": 0.0397, "step": 2490 }, { "grad_norm": 0.49627748131752014, "learning_rate": 3.380412909009254e-05, "loss": 0.0526, "step": 2500 }, { "grad_norm": 0.5607392191886902, "learning_rate": 3.3413606131768475e-05, "loss": 0.0529, "step": 2510 }, { "grad_norm": 0.5329471826553345, "learning_rate": 3.302421683143279e-05, "loss": 0.0468, "step": 2520 }, { "grad_norm": 0.5289620757102966, "learning_rate": 3.2635987803326896e-05, "loss": 0.0429, "step": 2530 }, { "grad_norm": 0.6561762690544128, "learning_rate": 3.224894558238918e-05, "loss": 0.0553, "step": 2540 }, { "grad_norm": 0.6217294931411743, "learning_rate": 3.18631166224413e-05, "loss": 0.0641, "step": 2550 }, { "grad_norm": 0.6828274726867676, "learning_rate": 3.147852729438017e-05, "loss": 0.0508, "step": 2560 }, { "grad_norm": 0.5295973420143127, "learning_rate": 3.109520388437548e-05, "loss": 0.0487, "step": 2570 }, { "grad_norm": 0.6650675535202026, "learning_rate": 3.0713172592073116e-05, "loss": 0.0496, "step": 2580 }, { "grad_norm": 0.45036959648132324, "learning_rate": 3.0332459528804457e-05, "loss": 0.0539, "step": 2590 }, { "grad_norm": 0.599022388458252, "learning_rate": 2.9953090715801634e-05, "loss": 0.0474, "step": 2600 }, { "grad_norm": 0.45430809259414673, "learning_rate": 2.9575092082419086e-05, "loss": 0.0432, "step": 2610 }, { "grad_norm": 0.44728928804397583, "learning_rate": 2.9198489464361288e-05, "loss": 0.0482, "step": 2620 }, { "grad_norm": 0.5080529451370239, "learning_rate": 2.8823308601916948e-05, "loss": 0.0426, "step": 2630 }, { "grad_norm": 0.46774718165397644, "learning_rate": 2.8449575138199613e-05, "loss": 0.0386, "step": 2640 }, { "grad_norm": 0.46217596530914307, "learning_rate": 2.807731461739509e-05, "loss": 0.0503, "step": 2650 }, { "grad_norm": 0.4635554850101471, "learning_rate": 2.7706552483015485e-05, "loss": 0.0644, "step": 2660 }, { "grad_norm": 0.4335513710975647, "learning_rate": 2.733731407616018e-05, "loss": 0.052, "step": 2670 }, { "grad_norm": 0.5467087030410767, "learning_rate": 2.6969624633783806e-05, "loss": 0.0509, "step": 2680 }, { "grad_norm": 0.4775363802909851, "learning_rate": 2.660350928697134e-05, "loss": 0.0447, "step": 2690 }, { "grad_norm": 0.5609132647514343, "learning_rate": 2.6238993059220395e-05, "loss": 0.0549, "step": 2700 }, { "grad_norm": 0.43147605657577515, "learning_rate": 2.5876100864730933e-05, "loss": 0.0491, "step": 2710 }, { "grad_norm": 0.5352368354797363, "learning_rate": 2.5514857506702405e-05, "loss": 0.0471, "step": 2720 }, { "grad_norm": 0.5938369035720825, "learning_rate": 2.5155287675638474e-05, "loss": 0.0481, "step": 2730 }, { "grad_norm": 0.4620404839515686, "learning_rate": 2.4797415947659457e-05, "loss": 0.048, "step": 2740 }, { "grad_norm": 0.5113051533699036, "learning_rate": 2.4441266782822588e-05, "loss": 0.0382, "step": 2750 }, { "grad_norm": 0.5275664925575256, "learning_rate": 2.4086864523450183e-05, "loss": 0.0439, "step": 2760 }, { "grad_norm": 0.42744407057762146, "learning_rate": 2.3734233392465903e-05, "loss": 0.0437, "step": 2770 }, { "grad_norm": 0.45062416791915894, "learning_rate": 2.3383397491739145e-05, "loss": 0.0472, "step": 2780 }, { "grad_norm": 0.5648841857910156, "learning_rate": 2.3034380800437678e-05, "loss": 0.0402, "step": 2790 }, { "grad_norm": 0.558660089969635, "learning_rate": 2.2687207173388743e-05, "loss": 0.0461, "step": 2800 }, { "grad_norm": 0.6338772177696228, "learning_rate": 2.234190033944858e-05, "loss": 0.0458, "step": 2810 }, { "grad_norm": 0.5471325516700745, "learning_rate": 2.1998483899880596e-05, "loss": 0.0384, "step": 2820 }, { "grad_norm": 0.45335057377815247, "learning_rate": 2.1656981326742266e-05, "loss": 0.0444, "step": 2830 }, { "grad_norm": 0.45926952362060547, "learning_rate": 2.1317415961280824e-05, "loss": 0.0433, "step": 2840 }, { "grad_norm": 0.5187070369720459, "learning_rate": 2.097981101233794e-05, "loss": 0.0442, "step": 2850 }, { "grad_norm": 0.5245686173439026, "learning_rate": 2.0644189554763417e-05, "loss": 0.0443, "step": 2860 }, { "grad_norm": 0.4762183427810669, "learning_rate": 2.0310574527838072e-05, "loss": 0.0416, "step": 2870 }, { "grad_norm": 0.49203959107398987, "learning_rate": 1.9978988733705807e-05, "loss": 0.0412, "step": 2880 }, { "grad_norm": 0.4212130606174469, "learning_rate": 1.9649454835815202e-05, "loss": 0.0407, "step": 2890 }, { "grad_norm": 0.45020461082458496, "learning_rate": 1.932199535737045e-05, "loss": 0.045, "step": 2900 }, { "grad_norm": 0.5626744031906128, "learning_rate": 1.8996632679791914e-05, "loss": 0.0684, "step": 2910 }, { "grad_norm": 0.44808852672576904, "learning_rate": 1.8673389041186418e-05, "loss": 0.0438, "step": 2920 }, { "grad_norm": 0.45066726207733154, "learning_rate": 1.8352286534827274e-05, "loss": 0.0427, "step": 2930 }, { "grad_norm": 0.41621166467666626, "learning_rate": 1.803334710764426e-05, "loss": 0.0412, "step": 2940 }, { "grad_norm": 0.40537965297698975, "learning_rate": 1.7716592558723556e-05, "loss": 0.0406, "step": 2950 }, { "grad_norm": 0.42102864384651184, "learning_rate": 1.7402044537817824e-05, "loss": 0.0546, "step": 2960 }, { "grad_norm": 0.5081369280815125, "learning_rate": 1.7089724543866465e-05, "loss": 0.048, "step": 2970 }, { "grad_norm": 0.44765639305114746, "learning_rate": 1.6779653923526188e-05, "loss": 0.0386, "step": 2980 }, { "grad_norm": 0.3410813808441162, "learning_rate": 1.6471853869712023e-05, "loss": 0.0359, "step": 2990 }, { "grad_norm": 0.32567310333251953, "learning_rate": 1.6166345420148787e-05, "loss": 0.0491, "step": 3000 }, { "grad_norm": 0.48567184805870056, "learning_rate": 1.5863149455933158e-05, "loss": 0.0435, "step": 3010 }, { "grad_norm": 0.47623395919799805, "learning_rate": 1.5562286700106558e-05, "loss": 0.0537, "step": 3020 }, { "grad_norm": 0.40610748529434204, "learning_rate": 1.526377771623869e-05, "loss": 0.0405, "step": 3030 }, { "grad_norm": 0.38754338026046753, "learning_rate": 1.496764290702209e-05, "loss": 0.0356, "step": 3040 }, { "grad_norm": 0.4229458272457123, "learning_rate": 1.4673902512877585e-05, "loss": 0.0447, "step": 3050 }, { "grad_norm": 0.38902783393859863, "learning_rate": 1.438257661057093e-05, "loss": 0.0448, "step": 3060 }, { "grad_norm": 0.37241271138191223, "learning_rate": 1.4093685111840566e-05, "loss": 0.0513, "step": 3070 }, { "grad_norm": 0.48701003193855286, "learning_rate": 1.380724776203668e-05, "loss": 0.0446, "step": 3080 }, { "grad_norm": 0.4198077917098999, "learning_rate": 1.3523284138771642e-05, "loss": 0.0446, "step": 3090 }, { "grad_norm": 0.37080636620521545, "learning_rate": 1.3241813650581902e-05, "loss": 0.0455, "step": 3100 }, { "grad_norm": 0.40539631247520447, "learning_rate": 1.2962855535601438e-05, "loss": 0.0504, "step": 3110 }, { "grad_norm": 0.34716448187828064, "learning_rate": 1.2686428860246852e-05, "loss": 0.0371, "step": 3120 }, { "grad_norm": 0.41595959663391113, "learning_rate": 1.241255251791421e-05, "loss": 0.0458, "step": 3130 }, { "grad_norm": 0.3998359739780426, "learning_rate": 1.2141245227687731e-05, "loss": 0.0443, "step": 3140 }, { "grad_norm": 0.34545400738716125, "learning_rate": 1.1872525533060269e-05, "loss": 0.0436, "step": 3150 }, { "grad_norm": 0.4052163064479828, "learning_rate": 1.1606411800666028e-05, "loss": 0.0388, "step": 3160 }, { "grad_norm": 0.3553888499736786, "learning_rate": 1.134292221902511e-05, "loss": 0.0454, "step": 3170 }, { "grad_norm": 0.4161509871482849, "learning_rate": 1.1082074797300413e-05, "loss": 0.0406, "step": 3180 }, { "grad_norm": 0.41217291355133057, "learning_rate": 1.0823887364066737e-05, "loss": 0.0448, "step": 3190 }, { "grad_norm": 0.4243583083152771, "learning_rate": 1.0568377566092164e-05, "loss": 0.0504, "step": 3200 } ], "logging_steps": 10, "max_steps": 4000, "num_input_tokens_seen": 0, "num_train_epochs": 9223372036854775807, "save_steps": 3200, "stateful_callbacks": { "TrainerControl": { "args": { "should_epoch_stop": false, "should_evaluate": false, "should_log": false, "should_save": true, "should_training_stop": false }, "attributes": {} } }, "total_flos": 0.0, "train_batch_size": 32, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:69cfbbd6ade3a8b71886854882019398ead683d700b932864813ebbd361eea56size 8017123456789101112131415161718192021{ "task": "a7v4p", "frames": 24241, "source": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/policies-20261109/models/groot-n17-base", "recipe": "full fine-tune (tune_llm, tune_visual, projector, diffusion, vlln), fixed steps, 2 nodes x 8 x 32, no accumulation", "per_gpu_batch": 32, "gradient_accumulation_steps": 1, "num_nodes": 2, "world_size": 16, "global_batch": 512, "max_steps": 4000, "learning_rate": 0.0001, "warmup_ratio": 0.05, "lr_schedule": "linear warmup 5 %, cosine to 0", "save_steps": 3200, "save_list": [ 3200, 4000 ], "epochs_equivalent": 84.48}1{"project": "finetune-gr00t-n1d7", "run_id": "production"}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960"""Put the full gated nvidia/Cosmos-Reason2-2B (pinned 9ce19a1) into the shared HF hub cache $G/hf-home/hub.
GR00T N1.7 builds its backbone with Qwen3VLForConditionalGeneration.from_pretrained("nvidia/Cosmos-Reason2-2B") andits processor with Qwen3VLProcessor.from_pretrained(same name) before loading the GR00T checkpoint, so every node needsthe whole repo resolvable by name. groot_node.sh runs with HF_HUB_OFFLINE=1, so nodes read this cache and never needthe token. refs/main is pinned to the verified revision.
Usage (token from stdin, kept in-process only): $G/envs/groot-py312/bin/python cache_cosmos_reason2.py $G/hf-home/hub < /root/.hb-secrets/hf_token"""import hashlibimport jsonimport osimport sysimport time
from huggingface_hub import HfApi, snapshot_download
REPO = "nvidia/Cosmos-Reason2-2B"REV = "9ce19a195e423419c349abfc86fd07178b230561"cache = os.path.abspath(sys.argv[1])token = sys.stdin.readline().strip()if not token.startswith("hf_"): raise SystemExit("token format rejected")api = HfApi(endpoint="https://huggingface.co", token=token)info = api.model_info(REPO, revision=REV, files_metadata=True)assert info.sha == REV, info.shat0 = time.monotonic()for attempt in range(1, 21): try: path = snapshot_download(REPO, revision=REV, cache_dir=cache, token=token, max_workers=8) break except Exception as error: # transient stalls if any(k in str(error).lower() for k in ("gated", "401", "403")): raise print(f"retry {attempt}: {type(error).__name__}: {str(error)[:200]}", flush=True) time.sleep(10)else: raise SystemExit("download did not finish")token = Nonecount, size = 0, 0for s in info.siblings: f = os.path.join(path, s.rfilename) assert os.path.isfile(f), s.rfilename if s.size is not None: assert os.path.getsize(f) == s.size, s.rfilename if s.lfs is not None: h = hashlib.sha256() with open(f, "rb") as stream: for chunk in iter(lambda: stream.read(1 << 22), b""): h.update(chunk) assert h.hexdigest() == s.lfs.sha256, s.rfilename count += 1 size += s.size or 0refs = os.path.join(cache, "models--" + REPO.replace("/", "--"), "refs")os.makedirs(refs, exist_ok=True)with open(os.path.join(refs, "main"), "w") as f: f.write(REV)print("CACHE_OK", json.dumps({"repo": REPO, "revision": REV, "snapshot": path, "files": count, "bytes": size, "seconds": round(time.monotonic() - t0, 1)}), flush=True)1234567891011121314151617181920212223242526"""CPU check that GR00T's Cosmos-Reason2-2B pieces load offline from $G/hf-home exactly as groot_node.sh will.
Usage: HF_HOME=$G/hf-home HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 $G/envs/groot-py312/bin/python check_reason2_offline.py"""import jsonimport osimport sysfrom pathlib import Path
import torch
sys.path.insert(0, str(Path(__file__).resolve().parent))import hb_offline_fix # noqa: E402,F401from transformers import AutoConfig, Qwen3VLForConditionalGeneration, Qwen3VLProcessor
assert os.environ.get("HF_HUB_OFFLINE") == "1", "run with HF_HUB_OFFLINE=1"name = "nvidia/Cosmos-Reason2-2B"torch.set_num_threads(8)proc = Qwen3VLProcessor.from_pretrained(name, trust_remote_code=True)cfg = AutoConfig.from_pretrained(name, trust_remote_code=True)ids = proc.tokenizer("pick up the trash and drop it in the bin")["input_ids"]model = Qwen3VLForConditionalGeneration.from_pretrained(name, torch_dtype=torch.bfloat16)n = sum(p.numel() for p in model.parameters())print("REASON2_OFFLINE_OK", json.dumps({"processor": type(proc).__name__, "tokens": len(ids), "model_type": cfg.model_type, "params_M": round(n / 1e6, 1), "llm_layers": len(model.model.language_model.layers)}), flush=True)123456789101112131415161718192021222324252627"""G1 feedback76 / H16 GR00T modality config (copy of HumanWAM configs/humanwam/groot/feedback76_h16.py @ c76527b).
The matching modality.json is generated per dataset from the recorded joint names (prepare_groot_data.py);HumanWAM's feedback76_modality.json has right_arm at observation.state[29:36] (left-hand fingers), which is wrongfor our G1 exports (right arm is [22:29])."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
feedback76_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["ego_view", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["motion_token", "left_hand_joints", "right_hand_joints"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(feedback76_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324"""G1 joint47 / H40 stride-2 GR00T modality config (2026-11-18 user: joint-angle action experiment, aligned withHumanWAM joint47 v2): action rows at source offsets 0,2,...,78 of body29 | Inspire left6 | right6 | root rotation6D(current-heading relative, hb_j47.py). State44 and cameras as feedback76."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
g1_joint47_h40 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["ego_view", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(0, 80, 2)), modality_keys=["body29", "left_hand_target", "right_hand_target", "root_rot6d"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(4)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(g1_joint47_h40, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139"""Per-node GR00T relay: per-layout batch-size probe (largest that fits), then 20-epoch production per task.
Run on every node (nohup), node rank from the DLC env RANK: python groot_chain.py [task ...]Default tasks: b6 a3 a7 a18 (basket postponed). A phase succeeds only if all 4 node launchers exit 0.
Batch (user rule: as large as memory allows, 2026-11-10): descending CANDIDATES, 4 steps each on all 32 GPUs; acandidate fits when all launchers exit 0 AND the peak reserved memory of every rank (written by hb_launch.py tologs/peak-<phase>-rank<r>.json) is <= MAX_FRAC of the GPU. Node 0 alone judges each probe and writes a verdict filethe other nodes wait for, so all nodes take the same decision. One decision per robot layout (g1 / h2).Outputs: $G/groot-runs-bmax/ (the earlier per-GPU-64 runs stay in $G/groot-runs/)."""import fcntlimport jsonimport mathimport osimport shutilimport subprocessimport sysimport timefrom pathlib import Path
H = Path(__file__).resolve().parentG = H.parentRUNS = G / os.environ.get("HB_GROOT_RUNS_NAME", "groot-runs-bmax")NODE = int(os.environ["RANK"])TASKS = sys.argv[1:] or ["b6", "a3", "a7", "a18"] # basket postponed (user plan 2026-11-10)CANDIDATES = [320, 288, 256, 224, 192, 160, 128, 96, 64, 48, 32]MAX_FRAC = 0.92EPOCHS = 20PORT_BASE = int(os.environ.get("HB_GROOT_PORT_BASE", "32500")) # probe PORT_BASE+i, production PORT_BASE+50+kRUNS.mkdir(parents=True, exist_ok=True)os.environ["HB_GROOT_RUNS"] = str(RUNS) # read by groot_node.shlock = (RUNS / f"chain-node-{NODE}.lock").open("a")fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
def log(msg): line = f"{time.strftime('%Y-%m-%d %H:%M:%S')} node{NODE} {msg}" print(line, flush=True) with (RUNS / f"chain-node-{NODE}.log").open("a") as f: f.write(line + "\n")
def run_phase(task, phase, bs, steps, save, port): logs = RUNS / task / "logs" exits = [logs / f"{phase}-node-{r}.exit" for r in range(4)] if all(p.is_file() for p in exits): return all(p.read_text().strip() == "0" for p in exits) subprocess.run(["bash", str(H / "groot_node.sh"), task, phase, str(bs), str(steps), str(save), str(port)]) deadline = time.monotonic() + 600 while not all(p.is_file() for p in exits): if time.monotonic() > deadline: log(f"{task}/{phase}: timed out waiting for peer exit files") return False time.sleep(5) ok = all(p.read_text().strip() == "0" for p in exits) log(f"{task}/{phase}: bs={bs} steps={steps} -> {'OK' if ok else 'FAIL'}") return ok
def peak_frac(task, phase): """Max over ranks of peak reserved / total; None when no rank reported.""" fracs = [] for f in (RUNS / task / "logs").glob(f"peak-{phase}-rank*.json"): try: d = json.loads(f.read_text()) fracs.append(d["peak_reserved_gb"] / d["total_gb"]) except (ValueError, KeyError, OSError): continue return (max(fracs), len(fracs)) if fracs else (None, 0)
def probe_verdict(task, cand, port): phase = f"probe-bs{cand}" verdict = RUNS / task / "logs" / f"{phase}.verdict.json" ok = run_phase(task, phase, cand, 4, 1000000, port) if NODE == 0 and not verdict.is_file(): time.sleep(10) # let peak files from the other nodes become visible on NAS frac, n = peak_frac(task, phase) if ok else (None, 0) fits = bool(ok and frac is not None and frac <= MAX_FRAC) verdict.write_text(json.dumps({"per_gpu_batch": cand, "ran_ok": ok, "peak_frac": frac, "ranks_reported": n, "max_frac": MAX_FRAC, "fits": fits}) + "\n") deadline = time.monotonic() + 600 while not verdict.is_file(): if time.monotonic() > deadline: log(f"{task}/{phase}: no verdict from node 0") return False time.sleep(5) v = json.loads(verdict.read_text()) log(f"{task}/{phase}: verdict {v}") return v["fits"]
def prune_resume_state(out): """Keep weights of every checkpoint but resume state (DeepSpeed optimizer shards, scheduler, RNG) only in the latest.""" ckpts = sorted((p for p in out.glob("checkpoint-*") if p.name.split("-")[-1].isdigit()), key=lambda p: int(p.name.split("-")[-1])) for c in ckpts[:-1]: for p in list(c.glob("global_step*")) + list(c.glob("optimizer*.pt")) + list(c.glob("scheduler.pt")) \ + list(c.glob("rng_state*.pth")) + list(c.glob("latest")) + list(c.glob("zero_to_fp32.py")): if p.is_dir(): shutil.rmtree(p, ignore_errors=True) else: p.unlink(missing_ok=True) log(f"{c.name}: resume state dropped (weights kept)")
def batch_for(task): layout = "h2" if task in ("a17", "a18") else "g1" decision = RUNS / f"batch-decision-{layout}.json" if decision.is_file(): return json.loads(decision.read_text())["per_gpu_batch"] for i, cand in enumerate(CANDIDATES): if probe_verdict(task, cand, PORT_BASE + i + (20 if layout == "h2" else 0)): if NODE == 0: decision.write_text(json.dumps({"per_gpu_batch": cand, "global_batch": cand * 32, "probe_task": task, "layout": layout, "candidates": CANDIDATES, "max_frac": MAX_FRAC}) + "\n") return cand time.sleep(20) log(f"{layout}: no batch size fit; stopping") sys.exit(1)
for k, task in enumerate(TASKS): bs = batch_for(task) log(f"{task}: per-GPU batch {bs} (global {bs * 32})") receipt = json.loads((G / "groot-data" / task / "hb-dataset-receipt.json").read_text()) steps = math.ceil(EPOCHS * receipt["frames"] / (bs * 32)) save = math.ceil(steps / 2) if not run_phase(task, "production", bs, steps, save, PORT_BASE + 50 + k): log(f"{task}: production failed; stopping chain") sys.exit(1) if NODE == 0: prune_resume_state(RUNS / task / "production") (RUNS / task / "production-complete.json").write_text(json.dumps( {"task": task, "frames": receipt["frames"], "epochs": EPOCHS, "per_gpu_batch": bs, "global_batch": bs * 32, "max_steps": steps, "save_steps": save}) + "\n")log("all tasks done")123456789101112131415161718192021222324"""A18 H2 (Sharpa hands) GR00T modality config, same protocol as the A18 Delta-flow run(schema a18-h2-sharpa-body31-hand44-state78-chunk16-v1): cameras head+chest, state = 75 joints + projectedgravity, action = action.body_target (31) + action.hands (44), horizon 16, absolute targets."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2_body31_hand44_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["body_target", "left_hand_target", "right_hand_target"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2_body31_hand44_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324"""2026-11-15 user: action horizon 32 copy of h2_body31_hand44_h16.py. A18 H2 (Sharpa hands) GR00T modality config, same protocol as the A18 Delta-flow run(schema a18-h2-sharpa-body31-hand44-state78-chunk16-v1): cameras head+chest, state = 75 joints + projectedgravity, action = action.body_target (31) + action.hands (44), horizon 16, absolute targets."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2_body31_hand44_h32 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(32)), modality_keys=["body_target", "left_hand_target", "right_hand_target"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2_body31_hand44_h32, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)12345678910111213141516171819202122232425"""A14 v2 H2 (Sharpa hands) GR00T modality config (H2 training guide hb_training/docs/h2/a14_training_guide.md 4.1):cameras head + chest, state78 = 75 joints + projected gravity, action82 = action.body_target (31) + action.hands (44)+ action.planner (7, the SONIC planner command), horizon 16, absolute targets. Identical to h2_body31_hand44_h16.pyexcept the added `planner` action modality."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2_body31_hand44_planner7_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["body_target", "left_hand_target", "right_hand_target", "planner"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(4)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2_body31_hand44_planner7_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324"""A14 H2 (Sharpa hands) GR00T modality config with THREE cameras head + chest + wrist (user 2026-11-12; the third-person camera is never a model input). Otherwise identical to h2_body31_hand44_h16.py:, same protocol as the A18 Delta-flow run(schema a18-h2-sharpa-body31-hand44-state78-chunk16-v1): cameras head+chest, state = 75 joints + projectedgravity, action = action.body_target (31) + action.hands (44), horizon 16, absolute targets."""from gr00t.configs.data.embodiment_configs import register_modality_configfrom gr00t.data.embodiment_tags import EmbodimentTagfrom gr00t.data.types import ActionConfig, ActionFormat, ActionRepresentation, ActionType, ModalityConfig
h2w3_body31_hand44_h16 = { "video": ModalityConfig(delta_indices=[0], modality_keys=["head", "chest", "wrist"]), "state": ModalityConfig( delta_indices=[0], modality_keys=["left_leg", "right_leg", "waist", "left_arm", "right_arm", "head", "left_hand", "right_hand", "projected_gravity"], ), "action": ModalityConfig( delta_indices=list(range(16)), modality_keys=["body_target", "left_hand_target", "right_hand_target"], action_configs=[ActionConfig(rep=ActionRepresentation.ABSOLUTE, type=ActionType.NON_EEF, format=ActionFormat.DEFAULT) for _ in range(3)], ), "language": ModalityConfig(delta_indices=[0], modality_keys=["annotation.human.task_description"]),}
register_modality_config(h2w3_body31_hand44_h16, embodiment_tag=EmbodimentTag.NEW_EMBODIMENT)123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163"""Humanoid Benchmark data augmentation v2 (project CLAUDE.md), model-agnostic torch implementation.
augment(x, rng, obs_mask=None) takes x: float [T, V, 3, H, W] in [0, 1] (T frames, V cameras) and returns theaugmented tensor. Each call is one training sample: one of the 15 effects is chosen uniformly and its magnitudeis scaled by 1.5 around identity; the rest stay at x1. Colour is shared across cameras and time; geometry, lightpatches and white balance are drawn per camera and fixed over time; sensor/optics effects (noise, gaussian blur,JPEG, motion blur, sharpen, defocus) apply only to observation frames (obs_mask True).Pixel-size parameters are defined at 224 px and scaled by H / 224.perturb_joints(q, rng) applies the proprio spec: per-joint bias +-2 deg plus N(0, 0.25 deg) clipped at 3 sigma."""import ioimport math
import numpy as npimport torchimport torch.nn.functional as Ffrom PIL import Imagefrom torchvision.transforms import InterpolationModefrom torchvision.transforms import functional as TF
EFFECTS = ("exposure", "contrast", "saturation", "hue", "gamma", "temperature", "rotation_crop", "noise", "gaussian_blur", "jpeg", "motion_blur", "sharpen", "defocus", "light_shadow", "wb_channel")CENTER = {"exposure": 0.0, "contrast": 1.0, "saturation": 1.0, "hue": 0.0, "gamma": 1.0, "temperature": 0.0}RANGE = {"exposure": (-0.22, 0.22), "contrast": (0.88, 1.12), "saturation": (0.76, 1.24), "hue": (-0.015, 0.015), "gamma": (0.89, 1.11), "temperature": (-0.066, 0.066)}VERSION = "hb-aug-v2-20261109"
def sample(rng, views, height): boost = EFFECTS[int(rng.integers(len(EFFECTS)))]
def k(name): return 1.5 if boost == name else 1.0
px = height / 224.0 p = {"boost": boost} for name, (a, b) in RANGE.items(): c = CENTER[name] p[name] = float(rng.uniform(c + k(name) * (a - c), c + k(name) * (b - c))) p["geometry"] = [] for _ in range(views): angle = float(rng.uniform(-1.5 * k("rotation_crop"), 1.5 * k("rotation_crop"))) p["geometry"].append((angle, 1.0 + abs(angle) * 0.015 + float(rng.uniform(0, 0.02 * k("rotation_crop"))))) p["noise"] = 4.0 / 255.0 * k("noise") if rng.random() < 0.5 else 0.0 p["gaussian_blur"] = float(rng.uniform(0.25, 0.65)) * k("gaussian_blur") if rng.random() < 0.15 else 0.0 if rng.random() < 0.35: lo = int(round(100 - k("jpeg") * 30)) hi = int(round(100 - k("jpeg") * 5)) p["jpeg"] = int(rng.integers(lo, hi + 1)) else: p["jpeg"] = None p["motion_blur"] = ((float(rng.uniform(3, 7)) * k("motion_blur") * px, float(rng.uniform(0, 180))) if rng.random() < 0.15 else None) p["sharpen"] = float(rng.uniform(0.2, 0.6)) * k("sharpen") if rng.random() < 0.15 else 0.0 p["defocus"] = float(rng.uniform(1, 2)) * k("defocus") * px if rng.random() < 0.10 else 0.0 if rng.random() < 0.30: g = 0.30 * k("light_shadow") p["light_shadow"] = [[(float(rng.uniform(0.1, 0.9)), float(rng.uniform(0.1, 0.9)), float(rng.uniform(0.15, 0.35)), float(rng.uniform(1 - g, 1 + g))) for _ in range(int(rng.integers(1, 3)))] for _ in range(views)] else: p["light_shadow"] = None if rng.random() < 0.30: g = 0.10 * k("wb_channel") gains = [] for _ in range(views): row = [1.0, 1.0, 1.0] row[int(rng.integers(0, 3))] = float(rng.uniform(1 - g, 1 + g)) gains.append(row) p["wb_channel"] = gains else: p["wb_channel"] = None return p
def _conv(x, kernel): n, c, h, w = x.shape k = kernel.to(x)[None, None].repeat(c, 1, 1, 1) pad = kernel.shape[-1] // 2 return F.conv2d(F.pad(x, (pad, pad, pad, pad), mode="reflect"), k, groups=c)
def motion_kernel(length, angle_deg): size = max(3, int(round(length)) | 1) k = torch.zeros(size, size) c = size // 2 th = math.radians(angle_deg) for s in np.linspace(-(length - 1) / 2, (length - 1) / 2, 8 * size): k[int(round(c - s * math.sin(th))), int(round(c + s * math.cos(th)))] = 1.0 return k / k.sum()
def disk_kernel(r): size = 2 * int(math.ceil(r)) + 1 c = size // 2 yy, xx = torch.meshgrid(torch.arange(size), torch.arange(size), indexing="ij") k = (((yy - c) ** 2 + (xx - c) ** 2) <= (r + 0.5) ** 2).float() return k / k.sum()
def apply(x, p, obs_mask=None, noise_seed=0): t, v, c, h, w = x.shape x = x.clone().clamp(0, 1) for vi, (angle, scale) in enumerate(p["geometry"]): x[:, vi] = TF.affine(x[:, vi], angle=angle, translate=[0, 0], scale=scale, shear=[0, 0], interpolation=InterpolationMode.BILINEAR) if p["light_shadow"] is not None: yy, xx = torch.meshgrid(torch.linspace(0, 1, h), torch.linspace(0, 1, w), indexing="ij") for vi, blobs in enumerate(p["light_shadow"]): m = torch.ones(h, w) for cx, cy, s, g in blobs: m = m + (g - 1.0) * torch.exp(-((xx - cx) ** 2 + (yy - cy) ** 2) / (2 * s * s)) x[:, vi] = (x[:, vi] * m.clamp(min=0).to(x)).clamp(0, 1) if p["wb_channel"] is not None: for vi, g in enumerate(p["wb_channel"]): x[:, vi] = (x[:, vi] * torch.tensor(g, dtype=x.dtype).view(1, 3, 1, 1)).clamp(0, 1) y = x.reshape(t * v, c, h, w) y = (y * float(2.0 ** p["exposure"])).clamp(0, 1) d = p["temperature"] y = (y * y.new_tensor([1.0 + d, 1.0, 1.0 - d]).view(1, 3, 1, 1)).clamp(0, 1) y = ((y - 0.5) * p["contrast"] + 0.5).clamp(0, 1) y = TF.adjust_saturation(y, p["saturation"]) y = TF.adjust_hue(y, p["hue"]) y = y.clamp(0, 1).pow(p["gamma"]) x = y.reshape(t, v, c, h, w) mask = torch.ones(t, dtype=torch.bool) if obs_mask is None else torch.as_tensor(obs_mask, dtype=torch.bool) if bool(mask.any()): o = x[mask].reshape(-1, c, h, w) if p["gaussian_blur"] > 0: o = TF.gaussian_blur(o, [3, 3], [p["gaussian_blur"]] * 2) if p["motion_blur"] is not None: o = _conv(o, motion_kernel(*p["motion_blur"])) if p["defocus"] > 0: o = _conv(o, disk_kernel(p["defocus"])) if p["sharpen"] > 0: o = o + p["sharpen"] * (o - TF.gaussian_blur(o, [5, 5], [1.0, 1.0])) o = o.clamp(0, 1) if p["noise"] > 0: gen = torch.Generator().manual_seed(int(noise_seed)) o = (o + torch.randn(o.shape, generator=gen, dtype=o.dtype) * p["noise"]).clamp(0, 1) if p["jpeg"] is not None: for i in range(o.shape[0]): buf = io.BytesIO() TF.to_pil_image(o[i]).save(buf, format="JPEG", quality=int(p["jpeg"])) buf.seek(0) with Image.open(buf) as im: o[i] = TF.pil_to_tensor(im.convert("RGB")).to(o.dtype).div(255.0) x[mask] = o.reshape(-1, v, c, h, w) return x.clamp(0, 1)
def augment(x, rng, obs_mask=None): p = sample(rng, x.shape[1], x.shape[-2]) return apply(x, p, obs_mask, noise_seed=int(rng.integers(0, 2 ** 62))), p
def perturb_joints(q, rng): q = np.asarray(q, dtype=np.float64) d = q.shape[-1] bias = rng.uniform(-math.radians(2.0), math.radians(2.0), size=d) sigma = math.radians(0.25) noise = np.clip(rng.normal(0.0, sigma, size=q.shape), -3 * sigma, 3 * sigma) return (q + bias + noise).astype(np.float32)a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/cache_cosmos_reason2.pyAdded+60
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/check_reason2_offline.pyAdded+26
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/g1_feedback76_h16.pyAdded+27
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/g1_joint47_h40.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/groot_chain.pyAdded+139
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_aug_v2.pyAdded+163
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_inloop_eval.pyAdded+347
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_j47.pyAdded+39
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch.pyAdded+121
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch_v.pyAdded+102
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/hb_offline_fix.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_data.pyAdded+212
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_j47.pyAdded+127
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/upload_groot_j47.pyAdded+66
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/verify_groot_cpu.pyAdded+57
a7-cabinet-close-v4/b512-trim3f/step-003200/code/hb_groot/verify_j47_cpu.pyAdded+59
a7-cabinet-close-v4/b512-trim3f/step-003200/config.jsonAdded+90
a7-cabinet-close-v4/b512-trim3f/step-003200/dataset_meta/hb-dataset-receipt.jsonAdded+45
a7-cabinet-close-v4/b512-trim3f/step-003200/dataset_meta/modality.jsonAdded+74
a7-cabinet-close-v4/b512-trim3f/step-003200/embodiment_id.jsonAdded+57
a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/conf.yamlAdded+234
a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/config.yamlAdded+232
a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/dataset_statistics.jsonAdded+883
a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/final_model_config.jsonAdded+58
a7-cabinet-close-v4/b512-trim3f/step-003200/experiment_cfg/final_processor_config.jsonAdded
a7-cabinet-close-v4/b512-trim3f/step-003200/model-00001-of-00002.safetensorsAdded+3
a7-cabinet-close-v4/b512-trim3f/step-003200/model-00002-of-00002.safetensorsAdded+3
a7-cabinet-close-v4/b512-trim3f/step-003200/model.safetensors.index.jsonAdded
a7-cabinet-close-v4/b512-trim3f/step-003200/processor_config.jsonAdded+1137
a7-cabinet-close-v4/b512-trim3f/step-003200/protocol.jsonAdded+104
a7-cabinet-close-v4/b512-trim3f/step-003200/statistics.jsonAdded
a7-cabinet-close-v4/b512-trim3f/step-003200/train.logAdded
a7-cabinet-close-v4/b512-trim3f/step-003200/trainer_state.jsonAdded+1954
a7-cabinet-close-v4/b512-trim3f/step-003200/training_args.binAdded+3
a7-cabinet-close-v4/b512-trim3f/step-003200/training_plan.jsonAdded+21
a7-cabinet-close-v4/b512-trim3f/step-003200/wandb_config.jsonAdded+1
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/cache_cosmos_reason2.pyAdded+60
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/check_reason2_offline.pyAdded+26
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/g1_feedback76_h16.pyAdded+27
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/g1_joint47_h40.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/groot_chain.pyAdded+139
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
a7-cabinet-close-v4/b512-trim3f/step-004000/code/hb_groot/hb_aug_v2.pyAdded+163