mbeukman commited on
Commit
ed6b675
·
verified ·
1 Parent(s): f4ab0fb

Upload folder using huggingface_hub

Browse files
README.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ library_name: jax
4
+ tags:
5
+ - reinforcement-learning
6
+ - kinetix
7
+ - jax
8
+ - flax
9
+ ---
10
+
11
+ # Kinetix pretrained agents
12
+
13
+ General reinforcement learning agents for [Kinetix](https://github.com/FLAIROx/Kinetix), a 2D physics-based control environment written in JAX. Both agents were trained with [SFL](https://arxiv.org/abs/2408.15099) on procedurally generated levels, and use the transformer architecture from the [Kinetix paper](https://arxiv.org/abs/2410.23208) (786k parameters), entity observations and multi-discrete actions.
14
+ The 1M parallel environment run was based on [this](https://arxiv.org/abs/2603.06009) paper. Note that this checkpoint is not from the original paper, but was trained using the insights from this work.
15
+
16
+ | Checkpoint | Description | Trained on | Parallel envs | Env steps | Hand-designed (S / M / L / all) | Random (S / M / L / all) |
17
+ |---|---|---|---|---|---|---|
18
+ | `sfl-paper` | The generalist agent from the Kinetix paper | random L levels | 2,048 | 18B | 0.42 / 0.32 / 0.11 / **0.22** | 0.33 / 0.24 / 0.16 / **0.24** |
19
+ | `sfl-1m-envs` | The same architecture, trained at a much larger scale | random M levels | 1,048,576 | 376B | 0.70 / 0.43 / 0.18 / **0.33** | 0.56 / 0.36 / 0.22 / **0.38** |
20
+
21
+ The numbers are average solve rates on the 74 hand-designed evaluation levels (20 attempts per level) and on 512 random levels per size (5 attempts per level). "all" averages over all levels.
22
+
23
+ ## Files
24
+
25
+ Each checkpoint directory contains:
26
+ - `params.safetensors`: the network parameters.
27
+ - `config.json`: the model options needed to create the network (`model`), plus training details and evaluation results.
28
+
29
+ ## Usage
30
+
31
+ ```bash
32
+ pip install kinetix-env huggingface_hub
33
+ hf download mbeukman/Kinetix-Checkpoints --local-dir ./checkpoints
34
+ ```
35
+
36
+ ```python
37
+ from kinetix.models import make_network_from_config
38
+ from kinetix.util import load_pretrained_checkpoint
39
+
40
+ params, pretrained_config = load_pretrained_checkpoint("./checkpoints/sfl-1m-envs")
41
+ config |= pretrained_config["model"] # your normalised Kinetix config
42
+ network = make_network_from_config(env, env_params, config)
43
+ hstate, pi, value = network.apply(params, hstate, (obs, done))
44
+ ```
45
+
46
+ See [`examples/example_pretrained.py`](https://github.com/FLAIROx/Kinetix/blob/main/examples/example_pretrained.py) for a complete example that evaluates a checkpoint on the hand-designed levels.
47
+
48
+ The `sfl-paper` checkpoint sets `legacy_entity_id: true`, which reproduces a quirk of the code it was trained with; this is handled automatically when you use its `config.json`.
49
+
50
+ ## Citation
51
+
52
+ ```bibtex
53
+ @article{matthews2024kinetix,
54
+ title={Kinetix: Investigating the Training of General Agents through Open-Ended Physics-Based Control Tasks},
55
+ author={Michael Matthews and Michael Beukman and Chris Lu and Jakob Foerster},
56
+ booktitle={The Thirteenth International Conference on Learning Representations},
57
+ year={2025},
58
+ url={https://arxiv.org/abs/2410.23208}
59
+ }
60
+
61
+
62
+ @inproceedings{beukman2026preventing,
63
+ title={Preventing Learning Stagnation in PPO by Scaling to 1 Million Parallel Environments},
64
+ author={Beukman, Michael and Khetarpal, Khimya and Zheng, Zeyu and Dabney, Will and Foerster, Jakob and Dennis, Michael and Lyle, Clare},
65
+ booktitle={Reinforcement Learning Conference},
66
+ year={2026},
67
+ }
68
+ ```
sfl-1m-envs/config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Kinetix SFL generalist (1M parallel envs)",
3
+ "description": "The same architecture as the paper, trained with SFL at a much larger scale (1M parallel environments, 376B steps) on random M levels.",
4
+ "model": {
5
+ "actor_depth": 5,
6
+ "critic_depth": 5,
7
+ "actor_width": 128,
8
+ "critic_width": 128,
9
+ "activation": "tanh",
10
+ "aggregate_mode": "dummy_and_mean",
11
+ "full_attention_mask": false,
12
+ "transformer_depth": 2,
13
+ "transformer_size": 16,
14
+ "transformer_encoder_size": 128,
15
+ "num_heads": 8,
16
+ "transformer_ffn": false,
17
+ "multilayer_joint_thruster_mixing": false,
18
+ "permutation_invariant_mlp": false,
19
+ "recurrent_model": false,
20
+ "legacy_entity_id": false
21
+ },
22
+ "env": {
23
+ "observation_type": "symbolic_entity",
24
+ "action_type": "multi_discrete"
25
+ },
26
+ "training": {
27
+ "algorithm": "SFL + PPO",
28
+ "trained_on": "random M levels",
29
+ "num_parallel_envs": 1048576,
30
+ "env_steps": 376000000000.0,
31
+ "lr": 0.0006,
32
+ "sfl_buffer_size": 65536,
33
+ "hardware": "64x NVIDIA GH200",
34
+ "wandb_runs": [
35
+ "general-ai/kinetix-bc/jil19kf1"
36
+ ],
37
+ "code": "Kinetix (multi-GPU SFL)",
38
+ "date": "2026-02"
39
+ },
40
+ "evaluation": {
41
+ "hand_designed": {
42
+ "s": 0.695,
43
+ "m": 0.429,
44
+ "l": 0.175,
45
+ "all": 0.328,
46
+ "num_levels": 74,
47
+ "attempts_per_level": 20
48
+ },
49
+ "random": {
50
+ "s": 0.556,
51
+ "m": 0.355,
52
+ "l": 0.217,
53
+ "all": 0.376,
54
+ "num_levels": 1536,
55
+ "attempts_per_level": 5
56
+ }
57
+ }
58
+ }
sfl-1m-envs/params.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dc777ce6935c29828a9898a669ce23629cee016c48b0145d4f44988cfd05646
3
+ size 3156756
sfl-paper/config.json ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "name": "Kinetix SFL generalist (paper)",
3
+ "description": "The SFL generalist agent from the Kinetix paper (L-size 'SFL' curve), trained on random L levels.",
4
+ "model": {
5
+ "actor_depth": 5,
6
+ "critic_depth": 5,
7
+ "actor_width": 128,
8
+ "critic_width": 128,
9
+ "activation": "tanh",
10
+ "aggregate_mode": "dummy_and_mean",
11
+ "full_attention_mask": false,
12
+ "transformer_depth": 2,
13
+ "transformer_size": 16,
14
+ "transformer_encoder_size": 128,
15
+ "num_heads": 8,
16
+ "transformer_ffn": false,
17
+ "multilayer_joint_thruster_mixing": false,
18
+ "permutation_invariant_mlp": false,
19
+ "recurrent_model": false,
20
+ "legacy_entity_id": true
21
+ },
22
+ "env": {
23
+ "observation_type": "symbolic_entity",
24
+ "action_type": "multi_discrete"
25
+ },
26
+ "training": {
27
+ "algorithm": "SFL + PPO",
28
+ "trained_on": "random L levels",
29
+ "num_parallel_envs": 2048,
30
+ "env_steps": 18000000000.0,
31
+ "lr": 5e-05,
32
+ "sfl_buffer_size": 1024,
33
+ "hardware": "1x NVIDIA L40S",
34
+ "wandb_runs": [
35
+ "general-ai/kinetix-experiments/3iihjaa2",
36
+ "general-ai/kinetix-experiments/rtyg0xvu"
37
+ ],
38
+ "code": "Jaxcredibots @ 5e3a0936 (pre-release Kinetix)",
39
+ "date": "2024-09",
40
+ "notes": "3iihjaa2 crashed at 6B steps and was resumed by rtyg0xvu for another 12B."
41
+ },
42
+ "evaluation": {
43
+ "hand_designed": {
44
+ "s": 0.415,
45
+ "m": 0.319,
46
+ "l": 0.111,
47
+ "all": 0.22,
48
+ "num_levels": 74,
49
+ "attempts_per_level": 20
50
+ },
51
+ "random": {
52
+ "s": 0.333,
53
+ "m": 0.236,
54
+ "l": 0.156,
55
+ "all": 0.242,
56
+ "num_levels": 1536,
57
+ "attempts_per_level": 5
58
+ }
59
+ }
60
+ }
sfl-paper/params.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b8c900433434c8f9f30492e888778bfa6fc96b09cdfdf3a78085c0abf21f4ff6
3
+ size 3156756