[`Quantization`] Add str to enum conversion for AWQ
Author: younesbelkada
Pull request: yes

# What does this PR do?

Fixes https://github.com/huggingface/transformers/issues/27318

Some repositories that use the old conversion script have the `version` field set to `GEMM` whereas it should be `gemm`. Despite the fix should be that we should convert the config file accordingly e.g.: https://huggingface.co/marcsun13/Llama-2-13B-AWQ/discussions/1 I propose to add a small str to enum conversion logic to cover this scenario as well and avoid errors that are hard to understand for users.

Added also a test for it

cc @amyeroberts 


Comments:
_The documentation is not available anymore as the PR was closed or merged._

@amyeroberts yes correct there is no backward compatibility to handle, it is more about users that can easily make the typo ("GEMM" vs "gemm") and lead to an error that is hard to understand for them. 
For quantizing a model one needs to call (through autoawq package):

```python
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer

model_path = "facebook/opt-125m"
quant_path = "opt-125m-awq"
quant_config = {"zero_point": True, "q_group_size": 128, "w_bit": 4, "version":"GEMM"}

# Load model
model = AutoAWQForCausalLM.from_pretrained(model_path)
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

# Quantize
model.quantize(tokenizer, quant_config=quant_config)
```

Then convert `quantization_config` to the transformers format like this:

```python
from transformers import AwqConfig, AutoConfig
from huggingface_hub import HfApi

# modify the config file so that it is compatible with transformers integration
quantization_config = AwqConfig(
    bits=quant_config["w_bit"],
    group_size=quant_config["q_group_size"],
    zero_point=quant_config["zero_point"],
    version=quant_config["version"].lower(),
).to_dict()

# the pretrained transformers model is stored in the model attribute + we need to pass a dict
model.model.config.quantization_config = quantization_config
# a second solution would be to use Autoconfig and push to hub (what we do at llm-awq)


# save model weights
model.save_quantized(quant_path)
tokenizer.save_pretrained(quant_path)
```

note the `version=quant_config["version"].lower()` here. This PR is more about the user experience and smooth compatibility between autoawq and transformers. The changes proposed in this PR are very simple and IMO would be nice to add it to avoid these easy usecases.


@younesbelkada Just to make sure I've understood, from the example above it seems that it's necessary for the value to be uppercase when creating the quant config? 

i.e. `quant_config = {"version": "GEMM"}` is correct but `quant_config = {"version": "gemm"}` is not? 

@amyeroberts when using external tools such as AutoAWQ or LLm-awq to quantize your LLM yes! However currently users need to make it lowercase before saving it locally / pushing it on the Hub in order to use it with transformers

@younesbelkada Failing CI runs should now be resolved on main. You should be able to rebase and merge :) 

@younesbelkada - the test should (🤞 ) now be passing. A full run of all the tests with a fix / skipping tests has passed and been merged to main 

Thank you veyr much @amyeroberts @ydshieh @muellerzr for fixing the CI issues!