Skip to content
Back to skills

Hrm

ASecurity

"Use the HRM repository for puzzle dataset preparation, HRM ACT

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
datapythonbashapibackenddocumentation

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 20 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill hrm --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Hrm?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Hrm
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-hrm/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-hrm)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: hrm
description: "Use the HRM repository for puzzle dataset preparation, HRM ACT
  model configuration, CUDA training/evaluation, and ARC checkpoint
  post-processing."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# HRM Repo Skill

Use this skill for the `sapientinc/HRM` repository, publicly called
Hierarchical Reasoning Model (HRM). HRM trains a recurrent, hierarchical
reasoning model on ARC, Sudoku, and Maze puzzle datasets using CUDA, PyTorch,
FlashAttention, Hydra config, W&B logging, and checkpoint evaluation scripts.

## When to use

- The user names HRM, Hierarchical Reasoning Model, ARC-AGI, ConceptARC,
  Sudoku Extreme, Maze 30x30, `pretrain.py`, `evaluate.py`, `arc_eval.ipynb`,
  or `puzzle_visualizer.html`.
- The task involves HRM's converted dataset layout with `dataset.json`,
  `identifiers.json`, and `<subset>__*.npy` arrays.
- The task asks about `hrm.hrm_act_v1@HierarchicalReasoningModel_ACTV1`,
  `losses@ACTLossHead`, StableMax loss, ACT halting, sparse puzzle embeddings,
  FlashAttention, or `adam_atan2`.
- The user wants to launch or debug HRM CUDA training/evaluation, checkpoints,
  W&B metrics, or ARC prediction aggregation.

## Sub-skill routing

| Need | Read |
|---|---|
| Build, validate, inspect, or visualize ARC/Sudoku/Maze converted datasets | [data-preparation](sub-skills/data-preparation/SKILL.md) |
| Understand HRM ACT v1 model internals, dynamic identifiers, config fields, losses, or model dependency imports | [model-architecture](sub-skills/model-architecture/SKILL.md) |
| Launch `pretrain.py`, distributed `torchrun`, `evaluate.py`, checkpoint workflows, W&B/offline mode, or ARC post-processing | [training-evaluation](sub-skills/training-evaluation/SKILL.md) |

## Setup snapshot

The repository is a source tree rather than a packaged Python distribution.
Install dependencies in an isolated environment and run from an HRM checkout or
with the checkout on `PYTHONPATH`.

```bash
# PyTorch CUDA first; choose the wheel/index matching the host driver and GPU.
pip install torch torchvision torchaudio --index-url <pytorch-cuda-index>

# FlashAttention: FA2 for Ampere/A100 or earlier, FA3 for Hopper when needed.
pip install flash-attn

# Remaining repository requirements.
pip install -r requirements.txt
```

For hosted experiment tracking, run `wandb login`. For safe smoke/debug runs,
use `WANDB_MODE=offline`. Use `DISABLE_COMPILE=true` to bypass `torch.compile`
while diagnosing shape, dependency, or checkpoint issues.

## Minimal safe checks

```bash
python dataset/build_arc_dataset.py --help
python dataset/build_sudoku_dataset.py --help
python dataset/build_maze_dataset.py --help
WANDB_MODE=offline DISABLE_COMPILE=true python pretrain.py --help
```

After installing CUDA dependencies, run the bundled readiness helper from this
skill:

```bash
python sub-skills/training-evaluation/scripts/check_training_env.py \
  --repo-root /path/to/HRM --require-cuda
```

Read [references/troubleshooting.md](references/troubleshooting.md) when an
install, dataset, model import, W&B, or checkpoint failure spans multiple
sub-skills.

## Provenance and freshness

Read [references/repo-provenance.md](references/repo-provenance.md) before
refreshing this skill or applying it to a different HRM checkout. The skill was
built from HRM commit `ac15626f8db096a63c775b84c9dc868776a6feda` and records
source evidence paths plus verified dependency facts.

Structured router metadata for managed DisCo import is in
[references/repo-routing-metadata.json](references/repo-routing-metadata.json).

## Important boundaries

- Do not ask future agents to open or run original repo docs/notebooks as
  runtime documentation. This skill bundles distilled references plus safe
  helper scripts.
- Full dataset downloads, submodule clones, multi-GPU training, checkpoint
  evaluation, W&B online logging, and browser visualization can be network-,
  storage-, GPU-, or manual-workflow-heavy; request explicit approval before
  running them as verification.
- CPU dataset validation is useful, but HRM model training/evaluation is a
  required CUDA workflow. Do not claim CUDA backend verification from CPU-only
  imports.
- A bounded current-environment model-forward smoke found a possible
  FlashAttention output `.view(...)` stride issue in `models/layers.py`; treat
  full forward/training verification as dependency-sensitive until a bounded
  forward run passes in the target environment.

Files in this skill

  • SKILL.md4.4 KB
  • references/repo-provenance.md2.3 KB
  • references/repo-routing-metadata.json331 B
  • references/troubleshooting.md2.3 KB
  • sub-skills/data-preparation/SKILL.md4.2 KB
  • sub-skills/data-preparation/references/data-formats.md3.9 KB
  • sub-skills/data-preparation/references/troubleshooting.md3.2 KB
  • sub-skills/data-preparation/references/workflows.md3.2 KB
  • sub-skills/data-preparation/scripts/assets/npyjs.js5.1 KB
  • sub-skills/data-preparation/scripts/puzzle_visualizer.html13.8 KB
  • sub-skills/data-preparation/scripts/run_dataset_builder.py1.7 KB
  • sub-skills/data-preparation/scripts/validate_dataset_layout.py8.2 KB
  • sub-skills/model-architecture/SKILL.md3.5 KB
  • sub-skills/model-architecture/references/api-reference.md3.5 KB
  • sub-skills/model-architecture/references/architecture.md3.2 KB
  • sub-skills/model-architecture/references/troubleshooting.md3.2 KB
  • sub-skills/model-architecture/scripts/inspect_model_config.py5.1 KB
  • sub-skills/training-evaluation/SKILL.md3.1 KB
  • sub-skills/training-evaluation/references/configuration.md2.9 KB
  • sub-skills/training-evaluation/references/troubleshooting.md3.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.