{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "3fe31229-8f6b-48bc-a86d-af8e5466d11c", "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "GPU available? True\n", "BF16 is supported? True\n" ] } ], "source": [ "# Check if GPU is available I used 4x NVIDIA GeForce RTX 3090 (rented 2.1.2-cuda12.1-cudnn8-devel)\n", "import torch\n", "print('GPU available?', torch.cuda.is_available())\n", "print('BF16 is supported?', torch.cuda.is_bf16_supported())" ] }, { "cell_type": "code", "execution_count": 2, "id": "1dee845b-f3cb-4b1e-bdd9-1a918eac140b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Collecting huggingface_hub\n", " Downloading huggingface_hub-0.20.1-py3-none-any.whl.metadata (12 kB)\n", "Requirement already satisfied: filelock in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (3.9.0)\n", "Requirement already satisfied: fsspec>=2023.5.0 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (2023.10.0)\n", "Requirement already satisfied: requests in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (2.31.0)\n", "Requirement already satisfied: tqdm>=4.42.1 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (4.65.0)\n", "Requirement already satisfied: pyyaml>=5.1 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (6.0.1)\n", "Requirement already satisfied: typing-extensions>=3.7.4.3 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (4.7.1)\n", "Requirement already satisfied: packaging>=20.9 in /opt/conda/lib/python3.10/site-packages (from huggingface_hub) (23.1)\n", "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (2.0.4)\n", "Requirement already satisfied: idna<4,>=2.5 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (3.4)\n", "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (1.26.18)\n", "Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/lib/python3.10/site-packages (from requests->huggingface_hub) (2023.7.22)\n", "Downloading huggingface_hub-0.20.1-py3-none-any.whl (330 kB)\n", "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m330.1/330.1 kB\u001b[0m \u001b[31m8.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m\n", "\u001b[?25hInstalling collected packages: huggingface_hub\n", "Successfully installed huggingface_hub-0.20.1\n", "\u001b[33mWARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv\u001b[0m\u001b[33m\n", "\u001b[0m" ] } ], "source": [ "!pip install huggingface_hub" ] }, { "cell_type": "code", "execution_count": 4, "id": "88731672-9050-4034-8266-11aaace2a44e", "metadata": {}, "outputs": [], "source": [ "from huggingface_hub import notebook_login" ] }, { "cell_type": "code", "execution_count": 5, "id": "6b5aa7d7-3b18-4c14-afd4-043c2c545259", "metadata": {}, "outputs": [ { "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "60df98d7b0294289aad8b6c8cd023c3b", "version_major": 2, "version_minor": 0 }, "text/plain": [ "VBox(children=(HTML(value='