Error trying to load MarkupLMForPretraining

I’m new to HF and just got this error, I’m using transformers version 4.2.0.dev0 and pytorch version 1.11.0 with python3.8.

ImportError                               Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 from transformers import MarkupLMForPretraining
      3 model = LayoutLMv2Model.from_pretrained("microsoft/layoutxlm-base")

ImportError: cannot import name 'MarkupLMForPretraining' from 'transformers' (/home/user/miniconda3/envs/fastai6/lib/python3.8/site-packages/transformers/

Is this model restricted? Is it because of my transformers version?

It’s been a while since I posted this, does anyone know why I can’t load this model?


is there ‘MarkupLMForPretraining’ in transformer?

i can’t find at HF docs.

also in the code, you load LayoutLMv2Model but import MarkupLMForPretraining.