Update README.md
Browse files
README.md
CHANGED
@@ -11,12 +11,51 @@ language:
|
|
11 |
- en
|
12 |
---
|
13 |
|
14 |
-
# Uploaded
|
15 |
|
16 |
- **Developed by:** Kohei0614
|
17 |
- **License:** apache-2.0
|
18 |
-
- **Finetuned from
|
19 |
|
20 |
-
This
|
21 |
|
22 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
- en
|
12 |
---
|
13 |
|
14 |
+
# Uploaded Model
|
15 |
|
16 |
- **Developed by:** Kohei0614
|
17 |
- **License:** apache-2.0
|
18 |
+
- **Finetuned from:** [llm-jp/llm-jp-3-13b](https://huggingface.co/llm-jp/llm-jp-3-13b)
|
19 |
|
20 |
+
This LLaMA-based model was finetuned using [Unsloth](https://github.com/unslothai/unsloth) and Hugging Face's TRL library, enabling 2x faster training even on resource-constrained GPUs like T4s on Google Colab.
|
21 |
|
22 |
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
23 |
+
|
24 |
+
---
|
25 |
+
|
26 |
+
## 概要
|
27 |
+
|
28 |
+
このリポジトリは、最終課題コンペ用に大規模言語モデル(LLM)の微調整(Fine-tuning)を行うためのテンプレートをベースにしています。
|
29 |
+
`unsloth` と `TRL` を用いることで、Google Colabで無料利用可能なT4 GPU上でも効率的かつ高速なFine-tuningが可能となりました。
|
30 |
+
|
31 |
+
### 特徴
|
32 |
+
|
33 |
+
- **Google Colab対応:** `unsloth`により、複雑な環境構築なしでColab上での実行が可能。
|
34 |
+
- **低リソース対応:** 4bit量子化やLoRAなどを組み合わせることで、メモリ制約のある環境でも学習が可能。
|
35 |
+
- **シンプルなAPI:** `FastLanguageModel`や`SFTTrainer`を利用した簡潔なコード構成。
|
36 |
+
|
37 |
+
---
|
38 |
+
|
39 |
+
## 環境構築手順 (ローカル環境例)
|
40 |
+
|
41 |
+
※Google Colab利用者は不要です。
|
42 |
+
|
43 |
+
```bash
|
44 |
+
# Miniforge3インストール
|
45 |
+
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
|
46 |
+
bash Miniforge3-$(uname)-$(uname -m).sh
|
47 |
+
|
48 |
+
# PATH設定
|
49 |
+
export PATH=/root/miniforge3/bin:$PATH
|
50 |
+
conda init
|
51 |
+
# 新ターミナルを起動
|
52 |
+
|
53 |
+
conda create --name unsloth_env python=3.10 pytorch-cuda=12.1 pytorch cudatoolkit xformers -c pytorch -c nvidia -c xformers -y
|
54 |
+
conda activate unsloth_env
|
55 |
+
|
56 |
+
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
|
57 |
+
pip install --no-deps "trl<0.9.0" peft accelerate bitsandbytes
|
58 |
+
|
59 |
+
# Jupyter Kernel設定
|
60 |
+
conda install -c conda-forge ipykernel
|
61 |
+
python -m ipykernel install --user --name=unsloth_env --display-name "Python (unsloth_env)"
|