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.

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 hf download DeepLearnPhysics/PILArNet-M-mini \
  --repo-type dataset \
  --local-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.

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 and sPHENIX (HDF5), WAND water Cherenkov, NEXT, JAXTPC, LUCiD, 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.0

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.0
File Size Uploaded Provenance Actions
particle_imaging_models-0.6.0.tar.gz 1.2 MB With provenance Details for particle_imaging_models-0.6.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.9 MB

Release files / particle_imaging_models-0.6.0.tar.gz

Download URL particle_imaging_models-0.6.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
f35e4003ca7b2da73406e5e76a689cb425e563a7132bd6518bb10f0992c3a760
BLAKE2b-256 checksum
How to use checksums
50ea606039b51ee5d2862ed22f903482ee2de19dd17d199c381c7b032e15d6e8
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 27, 2026.

Transparency log

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

Download URL particle_imaging_models-0.6.0-py3-none-any.whl
Size 640.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc5056bd0d684abb371f8f0590554fb08064610ff489547089f1a085f1ba0ab4
BLAKE2b-256 checksum
How to use checksums
a904753fe97953b7881c1b38e3f7b11814315e930b3a6befe1b95695fe0ac8c8
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 27, 2026.

Transparency log

Security for particle-imaging-models 0.6.0

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.0.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 27, 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.

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files Full provenance

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