# Speed Comparison
-[[open-in-colab]]
+<a href="https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb" target="_blank" class="absolute z-10 right-0 top-0">
+ <img
+ alt="Open In Colab"
+ class="!m-0"
+ src="https://colab.research.google.com/assets/colab-badge.svg"
+ />
+</a>
`Safetensors` is really fast. Let's compare it against `PyTorch` by loading [gpt2](https://huggingface.co/gpt2) weights. To run the [GPU benchmark](#gpu-benchmark), make sure your machine has GPU or you have selected `GPU runtime` if you are using Google Colab.
Before you begin, make sure you have all the necessary libraries installed:
-```bash
+```py
!pip install safetensors huggingface_hub torch
```