# Layoutlmv2 token classication inference with Pipeline

**URL:** <https://discuss.huggingface.co/t/layoutlmv2-token-classication-inference-with-pipeline/18625>\
**Category:** 🤗Transformers\
**Created:** [June 1, 2022, 8:44pm UTC](https://discuss.huggingface.co/t/layoutlmv2-token-classication-inference-with-pipeline/18625 "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](https://discuss.huggingface.co/u/fatemerhmi)\
**Post date:** [June 1, 2022, 8:44pm UTC](https://discuss.huggingface.co/t/layoutlmv2-token-classication-inference-with-pipeline/18625/1 "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.
