Repository navigation
[doc][llm] Add docs for serving LLMs with TPUs - #65026
Conversation
Signed-off-by: Jeffrey Wang <[email protected]>
There was a problem hiding this comment.
Code Review
This pull request adds documentation and a Python example for topology-aware TPU serving in Ray Serve LLM, introducing support for TPU-V6E and multi-host TPU slices. The review feedback points out a runtime configuration error where max_num_batched_tokens is smaller than max_model_len, and recommends replacing the non-existent google/gemma-4-31B-it model with a valid identifier like google/gemma-2-27b-it across both the code and documentation.
|
This pull request has been automatically marked as stale because it has not had You can always ask for help on our discussion forum or Ray's public slack channel. If you'd like to keep this open, just leave any comment, and the stale label will be removed. |
ryanaoleary
left a comment
There was a problem hiding this comment.
agree with the outstanding comments, once those are resolved LGTM
dstrodtman
left a comment
There was a problem hiding this comment.
Docs style review (style and grammar only)
Review from Douglas Strodtman on the Anyscale documentation team. I ran this with Claude Code's help, and I've read and stand behind every comment below.
Scope: style, grammar, and Ray docs conventions, checked against Ray's own writing style guide. I don't own this area. Every technical claim on this page, and final approval, belongs to @eicherseiji and @ryanaoleary. Posting as a comment, not a change request.
Nice page overall. The topology-to-bundles explanation carries the concept well, and the prose is already close to the guide: contractions where they belong, active voice, sentence-case headings, no benefits list, tagged code fences, {doc} and {class} cross-references instead of hardcoded docs.ray.io/en/latest/ URLs. I verified that the SlicePlacementGroup class reference resolves; ray.util.tpu.SlicePlacementGroup is autodoc'd in doc/source/ray-core/api/utility.rst. What's left is small.
The one finding worth calling out above nit level is the missing myst.html_meta.description front matter. All 15 existing pages in serve/llm/user-guides/ have one, so this page would be the only page in the directory without a search-result description.
On the open threads
I read the existing threads before writing anything, and I'm deliberately not re-raising any of them:
- @eicherseiji's suggestions on L63 and L67 are unapplied (the single commit predates the review), and I'd take both as written. My comments avoid those lines.
- The questions about prerequisites, defining "TPU slice", moving the topology note lower, the per-chip bundle use case, whether the
SlicePlacementGroupsection is an implementation detail, and thetpu-inferenceexecutor link are all yours to settle. They're content decisions, not style. - On the model ID: @ryanaoleary already confirmed the Gemini bot was wrong, so I left it alone everywhere.
- I did not touch
max_num_batched_tokens. That's still open above and it's a correctness question, not mine.
Technical questions, not style findings
Two things I noticed while verifying my own suggestions. Both are questions for you, and neither has a suggestion attached.
- Which Ray package a reader ends up with. The Dockerfile comment on L85 says to use "a released Ray version or wheel URL that contains TPU topology support," and the default is
ARG RAY_PACKAGE="ray". @ryanaoleary's successful run used an explicit Ray nightly wheel instead. If topology support isn't in a released Ray yet, a reader who copies this Dockerfile as-is gets a stableraythat may lack the feature. Worth making that pairing explicit either way. blocking=Trueversusblocking=False. The example usesserve.run(app, blocking=True); the verified run usedblocking=False. Probably intentional for a standalone script, just confirming.
Sign-off
Happy to give a docs-side approval once the content questions above settle. Nothing in my list should hold the PR up on its own.
Also, one out-of-diff nit with no comment attached because it's outside a hunk: index.md L3 reads "If you are new" where the guide asks for contractions ("If you're new"). Pre-existing, so entirely optional to fold in here.
Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: Douglas Strodtman <[email protected]> Signed-off-by: Jeffrey Wang <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Jeffrey Wang <[email protected]>
Signed-off-by: Jeffrey Wang <[email protected]>
Signed-off-by: Jeffrey Wang <[email protected]>
## Why Small, self-contained docs fixes found during other docs work, collected into one PR. Ray's `AGENTS.md` asks for trivial edits to be bundled instead of opened as one-off PRs, so this batch keeps collecting fixes and goes up for review about once a week. Each fix is its own commit, so a reviewer can drop any one without touching the rest. ## What - **Trailing space inside link text** (`vsphere.md`, `data/contributing/contributing-guide.md`). Two links' text ended in a space, such as `[… (WCP) enabled ](…)`, so the rendered underline ran past the last word. Removed the space. Found while fixing the same pattern in the Ray Data MyST conversion (#66375). - **Duplicated paragraph** (`serve/llm/user-guides/configuration.md`). The "Set `accelerator_type`" paragraph appeared twice back to back, with the same content in a different sentence order, apparently a suggestion-merge artifact from #65026 that also dropped the blank line after the heading. Kept the first copy and restored the blank line. - **Escaped sub-bullets** (`ray-core/internals/autoscaler-v2.md`, `ray-core/internals/ray-event-exporter.md`). The rST originals nested these sub-bullets without the blank line rST requires, so they rendered as run-on text, and the MyST conversion (#66430) carried them over as `\-`. Dropped the escapes so they render as the nested lists the author intended. Both of these fixes turned up during the soft-wrap pass in #66607. ## Not a duplicate There's no open PR touching any of these files, and a GitHub search for `vsphere.md`, `contributing-guide.md`, "vSphere WCP", `configuration.md` with `accelerator_type`, `autoscaler-v2`, and `ray-event-exporter` finds nothing related. ## Testing - Rendered both pages with `markdown-it-py` (CommonMark). Each link's text now ends right at `</a>`, with no trailing whitespace. - A regex scan of every `doc/source/**/*.md` outside code fences for whitespace before `](` finds these two as the only cases on `master`. - Rendered `autoscaler-v2.md` and `ray-event-exporter.md` with `markdown-it-py` and confirmed each sub-bullet group is now a nested `<ul>` under its parent item. - Confirmed `configuration.md` has one copy of the paragraph, preceded by a blank line after the heading. - Pre-commit hooks passed on every commit. AI assistance (Claude Code) was used to find and make these fixes. I reviewed each change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
## Description <img width="801" height="764" alt="Screenshot 2026-07-27 at 12 00 39 AM" src="https://github.com/user-attachments/assets/13e39779-f934-4ace-a26e-f0c49d03b514" /> <img width="1508" height="980" alt="Screenshot 2026-07-27 at 12 04 56 AM" src="https://github.com/user-attachments/assets/b6833654-7928-4785-a04a-4d02626dc912" /> <img width="1481" height="996" alt="Screenshot 2026-07-27 at 12 05 07 AM" src="https://github.com/user-attachments/assets/c1040a47-69b5-422b-a5d3-c1c7e7c316b5" /> <img width="1499" height="1203" alt="Screenshot 2026-07-27 at 12 05 17 AM" src="https://github.com/user-attachments/assets/d15de8b2-e9c8-4310-8e3d-14b58fa8dd81" /> <img width="1509" height="673" alt="Screenshot 2026-07-27 at 12 05 26 AM" src="https://github.com/user-attachments/assets/8cbbac0d-196b-4cd5-9761-7796231b661e" /> ## Related issues > Link related issues: "Fixes ray-project#1234", "Closes ray-project#1234", or "Related to ray-project#1234". ## Additional information > Optional: Add implementation details, API changes, usage examples, screenshots, etc. --------- Signed-off-by: Jeffrey Wang <[email protected]> Co-authored-by: Seiji Eicher <[email protected]> Co-authored-by: Douglas Strodtman <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
## Why Small, self-contained docs fixes found during other docs work, collected into one PR. Ray's `AGENTS.md` asks for trivial edits to be bundled instead of opened as one-off PRs, so this batch keeps collecting fixes and goes up for review about once a week. Each fix is its own commit, so a reviewer can drop any one without touching the rest. ## What - **Trailing space inside link text** (`vsphere.md`, `data/contributing/contributing-guide.md`). Two links' text ended in a space, such as `[… (WCP) enabled ](…)`, so the rendered underline ran past the last word. Removed the space. Found while fixing the same pattern in the Ray Data MyST conversion (ray-project#66375). - **Duplicated paragraph** (`serve/llm/user-guides/configuration.md`). The "Set `accelerator_type`" paragraph appeared twice back to back, with the same content in a different sentence order, apparently a suggestion-merge artifact from ray-project#65026 that also dropped the blank line after the heading. Kept the first copy and restored the blank line. - **Escaped sub-bullets** (`ray-core/internals/autoscaler-v2.md`, `ray-core/internals/ray-event-exporter.md`). The rST originals nested these sub-bullets without the blank line rST requires, so they rendered as run-on text, and the MyST conversion (ray-project#66430) carried them over as `\-`. Dropped the escapes so they render as the nested lists the author intended. Both of these fixes turned up during the soft-wrap pass in ray-project#66607. ## Not a duplicate There's no open PR touching any of these files, and a GitHub search for `vsphere.md`, `contributing-guide.md`, "vSphere WCP", `configuration.md` with `accelerator_type`, `autoscaler-v2`, and `ray-event-exporter` finds nothing related. ## Testing - Rendered both pages with `markdown-it-py` (CommonMark). Each link's text now ends right at `</a>`, with no trailing whitespace. - A regex scan of every `doc/source/**/*.md` outside code fences for whitespace before `](` finds these two as the only cases on `master`. - Rendered `autoscaler-v2.md` and `ray-event-exporter.md` with `markdown-it-py` and confirmed each sub-bullet group is now a nested `<ul>` under its parent item. - Confirmed `configuration.md` has one copy of the paragraph, preceded by a blank line after the heading. - Pre-commit hooks passed on every commit. AI assistance (Claude Code) was used to find and make these fixes. I reviewed each change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>


Description
Related issues
Additional information