[CI] fix: notebook ci often OOM (#20199)
This commit is contained in:
@@ -3,6 +3,7 @@ Do some monkey patch to make the documentation compilation faster and more relia
|
||||
|
||||
- Avoid port conflicts
|
||||
- Reduce the server launch time
|
||||
- Limit GPU memory usage to allow multiple servers on the same machine
|
||||
"""
|
||||
|
||||
import weakref
|
||||
@@ -26,6 +27,9 @@ def patched_post_init(self):
|
||||
self.max_running_requests = DEFAULT_MAX_RUNNING_REQUESTS
|
||||
if self.max_total_tokens is None:
|
||||
self.max_total_tokens = DEFAULT_MAX_TOTAL_TOKENS
|
||||
# Disable CUDA graphs to avoid memory spikes during capture.
|
||||
# Notebooks only run a few sample requests, so perf is not critical.
|
||||
self.disable_cuda_graph = True
|
||||
self.cuda_graph_max_bs = 4
|
||||
|
||||
|
||||
@@ -47,6 +51,7 @@ def launch_server_cmd(command: str, host: str = "0.0.0.0", port: int = None):
|
||||
extra_flags = (
|
||||
f"--max-running-requests {DEFAULT_MAX_RUNNING_REQUESTS} "
|
||||
f"--max-total-tokens {DEFAULT_MAX_TOTAL_TOKENS} "
|
||||
f"--disable-cuda-graph "
|
||||
f"--cuda-graph-max-bs 4"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user