# NVIDIA GPUの確認
nvidia-smi
# Python バージョン確認 (3.11+ 推奨)
python --version# リポジトリクローン
git clone https://github.com/langchain-ai/learning-langchain.git
cd learning-langchain/treg-raptor-tree
# 仮想環境作成
python -m venv raptor_env
source raptor_env/bin/activate # Linux/Mac
# または
raptor_env\Scripts\activate # Windows
# 依存関係インストール
pip install -r requirements.txt# CUDA対応版インストール
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121# RAPTORツリー構築
python true_raptor_builder.py
# 結果確認
python analyze_clustered_tree.py
# 可視化生成
python visualize_raptor_tree.py
# 可視化表示
python show_raptor_viz.py🚀 GPU detected: NVIDIA GeForce RTX 4060 Ti (16.0GB)
🔥 Using OPT-2.7B for GPU with 16GB+ memory
📊 Processing level 0: 35 nodes
📊 Processing level 1: 10 nodes
📊 Processing level 2: 2 nodes
🌟 Root node created
📊 Results Summary:
Generated nodes: 14
Tree levels: 4
Improvement: +180%
raptor_tree_visualization_*.png- ツリー構造図raptor_statistics_*.png- 統計分析data/immune_cell_differentiation/raptor_trees/*.json- ツリーデータ
# PyTorchのCUDA確認
python -c "import torch; print(torch.cuda.is_available())"
# 再インストール
pip uninstall torch torchvision torchaudio
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121- GPUメモリが不足する場合、より小さなモデルが自動選択されます
- 必要に応じて
config.yamlでバッチサイズを調整
# 全て再インストール
pip install --upgrade --force-reinstall -r requirements.txt✅ 14ノード以上生成
✅ 4階層達成
✅ 180%以上改善
✅ 可視化ファイル生成
- カスタムデータ: 独自の文書セットで実験
- パラメータ調整:
config.yamlで設定カスタマイズ - 拡張機能:
DEVELOPER_GUIDE.mdで高度な機能を学習
- 📖 詳細:
README.md - 🔬 開発者向け:
DEVELOPER_GUIDE.md - ❓ 問題: GitHub Issues で質問