Spaces:
Sleeping
Sleeping
🦙 feat: README.mdの更新とLlama-finetune-sandboxへのリネーム
Browse files- リポジトリ名を "HarmonAI_III" から "Llama-finetune-sandbox" に変更しました。
- プロジェクト概要、機能、使用方法などのREADME.mdの内容を更新しました。
- 新しいリポジトリのテーマに合わせたREADME.mdのデザインと内容に修正を加えました。
- 画像ファイルも新しいものに変更しました。
- ライセンス情報を更新しました。
- 全体を通して、より明確で簡潔な表現を用いました。
README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.39.0
|
8 |
app_file: app.py
|
@@ -11,226 +11,99 @@ license: mit
|
|
11 |
---
|
12 |
|
13 |
<p align="center">
|
14 |
-
<img src="
|
15 |
-
<h1 align="center">🌟
|
16 |
</p>
|
|
|
17 |
<p align="center">
|
18 |
-
<a href="https://github.com/Sunwood-ai-labs/
|
19 |
-
<img alt="GitHub Repo" src="https://img.shields.io/badge/github-
|
20 |
-
</a>
|
21 |
-
<a href="https://github.com/Sunwood-ai-labs/HarmonAI_III/blob/main/LICENSE">
|
22 |
-
<img alt="License" src="https://img.shields.io/github/license/Sunwood-ai-labs/HarmonAI_III?color=green">
|
23 |
-
</a>
|
24 |
-
<a href="https://github.com/Sunwood-ai-labs/HarmonAI_III/stargazers">
|
25 |
-
<img alt="GitHub stars" src="https://img.shields.io/github/stars/Sunwood-ai-labs/HarmonAI_III?style=social">
|
26 |
-
</a>
|
27 |
-
<a href="https://github.com/Sunwood-ai-labs/HarmonAI_III/releases">
|
28 |
-
<img alt="GitHub release" src="https://img.shields.io/github/v/release/Sunwood-ai-labs/HarmonAI_III?include_prereleases&style=flat-square">
|
29 |
</a>
|
30 |
-
<a href="https://github.com/Sunwood-ai-labs/
|
31 |
-
<img alt="
|
32 |
</a>
|
33 |
-
<a href="https://github.com/Sunwood-ai-labs/
|
34 |
-
<img alt="
|
35 |
</a>
|
36 |
-
<a href="https://github.com/Sunwood-ai-labs/
|
37 |
-
<img alt="GitHub
|
38 |
</a>
|
39 |
-
<a href="https://github.com/Sunwood-ai-labs/HarmonAI_III/watchers">
|
40 |
-
<img alt="GitHub watchers" src="https://img.shields.io/github/watchers/Sunwood-ai-labs/HarmonAI_III?style=social">
|
41 |
-
</a>
|
42 |
-
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/Sunwood-ai-labs/HarmonAI_III">
|
43 |
-
<img alt="GitHub top language" src="https://img.shields.io/github/languages/top/Sunwood-ai-labs/HarmonAI_III">
|
44 |
</p>
|
45 |
-
<h2 align="center">
|
46 |
-
~ AI-Powered Automated Repository Management Template ~
|
47 |
|
48 |
-
<
|
49 |
-
|
50 |
</h2>
|
|
|
51 |
<p align="center">
|
52 |
-
<img src="https://img.shields.io/badge/Python-
|
53 |
-
<img src="https://img.shields.io/badge/
|
54 |
-
<img src="https://img.shields.io/badge/
|
55 |
-
<img src="https://img.shields.io/badge/
|
56 |
-
<img src="https://img.shields.io/badge/
|
57 |
-
<img src="https://img.shields.io/badge/Actions-2088FF?style=for-the-badge&logo=github-actions" alt="GitHub Actions">
|
58 |
-
<img src="https://img.shields.io/badge/YAML-CB171E?style=for-the-badge&logo=yaml" alt="YAML">
|
59 |
-
<img src="https://img.shields.io/badge/pip-3775A9?style=for-the-badge&logo=pypi" alt="pip">
|
60 |
-
<img src="https://img.shields.io/badge/Markdown-000000?style=for-the-badge&logo=markdown" alt="Markdown">
|
61 |
-
<img src="https://img.shields.io/badge/GitHub_API-181717?style=for-the-badge&logo=github" alt="GitHub API">
|
62 |
</p>
|
63 |
-
<p align="center">
|
64 |
-
<a href="https://github.com/Sunwood-ai-labs/AIRA">
|
65 |
-
<img src="https://img.shields.io/badge/AIRA-FF4500?style=for-the-badge&logo=github" alt="AIRA">
|
66 |
-
</a>
|
67 |
-
<a href="https://github.com/Sunwood-ai-labs/IRIS">
|
68 |
-
<img src="https://img.shields.io/badge/IRIS-9370DB?style=for-the-badge&logo=github" alt="IRIS">
|
69 |
-
</a>
|
70 |
-
</p>
|
71 |
-
|
72 |
-
|
73 |
-
> [!IMPORTANT]
|
74 |
-
> HarmonAI IIIは、[cline (旧:Claude Dev)](https://github.com/clinebot/cline), [SourceSage](https://github.com/Sunwood-ai-labs/SourceSage), [claude.ai](https://claude.ai/)を活用して開発されたテンプレートリポジトリです。リリースノート、README、コミットメッセージの大部分は、最新のAI技術を用いて生成されています。
|
75 |
|
76 |
## 🚀 プロジェクト概要
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
## 🆕 最新情報
|
82 |
-
|
83 |
-
- 🎉 **v1.3.0リリース**: Streamlitアプリの基本構造作成、READMEファイルのデザイン改善、いくつかのバグ修正、およびドキュメントの更新を行いました。 StreamlitアプリではREADME.mdファイルを読み込んで表示する機能を実装しました。 README.mdファイルが存在しない場合のエラー処理も追加されています。 さらに、GitHubリポジトリへのコラボレーター追加スクリプト、Hugging Face Hubへの自動同期ワークフロー、PyPIへの自動デプロイワークフローを追加しました。
|
84 |
-
|
85 |
|
86 |
## ✨ 主な機能
|
87 |
|
88 |
-
1.
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
### Streamlitアプリの実行
|
100 |
-
1. `pip install -r requirements.txt` で必要なパッケージをインストールします。
|
101 |
-
2. `streamlit run app.py` を実行します。
|
102 |
-
|
103 |
-
### AIRAの使用例:
|
104 |
-
```bash
|
105 |
-
aira --mode sourcesage commit --config=.aira\config.dev.commit.yml --ss-model-name="gpt-4o-mini" --llm-output="llm_output.md"
|
106 |
-
```
|
107 |
-
|
108 |
-
### IRISの使用例:
|
109 |
-
|
110 |
-
詳細な使用方法については、各コンポーネントのドキュメンテーションを参照してください。
|
111 |
-
|
112 |
|
113 |
-
|
|
|
|
|
|
|
114 |
|
115 |
-
|
116 |
-
2. リポジトリをローカルにクローンします。
|
117 |
-
3. 必要な依存関係をインストールします:
|
118 |
-
```bash
|
119 |
-
pip install -r requirements.txt
|
120 |
-
```
|
121 |
-
4. AIRAとIRISの設定ファイルをカスタマイズします。
|
122 |
-
5. GitHub Actionsの設定を確認し、必要に応じて環境変数を設定します。
|
123 |
-
6. `.github/release_notes/.sourcesage_releasenotes_iris.yml`ファイルを開き、`repo-name:`の値を新しいリポジトリ名に修正します。
|
124 |
|
|
|
125 |
|
126 |
-
|
|
|
|
|
|
|
|
|
127 |
|
128 |
-
|
129 |
|
130 |
-
|
131 |
-
```bash
|
132 |
-
python3 -m venv .venv
|
133 |
-
```
|
134 |
-
これにより、`.venv`ディレクトリに仮想環境が作成されます。
|
135 |
-
|
136 |
-
2. 仮想環境をアクティベートします:
|
137 |
-
```bash
|
138 |
-
source .venv/bin/activate # Linux/macOS
|
139 |
-
.venv\Scripts\activate # Windows
|
140 |
-
```
|
141 |
-
|
142 |
-
3. 依存関係をインストールします:
|
143 |
-
```bash
|
144 |
-
pip install -r requirements.txt
|
145 |
-
```
|
146 |
-
|
147 |
-
これらの手順により、HarmonAI IIIの開発環境が整います。
|
148 |
-
|
149 |
-
|
150 |
-
## 📚 主要コンポーネント
|
151 |
-
|
152 |
-
### 🤖 [AIRA (AI-Integrated Repository for Accelerated Development)](https://github.com/Sunwood-ai-labs/AIRA)
|
153 |
-
- リポジトリ作成の自動化
|
154 |
-
- コミットメッセージの自動生成
|
155 |
-
|
156 |
-
### 🌈 [IRIS (Intelligent Repository Issue Solver)](https://github.com/Sunwood-ai-labs/IRIS)
|
157 |
-
- イシューの自動分類
|
158 |
-
- 解決策の自動提案
|
159 |
-
- リリースノートの自動生成
|
160 |
-
- READMEの自動翻訳
|
161 |
-
|
162 |
-
## 🤝 コラボレーターの自動招待
|
163 |
-
|
164 |
-
HarmonAI IIIには、GitHubリポジトリにコラボレーターを自動で招待するスクリプトが含まれています。以下の手順で使用できます:
|
165 |
-
|
166 |
-
1. `.env` ファイルを作成し、必要なトークンを設定します:
|
167 |
-
```
|
168 |
-
# GitHubアクセストークン(コラボレーター招待用)
|
169 |
-
GITHUB_TOKEN=your_github_personal_access_token_here
|
170 |
-
|
171 |
-
# 以下は他の機能で使用する可能性のあるトークンの例です。記載しておくと後々便利です。
|
172 |
-
# GITHUB_ACCESS_TOKEN=ghp_xxxxx
|
173 |
-
# YOUR_PERSONAL_ACCESS_TOKEN_IRIS=ghp_yyyyy
|
174 |
-
# GEMINI_API_KEY=AIzzzzz
|
175 |
-
```
|
176 |
-
|
177 |
-
注意: `.env` ファイルは `.gitignore` に含めて、リポジトリにコミットしないようにしてください。
|
178 |
-
|
179 |
-
2. 以下のコマンドを実行してコラボレーターを招待します:
|
180 |
-
```bash
|
181 |
-
python .github/github_add_collaborator.py Sunwood-ai-labs/HarmonAI_III username_to_invite
|
182 |
-
```
|
183 |
-
|
184 |
-
`username_to_invite` は招待したいGitHubユーザー名に置き換えてください。
|
185 |
-
|
186 |
-
3. スクリプトが正常に実行されると、指定したユーザーにコラボレーター招待が送信されます。
|
187 |
-
|
188 |
-
注意事項:
|
189 |
-
- このスクリプトを使用するには、GitHubトークンに適切な権限(`repo` スコープ)が必要です。
|
190 |
-
- 組織のリポジトリに対して使用する場合は、組織の設定で適切な権限が付与されていることを確認してください。
|
191 |
-
- セキュリティのため、トークンは定期的に更新し、必要最小限の権限のみを付与するようにしてください。
|
192 |
-
- `.env` ファイルやトークンを含む情報は、決して公開リポジトリにコミットしないでください。
|
193 |
-
|
194 |
-
この機能により、プロジェクトへの新しいコントリビューターの追加プロセスが簡素化されます。セキュリティを維持しながら、効率的にチームを拡大することができます。
|
195 |
-
|
196 |
-
## 🐈 処理フロー
|
197 |
-
|
198 |
-
|
199 |
-
```mermaid
|
200 |
-
%%{init:{'theme':'base','themeVariables':{'primaryColor':'#024959','primaryTextColor':'#F2C335','primaryBorderColor':'#F2AE30','lineColor':'#A1A2A6','secondaryColor':'#593E25','tertiaryColor':'#F2C335','noteTextColor':'#024959','noteBkgColor':'#F2C335','textColor':'#024959','fontSize':'18px'}}}%%
|
201 |
-
|
202 |
-
graph LR
|
203 |
-
A[開始] --> B[リポジトリの構想とネーミング]
|
204 |
-
B -->|人間が実施| C[HarmonAI IIIによる<br>リポジトリ初期化]
|
205 |
-
C -->|自動化| D[開発作業]
|
206 |
-
D -->|人間が実施| E[AIRAによる<br>コミット自動化]
|
207 |
-
E --> H[IRISによる<br>リリースノート作成]
|
208 |
-
H --> I[IRISによる<br>ドキュメント翻訳]
|
209 |
-
I --> J[リリース]
|
210 |
-
J --> K[終了]
|
211 |
-
|
212 |
-
class B,D,G human;
|
213 |
-
class E aira;
|
214 |
-
class F,H,I iris;
|
215 |
-
class C auto;
|
216 |
-
class A,J,K process;
|
217 |
|
|
|
|
|
|
|
|
|
218 |
```
|
219 |
|
|
|
220 |
|
|
|
|
|
|
|
|
|
221 |
|
222 |
## 🤝 コントリビューション
|
223 |
|
224 |
-
|
|
|
|
|
|
|
225 |
|
226 |
-
##
|
227 |
|
228 |
-
|
|
|
|
|
229 |
|
230 |
-
##
|
231 |
-
|
232 |
-
HarmonAI IIIの開発にあたり、多くのオープンソースプロジェクトからインスピレーションを得ています。特に、AIRAとIRISの開発者の皆様に深く感謝申し上げます。iris-s-coon、Maki様にも感謝いたします。
|
233 |
-
|
234 |
-
---
|
235 |
|
236 |
-
|
|
|
1 |
---
|
2 |
+
title: Llama-finetune-sandbox
|
3 |
+
emoji: 🦙
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: purple
|
6 |
sdk: streamlit
|
7 |
sdk_version: 1.39.0
|
8 |
app_file: app.py
|
|
|
11 |
---
|
12 |
|
13 |
<p align="center">
|
14 |
+
<img src="docs/Llama-finetune-sandbox.png" width="100%">
|
15 |
+
<h1 align="center">🌟 Llama-finetune-sandbox 🌟</h1>
|
16 |
</p>
|
17 |
+
|
18 |
<p align="center">
|
19 |
+
<a href="https://github.com/Sunwood-ai-labs/Llama-finetune-sandbox">
|
20 |
+
<img alt="GitHub Repo" src="https://img.shields.io/badge/github-Llama--finetune--sandbox-blue?logo=github">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
</a>
|
22 |
+
<a href="https://github.com/Sunwood-ai-labs/Llama-finetune-sandbox/blob/main/LICENSE">
|
23 |
+
<img alt="License" src="https://img.shields.io/github/license/Sunwood-ai-labs/Llama-finetune-sandbox?color=green">
|
24 |
</a>
|
25 |
+
<a href="https://github.com/Sunwood-ai-labs/Llama-finetune-sandbox/stargazers">
|
26 |
+
<img alt="GitHub stars" src="https://img.shields.io/github/stars/Sunwood-ai-labs/Llama-finetune-sandbox?style=social">
|
27 |
</a>
|
28 |
+
<a href="https://github.com/Sunwood-ai-labs/Llama-finetune-sandbox/releases">
|
29 |
+
<img alt="GitHub release" src="https://img.shields.io/github/v/release/Sunwood-ai-labs/Llama-finetune-sandbox?include_prereleases&style=flat-square">
|
30 |
</a>
|
|
|
|
|
|
|
|
|
|
|
31 |
</p>
|
|
|
|
|
32 |
|
33 |
+
<h2 align="center">
|
34 |
+
~ Llamaモデルのファインチューニング実験環境 ~
|
35 |
</h2>
|
36 |
+
|
37 |
<p align="center">
|
38 |
+
<img src="https://img.shields.io/badge/Python-3.8%2B-blue?style=for-the-badge&logo=python" alt="Python">
|
39 |
+
<img src="https://img.shields.io/badge/PyTorch-2.0%2B-red?style=for-the-badge&logo=pytorch" alt="PyTorch">
|
40 |
+
<img src="https://img.shields.io/badge/HuggingFace-yellow?style=for-the-badge&logo=huggingface" alt="HuggingFace">
|
41 |
+
<img src="https://img.shields.io/badge/Docker-blue?style=for-the-badge&logo=docker" alt="Docker">
|
42 |
+
<img src="https://img.shields.io/badge/CUDA-11.7%2B-green?style=for-the-badge&logo=nvidia" alt="CUDA">
|
|
|
|
|
|
|
|
|
|
|
43 |
</p>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
## 🚀 プロジェクト概要
|
46 |
|
47 |
+
**Llama-finetune-sandbox**は、Llamaモデルのファインチューニングを実験的に学習・検証できる環境です。様々なファインチューニング手法を試し、モデルのカスタマイズや性能評価を行うことができます。初学者から研究者まで、幅広いユーザーのニーズに対応します。
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
## ✨ 主な機能
|
50 |
|
51 |
+
1. **多様なファインチューニング手法**:
|
52 |
+
- LoRA (Low-Rank Adaptation)
|
53 |
+
- QLoRA (Quantized LoRA)
|
54 |
+
- Full Fine-tuning
|
55 |
+
- Parameter-Efficient Fine-tuning (PEFT)
|
56 |
+
|
57 |
+
2. **柔軟なモデル設定**:
|
58 |
+
- カスタム可能な最大シーケンス長
|
59 |
+
- 多様な量子化オプション
|
60 |
+
- 複数のアテンションメカニズム
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
|
62 |
+
3. **実験環境の整備**:
|
63 |
+
- 性能評価ツール
|
64 |
+
- メモリ使用量の最適化
|
65 |
+
- 実験結果の可視化
|
66 |
|
67 |
+
## 📚 実装例
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
68 |
|
69 |
+
本リポジトリには以下の実装例が含まれています:
|
70 |
|
71 |
+
1. **Unslothを使用した高速ファインチューニング**
|
72 |
+
- Llama-3.2-1B/3Bモデルの高速ファインチューニング実装
|
73 |
+
- → 詳細は [`Llama_3_2_1B+3B_Conversational_+_2x_faster_finetuning_JP.md`](sandbox/Llama_3_2_1B+3B_Conversational_+_2x_faster_finetuning_JP.md) をご参照ください。
|
74 |
+
- → [マークダウン形式からノートブック形式への変換はこちらを使用してください](https://huggingface.co/spaces/MakiAi/JupytextWebUI)
|
75 |
+
- [📒ノートブックはこちら](https://colab.research.google.com/drive/1AjtWF2vOEwzIoCMmlQfSTYCVgy4Y78Wi?usp=sharing)
|
76 |
|
77 |
+
2. その他の実装例は随時追加予定
|
78 |
|
79 |
+
## 🛠️ 環境構築
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
|
81 |
+
1. リポジトリのクローン:
|
82 |
+
```bash
|
83 |
+
git clone https://github.com/Sunwood-ai-labs/Llama-finetune-sandbox.git
|
84 |
+
cd Llama-finetune-sandbox
|
85 |
```
|
86 |
|
87 |
+
## 📝 実験例の追加方法
|
88 |
|
89 |
+
1. `examples/`ディレクトリに新しい実装を追加
|
90 |
+
2. 必要な設定やユーティリティを`utils/`に追加
|
91 |
+
3. ドキュメントとテストを更新
|
92 |
+
4. プルリクエストを作成
|
93 |
|
94 |
## 🤝 コントリビューション
|
95 |
|
96 |
+
- 新しいファインチューニング手法の実装
|
97 |
+
- バグ修正や機能改善
|
98 |
+
- ドキュメントの改善
|
99 |
+
- 使用例の追加
|
100 |
|
101 |
+
## 📚 参考資料
|
102 |
|
103 |
+
- [HuggingFace PEFT ドキュメント](https://huggingface.co/docs/peft)
|
104 |
+
- [Llama モデルについて](https://github.com/facebookresearch/llama)
|
105 |
+
- [ファインチューニングのベストプラクティス](https://github.com/Sunwood-ai-labs/Llama-finetune-sandbox/wiki)
|
106 |
|
107 |
+
## ⚖️ ライセンス
|
|
|
|
|
|
|
|
|
108 |
|
109 |
+
このプロジェクトはMITライセンスの下で公開されています。
|