optimum-tpu 文件

為 Optimum TPU 貢獻

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

貢獻 Optimum TPU

我們很高興您有興趣為 Optimum TPU 貢獻力量!無論是修復錯誤、新增新功能、改進文件還是分享您的經驗,您的貢獻都將受到高度重視 😄

開始

  1. Fork 並克隆倉庫
git clone https://github.com/YOUR_USERNAME/optimum-tpu.git
cd optimum-tpu
  1. 在本地安裝軟體包
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 locally

Docker 映象

make tpu-tgi        # Build TGI Docker image
make tpu-tgi-ie     # Build TGI inference endpoint image
make tpu-tgi-gcp    # Build TGI Google Cloud image

TGI 開發

在進行文字生成推理(`text-generation-inference` 資料夾)時,您可能還需要從頭開始構建 TGI 映象。為此,請參閱服務操作指南中的手動映象構建部分

  1. 構建獨立伺服器
make tgi_server

拉取請求流程

  1. 建立新分支
git checkout -b your-feature-name
  1. 進行更改

  2. 執行測試

make tests 
# Run more specialized test if needed such as make tgi_test, make tgi_test_jetstream, make tgi_docker_test
make style_check
  1. 提交您的 PR 並附上
    • 清晰的更改描述
    • 測試結果
    • 必要時更新文件

需要幫助?

  • 檢視文件
  • 針對 bug 或功能請求提出問題

許可證

透過貢獻 Optimum TPU,您同意您的貢獻將根據 Apache 許可證 2.0 版獲得許可。

© . This site is unofficial and not affiliated with Hugging Face, Inc.