File size: 5,205 Bytes
67a8ea1 c98e0c4 67a8ea1 c98e0c4 67a8ea1 c98e0c4 67a8ea1 37280be 67a8ea1 37280be 67a8ea1 37280be 67a8ea1 37280be 67a8ea1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# Model Card for mlpf-cms-v2.1.0
This model reconstructs particles in a detector, based on the tracks and calorimeter clusters recorded by the detector.
## Model Details
The performance is measured with respect to generator-level jets and MET computed from Pythia particles, i.e. the truth-level jets and MET.
<details>
<summary>Jet performance</summary>
<img src="plots_checkpoint-18-2.778778/cms_pf_qcd/jet_response_iqr_over_med_pt.png" alt="ttbar jet resolution" width="300"/>
<img src="plots_checkpoint-18-2.778778/cms_pf_ttbar/jet_response_iqr_over_med_pt.png" alt="qq jet resolution" width="300"/>
<img src="plots_checkpoint-18-2.778778/cms_pf_ztt/jet_response_iqr_over_med_pt.png" alt="ttbar jet resolution" width="300"/>
</details>
<details>
<summary>MET performance</summary>
<img src="plots_checkpoint-18-2.778778/cms_pf_qcd/met_response_iqr_over_med.png" alt="ttbar MET resolution" width="300"/>
<img src="plots_checkpoint-18-2.778778/cms_pf_ttbar/met_response_iqr_over_med.png" alt="qq MET resolution" width="300"/>
<img src="plots_checkpoint-18-2.778778/cms_pf_ztt/met_response_iqr_over_med.png" alt="ttbar MET resolution" width="300"/>
</details>
### Model Description
- **Developed by:** CMS MLPF Team
- **Model type:** transformer
- **License:** Apache License
### Model Sources
- **Repository:** https://github.com/jpata/particleflow/releases/tag/v2.1.0
## Uses
### Direct Use
This model may be used to study the physics and computational performance on ML-based reconstruction in simulation within the CMS collaboration.
### Out-of-Scope Use
This model is not intended for physics measurements on real data or for use outside the CMS collaboration.
## Bias, Risks, and Limitations
The model has only been trained on simulation data and has not been validated against real data.
The model has not been peer reviewed or published in a peer-reviewed journal.
## How to Get Started with the Model
Use the code below to get started with the model.
```
#get the code
git clone https://github.com/jpata/particleflow
cd particleflow
git checkout v2.1.0
#get the models
git clone https://huggingface.co/jpata/particleflow models
```
## Training Details
Trained on 8x MI250X for 18 epochs over ~26 days.
The training was continued multiple times from a checkpoint due to the 24h time limit.
### Training Data
The following datasets were used:
```
179G /local/joosep/mlpf/tensorflow_datasets/cms/cms_pf_qcd/2.5.0
84G /local/joosep/mlpf/tensorflow_datasets/cms/cms_pf_qcd_nopu/2.5.0
179G /local/joosep/mlpf/tensorflow_datasets/cms/cms_pf_ttbar/2.5.0
86G /local/joosep/mlpf/tensorflow_datasets/cms/cms_pf_ttbar_nopu/2.5.0
173G /local/joosep/mlpf/tensorflow_datasets/cms/cms_pf_ztt/2.5.0
57G /local/joosep/mlpf/tensorflow_datasets/cms/cms_pf_ztt_nopu/2.5.0
```
## Training Procedure
```bash
#!/bin/bash
#SBATCH --job-name=mlpf-train
#SBATCH --account=project_465000301
#SBATCH --time=3-00:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --cpus-per-task=32
#SBATCH --mem=400G
#SBATCH --gpus-per-task=8
#SBATCH --partition=small-g
#SBATCH --no-requeue
#SBATCH -o logs/slurm-%x-%j-%N.out
cd /scratch/project_465000301/particleflow
module load LUMI/24.03 partition/G
export IMG=/scratch/project_465000301/pytorch-rocm6.2.simg
export PYTHONPATH=`pwd`
export TFDS_DATA_DIR=/scratch/project_465000301/tensorflow_datasets
#export MIOPEN_DISABLE_CACHE=true
export MIOPEN_USER_DB_PATH=/tmp/${USER}-${SLURM_JOB_ID}-miopen-cache
export MIOPEN_CUSTOM_CACHE_DIR=${MIOPEN_USER_DB_PATH}
export TF_CPP_MAX_VLOG_LEVEL=-1 #to suppress ROCm fusion is enabled messages
export ROCM_PATH=/opt/rocm
#export NCCL_DEBUG=INFO
#export MIOPEN_ENABLE_LOGGING=1
#export MIOPEN_ENABLE_LOGGING_CMD=1
#export MIOPEN_LOG_LEVEL=4
export KERAS_BACKEND=torch
env
#TF training
singularity exec \
--rocm \
-B /scratch/project_465000301 \
-B /tmp \
--env LD_LIBRARY_PATH=/opt/rocm/lib/ \
--env CUDA_VISIBLE_DEVICES=$ROCR_VISIBLE_DEVICES \
$IMG python3 mlpf/pipeline.py --gpus 8 \
--data-dir $TFDS_DATA_DIR --config parameters/pytorch/pyg-cms.yaml \
--train --gpu-batch-multiplier 5 --num-workers 8 --prefetch-factor 50 --checkpoint-freq 1 --conv-type attention --dtype bfloat16 --lr 0.0001
```
## Evaluation
```bash
#!/bin/bash
#SBATCH --partition gpu
#SBATCH --gres gpu:mig:1
#SBATCH --mem-per-gpu 100G
#SBATCH -o logs/slurm-%x-%j-%N.out
IMG=/home/software/singularity/pytorch.simg:2024-08-18
cd ~/particleflow
WEIGHTS=experiments/pyg-cms_20241101_090645_682892/checkpoints/checkpoint-08-2.986092.pth
DATASET=$1
env
singularity exec -B /scratch/persistent --nv \
--env PYTHONPATH=`pwd` \
--env KERAS_BACKEND=torch \
$IMG python mlpf/pipeline.py --gpus 1 \
--data-dir /scratch/persistent/joosep/tensorflow_datasets --config parameters/pytorch/pyg-cms-nopu.yaml \
--test --make-plots --gpu-batch-multiplier 2 --load $WEIGHTS --ntest 50000 --dtype bfloat16 --num-workers 8 --prefetch-factor 10 --test-datasets $DATASET
```
## Citation
## Glossary
- PF: particle flow reconstruction
- MLPF: machine learning for particle flow
- CMS: Compact Muon Solenoid
## Model Card Contact
Joosep Pata, [email protected]
|