Skip to the content
AI and Cybersecurity Learning and Practice Center Test automation Open the Learning Center

Glossary

Pickle

Python's built-in serialization format. Loading a pickle can run arbitrary code, and many model files are pickles.

PyTorch .pt and .pth files, .pkl and .joblib files and some .bin files are pickle-based. A poisoned one runs code the moment it is loaded, before any inference happens. Prefer safetensors, and scan pickle-based files before use. The curator's model file scanner does this without loading the file.

Open the glossary in the Learning Center