]> khamidou — GitHub mirrors - safetensors.git/commitdiff
[docs] Fixes the colab btn on speed page (#91)
authorMishig <dmishig@gmail.com>
Fri, 18 Nov 2022 13:15:53 +0000 (14:15 +0100)
committerGitHub <noreply@github.com>
Fri, 18 Nov 2022 13:15:53 +0000 (14:15 +0100)
docs/source/speed.mdx

index 456de161a4316c384590e0f8a03aa47ab3985b49..660486d4cbbe91cfcb408bcc3b21c94093d2d317 100644 (file)
@@ -2,13 +2,19 @@
 
 # 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
 ```