diff --git a/notebooks/en/fine_tuning_smol_vlm_sft_trl.ipynb b/notebooks/en/fine_tuning_smol_vlm_sft_trl.ipynb index 2931b7d1..5645da68 100644 --- a/notebooks/en/fine_tuning_smol_vlm_sft_trl.ipynb +++ b/notebooks/en/fine_tuning_smol_vlm_sft_trl.ipynb @@ -60,23 +60,58 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": { - "id": "GCMhPmFdIGSb" + "id": "GCMhPmFdIGSb", + "outputId": "1d97a52a-72e7-4d88-bad8-ffde22ed79af", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + " Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n", + " Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n", + " Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m61.3/61.3 MB\u001b[0m \u001b[31m40.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m504.9/504.9 kB\u001b[0m \u001b[31m38.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m844.5/844.5 kB\u001b[0m \u001b[31m56.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m59.6/59.6 MB\u001b[0m \u001b[31m40.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m324.6/324.6 kB\u001b[0m \u001b[31m28.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m40.0/40.0 MB\u001b[0m \u001b[31m60.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Building wheel for trl (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n" + ] + } + ], "source": [ - "!pip install -U -q transformers trl datasets bitsandbytes peft accelerate\n", - "# Tested with transformers==4.53.0.dev0, trl==0.20.0.dev0, datasets==3.6.0, bitsandbytes==0.46.0, peft==0.15.2, accelerate==1.8.1" + "!pip install -U -q git+https://github.com/huggingface/trl.git bitsandbytes peft qwen-vl-utils trackio\n", + "# Tested with trl==0.22.0.dev0, bitsandbytes==0.47.0, peft==0.17.1, qwen-vl-utils==0.0.11, trackio==0.2.8" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": { - "id": "x6fAqSnKDtKg" + "id": "x6fAqSnKDtKg", + "outputId": "b3c6909f-ce1e-4c27-d2d5-5dbc0726e4c0", + "colab": { + "base_uri": "https://localhost:8080/" + } }, - "outputs": [], + "outputs": [ + { + "output_type": "stream", + "name": "stdout", + "text": [ + "\u001b[?25l \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m0.0/8.4 MB\u001b[0m \u001b[31m?\u001b[0m eta \u001b[36m-:--:--\u001b[0m\r\u001b[2K \u001b[91m━━━━━━\u001b[0m\u001b[91m╸\u001b[0m\u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.4/8.4 MB\u001b[0m \u001b[31m43.6 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[91m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m\u001b[91m╸\u001b[0m \u001b[32m8.4/8.4 MB\u001b[0m \u001b[31m133.9 MB/s\u001b[0m eta \u001b[36m0:00:01\u001b[0m\r\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m8.4/8.4 MB\u001b[0m \u001b[31m92.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", + "\u001b[?25h Preparing metadata (setup.py) ... \u001b[?25l\u001b[?25hdone\n", + " Building wheel for flash-attn (setup.py) ... \u001b[?25l\u001b[?25hdone\n" + ] + } + ], "source": [ "!pip install -q flash-attn --no-build-isolation" ] @@ -92,11 +127,53 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": { - "id": "xcL4-bwGIoaR" + "id": "xcL4-bwGIoaR", + "outputId": "5ae2f971-65ee-4fac-b34a-51ea281b1b9a", + "colab": { + "base_uri": "https://localhost:8080/", + "height": 17, + "referenced_widgets": [ + "57c3c655352b45e0813b8c251a157cbc", + "a54f4ca184734d6897c373e00a575bc3", + "32109ed3388f4cbc9f02e30c06db9559", + "9acdca4ab08a4984a65408928798373f", + "821d65ae9cc2496da0d0b65adcb9baaa", + "b38d957d13a444fdb54bb8f0a76d97f0", + "d5a33cb60b20480ba4b8c601d803b7c0", + "a63ae0630069403284388d5379d5ed8c", + "49b248a7ab97444287c3cefa92cb9fac", + "fd009d2a14474f8ca0d7cd063ac18f81", + "0851414d08174cd9b1c4772ed1386540", + "a0d4a8a10b204ec7a14db3e4680753fb", + "025a590f09944d4c928bbfdc0eb6db0e", + "438820f803ba44a7b8aeef39b1dfa57a", + "fdc33e42f9a1480caf012c1a9a058c8c", + "0b86b7406dae472295030fb65e80f282", + "5c0f4da623f44a8b99fdc398c80f9772", + "85b7c6bed3b04c4795badc845d284f68", + "8ca311df3db2490b8c349d877baea6b4", + "72569ad9a7784a6bbe45421d62c29f51" + ] + } }, - "outputs": [], + "outputs": [ + { + "output_type": "display_data", + "data": { + "text/plain": [ + "VBox(children=(HTML(value='
| 25 | \n", - "1.645000 | \n", - "
| 50 | \n", - "0.607100 | \n", - "
| 75 | \n", - "0.182700 | \n", - "
| 100 | \n", - "0.129700 | \n", - "
| 125 | \n", - "0.111500 | \n", - "
| 150 | \n", - "0.105600 | \n", - "
| 175 | \n", - "0.105200 | \n", - "
"
- ],
- "text/plain": [
- "
Copy a token from your Hugging Face\ntokens page and paste it below.
Immediately click login after copying\nyour token or it might be stored in plain text in this notebook file.