a29: 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)
- a29-drawer-close/b512/step-002000/code/hb_groot/cache_cosmos_reason2.pyAdded+60
- a29-drawer-close/b512/step-002000/code/hb_groot/check_reason2_offline.pyAdded+26
- a29-drawer-close/b512/step-002000/code/hb_groot/g1_feedback76_h16.pyAdded+27
- a29-drawer-close/b512/step-002000/code/hb_groot/g1_joint47_h40.pyAdded+24
- a29-drawer-close/b512/step-002000/code/hb_groot/groot_chain.pyAdded+139
- a29-drawer-close/b512/step-002000/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
- a29-drawer-close/b512/step-002000/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
- a29-drawer-close/b512/step-002000/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
- a29-drawer-close/b512/step-002000/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
- a29-drawer-close/b512/step-002000/code/hb_groot/hb_aug_v2.pyAdded+163
- a29-drawer-close/b512/step-002000/code/hb_groot/hb_inloop_eval.pyAdded+347
- a29-drawer-close/b512/step-002000/code/hb_groot/hb_j47.pyAdded+39
- a29-drawer-close/b512/step-002000/code/hb_groot/hb_launch.pyAdded+121
- a29-drawer-close/b512/step-002000/code/hb_groot/hb_launch_v.pyAdded+102
- a29-drawer-close/b512/step-002000/code/hb_groot/hb_offline_fix.pyAdded+24
- a29-drawer-close/b512/step-002000/code/hb_groot/prepare_groot_data.pyAdded+205
- a29-drawer-close/b512/step-002000/code/hb_groot/prepare_groot_j47.pyAdded+127
- a29-drawer-close/b512/step-002000/code/hb_groot/upload_groot_j47.pyAdded+66
- a29-drawer-close/b512/step-002000/code/hb_groot/verify_groot_cpu.pyAdded+57
- a29-drawer-close/b512/step-002000/code/hb_groot/verify_j47_cpu.pyAdded+59
- a29-drawer-close/b512/step-002000/config.jsonAdded+90
- a29-drawer-close/b512/step-002000/dataset_meta/hb-dataset-receipt.jsonAdded+45
- a29-drawer-close/b512/step-002000/dataset_meta/modality.jsonAdded+74
- a29-drawer-close/b512/step-002000/embodiment_id.jsonAdded+57
- a29-drawer-close/b512/step-002000/experiment_cfg/conf.yamlAdded+234
- a29-drawer-close/b512/step-002000/experiment_cfg/config.yamlAdded+232
- a29-drawer-close/b512/step-002000/experiment_cfg/dataset_statistics.jsonAdded+883
- a29-drawer-close/b512/step-002000/experiment_cfg/final_model_config.jsonAdded+58
- a29-drawer-close/b512/step-002000/experiment_cfg/final_processor_config.jsonAdded
- a29-drawer-close/b512/step-002000/model-00001-of-00002.safetensorsAdded+3
- a29-drawer-close/b512/step-002000/model-00002-of-00002.safetensorsAdded+3
- a29-drawer-close/b512/step-002000/model.safetensors.index.jsonAdded
- a29-drawer-close/b512/step-002000/processor_config.jsonAdded+1137
- a29-drawer-close/b512/step-002000/protocol.jsonAdded+107
- a29-drawer-close/b512/step-002000/statistics.jsonAdded
- a29-drawer-close/b512/step-002000/train.logAdded
- a29-drawer-close/b512/step-002000/trainer_state.jsonAdded+1234
- a29-drawer-close/b512/step-002000/training_args.binAdded+3
- a29-drawer-close/b512/step-002000/training_plan.jsonAdded+24
- a29-drawer-close/b512/step-002000/wandb_config.jsonAdded+1
- a29-drawer-close/b512/step-002500/code/hb_groot/cache_cosmos_reason2.pyAdded+60
- a29-drawer-close/b512/step-002500/code/hb_groot/check_reason2_offline.pyAdded+26
- a29-drawer-close/b512/step-002500/code/hb_groot/g1_feedback76_h16.pyAdded+27
- a29-drawer-close/b512/step-002500/code/hb_groot/g1_joint47_h40.pyAdded+24
- a29-drawer-close/b512/step-002500/code/hb_groot/groot_chain.pyAdded+139
- a29-drawer-close/b512/step-002500/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
- a29-drawer-close/b512/step-002500/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
- a29-drawer-close/b512/step-002500/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
- a29-drawer-close/b512/step-002500/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
- a29-drawer-close/b512/step-002500/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 = True123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205"""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) "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"} # 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")} # 2026-11-14: 2-camera re-train (user)PLANNER = {"a14v2", "a14cr3"} # 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"): # 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"): # 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": "a29", "source": "/mnt/nas/cross/Team/RobotAgent/Personal/baijiaqi/humanoid-benchmark-work/preflight-20261104T1648Z/a29-drawer-close-black-marble-30hz-d03c19e/data", "episodes": 100, "frames": 30041, "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": "bd3479b6810e46e551236d4c56638997298e07af3d0c805c6efd872e0626208d"}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/a29 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/a29/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: 500 save_total_limit: 5 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: 500123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232load_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/a29 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/a29/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: 500 save_total_limit: 5 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.534028172492981, -0.14577800035476685, -0.10741252452135086, 0.1223539188504219, -0.876969575881958, -0.1527269333600998 ], "max": [ 0.35993677377700806, 0.26245301961898804, 0.49964162707328796, 1.3215410709381104, 0.40844595432281494, 0.13166311383247375 ], "mean": [ -0.07639598101377487, 0.05036333203315735, 0.11190564930438995, 0.33528202772140503, -0.16446325182914734, -0.004820049740374088 ], "std": [ 0.14109931886196136, 0.0519041046500206, 0.0648188665509224, 0.22648517787456512, 0.11301981657743454, 0.03953135758638382 ], "q01": [ -0.417190283536911, -0.07877586185932159, -0.04071468636393547, 0.15576617121696473, -0.4854760646820068, -0.09140114337205887 ], "q99": [ 0.21878034174442265, 0.1836558401584625, 0.275507593154907, 1.1286747694015502, 0.04843496829271303, 0.09497715234756465 ] }, "right_leg": { "min": [ -0.6530642509460449, -0.34237927198410034, -0.5516390204429626, 0.11220990866422653, -0.7392274141311646, -0.13110315799713135 ], "max": [ 0.25757214426994324, 0.14982159435749054, 0.1273796558380127, 1.1904000043869019, 0.24902525544166565, 0.17109742760658264 ], "mean": [ -0.1325187385082245, -0.09894198924303055, -0.2247089296579361, 0.35335782170295715, -0.15784423053264618, -0.004799700807780027 ], "std": [ 0.1358546018600464, 0.0619482696056366, 0.09114930778741837, 0.2043185979127884, 0.10959497094154358, 0.05378849059343338 ], "q01": [ -0.49363011717796323, -0.25218828320503234, -0.47032172083854673, 0.14298123121261597, -0.45122013688087464, -0.10308443903923034 ], "q99": [ 0.12073682248592374, 0.016281763836741344, -0.03296960443258317, 1.055682277679443, 0.06629634946584678, 0.11890927255153656 ] }, "waist": { "min": [ -0.06260737776756287, -0.12067101150751114, -0.011655419133603573 ], "max": [ 0.130329892039299, 0.10224339365959167, 0.31962135434150696 ], "mean": [ 0.0051573640666902065, -0.005317479372024536, 0.17810982465744019 ], "std": [ 0.029423022642731667, 0.017899883911013603, 0.09952805191278458 ], "q01": [ -0.04440968483686447, -0.05223983824253082, 0.008049335703253746 ], "q99": [ 0.08051174283027648, 0.03354160413146017, 0.29587399959564203 ] }, "left_arm": { "min": [ -0.3356657326221466, -0.1486136019229889, -0.14513139426708221, -0.2398998737335205, -1.6966043710708618, -0.33168429136276245, -1.6061123609542847 ], "max": [ 0.7473008036613464, 0.3672693073749542, 0.43278905749320984, 1.1210671663284302, 0.43844008445739746, 1.6189088821411133, 0.13420991599559784 ], "mean": [ 0.36619657278060913, 0.11644535511732101, 0.09414791315793991, 0.6287029385566711, -0.9161337018013, 0.17411379516124725, -0.7752392888069153 ], "std": [ 0.1756298691034317, 0.05833153426647186, 0.0699504017829895, 0.19866740703582764, 0.6503497362136841, 0.19749969244003296, 0.5829147696495056 ], "q01": [ -0.12911565899848937, -0.021799198538064956, -0.029253486171364782, 0.06855058819055558, -1.585989809036255, -0.06389445811510086, -1.534110188484192 ], "q99": [ 0.6452373027801513, 0.2572611808776854, 0.2995794355869292, 0.9605796933174133, 0.16961778402328487, 1.107173442840575, 0.052000929415225446 ] }, "right_arm": { "min": [ 0.09308633953332901, -0.2865353524684906, -0.3184954524040222, 0.3765525221824646, -0.1930495649576187, -0.090675950050354, -0.060834407806396484 ], "max": [ 0.3154947757720947, -0.043002914637327194, 0.17981280386447906, 0.7492755055427551, 0.1251305788755417, 0.12946312129497528, 0.393763929605484 ], "mean": [ 0.21060234308242798, -0.15149006247520447, -0.10547209531068802, 0.573723316192627, -0.03791941702365875, 0.01571260578930378, 0.11962001025676727 ], "std": [ 0.024794813245534897, 0.044359199702739716, 0.09630613029003143, 0.03493403643369675, 0.04727216809988022, 0.027637340128421783, 0.0990808755159378 ], "q01": [ 0.14691382944583892, -0.2541212260723114, -0.2688462555408478, 0.481768810749054, -0.13288493752479552, -0.04776591286063194, -0.03384426012635231 ], "q99": [ 0.2677656173706054, -0.07813312858343129, 0.08268519043922411, 0.6668728351593016, 0.0758851110935211, 0.08943754434585542, 0.335182100534439 ] }, "left_hand": { "min": [ 0.9033362865447998, 0.9876859784126282, 0.9490998387336731, 0.704720675945282, 0.3992108106613159, 0.2467861771583557 ], "max": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "mean": [ 0.9997776746749878, 0.9999895095825195, 0.9991346001625061, 0.9988449811935425, 0.9914653301239014, 0.9944230914115906 ], "std": [ 0.0023649311624573273, 0.0002286125527114818, 0.0033685748930971497, 0.009352529421447039, 0.04256942495703681, 0.044920779764651635 ], "q01": [ 0.9927663207054138, 0.9997372627258301, 0.9819427847862243, 0.9680260419845581, 0.74067622423172, 0.8024724721908569 ], "q99": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] }, "right_hand": { "min": [ 0.9998832941055298, 0.9998472929000854, 0.9998288154602051, 0.9937314391136169, 0.9971558451652527, 0.9992426633834839 ], "max": [ 1.0, 1.0, 1.0, 1.0, 0.9983106255531311, 1.0 ], "mean": [ 0.999999463558197, 0.9999992251396179, 0.9999991655349731, 0.9999977946281433, 0.9979252815246582, 0.9999332427978516 ], "std": [ 2.2233051838574637e-05, 2.67843243011971e-05, 2.914313434023152e-05, 8.36224933969422e-05, 0.00024726107944292937, 0.0002013162884116509 ], "q01": [ 0.9999318718910217, 0.9999141097068787, 0.9999052286148071, 0.9999100565910339, 0.9973783493041992, 0.9994995951652527 ], "q99": [ 1.0, 1.0, 1.0, 1.0, 0.9980516910552979, 0.9999856352806091 ] }, "projected_gravity": { "min": [ -0.20440885424613953, -0.14709624648094177, -1.0 ], "max": [ 0.12773169577121735, 0.0766577422618866, -0.9782990217208862 ], "mean": [ -0.036762505769729614, -0.009412350133061409, -0.9982131123542786 ], "std": [ 0.041555434465408325, 0.02344907633960247, 0.0028139858040861455 ], "q01": [ -0.1513088047504425, -0.09491023570299148, -0.9999956250190735 ], "q99": [ 0.05160920098423956, 0.02682872228324408, -0.9869206070899963 ] } }, "action": { "motion_token": { "min": [ -0.125, -0.5625, -0.375, -0.375, -0.5, -0.375, -0.1875, -0.4375, -0.3125, -0.3125, -0.4375, -0.3125, 0.125, -0.4375, -0.1875, -0.3125, -0.3125, -0.375, -0.3125, -0.5625, -0.3125, -0.375, -0.5, -0.5, -0.625, 0.0, -0.1875, -0.1875, -0.0625, -0.5625, -0.0625, -0.6875, -0.4375, -0.5, 0.0, -0.125, -0.375, -0.125, -0.0625, -0.1875, -0.3125, -0.1875, -0.1875, -0.1875, -0.125, 0.1875, 0.1875, -0.4375, -0.625, -0.4375, -0.3125, -0.25, -0.4375, -0.5, -0.3125, -0.3125, 0.1875, -0.125, -0.0625, -0.25, -0.1875, -0.1875, -0.0625, -0.375 ], "max": [ 0.375, 0.0625, 0.1875, 0.375, 0.375, 0.25, 0.375, 0.125, 0.0, 0.3125, 0.1875, 0.1875, 0.5, 0.3125, 0.3125, 0.3125, 0.0625, 0.1875, 0.3125, 0.125, 0.375, 0.0625, 0.0625, 0.3125, -0.0625, 0.5, 0.125, 0.25, 0.375, 0.0, 0.4375, 0.1875, 0.125, 0.3125, 0.5625, 0.3125, 0.4375, 0.1875, 0.5625, 0.375, 0.25, 0.3125, 0.375, 0.4375, 0.5, 0.4375, 0.625, 0.125, 0.125, 0.0, 0.375, 0.125, 0.0, 0.125, 0.25, 0.25, 0.5, 0.25, 0.3125, 0.4375, 0.3125, 0.25, 0.6875, 0.1875 ], "mean": [ 0.17059186100959778, -0.2530999183654785, -0.06875811517238617, 0.02347000688314438, -0.01965647004544735, -0.05156286433339119, 0.0317191518843174, -0.14400944113731384, -0.13838794827461243, 0.02956376224756241, -0.21193327009677887, -0.09570877999067307, 0.3285801112651825, -0.04470764845609665, 0.11257947236299515, -0.0030895275995135307, -0.12385988980531693, -0.1394157111644745, 0.019219566136598587, -0.23617930710315704, 0.036778900772333145, -0.15651318430900574, -0.22744125127792358, -0.14134225249290466, -0.35456958413124084, 0.24737650156021118, -0.015869976952672005, 0.03560758754611015, 0.16090302169322968, -0.29230260848999023, 0.18102551996707916, -0.35666048526763916, -0.16304175555706024, -0.1404767632484436, 0.33271196484565735, 0.15131403505802155, -0.08912403136491776, -0.00544256204739213, 0.18380296230316162, 0.08557679504156113, -0.09318722784519196, 0.0881774052977562, 0.11623905599117279, 0.21342290937900543, 0.15590152144432068, 0.3040657043457031, 0.39258015155792236, -0.18963666260242462, -0.31082311272621155, -0.25856536626815796, -0.004643653519451618, -0.050593357533216476, -0.2170325517654419, -0.22278927266597748, -0.029147664085030556, -0.0018183483043685555, 0.3720540404319763, 0.06046527996659279, 0.1746654510498047, 0.07812032103538513, 0.02071959897875786, 0.024918029084801674, 0.35415348410606384, -0.10424919426441193 ], "std": [ 0.07860808819532394, 0.11456776410341263, 0.07556218653917313, 0.1207406297326088, 0.17311538755893707, 0.09805624186992645, 0.08413468301296234, 0.11097259074449539, 0.06497015058994293, 0.13934434950351715, 0.1381426602602005, 0.0870852991938591, 0.08245576918125153, 0.20011569559574127, 0.07920319586992264, 0.08283261209726334, 0.1068156510591507, 0.12675084173679352, 0.09672368317842484, 0.18222853541374207, 0.15581756830215454, 0.08829891681671143, 0.1476040929555893, 0.19344016909599304, 0.13316532969474792, 0.1166498064994812, 0.07802724093198776, 0.07686437666416168, 0.07159039378166199, 0.13230322301387787, 0.089718759059906, 0.20554637908935547, 0.10300076007843018, 0.20787084102630615, 0.14730237424373627, 0.08823499083518982, 0.15347924828529358, 0.06539694219827652, 0.11560209840536118, 0.13951250910758972, 0.06605646014213562, 0.0892881527543068, 0.10084298253059387, 0.19827210903167725, 0.10456417500972748, 0.05822211876511574, 0.10189230740070343, 0.11380606144666672, 0.21230778098106384, 0.05700475722551346, 0.11427851021289825, 0.07635960727930069, 0.07172281295061111, 0.08917270600795746, 0.1316765397787094, 0.07519087195396423, 0.09160835295915604, 0.067827969789505, 0.06876632571220398, 0.11512249708175659, 0.09993879497051239, 0.08094482868909836, 0.1368514746427536, 0.1265089362859726 ], "q01": [ 0.0, -0.5, -0.25, -0.25, -0.4375, -0.3125, -0.125, -0.375, -0.25, -0.25, -0.375, -0.3125, 0.1875, -0.375, -0.0625, -0.25, -0.3125, -0.3125, -0.1875, -0.5, -0.25, -0.3125, -0.4375, -0.4375, -0.5625, 0.0625, -0.1875, -0.125, 0.0, -0.5625, 0.0, -0.625, -0.375, -0.4375, 0.0625, -0.0625, -0.375, -0.0625, 0.0, -0.1875, -0.1875, -0.125, -0.125, -0.125, -0.0625, 0.1875, 0.25, -0.375, -0.5625, -0.375, -0.25, -0.25, -0.375, -0.4375, -0.25, -0.1875, 0.1875, -0.0625, 0.0, -0.1875, -0.125, -0.1875, 0.0, -0.3125 ], "q99": [ 0.3125, 0.0, 0.125, 0.3125, 0.3125, 0.1875, 0.25, 0.125, 0.0, 0.25, 0.125, 0.125, 0.4375, 0.3125, 0.25, 0.1875, 0.0625, 0.125, 0.1875, 0.0625, 0.3125, 0.0625, 0.0625, 0.25, -0.125, 0.5, 0.0625, 0.1875, 0.3125, -0.0625, 0.375, 0.125, 0.0625, 0.3125, 0.5625, 0.25, 0.3125, 0.125, 0.5, 0.3125, 0.125, 0.25, 0.3125, 0.375, 0.4375, 0.375, 0.5625, 0.0625, 0.0625, -0.125, 0.3125, 0.0625, 0.0, 0.0, 0.1875, 0.1875, 0.5, 0.1875, 0.25, 0.3125, 0.25, 0.1875, 0.5625, 0.125 ] }, "left_hand_joints": { "min": [ 0.9033362865447998, 0.9876859784126282, 0.9490998387336731, 0.704720675945282, 0.3992108106613159, 0.2467861771583557 ], "max": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ], "mean": [ 0.9997776746749878, 0.9999895095825195, 0.9991346001625061, 0.9988449811935425, 0.9914653301239014, 0.9944230914115906 ], "std": [ 0.0023649311624573273, 0.0002286125527114818, 0.0033685748930971497, 0.009352529421447039, 0.04256942495703681, 0.044920779764651635 ], "q01": [ 0.9927663207054138, 0.9997372627258301, 0.9819427847862243, 0.9680260419845581, 0.74067622423172, 0.8024724721908569 ], "q99": [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] }, "right_hand_joints": { "min": [ 0.9998832941055298, 0.9998472929000854, 0.9998288154602051, 0.9937314391136169, 0.9971558451652527, 0.9992426633834839 ], "max": [ 1.0, 1.0, 1.0, 1.0, 0.9983106255531311, 1.0 ], "mean": [ 0.999999463558197, 0.9999992251396179, 0.9999991655349731, 0.9999977946281433, 0.9979252815246582, 0.9999332427978516 ], "std": [ 2.2233051838574637e-05, 2.67843243011971e-05, 2.914313434023152e-05, 8.36224933969422e-05, 0.00024726107944292937, 0.0002013162884116509 ], "q01": [ 0.9999318718910217, 0.9999141097068787, 0.9999052286148071, 0.9999100565910339, 0.9973783493041992, 0.9994995951652527 ], "q99": [ 1.0, 1.0, 1.0, 1.0, 0.9980516910552979, 0.9999856352806091 ] } }, "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:6f4a07101149ffb081bcecd5aa02a4f6bf416d9d5c301fc8b4a3f3e2a1e109dbsize 4990519232123version https://git-lfs.github.com/spec/v1oid sha256:3c16adb491d31f295ed18f213f0cfa484e6339dba0a75574a7c46b6705096a5csize 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 }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107{ "model": "GR00T N1.7 (Gr00tN1d7), full fine-tune: all modules (tune_llm, tune_visual, projector, diffusion action head, VLLN)", "task": "A29 drawer close, black-marble kitchen (G1)", "task_dir": "a29-drawer-close/b512", "robot": "Unitree G1", "training_data": "a29-drawer-close-black-marble-30hz-v1 @d03c19e6 (all 100 episodes, 30 Hz; ego_view + chest of the four views)", "episodes": 100, "epoch_completed": null, "global_step": 2000, "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": [ 2000, 2500, 3000, 3500, 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": 68.17, "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": 30041, "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": "7a887ebb2709", "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": 16500, "code/hb_groot/prepare_groot_j47.py": 7913, "code/hb_groot/upload_groot_j47.py": 4426, "code/hb_groot/verify_groot_cpu.py": 2776, "code/hb_groot/verify_j47_cpu.py": 3249, "config.json": 2219, "dataset_meta/hb-dataset-receipt.json": 783, "dataset_meta/modality.json": 1537, "embodiment_id.json": 2226, "experiment_cfg/conf.yaml": 5793, "experiment_cfg/config.yaml": 5761, "experiment_cfg/dataset_statistics.json": 20430, "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": 4313523, "train.log": 399179, "trainer_state.json": 28274, "training_args.bin": 8017, "training_plan.json": 659, "wandb_config.json": 58 }}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234{ "best_global_step": null, "best_metric": null, "best_model_checkpoint": null, "epoch": 0.5, "eval_steps": 500, "global_step": 2000, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "grad_norm": 0.3794187009334564, "learning_rate": 4.5e-06, "loss": 1.3775, "step": 10 }, { "grad_norm": 0.7897610068321228, "learning_rate": 9.5e-06, "loss": 1.3298, "step": 20 }, { "grad_norm": 0.6254107356071472, "learning_rate": 1.45e-05, "loss": 1.2219, "step": 30 }, { "grad_norm": 0.5520678162574768, "learning_rate": 1.9500000000000003e-05, "loss": 1.1408, "step": 40 }, { "grad_norm": 0.38577595353126526, "learning_rate": 2.45e-05, "loss": 1.1191, "step": 50 }, { "grad_norm": 0.3105880618095398, "learning_rate": 2.95e-05, "loss": 1.1062, "step": 60 }, { "grad_norm": 0.29013824462890625, "learning_rate": 3.45e-05, "loss": 1.1094, "step": 70 }, { "grad_norm": 0.2956033945083618, "learning_rate": 3.9500000000000005e-05, "loss": 1.0974, "step": 80 }, { "grad_norm": 0.508359968662262, "learning_rate": 4.4500000000000004e-05, "loss": 1.0893, "step": 90 }, { "grad_norm": 0.4166826903820038, "learning_rate": 4.9500000000000004e-05, "loss": 1.0803, "step": 100 }, { "grad_norm": 0.7501237392425537, "learning_rate": 5.45e-05, "loss": 1.0425, "step": 110 }, { "grad_norm": 0.7332383394241333, "learning_rate": 5.95e-05, "loss": 0.982, "step": 120 }, { "grad_norm": 0.7797027230262756, "learning_rate": 6.450000000000001e-05, "loss": 0.9133, "step": 130 }, { "grad_norm": 0.9354603290557861, "learning_rate": 6.95e-05, "loss": 0.8641, "step": 140 }, { "grad_norm": 1.236518144607544, "learning_rate": 7.450000000000001e-05, "loss": 0.8137, "step": 150 }, { "grad_norm": 0.9075495004653931, "learning_rate": 7.950000000000001e-05, "loss": 0.7733, "step": 160 }, { "grad_norm": 0.8641310930252075, "learning_rate": 8.450000000000001e-05, "loss": 0.7376, "step": 170 }, { "grad_norm": 0.8242097496986389, "learning_rate": 8.950000000000001e-05, "loss": 0.713, "step": 180 }, { "grad_norm": 0.8543626666069031, "learning_rate": 9.449999999999999e-05, "loss": 0.6777, "step": 190 }, { "grad_norm": 1.0067710876464844, "learning_rate": 9.95e-05, "loss": 0.6466, "step": 200 }, { "grad_norm": 1.0546504259109497, "learning_rate": 9.999861593790126e-05, "loss": 0.6191, "step": 210 }, { "grad_norm": 1.1421971321105957, "learning_rate": 9.999383162408304e-05, "loss": 0.5928, "step": 220 }, { "grad_norm": 1.1368428468704224, "learning_rate": 9.998563029828259e-05, "loss": 0.5678, "step": 230 }, { "grad_norm": 1.1925424337387085, "learning_rate": 9.997401252104962e-05, "loss": 0.5481, "step": 240 }, { "grad_norm": 0.9638860821723938, "learning_rate": 9.995897908644378e-05, "loss": 0.5231, "step": 250 }, { "grad_norm": 1.120188593864441, "learning_rate": 9.994053102198034e-05, "loss": 0.5002, "step": 260 }, { "grad_norm": 1.1111263036727905, "learning_rate": 9.991866958856003e-05, "loss": 0.502, "step": 270 }, { "grad_norm": 1.0907953977584839, "learning_rate": 9.989339628038276e-05, "loss": 0.476, "step": 280 }, { "grad_norm": 1.0150076150894165, "learning_rate": 9.98647128248456e-05, "loss": 0.4779, "step": 290 }, { "grad_norm": 1.0606255531311035, "learning_rate": 9.98326211824246e-05, "loss": 0.4467, "step": 300 }, { "grad_norm": 1.214811086654663, "learning_rate": 9.979712354654091e-05, "loss": 0.4427, "step": 310 }, { "grad_norm": 1.1601444482803345, "learning_rate": 9.975822234341079e-05, "loss": 0.4093, "step": 320 }, { "grad_norm": 1.0899215936660767, "learning_rate": 9.97159202318798e-05, "loss": 0.3992, "step": 330 }, { "grad_norm": 0.9639289379119873, "learning_rate": 9.967022010324105e-05, "loss": 0.3765, "step": 340 }, { "grad_norm": 1.157136082649231, "learning_rate": 9.962112508103765e-05, "loss": 0.3553, "step": 350 }, { "grad_norm": 1.1367909908294678, "learning_rate": 9.956863852084914e-05, "loss": 0.3412, "step": 360 }, { "grad_norm": 1.1543182134628296, "learning_rate": 9.951276401006221e-05, "loss": 0.3422, "step": 370 }, { "grad_norm": 1.2415509223937988, "learning_rate": 9.945350536762543e-05, "loss": 0.3151, "step": 380 }, { "grad_norm": 1.0457683801651, "learning_rate": 9.939086664378829e-05, "loss": 0.3053, "step": 390 }, { "grad_norm": 0.9994325041770935, "learning_rate": 9.932485211982437e-05, "loss": 0.2906, "step": 400 }, { "grad_norm": 1.020624041557312, "learning_rate": 9.92554663077387e-05, "loss": 0.2845, "step": 410 }, { "grad_norm": 1.2020198106765747, "learning_rate": 9.918271394995935e-05, "loss": 0.2741, "step": 420 }, { "grad_norm": 1.0915557146072388, "learning_rate": 9.910660001901335e-05, "loss": 0.2713, "step": 430 }, { "grad_norm": 0.9826195240020752, "learning_rate": 9.902712971718675e-05, "loss": 0.2516, "step": 440 }, { "grad_norm": 1.2010838985443115, "learning_rate": 9.894430847616915e-05, "loss": 0.2415, "step": 450 }, { "grad_norm": 1.3101754188537598, "learning_rate": 9.885814195668232e-05, "loss": 0.238, "step": 460 }, { "grad_norm": 1.2421340942382812, "learning_rate": 9.876863604809344e-05, "loss": 0.2324, "step": 470 }, { "grad_norm": 1.205365538597107, "learning_rate": 9.867579686801245e-05, "loss": 0.2183, "step": 480 }, { "grad_norm": 1.0601333379745483, "learning_rate": 9.8579630761874e-05, "loss": 0.2038, "step": 490 }, { "grad_norm": 1.210420846939087, "learning_rate": 9.848014430250367e-05, "loss": 0.1909, "step": 500 }, { "grad_norm": 1.2366650104522705, "learning_rate": 9.837734428966885e-05, "loss": 0.1887, "step": 510 }, { "grad_norm": 1.2117027044296265, "learning_rate": 9.827123774961383e-05, "loss": 0.1747, "step": 520 }, { "grad_norm": 1.1268073320388794, "learning_rate": 9.816183193457968e-05, "loss": 0.179, "step": 530 }, { "grad_norm": 1.0325425863265991, "learning_rate": 9.804913432230856e-05, "loss": 0.1583, "step": 540 }, { "grad_norm": 1.2056756019592285, "learning_rate": 9.793315261553252e-05, "loss": 0.1588, "step": 550 }, { "grad_norm": 1.2255300283432007, "learning_rate": 9.781389474144717e-05, "loss": 0.1466, "step": 560 }, { "grad_norm": 1.3749446868896484, "learning_rate": 9.76913688511698e-05, "loss": 0.1401, "step": 570 }, { "grad_norm": 1.2854138612747192, "learning_rate": 9.756558331918227e-05, "loss": 0.1425, "step": 580 }, { "grad_norm": 1.1009594202041626, "learning_rate": 9.743654674275855e-05, "loss": 0.1473, "step": 590 }, { "grad_norm": 1.225917100906372, "learning_rate": 9.730426794137727e-05, "loss": 0.1447, "step": 600 }, { "grad_norm": 1.0391154289245605, "learning_rate": 9.716875595611879e-05, "loss": 0.1605, "step": 610 }, { "grad_norm": 1.1129077672958374, "learning_rate": 9.703002004904729e-05, "loss": 0.1331, "step": 620 }, { "grad_norm": 1.2230124473571777, "learning_rate": 9.688806970257773e-05, "loss": 0.1201, "step": 630 }, { "grad_norm": 1.0699435472488403, "learning_rate": 9.674291461882774e-05, "loss": 0.1281, "step": 640 }, { "grad_norm": 1.1297372579574585, "learning_rate": 9.659456471895445e-05, "loss": 0.1353, "step": 650 }, { "grad_norm": 1.232047200202942, "learning_rate": 9.644303014247648e-05, "loss": 0.1302, "step": 660 }, { "grad_norm": 1.0400594472885132, "learning_rate": 9.628832124658085e-05, "loss": 0.1525, "step": 670 }, { "grad_norm": 1.022633671760559, "learning_rate": 9.613044860541507e-05, "loss": 0.1342, "step": 680 }, { "grad_norm": 1.1698349714279175, "learning_rate": 9.596942300936445e-05, "loss": 0.1275, "step": 690 }, { "grad_norm": 1.0279994010925293, "learning_rate": 9.580525546431459e-05, "loss": 0.1317, "step": 700 }, { "grad_norm": 1.0328749418258667, "learning_rate": 9.563795719089911e-05, "loss": 0.143, "step": 710 }, { "grad_norm": 1.3422542810440063, "learning_rate": 9.546753962373281e-05, "loss": 0.1267, "step": 720 }, { "grad_norm": 0.9853194355964661, "learning_rate": 9.529401441062997e-05, "loss": 0.1271, "step": 730 }, { "grad_norm": 1.1162885427474976, "learning_rate": 9.511739341180842e-05, "loss": 0.1039, "step": 740 }, { "grad_norm": 0.9665213227272034, "learning_rate": 9.493768869907886e-05, "loss": 0.1267, "step": 750 }, { "grad_norm": 1.0232644081115723, "learning_rate": 9.475491255501968e-05, "loss": 0.1099, "step": 760 }, { "grad_norm": 1.0893474817276, "learning_rate": 9.456907747213748e-05, "loss": 0.1164, "step": 770 }, { "grad_norm": 1.1755614280700684, "learning_rate": 9.438019615201336e-05, "loss": 0.1181, "step": 780 }, { "grad_norm": 1.0117216110229492, "learning_rate": 9.418828150443469e-05, "loss": 0.1109, "step": 790 }, { "grad_norm": 0.8855955600738525, "learning_rate": 9.399334664651262e-05, "loss": 0.1164, "step": 800 }, { "grad_norm": 1.0298722982406616, "learning_rate": 9.379540490178581e-05, "loss": 0.1252, "step": 810 }, { "grad_norm": 1.0194453001022339, "learning_rate": 9.359446979930955e-05, "loss": 0.1153, "step": 820 }, { "grad_norm": 0.9571192264556885, "learning_rate": 9.33905550727312e-05, "loss": 0.1187, "step": 830 }, { "grad_norm": 1.2048546075820923, "learning_rate": 9.318367465935142e-05, "loss": 0.1108, "step": 840 }, { "grad_norm": 1.176647424697876, "learning_rate": 9.29738426991717e-05, "loss": 0.1264, "step": 850 }, { "grad_norm": 0.947502851486206, "learning_rate": 9.276107353392774e-05, "loss": 0.1169, "step": 860 }, { "grad_norm": 0.947023868560791, "learning_rate": 9.254538170610938e-05, "loss": 0.114, "step": 870 }, { "grad_norm": 1.015486478805542, "learning_rate": 9.232678195796654e-05, "loss": 0.1048, "step": 880 }, { "grad_norm": 0.9553835988044739, "learning_rate": 9.210528923050164e-05, "loss": 0.1022, "step": 890 }, { "grad_norm": 1.008416771888733, "learning_rate": 9.188091866244834e-05, "loss": 0.1208, "step": 900 }, { "grad_norm": 1.0629065036773682, "learning_rate": 9.165368558923695e-05, "loss": 0.0975, "step": 910 }, { "grad_norm": 0.9684891104698181, "learning_rate": 9.142360554194618e-05, "loss": 0.1165, "step": 920 }, { "grad_norm": 1.1541715860366821, "learning_rate": 9.119069424624163e-05, "loss": 0.1042, "step": 930 }, { "grad_norm": 0.9696004986763, "learning_rate": 9.0954967621301e-05, "loss": 0.0964, "step": 940 }, { "grad_norm": 1.0839933156967163, "learning_rate": 9.071644177872594e-05, "loss": 0.1161, "step": 950 }, { "grad_norm": 0.9450490474700928, "learning_rate": 9.047513302144095e-05, "loss": 0.0952, "step": 960 }, { "grad_norm": 0.9420949220657349, "learning_rate": 9.023105784257906e-05, "loss": 0.0973, "step": 970 }, { "grad_norm": 0.8834567666053772, "learning_rate": 8.998423292435454e-05, "loss": 0.1105, "step": 980 }, { "grad_norm": 1.07701575756073, "learning_rate": 8.973467513692265e-05, "loss": 0.1072, "step": 990 }, { "grad_norm": 0.9267083406448364, "learning_rate": 8.94824015372267e-05, "loss": 0.1059, "step": 1000 }, { "grad_norm": 1.0529786348342896, "learning_rate": 8.922742936783207e-05, "loss": 0.0939, "step": 1010 }, { "grad_norm": 1.2052042484283447, "learning_rate": 8.896977605574788e-05, "loss": 0.1026, "step": 1020 }, { "grad_norm": 0.8803035616874695, "learning_rate": 8.870945921123576e-05, "loss": 0.1005, "step": 1030 }, { "grad_norm": 1.059830904006958, "learning_rate": 8.844649662660624e-05, "loss": 0.1077, "step": 1040 }, { "grad_norm": 0.8729472756385803, "learning_rate": 8.818090627500266e-05, "loss": 0.0941, "step": 1050 }, { "grad_norm": 1.099016547203064, "learning_rate": 8.791270630917275e-05, "loss": 0.1165, "step": 1060 }, { "grad_norm": 0.9778003096580505, "learning_rate": 8.764191506022795e-05, "loss": 0.1067, "step": 1070 }, { "grad_norm": 0.8649887442588806, "learning_rate": 8.736855103639037e-05, "loss": 0.1016, "step": 1080 }, { "grad_norm": 0.9743629693984985, "learning_rate": 8.709263292172794e-05, "loss": 0.0771, "step": 1090 }, { "grad_norm": 0.9895583987236023, "learning_rate": 8.681417957487729e-05, "loss": 0.0965, "step": 1100 }, { "grad_norm": 1.0191885232925415, "learning_rate": 8.653321002775478e-05, "loss": 0.1049, "step": 1110 }, { "grad_norm": 0.8598974347114563, "learning_rate": 8.624974348425574e-05, "loss": 0.0981, "step": 1120 }, { "grad_norm": 0.7824508547782898, "learning_rate": 8.596379931894188e-05, "loss": 0.1094, "step": 1130 }, { "grad_norm": 0.7978663444519043, "learning_rate": 8.567539707571703e-05, "loss": 0.1018, "step": 1140 }, { "grad_norm": 0.9207552671432495, "learning_rate": 8.538455646649146e-05, "loss": 0.1029, "step": 1150 }, { "grad_norm": 1.1818913221359253, "learning_rate": 8.509129736983446e-05, "loss": 0.0971, "step": 1160 }, { "grad_norm": 0.9014419913291931, "learning_rate": 8.479563982961571e-05, "loss": 0.0948, "step": 1170 }, { "grad_norm": 0.8079601526260376, "learning_rate": 8.449760405363539e-05, "loss": 0.0944, "step": 1180 }, { "grad_norm": 0.859209418296814, "learning_rate": 8.419721041224287e-05, "loss": 0.098, "step": 1190 }, { "grad_norm": 0.928458034992218, "learning_rate": 8.389447943694451e-05, "loss": 0.1007, "step": 1200 }, { "grad_norm": 0.9727760553359985, "learning_rate": 8.358943181900032e-05, "loss": 0.0999, "step": 1210 }, { "grad_norm": 0.8428835272789001, "learning_rate": 8.328208840800981e-05, "loss": 0.0862, "step": 1220 }, { "grad_norm": 0.9168754816055298, "learning_rate": 8.297247021048686e-05, "loss": 0.0963, "step": 1230 }, { "grad_norm": 0.9363547563552856, "learning_rate": 8.266059838842396e-05, "loss": 0.088, "step": 1240 }, { "grad_norm": 0.8058893084526062, "learning_rate": 8.23464942578459e-05, "loss": 0.0982, "step": 1250 }, { "grad_norm": 0.8279845714569092, "learning_rate": 8.203017928735277e-05, "loss": 0.0884, "step": 1260 }, { "grad_norm": 0.9382731914520264, "learning_rate": 8.17116750966526e-05, "loss": 0.1016, "step": 1270 }, { "grad_norm": 0.9219934940338135, "learning_rate": 8.139100345508377e-05, "loss": 0.0955, "step": 1280 }, { "grad_norm": 1.018378496170044, "learning_rate": 8.106818628012697e-05, "loss": 0.0987, "step": 1290 }, { "grad_norm": 0.9395440220832825, "learning_rate": 8.074324563590736e-05, "loss": 0.0888, "step": 1300 }, { "grad_norm": 0.7738053798675537, "learning_rate": 8.041620373168628e-05, "loss": 0.0901, "step": 1310 }, { "grad_norm": 1.0005046129226685, "learning_rate": 8.008708292034349e-05, "loss": 0.0987, "step": 1320 }, { "grad_norm": 0.9008582234382629, "learning_rate": 7.975590569684925e-05, "loss": 0.0822, "step": 1330 }, { "grad_norm": 0.8464183211326599, "learning_rate": 7.942269469672687e-05, "loss": 0.0884, "step": 1340 }, { "grad_norm": 0.7918450236320496, "learning_rate": 7.908747269450558e-05, "loss": 0.0797, "step": 1350 }, { "grad_norm": 0.8357515335083008, "learning_rate": 7.875026260216393e-05, "loss": 0.0867, "step": 1360 }, { "grad_norm": 1.0057469606399536, "learning_rate": 7.841108746756382e-05, "loss": 0.0696, "step": 1370 }, { "grad_norm": 0.9055566191673279, "learning_rate": 7.806997047287516e-05, "loss": 0.0845, "step": 1380 }, { "grad_norm": 0.9204123020172119, "learning_rate": 7.772693493299138e-05, "loss": 0.0765, "step": 1390 }, { "grad_norm": 0.8804280161857605, "learning_rate": 7.7382004293936e-05, "loss": 0.0911, "step": 1400 }, { "grad_norm": 0.9833085536956787, "learning_rate": 7.703520213126e-05, "loss": 0.0759, "step": 1410 }, { "grad_norm": 0.8138096332550049, "learning_rate": 7.66865521484305e-05, "loss": 0.0892, "step": 1420 }, { "grad_norm": 0.7545316219329834, "learning_rate": 7.633607817521074e-05, "loss": 0.0827, "step": 1430 }, { "grad_norm": 0.6924526691436768, "learning_rate": 7.598380416603119e-05, "loss": 0.0855, "step": 1440 }, { "grad_norm": 0.8603386878967285, "learning_rate": 7.562975419835247e-05, "loss": 0.0891, "step": 1450 }, { "grad_norm": 0.8367820978164673, "learning_rate": 7.527395247101956e-05, "loss": 0.0806, "step": 1460 }, { "grad_norm": 0.8086408972740173, "learning_rate": 7.491642330260789e-05, "loss": 0.0844, "step": 1470 }, { "grad_norm": 0.7942255139350891, "learning_rate": 7.45571911297612e-05, "loss": 0.09, "step": 1480 }, { "grad_norm": 0.8821229338645935, "learning_rate": 7.419628050552131e-05, "loss": 0.0759, "step": 1490 }, { "grad_norm": 0.8832334876060486, "learning_rate": 7.383371609764999e-05, "loss": 0.0983, "step": 1500 }, { "grad_norm": 0.8671876192092896, "learning_rate": 7.346952268694288e-05, "loss": 0.084, "step": 1510 }, { "grad_norm": 0.9632744789123535, "learning_rate": 7.310372516553585e-05, "loss": 0.0855, "step": 1520 }, { "grad_norm": 0.7909260988235474, "learning_rate": 7.273634853520356e-05, "loss": 0.0849, "step": 1530 }, { "grad_norm": 0.7972952723503113, "learning_rate": 7.236741790565072e-05, "loss": 0.0906, "step": 1540 }, { "grad_norm": 0.9567497968673706, "learning_rate": 7.199695849279576e-05, "loss": 0.0821, "step": 1550 }, { "grad_norm": 0.7431076169013977, "learning_rate": 7.162499561704747e-05, "loss": 0.0806, "step": 1560 }, { "grad_norm": 0.8700494766235352, "learning_rate": 7.125155470157429e-05, "loss": 0.0735, "step": 1570 }, { "grad_norm": 0.8177248239517212, "learning_rate": 7.087666127056675e-05, "loss": 0.0724, "step": 1580 }, { "grad_norm": 0.8236406445503235, "learning_rate": 7.050034094749286e-05, "loss": 0.0825, "step": 1590 }, { "grad_norm": 0.8030959367752075, "learning_rate": 7.012261945334683e-05, "loss": 0.0816, "step": 1600 }, { "grad_norm": 0.7259902954101562, "learning_rate": 6.974352260489103e-05, "loss": 0.0687, "step": 1610 }, { "grad_norm": 0.8690468668937683, "learning_rate": 6.936307631289148e-05, "loss": 0.0671, "step": 1620 }, { "grad_norm": 0.8298538327217102, "learning_rate": 6.898130658034685e-05, "loss": 0.0714, "step": 1630 }, { "grad_norm": 0.9188842177391052, "learning_rate": 6.859823950071127e-05, "loss": 0.0771, "step": 1640 }, { "grad_norm": 0.843058168888092, "learning_rate": 6.821390125611078e-05, "loss": 0.0883, "step": 1650 }, { "grad_norm": 0.8165631890296936, "learning_rate": 6.782831811555385e-05, "loss": 0.063, "step": 1660 }, { "grad_norm": 0.7734370231628418, "learning_rate": 6.744151643313597e-05, "loss": 0.0777, "step": 1670 }, { "grad_norm": 0.7912521362304688, "learning_rate": 6.705352264623828e-05, "loss": 0.0829, "step": 1680 }, { "grad_norm": 0.7747507691383362, "learning_rate": 6.666436327372078e-05, "loss": 0.0797, "step": 1690 }, { "grad_norm": 0.8595577478408813, "learning_rate": 6.62740649141096e-05, "loss": 0.0754, "step": 1700 }, { "grad_norm": 0.7483862042427063, "learning_rate": 6.588265424377919e-05, "loss": 0.0741, "step": 1710 }, { "grad_norm": 0.8002271056175232, "learning_rate": 6.549015801512895e-05, "loss": 0.0827, "step": 1720 }, { "grad_norm": 0.7701843976974487, "learning_rate": 6.509660305475468e-05, "loss": 0.0779, "step": 1730 }, { "grad_norm": 0.7684341073036194, "learning_rate": 6.47020162616152e-05, "loss": 0.0707, "step": 1740 }, { "grad_norm": 0.8907729983329773, "learning_rate": 6.430642460519365e-05, "loss": 0.0747, "step": 1750 }, { "grad_norm": 0.7438266277313232, "learning_rate": 6.390985512365426e-05, "loss": 0.0806, "step": 1760 }, { "grad_norm": 0.8430042862892151, "learning_rate": 6.351233492199431e-05, "loss": 0.0754, "step": 1770 }, { "grad_norm": 0.7882105112075806, "learning_rate": 6.311389117019155e-05, "loss": 0.0734, "step": 1780 }, { "grad_norm": 0.9119648933410645, "learning_rate": 6.271455110134713e-05, "loss": 0.0825, "step": 1790 }, { "grad_norm": 0.7991885542869568, "learning_rate": 6.231434200982428e-05, "loss": 0.0742, "step": 1800 }, { "grad_norm": 0.7554255127906799, "learning_rate": 6.191329124938285e-05, "loss": 0.0737, "step": 1810 }, { "grad_norm": 0.7685657739639282, "learning_rate": 6.15114262313095e-05, "loss": 0.0648, "step": 1820 }, { "grad_norm": 0.6918243169784546, "learning_rate": 6.110877442254444e-05, "loss": 0.0695, "step": 1830 }, { "grad_norm": 0.6738623380661011, "learning_rate": 6.0705363343803946e-05, "loss": 0.0658, "step": 1840 }, { "grad_norm": 0.7122911214828491, "learning_rate": 6.030122056769934e-05, "loss": 0.0697, "step": 1850 }, { "grad_norm": 0.7169949412345886, "learning_rate": 5.989637371685257e-05, "loss": 0.0817, "step": 1860 }, { "grad_norm": 0.6426126956939697, "learning_rate": 5.949085046200808e-05, "loss": 0.0772, "step": 1870 }, { "grad_norm": 0.6960347890853882, "learning_rate": 5.908467852014169e-05, "loss": 0.0633, "step": 1880 }, { "grad_norm": 0.5965814590454102, "learning_rate": 5.867788565256607e-05, "loss": 0.0583, "step": 1890 }, { "grad_norm": 0.7190645337104797, "learning_rate": 5.827049966303335e-05, "loss": 0.0824, "step": 1900 }, { "grad_norm": 0.6242355108261108, "learning_rate": 5.786254839583478e-05, "loss": 0.0749, "step": 1910 }, { "grad_norm": 0.9508832693099976, "learning_rate": 5.745405973389757e-05, "loss": 0.0708, "step": 1920 }, { "grad_norm": 0.6629921793937683, "learning_rate": 5.7045061596879134e-05, "loss": 0.0725, "step": 1930 }, { "grad_norm": 0.8180894255638123, "learning_rate": 5.6635581939258855e-05, "loss": 0.0728, "step": 1940 }, { "grad_norm": 0.7217555642127991, "learning_rate": 5.622564874842742e-05, "loss": 0.0733, "step": 1950 }, { "grad_norm": 0.7975695133209229, "learning_rate": 5.5815290042773836e-05, "loss": 0.0574, "step": 1960 }, { "grad_norm": 0.8156248927116394, "learning_rate": 5.540453386977058e-05, "loss": 0.08, "step": 1970 }, { "grad_norm": 0.6750724911689758, "learning_rate": 5.4993408304056425e-05, "loss": 0.0813, "step": 1980 }, { "grad_norm": 0.7661650776863098, "learning_rate": 5.458194144551768e-05, "loss": 0.0668, "step": 1990 }, { "grad_norm": 0.8421220779418945, "learning_rate": 5.417016141736756e-05, "loss": 0.0605, "step": 2000 } ], "logging_steps": 10, "max_steps": 4000, "num_input_tokens_seen": 0, "num_train_epochs": 9223372036854775807, "save_steps": 500, "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:d0bfac76d7e630af8b31258ce47351d5b9d82f24d7e5b45ee1a2d4d80f44ed3dsize 8017123456789101112131415161718192021222324{ "task": "a29", "frames": 30041, "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": 500, "save_list": [ 2000, 2500, 3000, 3500, 4000 ], "epochs_equivalent": 68.17}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)a29-drawer-close/b512/step-002000/code/hb_groot/cache_cosmos_reason2.pyAdded+60
a29-drawer-close/b512/step-002000/code/hb_groot/check_reason2_offline.pyAdded+26
a29-drawer-close/b512/step-002000/code/hb_groot/g1_feedback76_h16.pyAdded+27
a29-drawer-close/b512/step-002000/code/hb_groot/g1_joint47_h40.pyAdded+24
a29-drawer-close/b512/step-002000/code/hb_groot/groot_chain.pyAdded+139
a29-drawer-close/b512/step-002000/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
a29-drawer-close/b512/step-002000/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
a29-drawer-close/b512/step-002000/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
a29-drawer-close/b512/step-002000/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
a29-drawer-close/b512/step-002000/code/hb_groot/hb_aug_v2.pyAdded+163
a29-drawer-close/b512/step-002000/code/hb_groot/hb_inloop_eval.pyAdded+347
a29-drawer-close/b512/step-002000/code/hb_groot/hb_j47.pyAdded+39
a29-drawer-close/b512/step-002000/code/hb_groot/hb_launch.pyAdded+121
a29-drawer-close/b512/step-002000/code/hb_groot/hb_launch_v.pyAdded+102
a29-drawer-close/b512/step-002000/code/hb_groot/hb_offline_fix.pyAdded+24
a29-drawer-close/b512/step-002000/code/hb_groot/prepare_groot_data.pyAdded+205
a29-drawer-close/b512/step-002000/code/hb_groot/prepare_groot_j47.pyAdded+127
a29-drawer-close/b512/step-002000/code/hb_groot/upload_groot_j47.pyAdded+66
a29-drawer-close/b512/step-002000/code/hb_groot/verify_groot_cpu.pyAdded+57
a29-drawer-close/b512/step-002000/code/hb_groot/verify_j47_cpu.pyAdded+59
a29-drawer-close/b512/step-002000/config.jsonAdded+90
a29-drawer-close/b512/step-002000/dataset_meta/hb-dataset-receipt.jsonAdded+45
a29-drawer-close/b512/step-002000/dataset_meta/modality.jsonAdded+74
a29-drawer-close/b512/step-002000/embodiment_id.jsonAdded+57
a29-drawer-close/b512/step-002000/experiment_cfg/conf.yamlAdded+234
a29-drawer-close/b512/step-002000/experiment_cfg/config.yamlAdded+232
a29-drawer-close/b512/step-002000/experiment_cfg/dataset_statistics.jsonAdded+883
a29-drawer-close/b512/step-002000/experiment_cfg/final_model_config.jsonAdded+58
a29-drawer-close/b512/step-002000/experiment_cfg/final_processor_config.jsonAdded
a29-drawer-close/b512/step-002000/model-00001-of-00002.safetensorsAdded+3
a29-drawer-close/b512/step-002000/model-00002-of-00002.safetensorsAdded+3
a29-drawer-close/b512/step-002000/model.safetensors.index.jsonAdded
a29-drawer-close/b512/step-002000/processor_config.jsonAdded+1137
a29-drawer-close/b512/step-002000/protocol.jsonAdded+107
a29-drawer-close/b512/step-002000/statistics.jsonAdded
a29-drawer-close/b512/step-002000/train.logAdded
a29-drawer-close/b512/step-002000/trainer_state.jsonAdded+1234
a29-drawer-close/b512/step-002000/training_args.binAdded+3
a29-drawer-close/b512/step-002000/training_plan.jsonAdded+24
a29-drawer-close/b512/step-002000/wandb_config.jsonAdded+1
a29-drawer-close/b512/step-002500/code/hb_groot/cache_cosmos_reason2.pyAdded+60
a29-drawer-close/b512/step-002500/code/hb_groot/check_reason2_offline.pyAdded+26
a29-drawer-close/b512/step-002500/code/hb_groot/g1_feedback76_h16.pyAdded+27
a29-drawer-close/b512/step-002500/code/hb_groot/g1_joint47_h40.pyAdded+24
a29-drawer-close/b512/step-002500/code/hb_groot/groot_chain.pyAdded+139
a29-drawer-close/b512/step-002500/code/hb_groot/h2_body31_hand44_h16.pyAdded+24
a29-drawer-close/b512/step-002500/code/hb_groot/h2_body31_hand44_h32.pyAdded+24
a29-drawer-close/b512/step-002500/code/hb_groot/h2_body31_hand44_planner7_h16.pyAdded+25
a29-drawer-close/b512/step-002500/code/hb_groot/h2w3_body31_hand44_h16.pyAdded+24
a29-drawer-close/b512/step-002500/code/hb_groot/hb_aug_v2.pyAdded+163