Skip to main content
pimm logo

particle imaging models

Documentation · First run · Models · Recipe catalog

What's new

11-27-2026

  • Panda V2: encoder, self-distillation pretraining and detector (panda-{encoder,ssl,detector}-v2m1), with recipes for LArTPC, sPHENIX, water Cherenkov and NEXT in configs/panda/v2.
  • New pimm.ops submodule of accelerated operations.
  • You can now run Panda V2 on any CUDA GPU: add attention_backend=torch to a run's overrides to use PyTorch's attention where FlashAttention can't run.
  • pimm is on PyPI: run pip install particle-imaging-models in an environment with PyTorch 2.4 or newer.
  • Panda V1 detector renamed panda-detector-v1m1; its recipes moved to configs/panda/v1.
  • Removed Point Transformer v1 and v2, PointGroup and Volt.

04-07-2026

  • PoLAr-MAE (Young et al., 2025), masked point modeling for liquid argon TPC data, was added with its pretraining and semantic segmentation recipes.

12-12-2025

  • First release of pimm, with Panda (Young et al., 2025): self-distillation
    pretraining on PILArNet-M with a Point Transformer V3 backbone, semantic segmentation, and a detector for particles
    and interactions.

Introduction

pimm (particle imaging models) is a library for pretraining, fine-tuning and running foundation models on sparse point clouds from particle-imaging detectors. You can import its models and operations into your own code, and the same package includes a complete training framework, with a launcher for a workstation or a Slurm cluster.

pimm is also the official implementation of the following papers:

  • Panda Diplomacy: Sensor-level Representation Learning across High-Energy and Nuclear Physics
    Samuel Young, César Jesús-Valls, Omar A. Alterkait, Gregor Krzmanc, Kazuhiro Terao
    [ Pretrain ] [ Panda V2 ] - [ Inference repo ] [ Weights ] → here

  • Panda: Self-distillation of Reusable Sensor-level Representations for High Energy Physics
    Samuel Young, Kazuhiro Terao
    [ Pretrain ] [ Panda ] - [ arXiv ] [ Project ] [ Inference repo ] [ Weights ] → here

  • Particle Trajectory Representation Learning with Masked Point Modeling
    Sam Young, Yeon-jae Jwa, Kazuhiro Terao
    [ Pretrain ] [ PoLAr-MAE ] - [ arXiv ] [ Project ] [ Weights ] → here

Install

On Linux x86-64 with an NVIDIA GPU:

curl -sSL https://raw.githubusercontent.com/DeepLearnPhysics/particle-imaging-models/main/install.sh | bash
cd particle-imaging-models
uv run pimm --help

With the install script, you get uv if it is missing, a clone of this repository, and a locked training environment (PyTorch 2.10 with CUDA 12.6). pimm's own requirements are only lower bounds (Python 3.10.12 or newer, PyTorch 2.4 or newer), so you can also install pimm with pip into an environment you already have. spconv is required, and its distribution must match your CUDA runtime (spconv-cuXXX; spconv-cu126 is selected here). Compiled operators, TensorBoard and plotting tools are optional extras. FlashAttention is installed in the locked environment and used by default in Panda V2. On a GPU older than Ampere, or to use PyTorch's attention instead, set attention_backend=torch for a run or pass attention_backend="torch" to pimm.from_pretrained. Run pimm commands through uv run; there is no environment to activate.

To install with pip instead, into an environment that has PyTorch 2.4 or newer:

pip install torch-scatter -f https://data.pyg.org/whl/torch-<version>+<cuda>.html  # e.g. torch-2.8.0+cu128
pip install particle-imaging-models

The package is imported as pimm. The recipes and launcher settings are not in it, so to train, run pip install -e . in a clone of this repository instead.

Or run pimm in a container. The image ghcr.io/deeplearnphysics/pimm:main contains the locked environment but not the pimm source, so run it from your checkout:

apptainer exec --nv docker://ghcr.io/deeplearnphysics/pimm:main pimm --help                       # Apptainer
docker run --rm --gpus all -v "$PWD:$PWD" -w "$PWD" ghcr.io/deeplearnphysics/pimm:main pimm --help  # Docker

See Install for step-by-step installation with uv or pip, containers, launcher-only hosts, and the GPUs on which FlashAttention and BF16 are supported.

Run a released model

import pimm

model = pimm.from_pretrained("DeepLearnPhysics/Panda-Semantic", device="cuda")  # Hugging Face
model = pimm.from_pretrained("artifacts/my-model", device="cuda")               # local export
model = pimm.from_pretrained("exp/panda/v1/semseg/my-run/model/last", device="cuda")  # run checkpoint

Call pimm.from_pretrained to rebuild the model, load its weights and get it back in eval mode. You can give a Hugging Face repository, a directory made with pimm export, or a checkpoint from one of your runs; for a checkpoint, the architecture comes from the run's config. Prepare a model's inputs with the same transforms as the recipe it was trained with. To label a full event, see Run a released model; for the released models, see Models.

Minimal training example

