# Extracting logits from vision language models at inference time

**URL:** <https://discuss.huggingface.co/t/extracting-logits-from-vision-language-models-at-inference-time/76122>\
**Category:** 🤗Transformers\
**Created:** [March 6, 2024, 5:37am UTC](https://discuss.huggingface.co/t/extracting-logits-from-vision-language-models-at-inference-time/76122 "2024-03-06T05:37:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alzaia](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@alzaia](https://discuss.huggingface.co/u/alzaia)\
**Post date:** [March 6, 2024, 5:37am UTC](https://discuss.huggingface.co/t/extracting-logits-from-vision-language-models-at-inference-time/76122/1 "2024-03-06T05:37:16Z")

</div>

Hello, is there a simple way to extract the output token(s) logits when running inference on a VLM natively integrated into _transformers_ (e.g. while using pipeline or AutoML classes)? For instance, I would expect to be able to get them via `outputs.logits` in the forward pass. Would this be doable with currently integrated models such as LLaVA or CogVLM?
