Support for returning Logits and Calculating Perplexity During Model Evaluation? #1314
-
Hello SGLang Community, I'm currently exploring the capabilities of the SGLang inference framework for LLMs and I have a couple of questions regarding model evaluation:
If these features are not currently supported, are there any plans to include them in future updates? Any guidance or suggestions on how to implement these functionalities using the current framework would also be greatly appreciated. Thank you! Best regards, willhe. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
They are well supported. Some related docs:
|
Beta Was this translation helpful? Give feedback.
-
@merrymercy Thank you for creating SGLang! Feature Request: Support returning raw logits in addition to logprobs Currently SGLang only supports returning logprobs through sampling_params.return_logprob. Would it be possible to add support for returning the raw logits (pre-softmax values) from the model? This would be useful for:
The API could potentially look like: sampling_params = SamplingParams(
return_logits=True, # New parameter
return_logprob=True # Existing parameter
) Is this something that could be considered for future releases? |
Beta Was this translation helpful? Give feedback.
They are well supported. Some related docs:
sglang/docs/en/sampling_params.md
Lines 23 to 28 in 5ab9418
sglang/test/srt/test_openai_server.py
Line 72 in 5ab9418
https://github.com/sgl-…