Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

perf(server): serve more LightOnOCR-3-4B pages at once with SGLang overlap scheduling (#676)

svonavab3546f8fc50e
diff --git a/packages/sie_server/models/lightonai__LightOnOCR-3-4B.yaml b/packages/sie_server/models/lightonai__LightOnOCR-3-4B.yaml
index 950fbaf9e..f75dfc024 100644
--- a/packages/sie_server/models/lightonai__LightOnOCR-3-4B.yaml
+++ b/packages/sie_server/models/lightonai__LightOnOCR-3-4B.yaml
@@ -38,6 +38,11 @@ tasks:
# continuous batching, no system prompt, the chat template's enable_thinking=False, and only the
# two trained prompts accepted. The `transformers` profile runs the same contract in-process in the
# transformers5 bundle.
+#
+# Throughput: up to 128 pages run in the engine at once. The radix cache is off: every page is a
+# new image, so it saves nothing, and with it on SGLang turns overlap scheduling off for this
+# hybrid (Gated DeltaNet) model. FlashInfer serves the attention layers. Sampling is unchanged and
+# outputs stay within bf16 run-to-run variance.
max_sequence_length: 24576
profiles:
default:
@@ -49,7 +54,7 @@ profiles:
mem_fraction_static: 0.85
served_model_name: lightonai/LightOnOCR-3-4B
trust_remote_code: false
- max_concurrent_requests: 32
+ max_concurrent_requests: 128
meter_pages: true
max_new_tokens: 12288
temperature: 0.1
@@ -58,7 +63,9 @@ profiles:
enable_thinking: false
allowed_instructions:
- grounding
- attention_backend: triton
+ attention_backend: flashinfer
+ extra_launch_args:
+ - --disable-radix-cache
runtime:
max_new_tokens: 12288
num_beams: 1
diff --git a/packages/sie_server/tests/config/test_lightonocr3_profiles.py b/packages/sie_server/tests/config/test_lightonocr3_profiles.py
index af144f768..29035bd6e 100644
--- a/packages/sie_server/tests/config/test_lightonocr3_profiles.py
+++ b/packages/sie_server/tests/config/test_lightonocr3_profiles.py
@@ -43,6 +43,9 @@ def test_catalog_pins_checkpoint_and_upstream_generation() -> None:
assert loadtime["allowed_instructions"] == ["grounding"]
assert loadtime["trust_remote_code"] is False
assert loadtime["meter_pages"] is True
+ assert loadtime["max_concurrent_requests"] == 128
+ assert loadtime["attention_backend"] == "flashinfer"
+ assert loadtime["extra_launch_args"] == ["--disable-radix-cache"]
assert "system_prompt" not in loadtime
assert "extra_env" not in loadtime
assert default["adapter_options"]["runtime"] == {"max_new_tokens": 12288, "num_beams": 1}
@@ -68,6 +71,8 @@ def test_loader_builds_pinned_sglang_default(monkeypatch: pytest.MonkeyPatch) ->
assert (adapter._temperature, adapter._top_p) == (0.1, 1.0)
assert adapter._system_prompt is None
assert adapter._trust_remote_code is False
+ assert adapter.max_concurrent_dispatch() == 128
+ assert adapter._extra_launch_args == ["--disable-radix-cache"]
engine_load.assert_not_called()