Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions nb/gpt-oss-(20B)-Fine-tuning.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": "%%capture\nimport os, importlib.util\n!pip install --upgrade -qqq uv\nif importlib.util.find_spec(\"torch\") is None or \"COLAB_\" in \"\".join(os.environ.keys()): \n try: import numpy; get_numpy = f\"numpy=={numpy.__version__}\"\n except: get_numpy = \"numpy\"\n !uv pip install -qqq \\\n \"torch>=2.8.0\" \"triton>=3.4.0\" {get_numpy} torchvision bitsandbytes \"transformers==4.56.2\" \\\n \"unsloth_zoo[base] @ git+https://github.com/unslothai/unsloth-zoo\" \\\n \"unsloth[base] @ git+https://github.com/unslothai/unsloth\" \\\n git+https://github.com/triton-lang/triton.git@05b2c186c1b6c9a08375389d5efe9cb4c401c075#subdirectory=python/triton_kernels\nelif importlib.util.find_spec(\"unsloth\") is None:\n !uv pip install -qqq unsloth\n!uv pip install --upgrade --no-deps transformers==4.56.2 tokenizers trl==0.22.2"
"source": "%%capture\nimport os, importlib.util\n!pip install --upgrade -qqq uv\nif importlib.util.find_spec(\"torch\") is None or \"COLAB_\" in \"\".join(os.environ.keys()): \n try: import numpy; get_numpy = f\"numpy=={numpy.__version__}\"\n except: get_numpy = \"numpy\"\n !uv pip install -qqq \\\n \"torch>=2.8.0\" \"triton>=3.4.0\" {get_numpy} torchvision bitsandbytes \"transformers==4.56.2\" \\\n \"unsloth_zoo[base] @ git+https://github.com/unslothai/unsloth-zoo\" \\\n \"unsloth[base] @ git+https://github.com/unslothai/unsloth\" \\\n git+https://github.com/triton-lang/triton.git@05b2c186c1b6c9a08375389d5efe9cb4c401c075#subdirectory=python/triton_kernels\nelif importlib.util.find_spec(\"unsloth\") is None:\n !uv pip install -qqq unsloth\n!uv pip install --upgrade --no-deps transformers==4.56.2 tokenizers trl==0.22.2\n!uv pip install \"trackio<=1.0\""
},
{
"cell_type": "markdown",
Expand Down Expand Up @@ -926,6 +926,7 @@
],
"source": [
"from trl import SFTConfig, SFTTrainer\n",
"\n",
"trainer = SFTTrainer(\n",
" model = model,\n",
" tokenizer = tokenizer,\n",
Expand All @@ -943,7 +944,7 @@
" lr_scheduler_type = \"linear\",\n",
" seed = 3407,\n",
" output_dir = \"outputs\",\n",
" report_to = \"none\", # Use this for WandB etc\n",
" report_to = \"trackio\",\n",
" ),\n",
")"
]
Expand Down Expand Up @@ -6951,4 +6952,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}