Google TPU 文件
貢獻於 Optimum TPU
加入 Hugging Face 社群
並獲得增強的文件體驗
開始使用
為 Optimum TPU 做出貢獻
我們很高興您有意為 Optimum TPU 做出貢獻!無論您是修正錯誤、新增功能、改進文件,或是分享您的使用經驗,我們都非常重視您的貢獻 😄
開始使用
- Fork 並複製 (clone) 儲存庫
git clone https://github.com/YOUR_USERNAME/optimum-tpu.git
cd optimum-tpu- 於本機安裝套件
python -m venv .venv
source .venv/bin/activate
python -m pip install . -f https://storage.googleapis.com/libtpu-releases/index.html開發工具
此專案包含一個完整的 Makefile,其中提供了各種開發任務的指令
測試
make tests # Run all the non-TGI-related tests
make tgi_test # Run TGI tests with PyTorch/XLA
make tgi_test_jetstream # Run TGI tests with Jetstream backend
make tgi_docker_test # Run TGI integration tests in Docker程式碼品質
make style # Auto-fix code style issues
make style_check # Check code style without fixing說明文件
make preview_doc # Preview documentation locallyDocker 映像檔
make tpu-tgi # Build TGI Docker image
make tpu-tgi-ie # Build TGI inference endpoint image
make tpu-tgi-gcp # Build TGI Google Cloud imageTGI 開發
若要參與 Text Generation Inference (/text-generation-inference 資料夾) 的開發,您可能也需要從頭建置一個 TGI 映像檔。請參考服務操作指南中的手動映像檔建置章節。
- 建置獨立伺服器
make tgi_server
提取請求 (Pull Request) 流程
- 建立一個新的分支
git checkout -b your-feature-name
進行您的更改
執行測試
make tests
# Run more specialized test if needed such as make tgi_test, make tgi_test_jetstream, make tgi_docker_test
make style_check- 提交您的 PR 並附上
- 清晰的更改描述
- 測試結果
- 若有必要,請附上文件更新
需要協助?
- 查閱說明文件
- 針對錯誤或功能請求建立 Issue
授權
透過為 Optimum TPU 做出貢獻,您即同意您的貢獻將依照 Apache License, Version 2.0 授權條款發佈。