Views
No views yet
llm-awq GEMM layout. This is a base model, not an
instruction-tuned/chat model.llm-awq backend. Reproduce the pinned environment:1git clone https://github.com/mit-han-lab/llm-awq.git
2cd llm-awq
3git checkout d6e797a42b9ef7778de8ee2352116e0f48a78d61
4pip install -e .
5cd awq/kernels
6python setup.py install1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4repo_id = "Phuc2005/Llama-3-8B-AWQ-W4A16-g128"
5tokenizer = AutoTokenizer.from_pretrained(repo_id, use_fast=False)
6model = AutoModelForCausalLM.from_pretrained(
7 repo_id,
8 torch_dtype=torch.float16,
9 device_map="auto",
10 trust_remote_code=True,
11)
12
13prompt = "The purpose of quantization in neural networks is"
14inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
15output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
16print(tokenizer.decode(output[0], skip_special_tokens=True))8cde5ca8380496c9a6cc7ef3a8b46a0372a1d920d6e797a42b9ef7778de8ee2352116e0f48a78d616.546638488769531quantization_metadata.json contains the full environment and packaging record. The
WikiText score validates the quantized checkpoint; it does not prove equal quality on every
dataset or downstream task.model-00001-of-00002.safetensors: 363c6b6b44dbec006ba5ed5c04b9f9ba7c60fdd990e4c4e5b1ab5360b7b7aeb5model-00002-of-00002.safetensors: f3ecea694f172a2cb25e8123aa8626e30ff588237119149eba99a28bc47bf86esource/llama3-8b-w4-g128-awq.pt: 6de86aecfc9eadead0966366004594704bb747c8acfde46fbf14cf16706e7617LICENSE, NOTICE, and USE_POLICY.md. Built with Meta Llama 3.