本文へ移動
cccskills
無料GitHub で公開

dm-haiku

Use DeepMind dm-haiku as a JAX neural-network library for transforms, modules, state/RNG, layers, advanced JAX interop, and optional Flax interop.

インストール方法を見る

含まれるファイル(31)

  • SKILL.md5.1 KB
  • references/repo-provenance.md2.5 KB
  • references/repo-routing-metadata.json341 B
  • references/troubleshooting.md4.0 KB
  • scripts/check_haiku_env.py4.2 KB
  • sub-skills/core-transforms/references/api-reference.md7.5 KB
  • sub-skills/core-transforms/references/troubleshooting.md9.4 KB
  • sub-skills/core-transforms/references/workflows.md8.7 KB
  • sub-skills/core-transforms/scripts/haiku_transform_smoke.py7.4 KB
  • sub-skills/core-transforms/SKILL.md3.6 KB
  • sub-skills/flax-interop/references/api-reference.md5.8 KB
  • sub-skills/flax-interop/references/flax-interop.md6.3 KB
  • sub-skills/flax-interop/references/troubleshooting.md6.3 KB
  • sub-skills/flax-interop/scripts/haiku_flax_smoke.py4.1 KB
  • sub-skills/flax-interop/SKILL.md2.7 KB
  • sub-skills/jax-interop-and-advanced/references/jax-transform-wrappers.md11.8 KB
  • sub-skills/jax-interop-and-advanced/references/troubleshooting.md10.2 KB
  • sub-skills/jax-interop-and-advanced/references/utilities-reference.md10.0 KB
  • sub-skills/jax-interop-and-advanced/scripts/haiku_jax_transform_smoke.py4.1 KB
  • sub-skills/jax-interop-and-advanced/SKILL.md3.7 KB
  • sub-skills/modules-and-networks/references/api-reference.md15.0 KB
  • sub-skills/modules-and-networks/references/model-overview.md7.4 KB
  • sub-skills/modules-and-networks/references/troubleshooting.md9.6 KB
  • sub-skills/modules-and-networks/references/workflows.md9.3 KB
  • sub-skills/modules-and-networks/scripts/haiku_mlp_smoke.py3.2 KB
  • sub-skills/modules-and-networks/SKILL.md4.3 KB
  • sub-skills/params-state-rng/references/api-reference.md10.2 KB
  • sub-skills/params-state-rng/references/state-rng-workflows.md9.0 KB
  • sub-skills/params-state-rng/references/troubleshooting.md9.3 KB
  • sub-skills/params-state-rng/scripts/haiku_rng_state_smoke.py7.1 KB
  • sub-skills/params-state-rng/SKILL.md3.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

dm-haiku

Use this repo skill when a task involves the dm-haiku Python package, usually imported as import haiku as hk, or when a JAX neural-network workflow needs Haiku's object-oriented modules plus pure init/apply functions.

Haiku is in maintenance mode: it remains useful for existing Haiku code and research checkouts, but new greenfield projects may be better served by Flax. Do not present Haiku as a full training framework: it provides module, parameter, state, RNG, transform, and model-building utilities that compose with JAX, optimizers, datasets, checkpointing, and accelerators from other libraries.

Quick install and smoke check

  1. Install a JAX build that matches the target machine first. CPU JAX is enough for API work; GPU/TPU execution requires the appropriate JAX backend package for that machine.

  2. Install Haiku:

    python -m pip install -U dm-haiku
    
  3. For optional Flax interop, also install Flax:

    python -m pip install -U flax
    
  4. Run the bundled checker from this skill directory if import or backend state is uncertain:

    python scripts/check_haiku_env.py
    python scripts/check_haiku_env.py --require-flax
    

The checker imports haiku, jax, and optionally flax, runs a tiny hk.Linear transform, reports JAX backend/devices, and does not download data or train.

Route by task

Root references and helper

  • Read references/troubleshooting.md for install/import, JAX backend, optional dependency, version, example dependency, and maintenance-mode issues that cut across sub-skills.
  • Read references/repo-provenance.md before deciding whether this skill is current for a checkout or should be refreshed.
  • references/repo-routing-metadata.json contains structured router metadata for managed repo-skill import.
  • Run scripts/check_haiku_env.py as the shared environment/import checker before deeper sub-skill smoke scripts.

Operating pattern

For most Haiku tasks, work in this order:

  1. Pick the transform boundary first: stateless hk.transform, stateful hk.transform_with_state, or multi-transform. See core-transforms.
  2. Build module code inside the transformed function. Keep hk.Module construction, hk.get_parameter, hk.get_state, and hk.next_rng_key inside Haiku contexts. See params-state-rng.
  3. Choose modules/networks and validate with synthetic arrays before adding optimizers, datasets, large examples, or distributed JAX. See modules-and-networks.
  4. If raw JAX transforms appear inside a Haiku-transformed function, switch to Haiku wrappers or lift nested transforms deliberately. See jax-interop-and-advanced.
  5. Treat Flax interop as optional and explicit. Verify the flax dependency and variable collection mapping before mixing codebases. See flax-interop.

Common boundaries

  • Haiku does not own optimizers, checkpoint formats, dataset loaders, training launchers, or accelerator installation. Bring those from JAX/Optax/Orbax/TFDS or the user's own stack.
  • Full public examples often require external datasets, TensorFlow/TFDS, Optax, RL libraries, or long training. This skill distills their Haiku model patterns into bundled no-download scripts and references; do not require the original checkout for runtime use.
  • GPU warnings from JAX usually mean the installed JAX backend is CPU-only. That does not invalidate Haiku API work, but it does mean accelerator performance has not been verified.
  • If a task is about editing the dm-haiku repository source itself rather than using Haiku as a package, first decide whether a maintainer/repository-development skill is more appropriate; this skill is optimized for package usage.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Routes 3D ResNets PyTorch video action-recognition workflows across training, inference, and data preparation.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

3ddfa

無料

Guide 3DDFA Python inference, geometry rendering, training/evaluation, and optional C++ ONNX workflows for 3D dense face alignment.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

3ddfa-v2

無料

Routes 3DDFA_V2 face-alignment setup, still-image demos, video tracking, and ONNX benchmarking workflows.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

ab3dmot

無料

Operate AB3DMOT 3D multi-object tracking workflows for KITTI and nuScenes data, tracking, evaluation, and visualization.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

Use Hugging Face Accelerate for PyTorch training-loop migration, distributed launch/configuration, DeepSpeed/FSDP/TPU backend setup, big-model inference/offload, checkpointing, tracking, and troubleshooting.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

acme

無料

Route Acme reinforcement-learning framework tasks across core loops, replay/data, JAX agents, and TensorFlow/Sonnet agents.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

VectorSpaceLab のスキルをすべて見る

このスキルの問題を報告する