# Layoutlmv2 token classication inference with Pipeline

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flayoutlmv2-token-classication-inference-with-pipeline%2F18625%3E%5C
**Category:** 🤗Transformers\
**Created:** [June 1, 2022, 8:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flayoutlmv2-token-classication-inference-with-pipeline%2F18625 "2022-06-01T20:44:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fatemerhmi](https://avatars.discourse-cdn.com/v4/letter/f/13edae/32.png) [@fatemerhmi](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffatemerhmi)%5C
**Post date:** [June 1, 2022, 8:44pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Flayoutlmv2-token-classication-inference-with-pipeline%2F18625%2F1 "2022-06-01T20:44:54Z")

</div>

Hello,

I was wondering if it is possible to use [TextClassificationPipeline](https://huggingface.co/docs/transformers/v4.19.2/en/main_classes/pipelines#transformers.TokenClassificationPipeline) with LayoutLMv2 model when trained on NER task ([LayoutLMv2ForTokenClassification](https://huggingface.co/docs/transformers/main/en/model_doc/layoutlmv2#transformers.LayoutLMv2ForTokenClassification)).

For example a pretrained LayoutLMv2 available in the model hub (i.e. [layoutlmv2-finetuned-funsd](https://huggingface.co/nielsr/layoutlmv2-finetuned-funsd))

Thank you.