Download PILArNet-M-mini, 120 events from the PILArNet-M dataset, from Hugging Face:

uv run pimm datasets download pilarnet-m-mini --output-dir data/PILArNet-M-mini

Train a tiny semantic-segmentation model on one GPU of this machine:

uv run pimm launch \
  --train.config tests/tiny_semseg \
  --resources.nproc-per-node 1 \
  -- \
  data.train.data_root="$PWD/data/PILArNet-M-mini" \
  data.val.data_root="$PWD/data/PILArNet-M-mini"

The flags before the bare -- are launcher settings, and the key=value pairs after it are overrides for the training config. You'll find the run's config, log and checkpoints under exp/tests/. For what each saved file is, see First run; to list every recipe, run uv run pimm ls.

To run the same job on a Slurm cluster, use pimm submit with the same flags plus your account and partition. Add --dry-run to print the job script without submitting it:

uv run pimm submit \
  --site slurm \
  --resources.account <account> \
  --resources.partition <gpu-partition> \
  --resources.nproc-per-node 1 \
  --resources.time 00:30:00 \
  --train.config tests/tiny_semseg \
  --dry-run \
  -- \
  data.train.data_root="$PWD/data/PILArNet-M-mini" \
  data.val.data_root="$PWD/data/PILArNet-M-mini"

Remove --dry-run to submit the job. You get your prompt back as soon as the job is queued, and you'll find the training log in the same run directory. Without --site, you get the generic slurm profile; give your account and partition with flags or in a site file. To write a site profile for your cluster or run on several GPUs or nodes, see Scale up.

The sPHENIX recipes in configs/panda/v2/tpcpp-10m read the TPCpp-10M release, from Zenodo or its Hugging Face mirror DeepLearnPhysics/tpcpp-10m, in data/tpcpp-10m. Before pretraining, write its unlabeled shards uncompressed once with uv run python -m pimm.datasets.preprocessing.tpcpp10m data/tpcpp-10m; see Supported detectors.

To train on another detector, write its events as .npy files or add a reader; see Bring your own data.

What's in pimm

Area Contents
Models Panda V1, Panda V2 (self-distillation) and PoLAr-MAE (masked point modeling) pretraining; semantic segmentation, the Panda detectors and event classification; Point Transformer V3, SparseUNet, LitePT and the Panda V2 encoder as backbones
Data PILArNet-M (HDF5), sPHENIX TPCpp-10M (the original release), WAND water Cherenkov, NEXT, and a generic .npy reader
Operations pimm.ops: accelerated attention, distillation loss, sparse convolution and serialization
Training torchrun with DDP, an experimental FSDP2 path, Slurm through Submitit
Models out Portable exports, loaded with pimm.from_pretrained from disk or Hugging Face

pimm is research software; its APIs and recipes can change between versions.

Documentation

To Read
see how a config becomes a training run How pimm works
change a recipe or override it on the command line Configs and overrides
fine-tune a released model Fine-tune
resume a run or find its checkpoints Checkpoints and resume
export weights or publish them on Hugging Face Export and publish
add a model, dataset, transform, loss or hook Add a component
fix a failed run Troubleshooting
look up a command, recipe, registered name or environment variable Reference

Contributing

See Contributing.

pimm is built on Pointcept, torchtitan and TorchRL, and it is distributed under the MIT License.

Citation

If you use pimm, please cite the repository and the papers for the models you use (their BibTeX entries are on the Panda and PoLAr-MAE pages):

@misc{pimm,
  title        = {pimm: particle imaging models},
  author       = {Samuel Young},
  year         = {2025},
  howpublished = {\url{https://github.com/DeepLearnPhysics/particle-imaging-models}},
  note         = {Version 0.6.0}
}

Metadata

Release files for particle-imaging-models 0.6.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for particle-imaging-models 0.6.4
File Size Uploaded Provenance Actions
particle_imaging_models-0.6.4.tar.gz 1.2 MB With provenance Details for particle_imaging_models-0.6.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for particle-imaging-models 0.6.4
File Interpreter ABI Platform Actions
particle_imaging_models-0.6.4-py3-none-any.whl Python 3 none any Details for particle_imaging_models-0.6.4-py3-none-any.whl

Total release size: 1.9 MB

Release files / particle_imaging_models-0.6.4.tar.gz

Download URL particle_imaging_models-0.6.4.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
9a4c758e12b87d5745ed40e9b13c77831614861a71f5cec5d3d25ea57b489226
BLAKE2b-256 checksum
How to use checksums
ab86848025c9eb23cc79a437966d8e9acf9bb484ffe274c000d0a5828d9b92e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / particle_imaging_models-0.6.4-py3-none-any.whl

Download URL particle_imaging_models-0.6.4-py3-none-any.whl
Size 646.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7bd1944c4779ba447a0b149098ab8becbd23f1982a080e402e37fa6ef426ab4
BLAKE2b-256 checksum
How to use checksums
3421193203f2593ffb39e2830cc156b1a147d44a9670abcad76dba3fcbe51a2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for particle-imaging-models 0.6.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for particle_imaging_models-0.6.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page