Papers › SOMA: Efficient Multi-turn LLM Serving via Small Language Model

SOMA: Efficient Multi-turn LLM Serving via Small Language Model

11 May 2026arXiv:2605.11317added by Syntology

Xueqi Cheng, Qiong Wu, Zhengyi Zhou, Xugui Zhou, Tyler Derr, Yushun Dong

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Large Language Models (LLMs) are increasingly deployed in multi-turn dialogue settings where preserving conversational context across turns is essential. A standard serving practice concatenates the full dialogue history at every turn, which reliably maintains coherence but incurs substantial cost in latency, memory, and API expenditure, especially when queries are routed to large proprietary models. Existing approaches often struggle to balance the trade-off between response quality and efficiency. We propose a framework that exploits the early turns of a session to estimate a local response manifold and then adapt a smaller surrogate model to this local region for the remainder of the conversation. Concretely, we learn soft prompts that maximize semantic divergence between the large and surrogate small language models' responses to surface least-aligned local directions, stabilize training with anti-degeneration control, and distill the mined cases into localized LoRA fine-tuning so the surrogate runs without prompts at inference. A simple gate enables a one-time switch with rollback on drift. We further provide a theoretical analysis for key components in SOMA. Extensive experiments show the effectiveness of SOMA. The source code is provided at: https://github.com/LabRAI/SOMA.

PaperPDFCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 23 code samples harvested from 1 repository linked to this paper: 18 ran (of which 8 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 8 where Syntology's instrument failed) · 5 unverified. Where Syntology's instrument failed: 8 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 23 samples from 1 repository, 18 ran (10 with no instrument failure; 8 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-22 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

LabRAI/SOMA found in paper text by SyntologySyntology: 23 samples, 18 ran (8 instrument-failed) · 5 unverified report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

23 samples harvested: 18 ran (of which 8 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 8 where Syntology's instrument failed) · 5 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
8ran · our draft was wrong
8ran
5unverified

Licence: 0 of the 23 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from LabRAI/SOMA. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

LabRAI/SOMA found in paper text by Syntology 23 samples, 18 ran (8 instrument-failed) · 5 unverified
CosineGate soma/pipeline.py ran MIT (permissive) · 521b89dcdbcd7d90 · report fixture: returned CosineGate · level recorded 2026-09-22
GateConfig soma/pipeline.py ran MIT (permissive) · 9ce3914e50095785 · report fixture: returned GateConfig · level recorded 2026-09-22
LMHandle soma/pipeline.py ran MIT (permissive) · 35455cd1fdcd31cc · report fixture: returned LMHandle · level recorded 2026-09-22
LoRAFTConfig soma/pipeline.py ran MIT (permissive) · 0b7133a154d20bcd · report fixture: returned LoRAFTConfig · level recorded 2026-09-22
SOMAConfig soma/pipeline.py ran MIT (permissive) · c9908b5ffa9879a1 · report fixture: returned SOMAConfig · level recorded 2026-09-22
SemanticDivergenceConfig soma/pipeline.py ran MIT (permissive) · ba9b99e7e09e0541 · report fixture: returned SemanticDivergenceConfig · level recorded 2026-09-22
SoftPrompt soma/pipeline.py ran MIT (permissive) · 3f989f78df25c6dd · report fixture: returned SoftPrompt · level recorded 2026-09-22
TurnLog soma/pipeline.py ran MIT (permissive) · 4da5dea573c333a1 · report fixture: returned TurnLog · level recorded 2026-09-22
_build_aligned_inputs soma/pipeline.py ran · our draft was wrong MIT (permissive) · e94372d620e92f1c · report fixture: signature tokenizer:callable/0/?, embed_layer:callable/0/?, context:str/0/str, query:str/0/str, soft_prompt:callable/0/?, teacher_text:str/0/str, max_prompt_tokens:int/0/int, max_teacher_tokens:int/0/int, device:device/0/?, dtype:dtype/0/? · returned tuple · level recorded 2026-09-22
_build_supervised_batch soma/pipeline.py ran · our draft was wrong MIT (permissive) · 8327ee00efeff10e · report fixture: signature tokenizer:callable/0/?, pairs:list/1/tuple, max_seq_length:int/0/int, device:device/0/? · returned tuple · level recorded 2026-09-22
_encode soma/pipeline.py ran · honoured contract MIT (permissive) · 8e512f8cc17a2d0e · report fixture: signature text:str/0/str, model:callable/0/?, tokenizer:callable/0/?, max_tokens:int/0/int · returned Tensor · level recorded 2026-09-22
_expectation_weighted_divergence_loss soma/pipeline.py ran · our draft was wrong MIT (permissive) · a1619f947861f21a · report fixture: signature logits:Tensor/3/float, labels:Tensor/2/int, teacher_ids:Tensor/1/int, embed_weight:Tensor/2/float, neighbors:Tensor/2/int, temperature:float/0/float, lambda_exp:float/0/float, teacher_topm:int/0/int · returned Tensor · level recorded 2026-09-22
_format_pair soma/pipeline.py ran · our draft was wrong MIT (permissive) · b7c5dd933aee0c10 · report fixture: signature context:str/0/str, query:str/0/str, response:str/0/str · returned tuple · level recorded 2026-09-22
_gap soma/pipeline.py ran · honoured contract MIT (permissive) · 26c3c15633ed5399 · report fixture: signature a_F:str/0/str, a_G:str/0/str, model:callable/0/?, tokenizer:callable/0/?, max_tokens:int/0/int · returned float · level recorded 2026-09-22
_semantic_neighbors soma/pipeline.py ran · our draft was wrong MIT (permissive) · dedc660f2559e46c · report fixture: signature embed_weight:Tensor/2/float, token_ids:Tensor/1/int, k:int/0/int · returned Tensor · level recorded 2026-09-22
_summarize_context soma/pipeline.py ran · our draft was wrong MIT (permissive) · 76d586af64e60597 · report fixture: signature history:list/1/dict, keep_last:int/0/int · returned str · level recorded 2026-09-22
_tail_entropy soma/pipeline.py ran · our draft was wrong fingerprinted MIT (permissive) · acf2f406b0a0e110 · report fixture: signature logits:Tensor/3/float, tail_size:int/0/int · returned Tensor · level recorded 2026-09-22
format_dialogue_context soma/pipeline.py ran · our draft was wrong MIT (permissive) · a70ceb18615ba919 · report fixture: signature history:list/1/dict · returned str · level recorded 2026-09-22
SOMASession soma/pipeline.py unverified MIT (permissive) · 604f60e4bf4d8289 · report
attach_lora soma/pipeline.py unverified MIT (permissive) · 1f11dc1ed8e709c5 · report
generate_text in 20 papers soma/pipeline.py unverified MIT (permissive) · 375a736e73709078 · report
localized_lora_finetune soma/pipeline.py unverified MIT (permissive) · f4be71fd7494ab51 · report
mine_soft_prompts soma/pipeline.py unverified MIT (permissive) · cca526db386c31e3 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for SOMA (graph method: SOMA). 23 bricks; individually on a fixture: 18 ran (of which 8 constructed an object rather than computing a result; 10 with no instrument failure: 2 honoured, 0 violated, 8 with no contract checked; 8 where Syntology's instrument failed) · 5 unverified. The assembly has not been run end-to-end.

  1. SOMASession entry · level 0 · unverified · 604f60e4bf4d8289
  2. CosineGate helper · level 1 · ran · 521b89dcdbcd7d90
  3. LMHandle model · level 1 · ran · 35455cd1fdcd31cc
  4. SOMAConfig helper · level 1 · ran · c9908b5ffa9879a1
  5. TurnLog helper · level 1 · ran · 4da5dea573c333a1
  6. _summarize_context data_transform · level 1 · ran · our draft was wrong · 76d586af64e60597
  7. attach_lora helper · level 0 · unverified · 1f11dc1ed8e709c5
  8. format_dialogue_context data_transform · level 1 · ran · our draft was wrong · a70ceb18615ba919
  9. generate_text helper · level 0 · unverified · 375a736e73709078
  10. localized_lora_finetune helper · level 0 · unverified · f4be71fd7494ab51
  11. mine_soft_prompts helper · level 0 · unverified · cca526db386c31e3
  12. GateConfig helper · level 1 · ran · 9ce3914e50095785
  13. _encode helper · level 1 · ran · honoured contract · 8e512f8cc17a2d0e
  14. _gap metric · level 1 · ran · honoured contract · 26c3c15633ed5399
  15. LoRAFTConfig helper · level 1 · ran · 0b7133a154d20bcd
  16. SemanticDivergenceConfig helper · level 1 · ran · ba9b99e7e09e0541
  17. _build_supervised_batch helper · level 1 · ran · our draft was wrong · 8327ee00efeff10e
  18. SoftPrompt helper · level 1 · ran · 3f989f78df25c6dd
  19. _build_aligned_inputs helper · level 1 · ran · our draft was wrong · e94372d620e92f1c
  20. _expectation_weighted_divergence_loss helper · level 1 · ran · our draft was wrong · a1619f947861f21a
  21. _semantic_neighbors helper · level 1 · ran · our draft was wrong · dedc660f2559e46c
  22. _tail_entropy helper · level 1 · ran · our draft was wrong · acf2f406b0a0e110
  23. _format_pair helper · level 1 · ran · our draft was wrong · b7c5dd933aee0c10

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2605.11317") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.11317, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections