TypeError: LlamaForCausalLM.__init__() got an unexpected keyword argument 'use_flash_attention_2'
Author: timelfrink
Pull request: no

### System Info

- `transformers` version: 4.33.2
- Platform: Linux-4.14.318-241.531.amzn2.x86_64-x86_64-with-glibc2.31
- Python version: 3.10.6
- Huggingface_hub version: 0.16.4
- Safetensors version: 0.3.3
- Accelerate version: 0.23.0
- Accelerate config: 	not found
- PyTorch version (GPU?): 2.0.1+cu117 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: No
- Using distributed or parallel set-up in script?: No

### Who can help?

@younesbelkada 
@ArthurZucker 

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)

### Reproduction

I finetuned NousResearch/Llama-2-7b-hf and used merge LoRA and base model and to save the model.

Now I would like to use `flash_attention_v2` as described [here](https://huggingface.co/docs/transformers/main/en/perf_infer_gpu_one#flash-attention-2) to improve inference speed. I wanted to load the model, apply the use_flash_attention_2 and safe it again. But i got this error.

`model = AutoModelForCausalLM.from_pretrained(
    PATH,
    local_files_only=True,
    torch_dtype=torch.bfloat16, 
    use_flash_attention_2=True,
)`

I get this error:
```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[5], line 3
      1 PATH = 'old'
----> 3 model = AutoModelForCausalLM.from_pretrained(
      4     PATH,
      5     local_files_only=True,
      6     torch_dtype=torch.bfloat16, 
      7     use_flash_attention_2=True,
      8 )

File /opt/conda/lib/python3.10/site-packages/transformers/models/auto/auto_factory.py:563, in _BaseAutoModelClass.from_pretrained(cls, pretrained_model_name_or_path, *model_args, **kwargs)
    561 elif type(config) in cls._model_mapping.keys():
    562     model_class = _get_model_class(config, cls._model_mapping)
--> 563     return model_class.from_pretrained(
    564         pretrained_model_name_or_path, *model_args, config=config, **hub_kwargs, **kwargs
    565     )
    566 raise ValueError(
    567     f"Unrecognized configuration class {config.__class__} for this kind of AutoModel: {cls.__name__}.\n"
    568     f"Model type should be one of {', '.join(c.__name__ for c in cls._model_mapping.keys())}."
    569 )

File /opt/conda/lib/python3.10/site-packages/transformers/modeling_utils.py:2966, in PreTrainedModel.from_pretrained(cls, pretrained_model_name_or_path, config, cache_dir, ignore_mismatched_sizes, force_download, local_files_only, token, revision, use_safetensors, *model_args, **kwargs)
   2963     init_contexts.append(init_empty_weights())
   2965 with ContextManagers(init_contexts):
-> 2966     model = cls(config, *model_args, **model_kwargs)
   2968 # Check first if we are `from_pt`
   2969 if use_keep_in_fp32_modules:

TypeError: LlamaForCausalLM.__init__() got an unexpected keyword argument 'use_flash_attention_2'
```

### Expected behavior

Able to load my model with `flash_attention_v2` 

Comments:
Hi @timelfrink 
Thanks for your interest in this feature, please use the main build of transformers to use that feature: `pip install -U git+https://github.com/huggingface/transformers.git`

@younesbelkada thanks for the quick hint and yes that worked!