a3v4p: 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)
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/cache_cosmos_reason2.pyAdded+60
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/check_reason2_offline.pyAdded+26
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/g1_feedback76_h16.pyAdded+27
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/g1_joint47_h40.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/groot_chain.pyAdded+139
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_aug_v2.pyAdded+163
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_inloop_eval.pyAdded+347
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_j47.pyAdded+39
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch.pyAdded+121
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch_v.pyAdded+102
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_offline_fix.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_data.pyAdded+212
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_j47.pyAdded+127
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/upload_groot_j47.pyAdded+66
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/verify_groot_cpu.pyAdded+57
- a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/verify_j47_cpu.pyAdded+59
- a3-fridge-open-v4/b512-trim3f/step-003200/config.jsonAdded+90
- a3-fridge-open-v4/b512-trim3f/step-003200/dataset_meta/hb-dataset-receipt.jsonAdded+45
- a3-fridge-open-v4/b512-trim3f/step-003200/dataset_meta/modality.jsonAdded+74
- a3-fridge-open-v4/b512-trim3f/step-003200/embodiment_id.jsonAdded+57
- a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/conf.yamlAdded+234
- a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/config.yamlAdded+232
- a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/dataset_statistics.jsonAdded+883
- a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/final_model_config.jsonAdded+58
- a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/final_processor_config.jsonAdded
- a3-fridge-open-v4/b512-trim3f/step-003200/model-00001-of-00002.safetensorsAdded+3
- a3-fridge-open-v4/b512-trim3f/step-003200/model-00002-of-00002.safetensorsAdded+3
- a3-fridge-open-v4/b512-trim3f/step-003200/model.safetensors.index.jsonAdded
- a3-fridge-open-v4/b512-trim3f/step-003200/processor_config.jsonAdded+1137
- a3-fridge-open-v4/b512-trim3f/step-003200/protocol.jsonAdded+104
- a3-fridge-open-v4/b512-trim3f/step-003200/statistics.jsonAdded
- a3-fridge-open-v4/b512-trim3f/step-003200/train.logAdded
- a3-fridge-open-v4/b512-trim3f/step-003200/trainer_state.jsonAdded+1954
- a3-fridge-open-v4/b512-trim3f/step-003200/training_args.binAdded+3
- a3-fridge-open-v4/b512-trim3f/step-003200/training_plan.jsonAdded+21
- a3-fridge-open-v4/b512-trim3f/step-003200/wandb_config.jsonAdded+1
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/cache_cosmos_reason2.pyAdded+60
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/check_reason2_offline.pyAdded+26
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/g1_feedback76_h16.pyAdded+27
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/g1_joint47_h40.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/groot_chain.pyAdded+139
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
- a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
- a3-fridge-open-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": "a3v4p", "source": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a3-fridge-open-v4p-fe89f5b/data", "episodes": 125, "frames": 35073, "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": "c541366a4d5d97753461051b7c97457be1da501ce1480facc7a3fb7af64fe62f"}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/a3v4p 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/a3v4p/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/a3v4p 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/a3v4p/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.47930213809013367, -0.10382170975208282, -0.1682608425617218, 0.06449195742607117, -0.4966750741004944, -0.11832975596189499 ], "max": [ 0.28977471590042114, 0.25390270352363586, 0.5948256254196167, 1.1495612859725952, 0.3642428517341614, 0.12349041551351547 ], "mean": [ -0.02474881522357464, 0.06077972427010536, 0.1488378643989563, 0.2735675871372223, -0.17818762362003326, -0.011736040934920311 ], "std": [ 0.13139531016349792, 0.046182382851839066, 0.11092108488082886, 0.17127513885498047, 0.11002320051193237, 0.04242974892258644 ], "q01": [ -0.3650780749320984, -0.05470295146107673, -0.02699091203510761, 0.134794704914093, -0.4102145218849182, -0.08169250547885895 ], "q99": [ 0.21709216237068168, 0.1598088145256041, 0.4592941749095917, 0.9930131220817565, 0.1360168194770812, 0.09729606449604034 ] }, "right_leg": { "min": [ -0.5181117653846741, -0.26178795099258423, -0.7301541566848755, 0.09125849604606628, -0.4970293641090393, -0.21486489474773407 ], "max": [ 0.20802396535873413, 0.09352660924196243, 0.09240955859422684, 1.134680986404419, 0.19441936910152435, 0.15764959156513214 ], "mean": [ -0.11566109955310822, -0.05841594561934471, -0.2295989692211151, 0.28920066356658936, -0.11757871508598328, -0.026941414922475815 ], "std": [ 0.11113815754652023, 0.0507587194442749, 0.10265751928091049, 0.16870266199111938, 0.09617728739976883, 0.04372891038656235 ], "q01": [ -0.4097143304347992, -0.21023851573467253, -0.5294949340820312, 0.14969354510307312, -0.3663373363018036, -0.1360355770587921 ], "q99": [ 0.10485250830650306, 0.03705693498253821, -0.04528599083423618, 1.0167219161987304, 0.07313011437654476, 0.08235033601522439 ] }, "waist": { "min": [ -0.19355493783950806, -0.22218972444534302, -0.061377380043268204 ], "max": [ 0.07021288573741913, 0.09260094910860062, 0.08884496241807938 ], "mean": [ -0.02988840453326702, -0.023509884253144264, 0.020846864208579063 ], "std": [ 0.04236866906285286, 0.03466241434216499, 0.015846258029341698 ], "q01": [ -0.1586446511745453, -0.1586277687549591, -0.015841247364878654 ], "q99": [ 0.03454671815037726, 0.04515043526887891, 0.06017082020640371 ] }, "left_arm": { "min": [ 0.11741440743207932, -0.10188108682632446, -0.10713779181241989, -0.36027491092681885, -0.10971848666667938, -0.10633698850870132, -0.2523418068885803 ], "max": [ 0.35214513540267944, 0.22489133477210999, 0.23734787106513977, -0.10157366842031479, 0.132419154047966, 0.09598184376955032, 0.07618709653615952 ], "mean": [ 0.2111087143421173, 0.14400845766067505, 0.031214645132422447, -0.22322234511375427, -0.006814543157815933, 0.024515891447663307, -0.04401550814509392 ], "std": [ 0.034105490893125534, 0.030522935092449188, 0.03395329415798187, 0.04013945162296295, 0.027176177129149437, 0.021542752161622047, 0.03566884249448776 ], "q01": [ 0.1418801563978195, 0.051545052975416186, -0.04486845880746841, -0.3178799867630005, -0.06768872082233429, -0.029855739772319794, -0.15816352128982544 ], "q99": [ 0.3099769628047943, 0.2084528601169586, 0.1413176727294915, -0.15145400881767274, 0.06406472474336623, 0.07417478978633878, 0.03915537625551222 ] }, "right_arm": { "min": [ -0.8411638140678406, -0.8251932263374329, -1.3970218896865845, -0.8241931796073914, -0.022155020385980606, -0.9224531650543213, -0.3615148663520813 ], "max": [ 1.6890711784362793, 0.16134093701839447, 0.44013461470603943, 1.0242727994918823, 0.7510392069816589, 0.5082058906555176, 0.6206473708152771 ], "mean": [ 0.2411588430404663, -0.14529310166835785, -0.16639788448810577, -0.3225136995315552, 0.20188911259174347, -0.05021575093269348, 0.013557366095483303 ], "std": [ 0.28778064250946045, 0.10600748658180237, 0.27823370695114136, 0.1939719021320343, 0.1547238528728485, 0.1651269793510437, 0.0965685173869133 ], "q01": [ -0.47319605588912966, -0.5183522081375121, -1.0617227745056153, -0.699490110874176, -0.010514799505472183, -0.7305329847335815, -0.20633589029312133 ], "q99": [ 0.980162944793701, 0.12038828641176222, 0.1972732591629028, 0.2994692301750178, 0.5390123057365417, 0.22422111272811843, 0.3815105426311492 ] }, "left_hand": { "min": [ 0.9708347320556641, 0.9997726678848267, 0.9997227191925049, 0.9997877478599548, 0.9995542764663696, 0.0 ], "max": [ 1.0, 1.0, 1.0, 1.0, 1.0, 0.0 ], "mean": [ 0.9999656677246094, 0.9999974370002747, 0.9999961853027344, 0.9999967813491821, 0.9999991059303284, 0.0 ], "std": [ 0.0006063997861699237, 5.444373501658278e-05, 6.37385530333474e-05, 5.9533431494149724e-05, 3.9138377146740105e-05, 0.0 ], "q01": [ 0.9996291399002075, 0.9998853206634521, 0.9998672437667847, 0.999878466129303, 0.9998160982131958, 0.0 ], "q99": [ 1.0, 1.0, 1.0, 0.9999999403953552, 1.0, 0.0 ] }, "right_hand": { "min": [ 0.4219241440296173, 0.4155133366584778, 0.37505996227264404, 0.33092063665390015, 0.4088923931121826, 0.0 ], "max": [ 1.0, 1.0, 1.0, 1.0, 1.0, 0.026209507137537003 ], "mean": [ 0.8402009010314941, 0.8423101902008057, 0.8466323018074036, 0.8531510233879089, 0.8724335432052612, 0.00048208405496552587 ], "std": [ 0.22703133523464203, 0.22401881217956543, 0.2183573693037033, 0.210307314991951, 0.18344362080097198, 0.0013974216999486089 ], "q01": [ 0.4991680681705475, 0.4900546991825104, 0.43919228076934813, 0.451452853679657, 0.49690262079238895, 0.0 ], "q99": [ 1.0, 1.0, 1.0, 1.0, 1.0, 0.006613422185182571 ] }, "projected_gravity": { "min": [ -0.13823279738426208, -0.10353901982307434, -0.9999999403953552 ], "max": [ 0.13775843381881714, 0.07830511033535004, -0.9902538061141968 ], "mean": [ -0.031780581921339035, 0.0014070228207856417, -0.9986887574195862 ], "std": [ 0.036750584840774536, 0.02045060321688652, 0.0015243602683785058 ], "q01": [ -0.1130752393603325, -0.06140898913145065, -0.9999896025657654 ], "q99": [ 0.09374776124954215, 0.048648969680070875, -0.9928160524368286 ] } }, "action": { "motion_token": { "min": [ -0.0625, -0.125, -0.375, -0.3125, -0.4375, -0.32874998450279236, -0.5625, -0.1875, -0.125, -0.375, -0.375, -0.375, -0.2565000057220459, -0.125, -0.25, -0.3199999928474426, -0.0625, -0.20374999940395355, -0.31562501192092896, -0.5, -0.5, -0.5787500143051147, -0.4375, -0.3125, -0.125, -0.3125, -0.375, -0.375, -0.375, -0.125, -0.3125, -0.3125, -0.3125, -0.0625, -0.125, -0.26625001430511475, -0.3125, -0.375, -0.25, -0.3125, -0.3125, -0.4068000018596649, -0.3125, -0.5, -0.24187500774860382, -0.3218750059604645, -0.375, -0.4375, -0.5, -0.5787500143051147, -0.25, -0.0689999982714653, -0.5, -0.5, -0.25, -0.3125, -0.375, 0.05000000074505806, -0.375, -0.375, -0.375, -0.1875, 0.0, -0.5625 ], "max": [ 0.4375, 0.4375, 0.5, 0.3125, 0.375, 0.3125, 0.3125, 0.5, 0.2593750059604645, 0.0, 0.1875, 0.125, 0.3125, 0.39124998450279236, 0.5, 0.1875, 0.4375, 0.5, 0.3125, 0.0625, 0.125, 0.5, 0.26249998807907104, 0.25, 0.26249998807907104, 0.1875, 0.1875, 0.3125, 0.3125, 0.3125, 0.5787500143051147, 0.1875, 0.20000000298023224, 0.44999998807907104, 0.1875, 0.3125, 0.4375, 0.5, 0.375, 0.1875, 0.3125, 0.375, 0.25, 0.012500000186264515, 0.4375, 0.1875, 0.3125, 0.3125, 0.09375, 0.5, 0.375, 0.32442477345466614, 0.42399999499320984, 0.125, 0.25, 0.4154999852180481, 0.25, 0.375, 0.25, 0.125, 0.096950002014637, 0.3199999928474426, 0.4375, 0.39124998450279236 ], "mean": [ 0.14175768196582794, 0.14085254073143005, -0.06547069549560547, -0.03802648186683655, 0.023928958922624588, 0.055760256946086884, -0.01141972653567791, 0.13124586641788483, 0.07842714339494705, -0.2204984724521637, -0.059452470391988754, -0.15377052128314972, 0.015776541084051132, 0.10140536725521088, 0.19938713312149048, -0.027156807482242584, 0.15322236716747284, 0.1263473927974701, -0.0550285167992115, -0.11627274751663208, -0.09705619513988495, -0.047826699912548065, -0.07908336073160172, 0.00949197169393301, 0.09132248908281326, -0.09980364143848419, -0.10114426165819168, 0.021741367876529694, 0.0327538438141346, 0.08616019040346146, 0.11511088162660599, -0.0838928073644638, -0.05282018706202507, 0.18056471645832062, 0.03586655110120773, 0.07649548351764679, -0.03416917473077774, 0.06310950219631195, 0.08939860761165619, -0.08665557205677032, -0.03159245476126671, -0.03483034297823906, 0.04541642591357231, -0.19007791578769684, 0.12351123988628387, -0.09727893769741058, 0.02401287853717804, -0.042405132204294205, -0.14495117962360382, -0.0489724762737751, 0.08868668973445892, 0.14373476803302765, -0.06625722348690033, -0.1656271368265152, 0.02377641387283802, 0.03347398340702057, -0.06730702519416809, 0.18841396272182465, 0.0530179962515831, -0.15452082455158234, -0.1367315649986267, 0.08237336575984955, 0.22504417598247528, -0.07278113067150116 ], "std": [ 0.08342579007148743, 0.084489606320858, 0.11679738014936447, 0.09926097095012665, 0.13307231664657593, 0.09047649055719376, 0.11802267283201218, 0.11344844102859497, 0.06395280361175537, 0.05068381130695343, 0.07466264814138412, 0.07225611060857773, 0.10808555036783218, 0.07362730801105499, 0.08476775139570236, 0.08570833504199982, 0.054431166499853134, 0.0818735733628273, 0.11226388067007065, 0.08053270727396011, 0.08885981142520905, 0.10949606448411942, 0.06945600360631943, 0.08456696569919586, 0.056679632514715195, 0.08983214199542999, 0.06905080378055573, 0.08755039423704147, 0.10649745166301727, 0.07497349381446838, 0.11304426938295364, 0.08800090104341507, 0.08004379272460938, 0.06990408152341843, 0.052012719213962555, 0.07119045406579971, 0.10564503818750381, 0.12566091120243073, 0.09016484767198563, 0.07622849196195602, 0.0975862368941307, 0.12883062660694122, 0.08571086078882217, 0.07247977703809738, 0.10465484112501144, 0.07255876809358597, 0.0895288735628128, 0.10829181224107742, 0.09715481102466583, 0.11024155467748642, 0.08759006857872009, 0.054345615208148956, 0.15219607949256897, 0.07342791557312012, 0.06021679565310478, 0.12249448150396347, 0.09838257730007172, 0.0365930013358593, 0.07558772712945938, 0.0790044441819191, 0.05822743475437164, 0.07602708786725998, 0.0670684352517128, 0.108371801674366 ], "q01": [ 0.0, -0.0625, -0.2785500025749206, -0.3125, -0.25, -0.1875, -0.3125, -0.125, -0.0625, -0.3125, -0.25, -0.3125, -0.1875, -0.0625, 0.0, -0.25, 0.0, -0.0625, -0.2750000059604645, -0.3125, -0.3125, -0.3125, -0.25, -0.1875, -0.0625, -0.25, -0.25, -0.1875, -0.1875, -0.0625, -0.125, -0.25, -0.25, 0.0, -0.125, -0.0625, -0.25, -0.19062499701976776, -0.125, -0.25, -0.1875, -0.3125, -0.125, -0.375, -0.125, -0.26249998807907104, -0.1875, -0.2750000059604645, -0.375, -0.3125, -0.125, 0.0, -0.4375, -0.3125, -0.125, -0.25, -0.3125, 0.125, -0.125, -0.3125, -0.25, -0.125, 0.0625, -0.375 ], "q99": [ 0.375, 0.3125, 0.25, 0.1875, 0.3125, 0.25, 0.25, 0.375, 0.1875, -0.0625, 0.125, 0.0083372937515378, 0.3125, 0.25, 0.375, 0.125, 0.3125, 0.3125, 0.25, 0.0, 0.11785968393087387, 0.1875, 0.0625, 0.1875, 0.1875, 0.125, 0.0625, 0.25, 0.25, 0.25, 0.375, 0.18127547204494476, 0.125, 0.3125, 0.125, 0.25, 0.25, 0.375, 0.3125, 0.0625, 0.25, 0.25, 0.1875, -0.0625, 0.375, 0.125, 0.25, 0.1875, 0.02500000037252903, 0.1875, 0.3125, 0.25, 0.25, 0.0625, 0.1875, 0.3125, 0.1875, 0.3125, 0.1875, 0.0625, 0.0, 0.25, 0.3218750059604645, 0.14000000059604645 ] }, "left_hand_joints": { "min": [ 0.9708347320556641, 0.9997726678848267, 0.9997227191925049, 0.9997877478599548, 0.9995542764663696, 0.0 ], "max": [ 1.0, 1.0, 1.0, 1.0, 1.0, 0.0 ], "mean": [ 0.9999656677246094, 0.9999974370002747, 0.9999961853027344, 0.9999967813491821, 0.9999991059303284, 0.0 ], "std": [ 0.0006063997861699237, 5.444373501658278e-05, 6.37385530333474e-05, 5.9533431494149724e-05, 3.9138377146740105e-05, 0.0 ], "q01": [ 0.9996291399002075, 0.9998853206634521, 0.9998672437667847, 0.999878466129303, 0.9998160982131958, 0.0 ], "q99": [ 1.0, 1.0, 1.0, 0.9999999403953552, 1.0, 0.0 ] }, "right_hand_joints": { "min": [ 0.4219241440296173, 0.4155133366584778, 0.37505996227264404, 0.33092063665390015, 0.4088923931121826, 0.0 ], "max": [ 1.0, 1.0, 1.0, 1.0, 1.0, 0.026209507137537003 ], "mean": [ 0.8402009010314941, 0.8423101902008057, 0.8466323018074036, 0.8531510233879089, 0.8724335432052612, 0.00048208405496552587 ], "std": [ 0.22703133523464203, 0.22401881217956543, 0.2183573693037033, 0.210307314991951, 0.18344362080097198, 0.0013974216999486089 ], "q01": [ 0.4991680681705475, 0.4900546991825104, 0.43919228076934813, 0.451452853679657, 0.49690262079238895, 0.0 ], "q99": [ 1.0, 1.0, 1.0, 1.0, 1.0, 0.006613422185182571 ] } }, "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:aa221197e1de0a96977d3ee006b48b835f2f2d881b0db301b3539062e4eeda30size 4990519232123version https://git-lfs.github.com/spec/v1oid sha256:6ddb5689fe9eba6e582b78e192b5cd73dc36bb9dab71624b062ea26672389c34size 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": "A3 open fridge door v4 (G1), pause-trim data (3-frame stationary trim)", "task_dir": "a3-fridge-open-v4/b512-trim3f", "robot": "Unitree G1", "training_data": "a3-fridge-open-expert-v4 @fe89f5b3 (all 125 episodes; pause-trim: 3-frame stationary trim, a29_trim_stationary.py be2caba1)", "episodes": 125, "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": 58.39, "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": 35073, "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": "e8f7aebe1ff1", "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": 769, "dataset_meta/modality.json": 1537, "embodiment_id.json": 2226, "experiment_cfg/conf.yaml": 5799, "experiment_cfg/config.yaml": 5766, "experiment_cfg/dataset_statistics.json": 20796, "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": 4313889, "train.log": 391522, "trainer_state.json": 45003, "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.24969686567783356, "learning_rate": 4.5e-06, "loss": 1.2664, "step": 10 }, { "grad_norm": 0.3702656328678131, "learning_rate": 9.5e-06, "loss": 1.2392, "step": 20 }, { "grad_norm": 0.33467936515808105, "learning_rate": 1.45e-05, "loss": 1.1712, "step": 30 }, { "grad_norm": 0.5395663380622864, "learning_rate": 1.9500000000000003e-05, "loss": 1.1259, "step": 40 }, { "grad_norm": 0.3507799208164215, "learning_rate": 2.45e-05, "loss": 1.1078, "step": 50 }, { "grad_norm": 0.2879819869995117, "learning_rate": 2.95e-05, "loss": 1.1068, "step": 60 }, { "grad_norm": 0.3296225666999817, "learning_rate": 3.45e-05, "loss": 1.0963, "step": 70 }, { "grad_norm": 0.406753271818161, "learning_rate": 3.9500000000000005e-05, "loss": 1.0867, "step": 80 }, { "grad_norm": 0.43973326683044434, "learning_rate": 4.4500000000000004e-05, "loss": 1.0639, "step": 90 }, { "grad_norm": 0.6432929635047913, "learning_rate": 4.9500000000000004e-05, "loss": 1.0061, "step": 100 }, { "grad_norm": 0.7439618110656738, "learning_rate": 5.45e-05, "loss": 0.9426, "step": 110 }, { "grad_norm": 0.8781758546829224, "learning_rate": 5.95e-05, "loss": 0.8847, "step": 120 }, { "grad_norm": 0.8247817158699036, "learning_rate": 6.450000000000001e-05, "loss": 0.8419, "step": 130 }, { "grad_norm": 0.8644923567771912, "learning_rate": 6.95e-05, "loss": 0.8085, "step": 140 }, { "grad_norm": 0.8179157376289368, "learning_rate": 7.450000000000001e-05, "loss": 0.7757, "step": 150 }, { "grad_norm": 0.9944325089454651, "learning_rate": 7.950000000000001e-05, "loss": 0.7454, "step": 160 }, { "grad_norm": 0.9542336463928223, "learning_rate": 8.450000000000001e-05, "loss": 0.7256, "step": 170 }, { "grad_norm": 0.9877910017967224, "learning_rate": 8.950000000000001e-05, "loss": 0.7193, "step": 180 }, { "grad_norm": 0.8070847988128662, "learning_rate": 9.449999999999999e-05, "loss": 0.6839, "step": 190 }, { "grad_norm": 1.029712438583374, "learning_rate": 9.95e-05, "loss": 0.6609, "step": 200 }, { "grad_norm": 0.8687057495117188, "learning_rate": 9.999861593790126e-05, "loss": 0.6342, "step": 210 }, { "grad_norm": 0.9528300166130066, "learning_rate": 9.999383162408304e-05, "loss": 0.6054, "step": 220 }, { "grad_norm": 0.8881350159645081, "learning_rate": 9.998563029828259e-05, "loss": 0.586, "step": 230 }, { "grad_norm": 0.967760443687439, "learning_rate": 9.997401252104962e-05, "loss": 0.561, "step": 240 }, { "grad_norm": 0.9163524508476257, "learning_rate": 9.995897908644378e-05, "loss": 0.5362, "step": 250 }, { "grad_norm": 1.1761821508407593, "learning_rate": 9.994053102198034e-05, "loss": 0.516, "step": 260 }, { "grad_norm": 0.9282422661781311, "learning_rate": 9.991866958856003e-05, "loss": 0.5119, "step": 270 }, { "grad_norm": 1.1019794940948486, "learning_rate": 9.989339628038276e-05, "loss": 0.4838, "step": 280 }, { "grad_norm": 0.9229307770729065, "learning_rate": 9.98647128248456e-05, "loss": 0.4752, "step": 290 }, { "grad_norm": 1.1167711019515991, "learning_rate": 9.98326211824246e-05, "loss": 0.4487, "step": 300 }, { "grad_norm": 1.031890630722046, "learning_rate": 9.979712354654091e-05, "loss": 0.4376, "step": 310 }, { "grad_norm": 1.1496820449829102, "learning_rate": 9.975822234341079e-05, "loss": 0.4019, "step": 320 }, { "grad_norm": 1.1180025339126587, "learning_rate": 9.97159202318798e-05, "loss": 0.3924, "step": 330 }, { "grad_norm": 1.0122398138046265, "learning_rate": 9.967022010324105e-05, "loss": 0.3743, "step": 340 }, { "grad_norm": 1.1472221612930298, "learning_rate": 9.962112508103765e-05, "loss": 0.3555, "step": 350 }, { "grad_norm": 1.1271696090698242, "learning_rate": 9.956863852084914e-05, "loss": 0.3514, "step": 360 }, { "grad_norm": 1.1087565422058105, "learning_rate": 9.951276401006221e-05, "loss": 0.343, "step": 370 }, { "grad_norm": 1.1708248853683472, "learning_rate": 9.945350536762543e-05, "loss": 0.3202, "step": 380 }, { "grad_norm": 1.2232983112335205, "learning_rate": 9.939086664378829e-05, "loss": 0.306, "step": 390 }, { "grad_norm": 1.0600069761276245, "learning_rate": 9.932485211982437e-05, "loss": 0.2928, "step": 400 }, { "grad_norm": 1.309991478919983, "learning_rate": 9.92554663077387e-05, "loss": 0.2871, "step": 410 }, { "grad_norm": 1.2092708349227905, "learning_rate": 9.918271394995935e-05, "loss": 0.2753, "step": 420 }, { "grad_norm": 0.9999510049819946, "learning_rate": 9.910660001901335e-05, "loss": 0.269, "step": 430 }, { "grad_norm": 1.0595834255218506, "learning_rate": 9.902712971718675e-05, "loss": 0.2536, "step": 440 }, { "grad_norm": 1.27973473072052, "learning_rate": 9.894430847616915e-05, "loss": 0.2429, "step": 450 }, { "grad_norm": 1.3076003789901733, "learning_rate": 9.885814195668232e-05, "loss": 0.2356, "step": 460 }, { "grad_norm": 1.2091642618179321, "learning_rate": 9.876863604809344e-05, "loss": 0.2262, "step": 470 }, { "grad_norm": 1.2186284065246582, "learning_rate": 9.867579686801245e-05, "loss": 0.2117, "step": 480 }, { "grad_norm": 1.0117164850234985, "learning_rate": 9.8579630761874e-05, "loss": 0.1995, "step": 490 }, { "grad_norm": 1.4287713766098022, "learning_rate": 9.848014430250367e-05, "loss": 0.1887, "step": 500 }, { "grad_norm": 1.0488054752349854, "learning_rate": 9.837734428966885e-05, "loss": 0.1898, "step": 510 }, { "grad_norm": 1.4567617177963257, "learning_rate": 9.827123774961383e-05, "loss": 0.1758, "step": 520 }, { "grad_norm": 0.9737544655799866, "learning_rate": 9.816183193457968e-05, "loss": 0.1818, "step": 530 }, { "grad_norm": 1.0815938711166382, "learning_rate": 9.804913432230856e-05, "loss": 0.1601, "step": 540 }, { "grad_norm": 1.04365873336792, "learning_rate": 9.793315261553252e-05, "loss": 0.1576, "step": 550 }, { "grad_norm": 1.0169397592544556, "learning_rate": 9.781389474144717e-05, "loss": 0.1462, "step": 560 }, { "grad_norm": 1.3647960424423218, "learning_rate": 9.76913688511698e-05, "loss": 0.1407, "step": 570 }, { "grad_norm": 1.092616081237793, "learning_rate": 9.756558331918227e-05, "loss": 0.1386, "step": 580 }, { "grad_norm": 1.0744850635528564, "learning_rate": 9.743654674275855e-05, "loss": 0.1447, "step": 590 }, { "grad_norm": 1.1381957530975342, "learning_rate": 9.730426794137727e-05, "loss": 0.1405, "step": 600 }, { "grad_norm": 1.2493499517440796, "learning_rate": 9.716875595611879e-05, "loss": 0.1575, "step": 610 }, { "grad_norm": 1.0182136297225952, "learning_rate": 9.703002004904729e-05, "loss": 0.1286, "step": 620 }, { "grad_norm": 1.1650744676589966, "learning_rate": 9.688806970257773e-05, "loss": 0.1156, "step": 630 }, { "grad_norm": 1.0424978733062744, "learning_rate": 9.674291461882774e-05, "loss": 0.1236, "step": 640 }, { "grad_norm": 1.0677504539489746, "learning_rate": 9.659456471895445e-05, "loss": 0.1305, "step": 650 }, { "grad_norm": 1.040608286857605, "learning_rate": 9.644303014247648e-05, "loss": 0.1254, "step": 660 }, { "grad_norm": 1.1769931316375732, "learning_rate": 9.628832124658085e-05, "loss": 0.1476, "step": 670 }, { "grad_norm": 0.9281076788902283, "learning_rate": 9.613044860541507e-05, "loss": 0.1313, "step": 680 }, { "grad_norm": 1.1233124732971191, "learning_rate": 9.596942300936445e-05, "loss": 0.1244, "step": 690 }, { "grad_norm": 1.0660840272903442, "learning_rate": 9.580525546431459e-05, "loss": 0.1277, "step": 700 }, { "grad_norm": 0.9175140261650085, "learning_rate": 9.563795719089911e-05, "loss": 0.1376, "step": 710 }, { "grad_norm": 1.2074233293533325, "learning_rate": 9.546753962373281e-05, "loss": 0.1182, "step": 720 }, { "grad_norm": 0.9398819208145142, "learning_rate": 9.529401441062997e-05, "loss": 0.1206, "step": 730 }, { "grad_norm": 1.0714794397354126, "learning_rate": 9.511739341180842e-05, "loss": 0.0976, "step": 740 }, { "grad_norm": 1.0384395122528076, "learning_rate": 9.493768869907886e-05, "loss": 0.1195, "step": 750 }, { "grad_norm": 1.2833391427993774, "learning_rate": 9.475491255501968e-05, "loss": 0.1051, "step": 760 }, { "grad_norm": 1.1420702934265137, "learning_rate": 9.456907747213748e-05, "loss": 0.1115, "step": 770 }, { "grad_norm": 1.0326255559921265, "learning_rate": 9.438019615201336e-05, "loss": 0.1127, "step": 780 }, { "grad_norm": 1.1427911520004272, "learning_rate": 9.418828150443469e-05, "loss": 0.1064, "step": 790 }, { "grad_norm": 0.965188205242157, "learning_rate": 9.399334664651262e-05, "loss": 0.1111, "step": 800 }, { "grad_norm": 1.0963115692138672, "learning_rate": 9.379540490178581e-05, "loss": 0.1188, "step": 810 }, { "grad_norm": 1.0374363660812378, "learning_rate": 9.359446979930955e-05, "loss": 0.1104, "step": 820 }, { "grad_norm": 1.1286821365356445, "learning_rate": 9.33905550727312e-05, "loss": 0.113, "step": 830 }, { "grad_norm": 1.0085028409957886, "learning_rate": 9.318367465935142e-05, "loss": 0.1026, "step": 840 }, { "grad_norm": 0.9976567625999451, "learning_rate": 9.29738426991717e-05, "loss": 0.1191, "step": 850 }, { "grad_norm": 0.9438088536262512, "learning_rate": 9.276107353392774e-05, "loss": 0.1071, "step": 860 }, { "grad_norm": 1.0611025094985962, "learning_rate": 9.254538170610938e-05, "loss": 0.106, "step": 870 }, { "grad_norm": 1.0187612771987915, "learning_rate": 9.232678195796654e-05, "loss": 0.0974, "step": 880 }, { "grad_norm": 1.0197113752365112, "learning_rate": 9.210528923050164e-05, "loss": 0.0955, "step": 890 }, { "grad_norm": 1.001359224319458, "learning_rate": 9.188091866244834e-05, "loss": 0.1158, "step": 900 }, { "grad_norm": 1.08006751537323, "learning_rate": 9.165368558923695e-05, "loss": 0.0884, "step": 910 }, { "grad_norm": 1.0013184547424316, "learning_rate": 9.142360554194618e-05, "loss": 0.1097, "step": 920 }, { "grad_norm": 1.054321527481079, "learning_rate": 9.119069424624163e-05, "loss": 0.0948, "step": 930 }, { "grad_norm": 0.8738356232643127, "learning_rate": 9.0954967621301e-05, "loss": 0.0884, "step": 940 }, { "grad_norm": 1.2635947465896606, "learning_rate": 9.071644177872594e-05, "loss": 0.1082, "step": 950 }, { "grad_norm": 0.9552425742149353, "learning_rate": 9.047513302144095e-05, "loss": 0.0894, "step": 960 }, { "grad_norm": 1.0028635263442993, "learning_rate": 9.023105784257906e-05, "loss": 0.09, "step": 970 }, { "grad_norm": 1.0272175073623657, "learning_rate": 8.998423292435454e-05, "loss": 0.1034, "step": 980 }, { "grad_norm": 0.9832494258880615, "learning_rate": 8.973467513692265e-05, "loss": 0.1033, "step": 990 }, { "grad_norm": 0.8824711441993713, "learning_rate": 8.94824015372267e-05, "loss": 0.0969, "step": 1000 }, { "grad_norm": 0.9886422753334045, "learning_rate": 8.922742936783207e-05, "loss": 0.0874, "step": 1010 }, { "grad_norm": 1.0349059104919434, "learning_rate": 8.896977605574788e-05, "loss": 0.0936, "step": 1020 }, { "grad_norm": 0.8122439980506897, "learning_rate": 8.870945921123576e-05, "loss": 0.0925, "step": 1030 }, { "grad_norm": 0.9307723045349121, "learning_rate": 8.844649662660624e-05, "loss": 0.099, "step": 1040 }, { "grad_norm": 1.0381238460540771, "learning_rate": 8.818090627500266e-05, "loss": 0.0861, "step": 1050 }, { "grad_norm": 0.8171885013580322, "learning_rate": 8.791270630917275e-05, "loss": 0.1078, "step": 1060 }, { "grad_norm": 0.8993248343467712, "learning_rate": 8.764191506022795e-05, "loss": 0.0991, "step": 1070 }, { "grad_norm": 0.83534836769104, "learning_rate": 8.736855103639037e-05, "loss": 0.0925, "step": 1080 }, { "grad_norm": 0.9656429886817932, "learning_rate": 8.709263292172794e-05, "loss": 0.0718, "step": 1090 }, { "grad_norm": 0.9362795948982239, "learning_rate": 8.681417957487729e-05, "loss": 0.088, "step": 1100 }, { "grad_norm": 1.0397653579711914, "learning_rate": 8.653321002775478e-05, "loss": 0.0959, "step": 1110 }, { "grad_norm": 0.7886846661567688, "learning_rate": 8.624974348425574e-05, "loss": 0.0894, "step": 1120 }, { "grad_norm": 0.9985739588737488, "learning_rate": 8.596379931894188e-05, "loss": 0.0996, "step": 1130 }, { "grad_norm": 0.8394832015037537, "learning_rate": 8.567539707571703e-05, "loss": 0.0937, "step": 1140 }, { "grad_norm": 1.0103176832199097, "learning_rate": 8.538455646649146e-05, "loss": 0.0933, "step": 1150 }, { "grad_norm": 0.9272393584251404, "learning_rate": 8.509129736983446e-05, "loss": 0.0879, "step": 1160 }, { "grad_norm": 0.9583043456077576, "learning_rate": 8.479563982961571e-05, "loss": 0.0855, "step": 1170 }, { "grad_norm": 0.9452757835388184, "learning_rate": 8.449760405363539e-05, "loss": 0.0851, "step": 1180 }, { "grad_norm": 0.8917825818061829, "learning_rate": 8.419721041224287e-05, "loss": 0.0901, "step": 1190 }, { "grad_norm": 0.9166073203086853, "learning_rate": 8.389447943694451e-05, "loss": 0.0919, "step": 1200 }, { "grad_norm": 1.0263557434082031, "learning_rate": 8.358943181900032e-05, "loss": 0.0897, "step": 1210 }, { "grad_norm": 0.879992663860321, "learning_rate": 8.328208840800981e-05, "loss": 0.0771, "step": 1220 }, { "grad_norm": 0.7573461532592773, "learning_rate": 8.297247021048686e-05, "loss": 0.0865, "step": 1230 }, { "grad_norm": 0.8213328123092651, "learning_rate": 8.266059838842396e-05, "loss": 0.078, "step": 1240 }, { "grad_norm": 0.8308892250061035, "learning_rate": 8.23464942578459e-05, "loss": 0.0893, "step": 1250 }, { "grad_norm": 0.9865770936012268, "learning_rate": 8.203017928735277e-05, "loss": 0.0799, "step": 1260 }, { "grad_norm": 0.9440226554870605, "learning_rate": 8.17116750966526e-05, "loss": 0.0926, "step": 1270 }, { "grad_norm": 0.8566972613334656, "learning_rate": 8.139100345508377e-05, "loss": 0.086, "step": 1280 }, { "grad_norm": 0.9944272041320801, "learning_rate": 8.106818628012697e-05, "loss": 0.0905, "step": 1290 }, { "grad_norm": 0.7673008441925049, "learning_rate": 8.074324563590736e-05, "loss": 0.0801, "step": 1300 }, { "grad_norm": 0.8748568892478943, "learning_rate": 8.041620373168628e-05, "loss": 0.0819, "step": 1310 }, { "grad_norm": 0.9726541042327881, "learning_rate": 8.008708292034349e-05, "loss": 0.0906, "step": 1320 }, { "grad_norm": 0.8499472737312317, "learning_rate": 7.975590569684925e-05, "loss": 0.0743, "step": 1330 }, { "grad_norm": 0.9892880916595459, "learning_rate": 7.942269469672687e-05, "loss": 0.0807, "step": 1340 }, { "grad_norm": 0.8883183002471924, "learning_rate": 7.908747269450558e-05, "loss": 0.0713, "step": 1350 }, { "grad_norm": 0.8610345125198364, "learning_rate": 7.875026260216393e-05, "loss": 0.0771, "step": 1360 }, { "grad_norm": 0.7803037166595459, "learning_rate": 7.841108746756382e-05, "loss": 0.0618, "step": 1370 }, { "grad_norm": 0.9016158580780029, "learning_rate": 7.806997047287516e-05, "loss": 0.0747, "step": 1380 }, { "grad_norm": 0.8107506632804871, "learning_rate": 7.772693493299138e-05, "loss": 0.0682, "step": 1390 }, { "grad_norm": 0.7583107352256775, "learning_rate": 7.7382004293936e-05, "loss": 0.0823, "step": 1400 }, { "grad_norm": 0.8535319566726685, "learning_rate": 7.703520213126e-05, "loss": 0.0668, "step": 1410 }, { "grad_norm": 0.8480080962181091, "learning_rate": 7.66865521484305e-05, "loss": 0.0799, "step": 1420 }, { "grad_norm": 0.7428354620933533, "learning_rate": 7.633607817521074e-05, "loss": 0.0734, "step": 1430 }, { "grad_norm": 0.8748795986175537, "learning_rate": 7.598380416603119e-05, "loss": 0.0767, "step": 1440 }, { "grad_norm": 0.8065324425697327, "learning_rate": 7.562975419835247e-05, "loss": 0.0815, "step": 1450 }, { "grad_norm": 0.8415871858596802, "learning_rate": 7.527395247101956e-05, "loss": 0.0702, "step": 1460 }, { "grad_norm": 0.8654342889785767, "learning_rate": 7.491642330260789e-05, "loss": 0.0746, "step": 1470 }, { "grad_norm": 0.9353384971618652, "learning_rate": 7.45571911297612e-05, "loss": 0.0806, "step": 1480 }, { "grad_norm": 0.7830837965011597, "learning_rate": 7.419628050552131e-05, "loss": 0.068, "step": 1490 }, { "grad_norm": 0.8030922412872314, "learning_rate": 7.383371609764999e-05, "loss": 0.0881, "step": 1500 }, { "grad_norm": 0.692565381526947, "learning_rate": 7.346952268694288e-05, "loss": 0.0735, "step": 1510 }, { "grad_norm": 0.9564480781555176, "learning_rate": 7.310372516553585e-05, "loss": 0.0758, "step": 1520 }, { "grad_norm": 0.7724871635437012, "learning_rate": 7.273634853520356e-05, "loss": 0.0752, "step": 1530 }, { "grad_norm": 0.7512139081954956, "learning_rate": 7.236741790565072e-05, "loss": 0.082, "step": 1540 }, { "grad_norm": 0.8139519691467285, "learning_rate": 7.199695849279576e-05, "loss": 0.0731, "step": 1550 }, { "grad_norm": 0.6900156736373901, "learning_rate": 7.162499561704747e-05, "loss": 0.071, "step": 1560 }, { "grad_norm": 0.9062541127204895, "learning_rate": 7.125155470157429e-05, "loss": 0.0658, "step": 1570 }, { "grad_norm": 0.9098150134086609, "learning_rate": 7.087666127056675e-05, "loss": 0.0635, "step": 1580 }, { "grad_norm": 0.8518034219741821, "learning_rate": 7.050034094749286e-05, "loss": 0.0707, "step": 1590 }, { "grad_norm": 0.7341071963310242, "learning_rate": 7.012261945334683e-05, "loss": 0.0702, "step": 1600 }, { "grad_norm": 0.8986262679100037, "learning_rate": 6.974352260489103e-05, "loss": 0.0596, "step": 1610 }, { "grad_norm": 0.8570002317428589, "learning_rate": 6.936307631289148e-05, "loss": 0.0592, "step": 1620 }, { "grad_norm": 0.7208150029182434, "learning_rate": 6.898130658034685e-05, "loss": 0.0618, "step": 1630 }, { "grad_norm": 0.813809335231781, "learning_rate": 6.859823950071127e-05, "loss": 0.0659, "step": 1640 }, { "grad_norm": 0.9617616534233093, "learning_rate": 6.821390125611078e-05, "loss": 0.078, "step": 1650 }, { "grad_norm": 0.7030258774757385, "learning_rate": 6.782831811555385e-05, "loss": 0.0531, "step": 1660 }, { "grad_norm": 0.7581276893615723, "learning_rate": 6.744151643313597e-05, "loss": 0.0669, "step": 1670 }, { "grad_norm": 0.7828285694122314, "learning_rate": 6.705352264623828e-05, "loss": 0.0711, "step": 1680 }, { "grad_norm": 0.7556164860725403, "learning_rate": 6.666436327372078e-05, "loss": 0.0691, "step": 1690 }, { "grad_norm": 0.800704836845398, "learning_rate": 6.62740649141096e-05, "loss": 0.0633, "step": 1700 }, { "grad_norm": 0.8132439851760864, "learning_rate": 6.588265424377919e-05, "loss": 0.0629, "step": 1710 }, { "grad_norm": 0.6503492593765259, "learning_rate": 6.549015801512895e-05, "loss": 0.0711, "step": 1720 }, { "grad_norm": 0.6679508686065674, "learning_rate": 6.509660305475468e-05, "loss": 0.0667, "step": 1730 }, { "grad_norm": 0.7464534640312195, "learning_rate": 6.47020162616152e-05, "loss": 0.0601, "step": 1740 }, { "grad_norm": 0.9407488107681274, "learning_rate": 6.430642460519365e-05, "loss": 0.0646, "step": 1750 }, { "grad_norm": 0.8934836387634277, "learning_rate": 6.390985512365426e-05, "loss": 0.0705, "step": 1760 }, { "grad_norm": 0.8085567355155945, "learning_rate": 6.351233492199431e-05, "loss": 0.0633, "step": 1770 }, { "grad_norm": 0.8393984436988831, "learning_rate": 6.311389117019155e-05, "loss": 0.0624, "step": 1780 }, { "grad_norm": 0.7390518188476562, "learning_rate": 6.271455110134713e-05, "loss": 0.0724, "step": 1790 }, { "grad_norm": 0.731323778629303, "learning_rate": 6.231434200982428e-05, "loss": 0.0641, "step": 1800 }, { "grad_norm": 0.8583155274391174, "learning_rate": 6.191329124938285e-05, "loss": 0.0613, "step": 1810 }, { "grad_norm": 0.7346614003181458, "learning_rate": 6.15114262313095e-05, "loss": 0.0565, "step": 1820 }, { "grad_norm": 0.6838651299476624, "learning_rate": 6.110877442254444e-05, "loss": 0.0584, "step": 1830 }, { "grad_norm": 0.6274861693382263, "learning_rate": 6.0705363343803946e-05, "loss": 0.0561, "step": 1840 }, { "grad_norm": 0.6365845203399658, "learning_rate": 6.030122056769934e-05, "loss": 0.0599, "step": 1850 }, { "grad_norm": 0.8049864768981934, "learning_rate": 5.989637371685257e-05, "loss": 0.0706, "step": 1860 }, { "grad_norm": 0.6905391812324524, "learning_rate": 5.949085046200808e-05, "loss": 0.0666, "step": 1870 }, { "grad_norm": 0.8581084609031677, "learning_rate": 5.908467852014169e-05, "loss": 0.0534, "step": 1880 }, { "grad_norm": 0.6320569515228271, "learning_rate": 5.867788565256607e-05, "loss": 0.0502, "step": 1890 }, { "grad_norm": 0.7177176475524902, "learning_rate": 5.827049966303335e-05, "loss": 0.0721, "step": 1900 }, { "grad_norm": 0.7732782959938049, "learning_rate": 5.786254839583478e-05, "loss": 0.0632, "step": 1910 }, { "grad_norm": 0.9078860878944397, "learning_rate": 5.745405973389757e-05, "loss": 0.0599, "step": 1920 }, { "grad_norm": 0.7273578643798828, "learning_rate": 5.7045061596879134e-05, "loss": 0.0615, "step": 1930 }, { "grad_norm": 0.7950225472450256, "learning_rate": 5.6635581939258855e-05, "loss": 0.0615, "step": 1940 }, { "grad_norm": 0.7294769287109375, "learning_rate": 5.622564874842742e-05, "loss": 0.0618, "step": 1950 }, { "grad_norm": 0.7480297684669495, "learning_rate": 5.5815290042773836e-05, "loss": 0.0496, "step": 1960 }, { "grad_norm": 0.8114850521087646, "learning_rate": 5.540453386977058e-05, "loss": 0.0663, "step": 1970 }, { "grad_norm": 0.678735077381134, "learning_rate": 5.4993408304056425e-05, "loss": 0.0707, "step": 1980 }, { "grad_norm": 0.6654773950576782, "learning_rate": 5.458194144551768e-05, "loss": 0.0553, "step": 1990 }, { "grad_norm": 0.6690157055854797, "learning_rate": 5.417016141736756e-05, "loss": 0.0504, "step": 2000 }, { "grad_norm": 0.7380792498588562, "learning_rate": 5.375809636422399e-05, "loss": 0.0486, "step": 2010 }, { "grad_norm": 0.7438030242919922, "learning_rate": 5.334577445018599e-05, "loss": 0.0607, "step": 2020 }, { "grad_norm": 0.6797165870666504, "learning_rate": 5.293322385690867e-05, "loss": 0.0624, "step": 2030 }, { "grad_norm": 0.6857747435569763, "learning_rate": 5.252047278167709e-05, "loss": 0.0648, "step": 2040 }, { "grad_norm": 0.5639367699623108, "learning_rate": 5.210754943547893e-05, "loss": 0.057, "step": 2050 }, { "grad_norm": 0.6196110844612122, "learning_rate": 5.169448204107643e-05, "loss": 0.0506, "step": 2060 }, { "grad_norm": 0.5484029650688171, "learning_rate": 5.128129883107729e-05, "loss": 0.0484, "step": 2070 }, { "grad_norm": 0.6291552782058716, "learning_rate": 5.086802804600505e-05, "loss": 0.0479, "step": 2080 }, { "grad_norm": 0.6400952935218811, "learning_rate": 5.045469793236892e-05, "loss": 0.0508, "step": 2090 }, { "grad_norm": 0.562771201133728, "learning_rate": 5.00413367407331e-05, "loss": 0.0475, "step": 2100 }, { "grad_norm": 0.6428771615028381, "learning_rate": 4.9627972723785964e-05, "loss": 0.0482, "step": 2110 }, { "grad_norm": 0.656426191329956, "learning_rate": 4.921463413440898e-05, "loss": 0.0461, "step": 2120 }, { "grad_norm": 0.6525030732154846, "learning_rate": 4.8801349223745654e-05, "loss": 0.0539, "step": 2130 }, { "grad_norm": 0.6891365051269531, "learning_rate": 4.838814623927067e-05, "loss": 0.0524, "step": 2140 }, { "grad_norm": 0.616743266582489, "learning_rate": 4.797505342285912e-05, "loss": 0.0659, "step": 2150 }, { "grad_norm": 0.7542160749435425, "learning_rate": 4.756209900885628e-05, "loss": 0.0524, "step": 2160 }, { "grad_norm": 0.5632624626159668, "learning_rate": 4.714931122214781e-05, "loss": 0.0465, "step": 2170 }, { "grad_norm": 0.781570553779602, "learning_rate": 4.673671827623058e-05, "loss": 0.0577, "step": 2180 }, { "grad_norm": 0.6875352263450623, "learning_rate": 4.632434837128443e-05, "loss": 0.0466, "step": 2190 }, { "grad_norm": 0.5860863327980042, "learning_rate": 4.591222969224453e-05, "loss": 0.0469, "step": 2200 }, { "grad_norm": 0.45962485671043396, "learning_rate": 4.550039040687518e-05, "loss": 0.0459, "step": 2210 }, { "grad_norm": 0.6461193561553955, "learning_rate": 4.508885866384446e-05, "loss": 0.0455, "step": 2220 }, { "grad_norm": 0.7336782813072205, "learning_rate": 4.4677662590800355e-05, "loss": 0.054, "step": 2230 }, { "grad_norm": 0.7126169800758362, "learning_rate": 4.426683029244825e-05, "loss": 0.0444, "step": 2240 }, { "grad_norm": 0.7063816785812378, "learning_rate": 4.385638984863e-05, "loss": 0.0546, "step": 2250 }, { "grad_norm": 0.6571717858314514, "learning_rate": 4.3446369312404745e-05, "loss": 0.054, "step": 2260 }, { "grad_norm": 0.6431688070297241, "learning_rate": 4.3036796708131474e-05, "loss": 0.0436, "step": 2270 }, { "grad_norm": 0.6200963258743286, "learning_rate": 4.262770002955363e-05, "loss": 0.058, "step": 2280 }, { "grad_norm": 0.6124681830406189, "learning_rate": 4.221910723788578e-05, "loss": 0.0487, "step": 2290 }, { "grad_norm": 0.6519785523414612, "learning_rate": 4.1811046259902474e-05, "loss": 0.0426, "step": 2300 }, { "grad_norm": 0.5403896570205688, "learning_rate": 4.140354498602952e-05, "loss": 0.0579, "step": 2310 }, { "grad_norm": 0.6314637660980225, "learning_rate": 4.099663126843769e-05, "loss": 0.0441, "step": 2320 }, { "grad_norm": 0.5901674628257751, "learning_rate": 4.059033291913902e-05, "loss": 0.0551, "step": 2330 }, { "grad_norm": 0.6443197727203369, "learning_rate": 4.0184677708086014e-05, "loss": 0.0458, "step": 2340 }, { "grad_norm": 0.6491107940673828, "learning_rate": 3.977969336127348e-05, "loss": 0.0513, "step": 2350 }, { "grad_norm": 0.583543598651886, "learning_rate": 3.937540755884357e-05, "loss": 0.0451, "step": 2360 }, { "grad_norm": 0.5998058915138245, "learning_rate": 3.897184793319384e-05, "loss": 0.046, "step": 2370 }, { "grad_norm": 0.5708314776420593, "learning_rate": 3.856904206708863e-05, "loss": 0.0417, "step": 2380 }, { "grad_norm": 0.6996421217918396, "learning_rate": 3.8167017491773847e-05, "loss": 0.0531, "step": 2390 }, { "grad_norm": 0.7917832136154175, "learning_rate": 3.776580168509516e-05, "loss": 0.053, "step": 2400 }, { "grad_norm": 0.5846177935600281, "learning_rate": 3.736542206962e-05, "loss": 0.0432, "step": 2410 }, { "grad_norm": 0.6452243328094482, "learning_rate": 3.696590601076326e-05, "loss": 0.0449, "step": 2420 }, { "grad_norm": 0.6359251141548157, "learning_rate": 3.656728081491686e-05, "loss": 0.041, "step": 2430 }, { "grad_norm": 0.6783343553543091, "learning_rate": 3.6169573727583405e-05, "loss": 0.052, "step": 2440 }, { "grad_norm": 0.6889586448669434, "learning_rate": 3.5772811931514036e-05, "loss": 0.0432, "step": 2450 }, { "grad_norm": 0.7249393463134766, "learning_rate": 3.5377022544850505e-05, "loss": 0.0526, "step": 2460 }, { "grad_norm": 0.607746422290802, "learning_rate": 3.498223261927158e-05, "loss": 0.046, "step": 2470 }, { "grad_norm": 0.5785282850265503, "learning_rate": 3.4588469138144295e-05, "loss": 0.0477, "step": 2480 }, { "grad_norm": 0.5808761715888977, "learning_rate": 3.419575901467952e-05, "loss": 0.0361, "step": 2490 }, { "grad_norm": 0.551202118396759, "learning_rate": 3.380412909009254e-05, "loss": 0.0478, "step": 2500 }, { "grad_norm": 0.6650727391242981, "learning_rate": 3.3413606131768475e-05, "loss": 0.0472, "step": 2510 }, { "grad_norm": 0.5690572261810303, "learning_rate": 3.302421683143279e-05, "loss": 0.0441, "step": 2520 }, { "grad_norm": 0.5516974329948425, "learning_rate": 3.2635987803326896e-05, "loss": 0.0395, "step": 2530 }, { "grad_norm": 0.6425303220748901, "learning_rate": 3.224894558238918e-05, "loss": 0.05, "step": 2540 }, { "grad_norm": 0.5988234877586365, "learning_rate": 3.18631166224413e-05, "loss": 0.0579, "step": 2550 }, { "grad_norm": 0.5933385491371155, "learning_rate": 3.147852729438017e-05, "loss": 0.046, "step": 2560 }, { "grad_norm": 0.4718160629272461, "learning_rate": 3.109520388437548e-05, "loss": 0.0449, "step": 2570 }, { "grad_norm": 0.5682607889175415, "learning_rate": 3.0713172592073116e-05, "loss": 0.0447, "step": 2580 }, { "grad_norm": 0.5197652578353882, "learning_rate": 3.0332459528804457e-05, "loss": 0.0468, "step": 2590 }, { "grad_norm": 0.5798529982566833, "learning_rate": 2.9953090715801634e-05, "loss": 0.0426, "step": 2600 }, { "grad_norm": 0.545190155506134, "learning_rate": 2.9575092082419086e-05, "loss": 0.0382, "step": 2610 }, { "grad_norm": 0.47157353162765503, "learning_rate": 2.9198489464361288e-05, "loss": 0.0415, "step": 2620 }, { "grad_norm": 0.5008323192596436, "learning_rate": 2.8823308601916948e-05, "loss": 0.037, "step": 2630 }, { "grad_norm": 0.5246574282646179, "learning_rate": 2.8449575138199613e-05, "loss": 0.0338, "step": 2640 }, { "grad_norm": 0.5127421617507935, "learning_rate": 2.807731461739509e-05, "loss": 0.0435, "step": 2650 }, { "grad_norm": 0.46520936489105225, "learning_rate": 2.7706552483015485e-05, "loss": 0.0565, "step": 2660 }, { "grad_norm": 0.3762061595916748, "learning_rate": 2.733731407616018e-05, "loss": 0.0452, "step": 2670 }, { "grad_norm": 0.49434220790863037, "learning_rate": 2.6969624633783806e-05, "loss": 0.0465, "step": 2680 }, { "grad_norm": 0.472543865442276, "learning_rate": 2.660350928697134e-05, "loss": 0.0397, "step": 2690 }, { "grad_norm": 0.62778639793396, "learning_rate": 2.6238993059220395e-05, "loss": 0.0499, "step": 2700 }, { "grad_norm": 0.5138208270072937, "learning_rate": 2.5876100864730933e-05, "loss": 0.0448, "step": 2710 }, { "grad_norm": 0.5321423411369324, "learning_rate": 2.5514857506702405e-05, "loss": 0.0404, "step": 2720 }, { "grad_norm": 0.5107710361480713, "learning_rate": 2.5155287675638474e-05, "loss": 0.0419, "step": 2730 }, { "grad_norm": 0.5091364979743958, "learning_rate": 2.4797415947659457e-05, "loss": 0.0421, "step": 2740 }, { "grad_norm": 0.5484399795532227, "learning_rate": 2.4441266782822588e-05, "loss": 0.0344, "step": 2750 }, { "grad_norm": 0.4985147714614868, "learning_rate": 2.4086864523450183e-05, "loss": 0.0382, "step": 2760 }, { "grad_norm": 0.44700172543525696, "learning_rate": 2.3734233392465903e-05, "loss": 0.0404, "step": 2770 }, { "grad_norm": 0.5019997954368591, "learning_rate": 2.3383397491739145e-05, "loss": 0.0418, "step": 2780 }, { "grad_norm": 0.50881427526474, "learning_rate": 2.3034380800437678e-05, "loss": 0.0361, "step": 2790 }, { "grad_norm": 0.500697910785675, "learning_rate": 2.2687207173388743e-05, "loss": 0.0408, "step": 2800 }, { "grad_norm": 0.5018814206123352, "learning_rate": 2.234190033944858e-05, "loss": 0.043, "step": 2810 }, { "grad_norm": 0.526495099067688, "learning_rate": 2.1998483899880596e-05, "loss": 0.0346, "step": 2820 }, { "grad_norm": 0.4378955364227295, "learning_rate": 2.1656981326742266e-05, "loss": 0.0377, "step": 2830 }, { "grad_norm": 0.4240167438983917, "learning_rate": 2.1317415961280824e-05, "loss": 0.0394, "step": 2840 }, { "grad_norm": 0.4522992670536041, "learning_rate": 2.097981101233794e-05, "loss": 0.0393, "step": 2850 }, { "grad_norm": 0.4238714277744293, "learning_rate": 2.0644189554763417e-05, "loss": 0.0393, "step": 2860 }, { "grad_norm": 0.4627169668674469, "learning_rate": 2.0310574527838072e-05, "loss": 0.0364, "step": 2870 }, { "grad_norm": 0.47382843494415283, "learning_rate": 1.9978988733705807e-05, "loss": 0.036, "step": 2880 }, { "grad_norm": 0.44003772735595703, "learning_rate": 1.9649454835815202e-05, "loss": 0.0358, "step": 2890 }, { "grad_norm": 0.47117024660110474, "learning_rate": 1.932199535737045e-05, "loss": 0.0394, "step": 2900 }, { "grad_norm": 0.5469751358032227, "learning_rate": 1.8996632679791914e-05, "loss": 0.0593, "step": 2910 }, { "grad_norm": 0.3883281946182251, "learning_rate": 1.8673389041186418e-05, "loss": 0.0373, "step": 2920 }, { "grad_norm": 0.44305619597435, "learning_rate": 1.8352286534827274e-05, "loss": 0.0378, "step": 2930 }, { "grad_norm": 0.36631765961647034, "learning_rate": 1.803334710764426e-05, "loss": 0.0363, "step": 2940 }, { "grad_norm": 0.40135014057159424, "learning_rate": 1.7716592558723556e-05, "loss": 0.0354, "step": 2950 }, { "grad_norm": 0.4747869074344635, "learning_rate": 1.7402044537817824e-05, "loss": 0.0465, "step": 2960 }, { "grad_norm": 0.4110397398471832, "learning_rate": 1.7089724543866465e-05, "loss": 0.0422, "step": 2970 }, { "grad_norm": 0.45568767189979553, "learning_rate": 1.6779653923526188e-05, "loss": 0.0333, "step": 2980 }, { "grad_norm": 0.3680548071861267, "learning_rate": 1.6471853869712023e-05, "loss": 0.031, "step": 2990 }, { "grad_norm": 0.44791269302368164, "learning_rate": 1.6166345420148787e-05, "loss": 0.0413, "step": 3000 }, { "grad_norm": 0.4803497791290283, "learning_rate": 1.5863149455933158e-05, "loss": 0.0379, "step": 3010 }, { "grad_norm": 0.4314368665218353, "learning_rate": 1.5562286700106558e-05, "loss": 0.0466, "step": 3020 }, { "grad_norm": 0.48052647709846497, "learning_rate": 1.526377771623869e-05, "loss": 0.0339, "step": 3030 }, { "grad_norm": 0.3225763738155365, "learning_rate": 1.496764290702209e-05, "loss": 0.0306, "step": 3040 }, { "grad_norm": 0.3679831326007843, "learning_rate": 1.4673902512877585e-05, "loss": 0.0415, "step": 3050 }, { "grad_norm": 0.4197865426540375, "learning_rate": 1.438257661057093e-05, "loss": 0.0395, "step": 3060 }, { "grad_norm": 0.4000924527645111, "learning_rate": 1.4093685111840566e-05, "loss": 0.0459, "step": 3070 }, { "grad_norm": 0.4727106988430023, "learning_rate": 1.380724776203668e-05, "loss": 0.039, "step": 3080 }, { "grad_norm": 0.3511694073677063, "learning_rate": 1.3523284138771642e-05, "loss": 0.0404, "step": 3090 }, { "grad_norm": 0.40936514735221863, "learning_rate": 1.3241813650581902e-05, "loss": 0.0389, "step": 3100 }, { "grad_norm": 0.37976589798927307, "learning_rate": 1.2962855535601438e-05, "loss": 0.0442, "step": 3110 }, { "grad_norm": 0.35307174921035767, "learning_rate": 1.2686428860246852e-05, "loss": 0.033, "step": 3120 }, { "grad_norm": 0.41772422194480896, "learning_rate": 1.241255251791421e-05, "loss": 0.0395, "step": 3130 }, { "grad_norm": 0.32120734453201294, "learning_rate": 1.2141245227687731e-05, "loss": 0.0377, "step": 3140 }, { "grad_norm": 0.3910685181617737, "learning_rate": 1.1872525533060269e-05, "loss": 0.0363, "step": 3150 }, { "grad_norm": 0.4167788028717041, "learning_rate": 1.1606411800666028e-05, "loss": 0.033, "step": 3160 }, { "grad_norm": 0.31405672430992126, "learning_rate": 1.134292221902511e-05, "loss": 0.0399, "step": 3170 }, { "grad_norm": 0.4124079942703247, "learning_rate": 1.1082074797300413e-05, "loss": 0.0351, "step": 3180 }, { "grad_norm": 0.4488357603549957, "learning_rate": 1.0823887364066737e-05, "loss": 0.0379, "step": 3190 }, { "grad_norm": 0.46956488490104675, "learning_rate": 1.0568377566092164e-05, "loss": 0.0437, "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:9ff094cd8a4d8ed30a0128f4f9c5426b501e4351dc8b2ee3904a66ca0ba0276bsize 8017123456789101112131415161718192021{ "task": "a3v4p", "frames": 35073, "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": 58.39}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)a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/cache_cosmos_reason2.pyAdded+60
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/check_reason2_offline.pyAdded+26
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/g1_feedback76_h16.pyAdded+27
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/g1_joint47_h40.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/groot_chain.pyAdded+139
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_aug_v2.pyAdded+163
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_inloop_eval.pyAdded+347
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_j47.pyAdded+39
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch.pyAdded+121
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_launch_v.pyAdded+102
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/hb_offline_fix.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_data.pyAdded+212
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/prepare_groot_j47.pyAdded+127
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/upload_groot_j47.pyAdded+66
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/verify_groot_cpu.pyAdded+57
a3-fridge-open-v4/b512-trim3f/step-003200/code/hb_groot/verify_j47_cpu.pyAdded+59
a3-fridge-open-v4/b512-trim3f/step-003200/config.jsonAdded+90
a3-fridge-open-v4/b512-trim3f/step-003200/dataset_meta/hb-dataset-receipt.jsonAdded+45
a3-fridge-open-v4/b512-trim3f/step-003200/dataset_meta/modality.jsonAdded+74
a3-fridge-open-v4/b512-trim3f/step-003200/embodiment_id.jsonAdded+57
a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/conf.yamlAdded+234
a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/config.yamlAdded+232
a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/dataset_statistics.jsonAdded+883
a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/final_model_config.jsonAdded+58
a3-fridge-open-v4/b512-trim3f/step-003200/experiment_cfg/final_processor_config.jsonAdded
a3-fridge-open-v4/b512-trim3f/step-003200/model-00001-of-00002.safetensorsAdded+3
a3-fridge-open-v4/b512-trim3f/step-003200/model-00002-of-00002.safetensorsAdded+3
a3-fridge-open-v4/b512-trim3f/step-003200/model.safetensors.index.jsonAdded
a3-fridge-open-v4/b512-trim3f/step-003200/processor_config.jsonAdded+1137
a3-fridge-open-v4/b512-trim3f/step-003200/protocol.jsonAdded+104
a3-fridge-open-v4/b512-trim3f/step-003200/statistics.jsonAdded
a3-fridge-open-v4/b512-trim3f/step-003200/train.logAdded
a3-fridge-open-v4/b512-trim3f/step-003200/trainer_state.jsonAdded+1954
a3-fridge-open-v4/b512-trim3f/step-003200/training_args.binAdded+3
a3-fridge-open-v4/b512-trim3f/step-003200/training_plan.jsonAdded+21
a3-fridge-open-v4/b512-trim3f/step-003200/wandb_config.jsonAdded+1
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/cache_cosmos_reason2.pyAdded+60
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/check_reason2_offline.pyAdded+26
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/g1_feedback76_h16.pyAdded+27
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/g1_joint47_h40.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/groot_chain.pyAdded+139
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
a3-fridge-open-v4/b512-trim3f/step-004000/code/hb_groot/hb_aug_v2.pyAdded+163