DEV Community

FlitAI
FlitAI

Posted on

Three large models, one 8-GPU pool: inside GPUWorks time-sharing

Multiple models taking turns on the same eight GPUs

It's 10 p.m. at a financial institution. Daytime online queries have slowed, and a nightly batch job still has to classify documents and extract fields before the next business day starts. The two workloads peak at completely different times, but the batch model can't touch the GPUs: the online model's weights are still resident across the whole eight-GPU pool.

This is the usual shape of the problem. Business teams see a GPU shortage. Procurement sees hardware that is only fully used during certain windows. Per-deployment allocation doesn't match demand that fluctuates by the hour, and a pool can sit nearly idle for hours while a queued model waits for it.

The first question is not "buy more GPUs." It's how much the workloads actually need GPUs at the same time. If they truly peak together, more hardware is the answer. If online Q&A is busy by day and document processing runs at night, two dedicated eight-GPU pools is an expensive way to keep both half idle.

GPUWorks gives several models access to the same pool at different times. Scheduled handovers run on timed plans; unpredictable workloads yield based on idle duration, turn length or priority. The daytime service keeps its eight GPUs, and the nightly batch job gets the same eight later — without anyone stopping and swapping models by hand every night.

Yield policies decide who gets the pool

Administrators place several models on one GPU pool and give each deployment a yield policy. When another model asks for the GPUs, the platform checks the occupying model's policy to decide when resources get released.

Say DeepSeek, Qwen and GLM share eight GPUs. DeepSeek holds all eight, and Qwen requests them. Once DeepSeek meets its yield condition, it finishes the requests it is handling under the preset rules, sleeps and releases memory. Qwen takes over all eight. If GLM is also waiting, Qwen's policy decides the next handover.

The payoff is memory, not just time. On a pool with roughly 1 TB of total memory, three models that each need the full pool would normally mean three separate allocations. Under time-sharing, they take turns and each turn gets the full 1 TB. Call it 3x oversubscription: three large models serving three workloads through one pool.

Four policies cover most arrangements:

Policy What happens when another deployment is waiting
Never yield Keeps the GPUs. For always-on online services that have to stay resident.
Yield when idle Yields after a continuous period with no user requests, for example 60 seconds. A new request resets the timer; health checks don't count as user requests.
Yield on schedule Yields on the idle threshold, and when alternating with another deployment under the same policy, yields when the current turn hits its service cap, for example 120 seconds per turn.
Yield immediately Starts handing over the moment a higher-priority deployment asks, even mid-request. Lets ordinary work step aside for critical work.

One subtlety with "yield on schedule": the cap measures the length of the current turn. If nobody else is waiting, the model can keep going past 120 seconds.

Timed plans handle the predictable case. To hand over every weekday at 10 p.m., add a sleep command to the timed plan with the day of week, time and sleep level. A model set to never yield during the day can still be scheduled to sleep at 10 p.m.

At that moment the model may be mid-answer, so the in-flight behavior is configurable: wait for the current request to finish (with a maximum wait), or interrupt immediately so the waiting workload starts sooner.

Sleep and wake are what make this practical

Reloading full weights from storage on every turn would make short gaps useless. GPUWorks has two sleep levels:

  • L1 sleep: the inference engine stays alive while weights move from GPU memory to host memory. Other models use the freed GPUs; when the original model returns, weights go back to the GPU from host memory.
  • L2 deep sleep: for hosts tight on memory, weights go to disk instead.

The benchmark story is where the numbers get interesting. On a server with eight H200 GPUs, three models each deployed with eight-way tensor parallelism:

  • Traditional cold start (restart the engine, reload weights from NFS, load GPU memory, initialize, warm up): 16 to 17.5 minutes.
  • GPUWorks L1 wake-up on the same hardware: about 4 seconds. That's a 200x improvement, and it's what turns a nightly swap from an operation nobody wants to schedule into something that just happens.

Four setups that map to real teams

Comparing models on the same questions. R&D needs DeepSeek, Qwen and GLM to answer one question set. All three get "yield on schedule" with a 120-second turn cap and "wait for the current request to complete." Each model finishes its question, hands off, and results are recorded separately — same questions, same hardware, one pool, no redeploying by hand.

Online by day, batch by night. The online model is set to never yield, with a timed-plan sleep at 22:00. Queued documents wait until then; the online service keeps answering normally. The batch model runs "yield when idle," so if the night queue drains early, other waiting tasks can use the rest of the night.

Critical work jumps the line. A business-critical Q&A model gets P0 priority and "yield when idle"; an ordinary sorting model gets P1 and "yield immediately." Sorting runs normally. When a critical request arrives, sorting finishes the current item within the wait limit, saves the result and yields. When the critical model goes quiet for 60 seconds and sorting is still waiting, the pool goes back.

Two backlogged queues, alternating. Offline data synthesis and document summarization both have long queues and equal priority. Instead of one finishing entirely before the other starts, both get the same priority and "yield on schedule" at 120 seconds per turn. Each serves a full turn, handles the in-flight item, saves it, and yields. Both make steady progress, and neither waits for a scheduled pause.

The takeaway

Before buying more GPUs, work out whether the workloads need them at the same time. Simultaneous full load still needs peak provisioning — no policy changes that. But when GPU time can be staggered, time-sharing lets one pool carry more work, and a 4-second wake-up is what makes the staggering invisible to users.

GPUWorks is open source under Apache 2.0:

The project is early in its open-source life. The most useful contributions right now are reports from real hardware: run a model and a card combination, post what worked or failed, and file issues for the failures. AI developers, infrastructure engineers and hardware vendors are all welcome — discussion happens on Discord: https://discord.gg/9m3gryGwzg

Top comments (0)