We’re excited that you’re interested in contributing to Optimum TPU! Whether you’re fixing bugs, adding new features, improving documentation, or sharing your experiences, your contributions are highly valued 😄
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
The project includes a comprehensive Makefile with commands for various development tasks:
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
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
When working on Text Generation Inference (/text-generation-inference
folder), you might also want to build a TGI image from scratch. To do this, refer to the manual image building section of the serving how to guide
make tgi_server
git checkout -b your-feature-name
Make your changes
Run tests:
make tests
# Run more specialized test if needed such as make tgi_test, make tgi_test_jetstream, make tgi_docker_test
make style_check
By contributing to Optimum TPU, you agree that your contributions will be licensed under the Apache License, Version 2.0.