Repository navigation
[rl] Move GenerationServer to torchtitan/rl/generator (9/14) - #5505
felipemello1 wants to merge 7 commits into
Conversation
aa0cdbc to
d596a8e
Compare
ba0dc0b to
3a10979
Compare
d596a8e to
c8a316a
Compare
3a10979 to
94f44ea
Compare
c8a316a to
5761d00
Compare
|
This stack's
Change 1 is a valid design, except the obvious trade-offs:
Change 2 makes sense for Verifiers but is unnecessary for the native path, and it makes the code more convoluted. It should be an easy fix to make the HTTP path opt-in only for the verifier path. Or more generically speaking, for path that needs an HTTP endpoint of the generation stack. Nevertheless, before we commit to the look-aside pattern, I think we should look into the following choice first, and at least demonstrate it is not working, since that would be a much smaller change:
This is how the topology would look like: No generator hosts an HTTP server: no aiohttp, sockets, ports or URLs on generators. I like the reverse proxy because it hides the whole generation stack behind the router, which makes it easier to extend:
With lookaside, each of these is coupled to the clients. The trade-offs of using reverse proxy over lookaside are:
Depending on the workload or complexity, this is where lookaside might win. |
5761d00 to
efa6953
Compare
052cb87 to
ca5281f
Compare
efa6953 to
dbc8b18
Compare
tianyu-l
left a comment
There was a problem hiding this comment.
motivation is clear but approach needs to be discussed
ca5281f to
8da6b9d
Compare
dbc8b18 to
51ddd7c
Compare
8da6b9d to
bd9bd75
Compare
51ddd7c to
49739f6
Compare
…http/2-move-generation-server
…http/2-move-generation-server
…http/2-move-generation-server
…http/2-move-generation-server
…http/2-move-generation-server
…http/2-move-generation-server
TLDR:
examples/verifiers/generation_server.pymoves togenerator/generation_server.pywith no content change, and its imports follow. PR 10 serves it from each generator.Stack (14 PRs, merge bottom-up; this PR is in bold)
PRs 2-7 don't need the HTTP design and can be reviewed now. PRs 8-14 wait on the design discussion on PRs 9 and 10.
You may ask: why its own PR? Combined with PR 10's edits, the move is only 54% similar, just above git's 50% rename cutoff, so a later edit can turn it into a delete plus a new file. On its own it's a 100% rename, reviewed at a glance.
Test plan
pytest tests/rl/unit_tests/cpu # verifiers 0.4.0, at this position (local, 11-04): 613 passed, 4 skipped (same as PR 8)