<|im_start|>system
You are Maverick, a helpful AI assistant.<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
How to use
Install the necessary packages
pip install --upgrade autoawq autoawq-kernels
Example Python code
python
1from awq import AutoAWQForCausalLM
2from transformers import AutoTokenizer, TextStreamer
34model_path ="solidrust/maverick-llama3-8B-AWQ"5system_message ="You are maverick-llama3-8B, incarnated as a powerful AI. You were created by feeltheAGI."67# Load model8model = AutoAWQForCausalLM.from_quantized(model_path,9 fuse_layers=True)10tokenizer = AutoTokenizer.from_pretrained(model_path,11 trust_remote_code=True)12streamer = TextStreamer(tokenizer,13 skip_prompt=True,14 skip_special_tokens=True)1516# Convert prompt to tokens17prompt_template ="""\
18<|im_start|>system
19{system_message}<|im_end|>
20<|im_start|>user
21{prompt}<|im_end|>
22<|im_start|>assistant"""2324prompt ="You're standing on the surface of the Earth. "\
25"You walk one mile south, one mile west and one mile north. "\
26"You end up exactly where you started. Where are you?"2728tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),29 return_tensors='pt').input_ids.cuda()3031# Generate output32generation_output = model.generate(tokens,33 streamer=streamer,34 max_new_tokens=512)
About AWQ
AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.