Skip to content
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

Function server #1641

Merged
merged 31 commits into from
May 25, 2024
Merged

Function server #1641

merged 31 commits into from
May 25, 2024

Conversation

pseudotensor
Copy link
Collaborator

@pseudotensor pseudotensor commented May 23, 2024

Parallel and Isolated OpenAI Proxy Servers

python generate.py --openai_server=True --openai_workers=2 ...

will launch 2 OpenAI proxy servers using FastAPIs workers, so each is a separate fork independent of any other process.

This speeds up any calls to the OpenAI server, letting FastAPI handle concurrency and load balancing between the different workers using same IP/port via OS management.

Parallel and Isolated Ingestion Servers

python generate.py --function_server=True --function_server_workers=2 ...

will launch 2 Ingestion proxy servers using FastAPIs workers, so each is a separate fork independent of any other process. If ASR, DocTR, captions, etc. are enabled, these will be run on same GPUs in separate processes.

This helps keep the main UI server isolated from ingestion tasks that can consume alot of cpu or hang the Gradio server.

@pseudotensor pseudotensor force-pushed the function_server branch 3 times, most recently from cda8709 to 8a76cbf Compare May 23, 2024 04:02
@pseudotensor
Copy link
Collaborator Author

image

@pseudotensor pseudotensor marked this pull request as ready for review May 25, 2024 05:48
@pseudotensor pseudotensor merged commit 538564d into main May 25, 2024
2 checks passed
@pseudotensor pseudotensor deleted the function_server branch May 25, 2024 05:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant