-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix generation using Jetstream Pytorch #94
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c897a7f
feat(debug): add env var to skip warmup
tengomucho d7b8978
fix(Jetstream Pt): correct generation
tengomucho 9c26616
ci: separate Jetstream Pytorch test to its own workflow
tengomucho 960efcc
fix(jetstream Pt): make Jetstream Pt install more reliable
tengomucho 1b26e16
fix(style): correct generator style
tengomucho 8519c81
refactor(Jetstream Pt): avoid duplicating Llama modeling
tengomucho File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Optimum TPU / Test TGI on TPU / Jetstream Pytorch | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- "text-generation-inference/**" | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- "text-generation-inference/**" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
do-the-job: | ||
name: Run TGI tests - Jetstream Pytorch | ||
runs-on: optimum-tpu | ||
container: | ||
image: us-central1-docker.pkg.dev/tpu-pytorch-releases/docker/xla:r2.4.0_3.10_tpuvm | ||
options: --shm-size "16gb" --ipc host --privileged | ||
env: | ||
PJRT_DEVICE: TPU | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build and test TGI server | ||
run: | | ||
HF_TOKEN=${{ secrets.HF_TOKEN_OPTIMUM_TPU_CI }} make tgi_test_jetstream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,4 +133,6 @@ dmypy.json | |
*.pt | ||
|
||
.vscode | ||
.idea/ | ||
.idea/ | ||
|
||
jetstream-pt-deps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
deps_dir=deps | ||
rm -rf $deps_dir | ||
mkdir -p $deps_dir | ||
cd $deps_dir | ||
pwd | ||
git clone https://github.com/google/jetstream-pytorch.git | ||
cd jetstream-pytorch | ||
git checkout ec4ac8f6b180ade059a2284b8b7d843b3cab0921 | ||
git submodule update --init --recursive | ||
# We cannot install in a temporary directory because the directory should not be deleted after the script finishes, | ||
# because it will install its dependendencies from that directory. | ||
pip install -e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this is used mostly for debug only? Or can it be turned on for other reasons? In the later case I would use
logger.warning
if not,logger.debug
is fineThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say it's only for debugging. Warmup will check if model can fit in memory and prepare inference so prefill and decode is rather fast afterwards, but it can last around 4-5 minutes, so it can be annoying for debugging the container.