Python with Google Colab
Google Colab provides a jupyter environment based on environment and hosted hardware accelerators by google.
Basic features are explained in this notebook.
GPU Lineup
- Tesla T4: light training, inference and
mixed precision - NVidia L4: best for modern LLMs, bfloat16 (
) support and mid-range training - A100: best for deep learning, large datasets and
math - H100: state-of-the-art transformer training and extreme speed.
Interaction with google drive
To mount from google drive that is useful to access datasets:
from google.colab import drive
import sys
import os
# Mount your Google Drive
drive_path="/content/drive"
drive.mount(drive_path)
file_path = "/content/drive/MyDrive/MyLabs/"
if file_path not in sys.path:
sys.path.insert(0, file_path)
Python’s pip can specify a “target” where the packets are downloaded and builded, to avoid to reinstall them later.