# Unmasker probabilities for all tokens in sequence

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funmasker-probabilities-for-all-tokens-in-sequence%2F28344%3E%5C
**Category:** 🤗Transformers\
**Created:** [December 23, 2022, 8:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funmasker-probabilities-for-all-tokens-in-sequence%2F28344 "2022-12-23T20:06:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![diegoinsausti](https://avatars.discourse-cdn.com/v4/letter/d/22d042/32.png) [@diegoinsausti](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdiegoinsausti)%5C
**Post date:** [December 23, 2022, 8:06pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Funmasker-probabilities-for-all-tokens-in-sequence%2F28344%2F1 "2022-12-23T20:06:38Z")

</div>

Hello, I fine tuned a masked language model using AutoModelForMaskedLM and a default DataCollatorForLanguageModeling. I would like to infer the probabilities for all vocab options (less than 50 vocab tokens) at each location of my sequence in a way that doesn’t involve iterating through each position in the test sequence, masking it, and using the pipeline to get each vocab probability.

Is there a way to obtain these probabilities in one go, rather than having to go through each token in the sequence to obtain the probabilities?
