Skip to content

Commit 9ed95bb

Browse files
committed
.
1 parent 6b051d3 commit 9ed95bb

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

areal/engine/sglang_remote.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,13 @@ def parse_generation_response(
8888
# Extract routed_experts information if available
8989
routed_experts = meta_info.get("routed_experts", None)
9090
if routed_experts is not None:
91-
num_sgl_token=meta_info['prompt_tokens'] + meta_info['completion_tokens']-1
91+
num_sgl_token = (
92+
meta_info["prompt_tokens"] + meta_info["completion_tokens"] - 1
93+
)
9294
# Extract expert_id and reshape to (num_sgl_token, num_layers*expert_top_k)
9395
routed_experts = np.frombuffer(
9496
pybase64.b64decode(routed_experts.encode("utf-8")), dtype=np.int32
95-
).reshape(num_sgl_token,-1)
97+
).reshape(num_sgl_token, -1)
9698

9799
if stop_reason == "abort" and stop_message.startswith("Abort before prefill"):
98100
return HttpGenerationResult(

areal/infra/launcher/sglang_server.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from areal.api.alloc_mode import AllocationMode
1313
from areal.api.cli_args import (
1414
ClusterSpecConfig,
15-
GenerationHyperparameters,
1615
NameResolveConfig,
1716
SGLangConfig,
1817
parse_cli_args,

docs/cli_reference.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,6 +575,7 @@ https://github.com/sgl-project/sglang for detailed documentation.
575575
| `enable_metrics` | boolean | `True` | - |
576576
| `decode_log_interval` | integer | `1` | - |
577577
| `enable_multithread_load` | boolean | `False` | - |
578+
| `enable_return_routed_experts` | boolean | `False` | - |
578579

579580
(section-v-llm)=
580581

@@ -747,7 +748,7 @@ Configuration for SwanLab experiment tracking and monitoring.
747748
| `config` | `dict` \| None | `None` | - |
748749
| `logdir` | string \| None | `None` | - |
749750
| `mode` | string \| None | `"disabled"` | - |
750-
| `api_key` | string \| None | `None` | - |
751+
| `api_key` | string \| None | `"4KHJ20cRg6fuVkvwvGaXD"` | - |
751752

752753
(section-tensor-board)=
753754

0 commit comments

Comments
 (0)