AutoModelForSequenceClassification.from_config doesn't support LlamaConfig
Author: kungfu-eric
Pull request: no

### System Info

Calling:

```
from transformers import AutoModelForSequenceClassification
from transformers.models.llama.configuration_llama import LlamaConfig
config = LlamaConfig()
model = AutoModelForSequenceClassification.from_config(config)
```

gives:
```
________________________________ Traceback (most recent call last) _________________________________
_ in <module>:1                                                                                    _
_                                                                                                  _
_ /opt/conda/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py:413 in          _
_ from_config                                                                                      _
_                                                                                                  _
_   410 _   _   _   model_class = _get_model_class(config, cls._model_mapping)                     _
_   411 _   _   _   return model_class._from_config(config, **kwargs)                              _
_   412 _   _                                                                                      _
_ _ 413 _   _   raise ValueError(                                                                  _
_   414 _   _   _   f"Unrecognized configuration class {config.__class__} for this kind of AutoM   _
_   415 _   _   _   f"Model type should be one of {', '.join(c.__name__ for c in cls._model_mapp   _
_   416 _   _   )                                                                                  _
____________________________________________________________________________________________________
ValueError: Unrecognized configuration class <class 'type'> for this kind of AutoModel: AutoModelForSequenceClassification.
Model type should be one of AlbertConfig, BartConfig, BertConfig, BigBirdConfig, BigBirdPegasusConfig, BloomConfig, CamembertConfig, CanineConfig, ConvBertConfig, 
CTRLConfig, Data2VecTextConfig, DebertaConfig, DebertaV2Config, DistilBertConfig, ElectraConfig, ErnieConfig, ErnieMConfig, EsmConfig, FlaubertConfig, FNetConfig, 
FunnelConfig, GPT2Config, GPT2Config, GPTBigCodeConfig, GPTNeoConfig, GPTNeoXConfig, GPTJConfig, IBertConfig, LayoutLMConfig, LayoutLMv2Config, LayoutLMv3Config, 
LEDConfig, LiltConfig, LlamaConfig, LongformerConfig, LukeConfig, MarkupLMConfig, MBartConfig, MegaConfig, MegatronBertConfig, MobileBertConfig, MPNetConfig, MvpConfig, 
NezhaConfig, NystromformerConfig, OpenAIGPTConfig, OPTConfig, PerceiverConfig, PLBartConfig, QDQBertConfig, ReformerConfig, RemBertConfig, RobertaConfig, 
RobertaPreLayerNormConfig, RoCBertConfig, RoFormerConfig, SqueezeBertConfig, TapasConfig, TransfoXLConfig, XLMConfig, XLMRobertaConfig, XLMRobertaXLConfig, XLNetConfig, 
XmodConfig, YosoConfig.
```

### Who can help?

@ArthurZucker 

### Expected behavior

Model should be able to be loaded from config with randomly initialized weights, preferably with bfloat16 and load_8bit support.

Comments:
Hi @kungfu-eric, 

This issue is arising because you need to pass an instance of the config, rather than the config class i.e.:

```python
from transformers import AutoModelForSequenceClassification
from transformers.models.llama.configuration_llama import LlamaConfig

config = LlamaConfig()
model = AutoModelForSequenceClassification.from_config(config)
```

What ended up fixing the issues was updating to transformers-4.30.2 from 4.28.1. @amyeroberts ah i wrote the simple example wrong. I did define the config in the actual full code. Thank you though.