{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/muxserve-flexible-multiplexing-for-efficient","title":"MuxServe: Flexible Spatial-Temporal Multiplexing for Multiple LLM Serving","arxiv_id":"2404.02015","date":"2024-04-02","proceeding":null,"authors":["Jiangfei Duan","Runyu Lu","Haojie Duanmu","Xiuhong Li","Xingcheng Zhang","Dahua Lin","Ion Stoica","Hao Zhang"],"abstract":"Large language models (LLMs) have demonstrated remarkable performance, and organizations are racing to serve LLMs of varying sizes as endpoints for use-cases like chat, programming and search. However, efficiently serving multiple LLMs poses significant challenges for existing approaches due to varying popularity of LLMs. In the paper, we present MuxServe, a flexible spatial-temporal multiplexing system for efficient multiple LLM serving. The key insight behind is to colocate LLMs considering their popularity to multiplex memory resources, and leverage the characteristics of prefill and decoding phases to separate and flexibly colocate them to multiplex computation resources. MuxServe formally formulates the multiplexing problem, and proposes a novel placement algorithm and adaptive batch scheduling strategy to identify optimal colocations and maximize utilization. MuxServe designs a unified resource manager to enable flexible and efficient multiplexing. Evaluation results show that MuxServe can achieves up to $1.8\\times$ higher throughput or processes $2.9\\times$ more requests within $99\\%$ SLO attainment. The code is available at: \\url{https://github.com/hao-ai-lab/MuxServe}.","url_abs":"https://arxiv.org/abs/2404.02015v2","url_pdf":"https://arxiv.org/pdf/2404.02015v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"muxserve-flexible-multiplexing-for-efficient","repo_url":"https://github.com/hao-ai-lab/muxserve","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2404.02015","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2404.02015"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hao-ai-lab/muxserve","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":7,"unverified":1},"by_repo_kind":{"official":{"samples":8,"ran":7,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"0ea2b6175c8ac1a7","entry":"create_shared_var","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"muxserve/shm_utils.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/muxserve/shm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0ea2b6175c8ac1a7"}},{"code_sha256_prefix":"8e3cd3729936f861","entry":"get_real_rate","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"benchmark/end_to_end/bench_end_to_end_muxserve.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/benchmark/end_to_end/bench_end_to_end_muxserve.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8e3cd3729936f861"}},{"code_sha256_prefix":"197a0f338024eca9","entry":"init_logger","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"muxserve/logger.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/muxserve/logger.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"197a0f338024eca9"}},{"code_sha256_prefix":"1efcb2e9730f7147","entry":"is_cfg_valid","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"benchmark/end_to_end/bench_end_to_end_muxserve.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/benchmark/end_to_end/bench_end_to_end_muxserve.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1efcb2e9730f7147"}},{"code_sha256_prefix":"05f72ec8263762e7","entry":"map_shm_name","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"muxserve/shm_utils.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/muxserve/shm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"05f72ec8263762e7"}},{"code_sha256_prefix":"21d87cd2fd05d248","entry":"pack_to_proc_name","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"muxserve/tracer.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/muxserve/tracer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"21d87cd2fd05d248"}},{"code_sha256_prefix":"882ad2eb293ebb9b","entry":"read_shared_var","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"muxserve/shm_utils.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/muxserve/shm_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"882ad2eb293ebb9b"}},{"code_sha256_prefix":"0bfb73da82247d71","entry":"get_placement_from_cfg","repo":"hao-ai-lab/muxserve","repo_kind":"official","path":"benchmark/end_to_end/bench_end_to_end_muxserve.py","file_url":"https://github.com/hao-ai-lab/muxserve/blob/HEAD/benchmark/end_to_end/bench_end_to_end_muxserve.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0bfb73da82247d71"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}