Windows で Unsloth を使って LLM をファインチューニングする方法(ステップバイステップガイド)
Windows に Unsloth をインストールしてローカルで LLM をファインチューニングする方法をご覧ください。
方法 #1 - Conda 経由の Windows:
1


Invoke-WebRequest -Uri "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" -OutFile ".\miniconda.exe"
Start-Process -FilePath ".\miniconda.exe" -ArgumentList "/S" -Wait
del .\miniconda.exe



2
conda create --name unsloth_env python==3.12 -y
conda activate unsloth_env
3

4
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu130
import torch
print(torch.cuda.is_available())
A = torch.ones((10, 10), device = "cuda")
B = torch.ones((10, 10), device = "cuda")
A @ B
5
pip install unsloth6
🦥 Unsloth: あなたのコンピュータをパッチして無料で 2 倍速いファインチューニングを可能にします。
🦥 Unsloth Zoo は今からトレーニングを高速化するためにすべてをパッチします!
==((====))== Unsloth 2026.1.4: Fast Gemma3 patching. Transformers: 4.57.6.
\\ /| NVIDIA GeForce RTX 3060。GPU 数 = 1。最大メモリ: 12.0 GB。プラットフォーム: Windows。
O^O/ \_/ \ Torch: 2.10.0+cu130。CUDA: 8.6。CUDA Toolkit: 13.0。Triton: 3.6.0
\ / Bfloat16 = TRUE。FA [Xformers = 0.0.34。FA2 = False]
"-____-" Free license: http://github.com/unslothai/unsloth
Unsloth: 高速ダウンロードが有効です — 赤色のダウンロードバーは無視してください!
Unsloth: Gemma3 は SDPA をサポートしていないため、高速な eager に切り替えます。
Unsloth: `model.base_model.model.model` に勾配が必要になるようにしています
Unsloth: Tokenizing ["text"] (num_proc=1): 0%| | 0/210289 [00:00<?, ? examples/s]� Unsloth: あなたのコンピュータをパッチして無料で 2 倍速いファインチューニングを可能にします。
🦥 Unsloth: あなたのコンピュータをパッチして無料で 2 倍速いファインチューニングを可能にします。
方法 #2 - Docker:
1
をインストールします
export NVIDIA_CONTAINER_TOOLKIT_VERSION=1.17.8-1
sudo apt-get update && sudo apt-get install -y \
nvidia-container-toolkit=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
nvidia-container-toolkit-base=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \
libnvidia-container-tools=${NVIDIA_CONTAINER_TOOLKIT_VERSION} \2
は Unsloth の唯一の Docker イメージです。
docker run -d -e JUPYTER_PASSWORD="mypassword" \
-p 8888:8888 -p 2222:22 \
-v $(pwd)/work:/workspace/work \
unsloth/unsloth3
4
5
Docker の問題 - GPU が検出されない?
1
WSL をインストールします
コマンドプロンプトまたはターミナルを開き、Ubuntu をインストールします。パスワードの入力を求められたら設定してください。2
$primary3
そしてコマンドプロンプトで ENTER を押します
Python をインストールします4
sudo apt update5
pip install torch torchvision --force-reinstall --index-url https://download.pytorch.org/whl/cu130 –break-system-packages6
pip install unsloth jupyter –-break-system-packagesもし GRPO を使用している、または vLLM を使う予定がある場合、現時点では vLLM は Windows を直接サポートしておらず、WSL または Linux 経由のみサポートしています。 トラブルシューティング /
最終更新
役に立ちましたか?


