petals
๐ธ LLMs์ BitTorrent ๋ฐฉ์์ผ๋ก ์ง์์ ์คํํ์ธ์. ์คํ๋ก๋ฉ๋ณด๋ค ์ต๋ 10๋ฐฐ ๋น ๋ฅธ ํ์ธํ๋๊ณผ ์ถ๋ก
ํ์ผ ํ์๊ธฐ
์ต์ข ๋ฒ์ ๋ค์ด๋ก๋ (.zip)- check-style.yaml
- push-docker-image.yaml
- run-tests.yaml
- benchmark_forward.py
- benchmark_inference.py
- benchmark_training.py
- prompt-tuning-personachat.ipynb
- prompt-tuning-sst2.ipynb
- __init__.py
- run_dht.py
- run_prod_server.sh
- run_server.py
- __init__.py
- sequence_info.py
- sequence_manager.py
- spending_policy.py
- __init__.py
- config.py
- from_pretrained.py
- inference_session.py
- lm_head.py
- ptune.py
- remote_forward_backward.py
- remote_generation.py
- remote_sequential.py
- sequential_autograd.py
- __init__.py
- block.py
- config.py
- model.py
- __init__.py
- block.py
- config.py
- model.py
- __init__.py
- block.py
- config.py
- model.py
- speculative_model.py
- __init__.py
- block.py
- config.py
- model.py
- __init__.py
- __init__.py
- backend.py
- block_functions.py
- block_selection.py
- block_utils.py
- from_pretrained.py
- handler.py
- memory_cache.py
- reachability.py
- server.py
- task_pool.py
- task_prioritizer.py
- throughput.py
- __init__.py
- asyncio.py
- auto_config.py
- convert_block.py
- cuda_graphs.py
- dht.py
- disk_cache.py
- hf_auth.py
- logging.py
- misc.py
- packaging.py
- peft.py
- ping.py
- random.py
- version.py
- __init__.py
- constants.py
- data_structures.py
- dht_utils.py
- bootstrap.id
- conftest.py
- server2.id
- test_aux_functions.py
- test_block_exact_match.py
- test_cache.py
- test_chained_calls.py
- test_dtype.py
- test_full_model.py
- test_optimized_layers.py
- test_peft.py
- test_priority_pool.py
- test_remote_sequential.py
- test_sequence_manager.py
- test_server_stats.py
- test_speculative_generation.py
- test_tensor_parallel.py
- test_utils.py
- .gitignore
- Dockerfile
- LICENSE
- pyproject.toml
- README.md
- setup.cfg
# ์ค์น ๊ฐ์ด๋
git clone https://github.com/bigscience-workshop/petals
๊นํ๋ธ์์ ํ๋ก์ ํธ ์ฝ๋ ์ ์ฒด๋ฅผ ๋ด ์ปดํจํฐ๋ก ๋ด๋ ค๋ฐ์ต๋๋ค.
cd petals
๋ฐฉ๊ธ ๋ด๋ ค๋ฐ์ ํ๋ก์ ํธ ํด๋ ์์ผ๋ก ์ด๋ํฉ๋๋ค.
2. ๊ณต์ ์ค์น ์คํฌ๋ฆฝํธ
์ฌ์ ์ถ์ฒpip install git+https://github.com/bigscience-workshop/petals
PyPI์ ๋ฐฐํฌ๋ ํจํค์ง๋ฅผ ๋ฐ๋ก ์ค์นํฉ๋๋ค. ์์ค ํด๋ก ์ด ํ์ ์์ต๋๋ค.
brew install python
Homebrew๋ก ์ด๋ฏธ ๋น๋๋ ํจํค์ง๋ฅผ ๋ฐ๋ก ์ค์นํฉ๋๋ค. ์์ค ๋น๋๊ฐ ํ์ ์์ต๋๋ค.
์ด ๋ ํฌ์ README์ ์ ํ ์ค์ ๋ช ๋ น์ด๋ฅผ ๊ทธ๋๋ก ๊ฐ์ ธ์์ต๋๋ค.
3. Docker
์ฌ์- Git GitHub์์ ํ๋ก์ ํธ ์ฝ๋๋ฅผ ๋ด๋ ค๋ฐ์ผ๋ ค๋ฉด ํ์ํฉ๋๋ค.
- Docker Desktop ์ปจํ ์ด๋๋ฅผ ๋น๋ํ๊ณ ์คํํ๋ ค๋ฉด ํ์ํฉ๋๋ค. ์ค์น ํ ์คํํด์ ๋ฐฑ๊ทธ๋ผ์ด๋์ ์ผ๋์ธ์.
sudo docker run -p 31330:31330 --ipc host --gpus all --volume petals-cache:/cache --rm \
๋น๋๋ ์ด๋ฏธ์ง๋ฅผ ์ค์ ์ปจํ ์ด๋๋ก ์คํํฉ๋๋ค.
์ด ๋ ํฌ์ README์ ์ ํ ์ค์ ๋ช ๋ น์ด๋ฅผ ๊ทธ๋๋ก ๊ฐ์ ธ์์ต๋๋ค.
4. Python
์ฌ์pip install git+https://github.com/bigscience-workshop/petals
PyPI์ ๋ฐฐํฌ๋ ํจํค์ง๋ฅผ ๋ฐ๋ก ์ค์นํฉ๋๋ค. ์์ค ํด๋ก ์ด ํ์ ์์ต๋๋ค.
python -m petals.cli.run_server meta-llama/Meta-Llama-3.1-405B-Instruct
ํ์ด์ฌ ์คํฌ๋ฆฝํธ(๋๋ ๋ชจ๋)๋ฅผ ์คํํฉ๋๋ค.
python -m petals.cli.run_server --port 31330 meta-llama/Meta-Llama-3.1-405B-Instruct
ํ์ด์ฌ ์คํฌ๋ฆฝํธ(๋๋ ๋ชจ๋)๋ฅผ ์คํํฉ๋๋ค.
python3 -m pip install git+https://github.com/bigscience-workshop/petals
requirements.txt ๋ฑ์ ๋ช ์๋ ํ์ด์ฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ์ค์นํฉ๋๋ค.
python3 -m petals.cli.run_server meta-llama/Meta-Llama-3.1-405B-Instruct
ํ์ด์ฌ ์คํฌ๋ฆฝํธ(๋๋ ๋ชจ๋)๋ฅผ ์คํํฉ๋๋ค.
์ด ๋ ํฌ์ README์ ์ ํ ์ค์ ๋ช ๋ น์ด๋ฅผ ๊ทธ๋๋ก ๊ฐ์ ธ์์ต๋๋ค.
