Replies: 1 comment
-
|
For decoder-only models, From what you've described, your current approach of:
is the standard way to expose intermediate tensors. As far as I'm aware, the new Executor API does not currently provide a high-level mechanism to request arbitrary intermediate activations (such as decoder hidden states) through the public API. The So unless I've overlooked a recently added feature, you would likely still need to:
I don't believe this can be achieved purely from an application like One question for the TensorRT-LLM team:
That would be useful for applications such as feature extraction, embeddings, reranking, and custom downstream tasks. If this answer helped or pointed you in the right direction, I'd appreciate it if you could mark it as the accepted answer so it's easier for others with the same issue to find. Also, if you found my contribution useful, I'd appreciate it if you could check out my GitHub profile, follow me, and star any repositories you find interesting. GitHub: https://github.com/Advait251206 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
We have a decoder only Llama-like model and we need to access its hidden states. Currently for this purpose we patch both the Python
LLaMAModeland the C++GptSessionclasses. In the former we dohidden_states.mark_output(...)to make these visible and in the latter we access them withoutputBuffer.at(...)here.We would like to timely switch to the new Executor API (with the current API announced to be deprecated) but cannot find the proper way to achieve what we want there.
What would be the easiest way to access the hidden states in the new API? Is it possible to do within something like executorExampleBasic?
The
returnEncoderOutputsetting looked promising but it does not seem to work for a decoder only model (as expected from the comment):Result::encoderOutputis empty.Beta Was this translation helpful? Give feedback.
All reactions