Views
No views yet
google/gemma-2-2b.
Support for Gemma2 in the codebase of AutoAWQ is proposed in the following pull request.
To use the model, follow the AutoAWQ examples with the source from #562.1model_path = "radi-cho/gemma-2-2b-AWQ"
2
3# With transformers
4from transformers import AutoModelForCausalLM
5model = AutoModelForCausalLM.from_pretrained(model_path, device_map="cuda:0")
6
7# With transformers (fused)
8from transformers import AutoModelForCausalLM, AwqConfig
9quantization_config = AwqConfig(bits=4, fuse_max_seq_len=512, do_fuse=True)
10model = AutoModelForCausalLM.from_pretrained(model_path, quantization_config=quantization_config).to(0)
11
12# With AutoAWQ
13from awq import AutoAWQForCausalLM
14model = AutoAWQForCausalLM.from_quantized(model_path)