mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[GH-ISSUE #437] A real multi-user lab for DeepSeek on Maya: admin staff, programmers and research data work all sharing one server — volunteers ready to stress-test #178
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#178
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @talisp on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/437
In short
First, thank you. This week we filed an issue in the morning and had it fixed and released by dinner, twice. It's getting a bit embarrassing on our side: we're still writing the next issue and you've already shipped the answer. We went from 15 to 45 tok/s in a week on the same card, and a good part of that was you.
Who we are. We are a university in Brazil running DeepSeek-V4.1-Flash on Project Maya, and it works well for us. Thanks to #356, #403 and v1.1.26, one user now gets about 40-45 tok/s on a single L40S, and agents with sub-agents no longer re-read their prompts.
What we want to do next. We want to put several kinds of users on the same Maya server at the same time, as a lab, not a production service:
Several professors and programmers have already volunteered to use it hard and try to make Maya "cry", as we joke here. Everyone involved knows it is an experiment. The goal is to generate real multi-user data for the Maya project.
The problem we will hit. Today the DeepSeek engine serves one conversation at a time. Thanks to #356, switching between conversations is cheap now, but a second person still waits for the first person's whole answer, which is often a minute or more. With three groups competing, that becomes the main thing people notice. #332 and #409 already ask about concurrent decoding. This issue is about the whole picture around it, and an offer to test it for real.
What we propose, from the smallest step to the largest:
MAYA_FAIR_SLICE_S); the DeepSeek engine only needs apause.An idea on the hardware side, if it helps. We don't know if this is possible or sensible. We could add RAM and a second identical GPU, if that would let Maya serve two conversations at once, one per GPU: for example, one DeepSeek engine per card. If a setup like that would be easy for you, or useful to test, tell us and we'll ask for it.
What we offer. Whatever gets implemented, even partly or as an opt-in branch, we will:
We have one L40S now and have asked for a second identical one.
The technical part follows: our usage data, how other servers handle parallelism, and what we think transfers to Maya's DeepSeek engine.
Technical notes
1. Our setup
maya-ds4.--cpu-threads 28 --mmap-experts off, withMAYA_DS4_SLOT_KEEP=1andMAYA_DS4_SLOT_CAP=8.2. Usage data so far (one user at a time)
Two numbers matter most for concurrency. A conversation's state is small. The CPU lane computes most of each token's experts, and every concurrent user would share it.
3. How DeepSeek is served elsewhere, and what transfers
We looked at how vLLM and llama-server get parallelism, in case it helps.
The common idea: continuous batching. Decode is limited by reading weights, not by arithmetic. So one decode step can carry one token from each of several sequences, and every weight that is read serves all of them. Up to the point where the step becomes compute-bound, N users cost little more than one.
vLLM:
llama-server (llama.cpp):
--parallel Nslots with continuous batching.--kv-unified).-cmoe,--n-cpu-moe), so it does cover RAM-heavy boxes.What we think transfers to
maya-ds4:MAYA_GLM_PREFILL_INTERLEAVE, #386); in a lab, a 100K-token prompt arriving should not freeze everyoneMAYA_GLM_MULTI_MTP(#385) after--parallel; DSpark per sequence is the DS4 equivalent4. Where the difficulty is in
maya-ds4(our reading of the code)slot_save/slot_load) and a server that opens N places when the engine announcesmulti=N(FairLock).4b. The "one engine per GPU" idea (untested, possibly naive)
Before #332 lands, two independent
maya-ds4engines, one per GPU, each on its own port, would give two conversations at once. We could assign user groups to ports. What we think it would take:--mmap-experts off, each engine copies its CPU-lane experts: ~262 GB each, so ~525 GB for two, plus Engram's hot rows and the system. We can ask for more RAM if this is the way.--mmap-experts auto), both engines would read the same GGUF through the page cache. RAM would then be paid once, but we have not checked whether the engine copes well with two processes sharing it.MAYA_DS4_SLOT_DIR, so a user should stay on one engine.If this is a dead end, or if #332's layer-split pipeline on two GPUs is clearly the better use of a second card, that answer alone helps us decide what hardware to request.
5. The proposal, with the current state of each piece
pause(stop, keeping the state with what it wrote); the server's existingMAYA_FAIR_SLICE_Sthen applies. A park costs a slot save/load (~0.1-0.5 s)/v1/statusor/slots, and in the stream (e.g. aprompt_progress-style field), so clients show "waiting for 2 others" and do not hit idle timeouts (cf. Strata #1619, #1951)MAYA_DS4_SLOT_CAP, and a minimum kept size--api-key K1,K2), with no policy--tp6. The lab and what we will report
Three user groups competing for one server:
What we will report, with the same benchmark script before and after any branch or opt-in setting:
Happy to start with whatever piece you consider the most useful first.
@mrsirg97-rgb commented on GitHub (Oct 24, 2026):
Hey! I worked on #356, would love to connect 🙂 won't have access to my home lab for another day but my inbox is open
@talisp commented on GitHub (Oct 28, 2026):
A lab update: we measured
--parallelon v1.1.34. Thanks @mw00 for shipping it (#332), and @mrsirg97-rgb for pushing it with #557: it's exactly what this issue was asking for.In short: on our single L40S, two people at once now both move, at ~18 tok/s each, instead of one waiting for the other's whole answer. That's the fairness we wanted. But the total doesn't go up: 34.5 tok/s for two at once against ~41 taking turns. The reason is DSpark. A request alone drafts, with ~85% of drafts accepted, and runs at ~42 tok/s. Two or more go through
step_multi, which doesn't draft (the comment atsrc/ds4/ds4_main.cpp:1418says so: "two or more go through Model::step_multi - a token of each through the model together, no drafts"). With DSpark off on both sides, the joint step is a real 1.43x (24.3 → 34.7 tok/s), in line with the 1.6x on the V100 in the release notes. On a box like ours the two gains are about the same size, so they cancel out.What we'd ask: DSpark drafts inside the joint step, even if only for 2-4 conversations. If part of both gains stacked, two users could go well past the 41 tok/s of taking turns. The v1.1.34 notes say MiniMax's drafter is off while more than one conversation runs; for DeepSeek it's only in that code comment, so a line in the notes would help too.
Numbers (1× L40S 48 GB, DeepSeek-V4.1-Flash UD-Q8_K_XL, ~270 GB of the experts in RAM)
Total = tokens written by all requests / wall time. Code prompts of 600 tokens at temperature 0, each with its own salt (no conversation reused); two rounds each, the second shown.
--parallel 1(take turns)--parallel 2--parallel 4--parallel 1--parallel 2(In parentheses: each request's own decode speed from the server's timings.)
--parallelon costs nothing for a request alone (38-44 tok/s, within our usual spread) and little VRAM: +0.24 GB for 2 conversations, +0.73 GB for 4 (1,357 → 1,343 experts in VRAM for 2). RAM is unchanged.--parallel 2, both at ~48 s; with--parallel 4, four at once all finish at 83.2 s (prompt read at 731-773 tok/s each).Setup
1× NVIDIA L40S-48Q (vGPU, 48 GB, sm_89), Xeon Platinum 8580 VM (32 vCPUs, no SMT), ~504 GB RAM, Ubuntu 22.04, Linux 6.8, CUDA 12.9. Maya v1.1.34,
maya-ds4with--max-context 262144 --tp 2 --threads on --cpu-threads 28 --mmap-experts off --dspark on|off [--parallel N],MAYA_DS4_SLOT_KEEP=1. Page cache dropped before each start, one start per row.Our volunteers are still keen to make Maya cry 😄. If you put drafts in the joint step on a branch, we'll run the same test on it the same day.
@mrsirg97-rgb commented on GitHub (Oct 29, 2026):
@talisp you are welcome to test #587
@talisp commented on GitHub (Oct 29, 2026):
An update with v1.1.36: the drafter inside
--parallel(#611) turned it into a real gain here. Thanks @mw00 and @needmorevram!Same box and pack as my last comment (1× L40S 48 GB, DeepSeek-V4.1-Flash-1017 UD-Q8_K_XL, ~91% of the experts on the CPU lane), same script (code prompts with 600-token answers at temperature 0, second round; total = tokens written / wall time):
--parallel 2--parallel 4--parallel 4So two at once are now ~16% faster than a queue. With four, the drafters don't fit one pass (as the release notes say), and it's back to queue speed. For our lab, two is the sweet spot: we moved production to v1.1.36 with
--parallel 2this morning, and the first check gave 49.2 tok/s in total for two requests.@mrsirg97-rgb thanks! #587 just landed in v1.1.37, and we'll try it on our agent traffic next. A short sub-agent question waiting behind a long prompt read is exactly what we see.