WorldParticle
Implementation of WorldParticle, Unified Simulation of Lagrangian Particle Dynamics via Transformer
Install
$ pip install worldparticle
Usage
import torch
from worldparticle import WorldParticle, ParticleTokenizer
tokenizer = ParticleTokenizer(
dim = 64,
dim_attr = 1,
grid_res = 5,
spatial_radius = 2.0,
boundary_radius = 2.0
)
model = WorldParticle(
predictor = dict(
delta_time = 0.01
),
corrector = dict(
dim = 64,
enc_depth = 4,
dec_depth = 4,
enc_dim_head = 96,
enc_heads = 8,
dec_dim_head = 96,
dec_heads = 8
),
tokenizer = tokenizer
)
pos = torch.randn(2, 512, 3)
vel = torch.randn(2, 512, 3)
forces = torch.randn(2, 512, 3)
mass = torch.ones(2, 512)
boundary_pos = torch.randn(2, 128, 3)
# forward 1 step
out = model(
pos = pos,
vel = vel,
mass = mass,
forces = forces,
attrs = mass,
boundary_pos = boundary_pos
)
# out.pos (2, 512, 3)
# out.vel (2, 512, 3)
# or multi-step rollout
out_trajectory = model(
num_steps = 10,
pos = pos,
vel = vel,
mass = mass,
forces = forces,
return_initial_state = True,
attrs = mass,
boundary_pos = boundary_pos
)
# out_trajectory.pos (2, 11, 512, 3)
# out_trajectory.vel (2, 11, 512, 3)
Citations
@misc{wang2026unifiedsimulationlagrangianparticle,
title = {Unified Simulation of Lagrangian Particle Dynamics via Transformer},
author = {Caoliwen Wang and Minghao Guo and Siyuan Chen and Heng Zhang and Mengdi Wang and Xingyu Ni and Hanson Sun and Kunyi Wang and Zherong Pan and Kui Wu and Lingjie Liu and Yin Yang and Chenfanfu Jiang and Taku Komura and Wojciech Matusik and Peter Yichen Chen},
year = {2026},
eprint = {2605.15305},
archivePrefix = {arXiv},
primaryClass = {cs.GR},
url = {https://arxiv.org/abs/2605.15305},
}
@misc{teoh2026nextlatentpredictiontransformerslearn,
title = {Next-Latent Prediction Transformers Learn Compact World Models},
author = {Jayden Teoh and Manan Tomar and Kwangjun Ahn and Edward S. Hu and Tim Pearce and Pratyusha Sharma and Akshay Krishnamurthy and Riashat Islam and Alex Lamb and John Langford},
year = {2026},
eprint = {2511.05963},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2511.05963},
}
Metadata
Release files for worldparticle 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| worldparticle-0.1.2.tar.gz | 12.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| worldparticle-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.2 kB
Release files / worldparticle-0.1.2.tar.gz
| Download URL | worldparticle-0.1.2.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aa39b7a6de1c3b70005f5f32d51c4bc2d1c73103b85e3154b239a73235ce21d5
|
|
BLAKE2b-256 checksum How to use checksums |
02ffc707e83633099e31d76668b09f8af3d2550ba9a65e3e75605f3beee51502
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|
Release files / worldparticle-0.1.2-py3-none-any.whl
| Download URL | worldparticle-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a7f30a4b07b59dd94d61b7ad78bf999189200825e611b2492d8d589dc426007
|
|
BLAKE2b-256 checksum How to use checksums |
df1f8e26e8c9022a22f519ca8e28e4d7d1677e240a0a360cb01f3fd9f68a4ee1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.17
|