Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
00198a3
feat(core): core-side wiring for kimi-linear serving
Aug 12, 2026
a52e95c
fix(worker): M1 core-side fixes for kimi-linear (F5, decode heartbeat)
Aug 12, 2026
f524e91
fix(worker): stale completion metadata and slot reuse on decode drain
Jul 30, 2026
72957f1
feat(kv_cache): manager-authoritative graph-ready KDA state pools
Aug 12, 2026
87aea66
fix(worker): log the full sequence id in REPETITION warnings
Aug 1, 2026
96436cb
fix(core): route kimi-k3 tokenizer; fail prompt construction loudly
SeedEverything328 Aug 4, 2026
6e3cf46
fix(htod): throw on missing slot and size mismatch in the copy loop
SeedEverything328 Aug 4, 2026
d6f42a9
fix: ckpt_converter refuses MXFP4 tensors in the INT4 marlin repack
SeedEverything328 Aug 4, 2026
cd8f1c4
feat(worker): carry K3 block residuals through the serving prefill loop
Aug 12, 2026
61e43dc
fix(kv_cache): give kimi-k3 its own host-KV profile
SeedEverything328 Aug 6, 2026
af34da9
fix(worker): log the first token prefill actually sampled
SeedEverything328 Aug 6, 2026
1842a65
perf(worker): seed preallocated block_residual; free inputs_embeds
Aug 8, 2026
f2ee9be
feat(worker): return the prefill-sampled token for max_tokens=1 (C4)
Aug 12, 2026
30a88e0
perf(worker): share the input_ids pool per node and size it by need
Aug 12, 2026
211ae2a
fix(worker): keep C4-completed seqs visible to legacy result gather
Aug 12, 2026
5f92b08
feat(worker): emit a structured [METRICS] prefill record
Aug 12, 2026
8fc02f2
fix(worker): make the C4 result store survive a hot reload
Aug 12, 2026
7cf61f4
feat(server): reject /v1/inference at the door instead of parking it
Aug 12, 2026
8d961b7
test(k3): exercise the buffer-pool grow rebind-with-live-sequences br…
Aug 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 10 additions & 37 deletions batchgen/batchgen_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import argparse
from typing import List, Optional, Dict, Any

from batchgen.deprecation import LegacyInferenceDeprecated

try:
import requests
_REQUESTS_AVAILABLE = True
Expand Down Expand Up @@ -208,47 +210,18 @@ def submit_inference(
temperature: Optional[float] = None,
top_p: Optional[float] = None,
) -> List[str]:
"""Submit inference request and get decoded string results.

Args:
prompts: List of prompt strings
max_input_len: Maximum input sequence length. If None, determined
dynamically from the longest prompt in the batch.
max_output_len: Maximum output/decoding length
ignore_eos: If True, ignore EOS tokens and decode to max_output_len
temperature: Sampling temperature (None = greedy decoding)
top_p: Nucleus sampling threshold (None = disabled)
"""DEPRECATED and disabled. Use submit_batch() instead.

Returns:
List of decoded output strings
The method is kept, rather than deleted, so a caller gets the
explanation above instead of an AttributeError telling it only that
something is gone. It raises without any network call: the server
answers /v1/inference with 410 anyway, and failing here keeps the
deprecated request off the wire entirely.

Raises:
RuntimeError: If inference fails or returns unexpected format
LegacyInferenceDeprecated: always.
"""
payload: Dict[str, Any] = {
"prompts": prompts,
"max_input_len": max_input_len,
"max_output_len": max_output_len,
"ignore_eos": ignore_eos,
}
if temperature is not None:
payload["temperature"] = temperature
if top_p is not None:
payload["top_p"] = top_p

response = self.post_json("/v1/inference", payload)

if response.get("status") != "success":
raise RuntimeError(f"Inference failed: {response}")

results = response.get("results")
if not results:
raise RuntimeError("Server returned empty results.")

if not isinstance(results, list):
raise RuntimeError(f"Unexpected result format: {type(results)}")

return results
raise LegacyInferenceDeprecated()

# ==================== Batch API Methods ====================

Expand Down
Loading
Loading