sglang icon indicating copy to clipboard operation
sglang copied to clipboard

[Feature] Add return hidden state in the native API

Open zhaochenyang20 opened this issue 2 weeks ago • 4 comments

Checklist

  • [x] 1. If the issue you raised is not a feature but a question, please raise a discussion at https://github.com/sgl-project/sglang/discussions/new/choose Otherwise, it will be closed.
  • [x] 2. Please use English, otherwise it will be closed.

Motivation

JM is submitting a feature to get a hidden state. We can add examples at the beginning of the test file test/srt/test_hidden_states.py right now. Later rewrite this API and add it in the docs.

Try to add a native API instead of adding a parameter and relaunching the engine.

If anyone is interested in this, could reach out to me and try to get in touch.

Image

Related resources

https://github.com/sgl-project/sglang/pull/3364

zhaochenyang20 avatar Feb 10 '25 06:02 zhaochenyang20