Skip to content

Commit 0b08b2c

Browse files
committed
fix: set minimal required memory for sglang to allow it to start
1 parent dff7443 commit 0b08b2c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

pkg/inference/backends/sglang/sglang.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,14 @@ func (s *sglang) GetDiskUsage() (int64, error) {
183183
}
184184

185185
func (s *sglang) GetRequiredMemoryForModel(_ context.Context, _ string, _ *inference.BackendConfiguration) (inference.RequiredMemory, error) {
186-
// TODO: Implement accurate memory estimation based on model size and SGLang's memory requirements.
187-
// Returning an error prevents the scheduler from making incorrect decisions based
188-
// on placeholder values.
189-
return inference.RequiredMemory{}, ErrNotImplemented
186+
if !platform.SupportsSGLang() {
187+
return inference.RequiredMemory{}, ErrNotImplemented
188+
}
189+
190+
return inference.RequiredMemory{
191+
RAM: 1,
192+
VRAM: 1,
193+
}, nil
190194
}
191195

192196
// pythonCmd creates an exec.Cmd that runs python with the given arguments.

0 commit comments

Comments
 (0)