# Unrecognized configuration class error which loading a model

**URL:** <https://discuss.huggingface.co/t/unrecognized-configuration-class-error-which-loading-a-model/72236>\
**Category:** Models\
**Created:** [February 7, 2024, 9:48am UTC](https://discuss.huggingface.co/t/unrecognized-configuration-class-error-which-loading-a-model/72236 "2024-02-07T09:48:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vineethsaia](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@Vineethsaia](https://discuss.huggingface.co/u/Vineethsaia)\
**Post date:** [February 7, 2024, 9:48am UTC](https://discuss.huggingface.co/t/unrecognized-configuration-class-error-which-loading-a-model/72236/1 "2024-02-07T09:48:17Z")

</div>

Hi folks, I’m getting the below error while trying to load this model, “togethercomputer/m2-bert-80M-32k” to my local machine and cloud based machine. Could anyone please help me to resolve this issue?  
Thank you in advance.

```auto
ValueError: Unrecognized configuration class <class 'transformers_modules.togethercomputer.m2-bert-80M-32k.b6752c3b2909e7ff2f734a4e30e44f7e4796e9c4.configuration_bert.BertConfig'> for this kind of AutoModel: AutoModelForMaskedLM.
Model type should be one of AlbertConfig, BartConfig, BertConfig, BigBirdConfig, CamembertConfig, ConvBertConfig, Data2VecTextConfig, DebertaConfig, DebertaV2Config, DistilBertConfig, ElectraConfig, ErnieConfig, EsmConfig, FlaubertConfig, FNetConfig, FunnelConfig, IBertConfig, LayoutLMConfig, LongformerConfig, LukeConfig, MBartConfig, MegaConfig, MegatronBertConfig, MobileBertConfig, MPNetConfig, MraConfig, MvpConfig, NezhaConfig, NystromformerConfig, PerceiverConfig, QDQBertConfig, ReformerConfig, RemBertConfig, RobertaConfig, RobertaPreLayerNormConfig, RoCBertConfig, RoFormerConfig, SqueezeBertConfig, TapasConfig, Wav2Vec2Config, XLMConfig, XLMRobertaConfig, XLMRobertaXLConfig, XmodConfig, YosoConfig.

```
