HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
qwopqwop200
GPTQ-for-LLaMa
Python2023–2023
qwopqwop200 / GPTQ-for-LLaMa

GPTQ-for-LLaMa

4 bits quantization of LLaMA using GPTQ

15Distinct people
20Mentions
0Explicit recommenders
3.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

4 bits quantization of LLaMA using GPTQ

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week20 dated mentions

Observed mentions: 2023-03-10 21:44:13 UTC to 2023-07-11 06:17:01 UTC. Weeks start Monday, UTC.

02462023-03-06 00:00:00 UTC to 2023-03-13 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 commentsMar 62023-03-13 00:00:00 UTC to 2023-03-20 00:00:00 UTC (exclusive): 6 mentions; 0 submissions, 6 comments2023-03-20 00:00:00 UTC to 2023-03-27 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-03-27 00:00:00 UTC to 2023-04-03 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-04-03 00:00:00 UTC to 2023-04-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-10 00:00:00 UTC to 2023-04-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-17 00:00:00 UTC to 2023-04-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-24 00:00:00 UTC to 2023-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-01 00:00:00 UTC to 2023-05-08 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-08 00:00:00 UTC to 2023-05-15 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMay 82023-05-15 00:00:00 UTC to 2023-05-22 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-22 00:00:00 UTC to 2023-05-29 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-05-29 00:00:00 UTC to 2023-06-05 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-05 00:00:00 UTC to 2023-06-12 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-06-12 00:00:00 UTC to 2023-06-19 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-19 00:00:00 UTC to 2023-06-26 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-06-26 00:00:00 UTC to 2023-07-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-03 00:00:00 UTC to 2023-07-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-07-10 00:00:00 UTC to 2023-07-17 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJul 10

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 62023-03-06 00:00:00 UTC2023-03-13 00:00:00 UTC505
Mar 132023-03-13 00:00:00 UTC2023-03-20 00:00:00 UTC606
Mar 202023-03-20 00:00:00 UTC2023-03-27 00:00:00 UTC202
Mar 272023-03-27 00:00:00 UTC2023-04-03 00:00:00 UTC303
Apr 32023-04-03 00:00:00 UTC2023-04-10 00:00:00 UTC000
Apr 102023-04-10 00:00:00 UTC2023-04-17 00:00:00 UTC000
Apr 172023-04-17 00:00:00 UTC2023-04-24 00:00:00 UTC000
Apr 242023-04-24 00:00:00 UTC2023-05-01 00:00:00 UTC000
May 12023-05-01 00:00:00 UTC2023-05-08 00:00:00 UTC000
May 82023-05-08 00:00:00 UTC2023-05-15 00:00:00 UTC000
May 152023-05-15 00:00:00 UTC2023-05-22 00:00:00 UTC000
May 222023-05-22 00:00:00 UTC2023-05-29 00:00:00 UTC202
May 292023-05-29 00:00:00 UTC2023-06-05 00:00:00 UTC000
Jun 52023-06-05 00:00:00 UTC2023-06-12 00:00:00 UTC101
Jun 122023-06-12 00:00:00 UTC2023-06-19 00:00:00 UTC000
Jun 192023-06-19 00:00:00 UTC2023-06-26 00:00:00 UTC000
Jun 262023-06-26 00:00:00 UTC2023-07-03 00:00:00 UTC000
Jul 32023-07-03 00:00:00 UTC2023-07-10 00:00:00 UTC000
Jul 102023-07-10 00:00:00 UTC2023-07-17 00:00:00 UTC101

What Hacker News says

20 sources
LLaMA 30B or 60B can be very impressive when correctly prompted. Deploying the 60B version is a challenge though and you might need to apply 4-bit quantization with something like https://github.com/PanQiWei/AutoGPTQ or https://github.com/qwopqwop200/GPTQ-for-LLaMa . Then you can improve the inference speed by using https://github.com/turboderp/exllama . If you prefer to use an "instruct" model à la ChatGPT (i.e. that does not need few-shot learning to output good results) you can use something like this: https://huggingface.co/TheBloke/Wizard-Vicuna-30B-Uncensored... The interesting thing with these Uncensored models is that they don't constantly answer that they cannot help you (which is what ChatGPT and GPT-4 are doing more and more).
In GPT-4 details leaked?
Hold on. I need someone to explain something to me. The colab notebook shows an example of loading the vanilla, unquantized model "decapoda-research/llama-7b-hf", using the flag "load_in_4bit" to load it as 4bits. When... when did this become possible? My understanding, from playing with these models daily for the past few months, is that quantization of LLaMA-based models is done via this: https://github.com/qwopqwop200/GPTQ-for-LLaMa And performing the quantization step is memory and time expensive. Which is why some kind people with large resources are performing the quantization, and then uploading those quantized models, such as this one: https://huggingface.co/TheBloke/wizard-vicuna-13B-GPTQ But now I'm seeing that, as of recently, the transformers library is capable of loading models in 4bits simply by passing this flag? Is this a
Read the rest
free lunch? Is GPTQ-for-LLaMA no longer needed anymore? Or is this still not as good, in terms of inference quality, as the GPTQ-quantized models?
In QLoRA: Efficient Finetuning of Quantized LLMs
For this specific implementation here's info from llama.cpp repo: Perplexity - model options 5.5985 - 13B, q4_0 5.9565 - 7B, f16 6.3001 - 7B, q4_1 6.5949 - 7B, q4_0 6.5995 - 7B, q4_0, --memory_f16 According to this repo[1] difference is about 3% in their implementation with right group size. If you'd like to know more, I think you should read GPTQ paper[2]. [1] https://github.com/qwopqwop200/GPTQ-for-LLaMa [2] https://arxiv.org/abs/2210.17323
In Llama.cpp 30B runs with only 6GB of RAM now
> With no real knowledge of LLM and only recently started to understand what LLM terms mean, such as 'model, inference, LLM model, intruction set, fine tuning' whatelse do you think is required to make a took like yours? This was mee a few weeks ago. I got interested in all this when FlexGen (https://github.com/FMInference/FlexGen) was announced, which allowed to run inference using OPT model on consumer hardware. I'm an avid user of Stable Diffusion, and I wanted to see if I can have an SD equivalent of ChatGPT. Not understanding the details of hyperparameters or terminology, I basically asked ChatGPT to explain to me what these things are: Explain to someone who is a software engineer with limited knowledge of ML terms or linear algebra, what is "feed forward" and "self-attention" in the context of ML and large language models. Provi
Read the rest
de examples when possible. I did the same with all the other terms I didn't understand, like "ADAM optimizer", "gradient", etc. I relied on it very heavily and cross-referenced the answers. Looking at other people's code and just tinkering with things on my own really helped. Through the FlexGen discord I've discovered https://github.com/oobabooga/text-generation-webui where I spent days just playing around with models. This got me into the huggingface ecosystem -- their transformers library is an easy way to get started. I joined a few other discords, like LLaMA Unofficial, RWKV, Eleuther AI, Together, Hivemind and Petals. I bookmarked a bunch of resources but it's very sporadic. Here are some: - https://github.com/zphang/minimal-llama/#peft-fine-tuning-wi... - https://github.com/togethercomputer/OpenChatKit - https://www.cstroik.com/index.php/2023/02/18/finetuning-an-a... - https://github.com/huggingface/peft - https://github.com/kingoflolz/mesh-transformer-jax/blob/mast... - https://github.com/oobabooga/text-generation-webui - https://github.com/hizkifw/WebChatRWKVstic - https://github.com/ggerganov/whisper.cpp - https://github.com/qwopqwop200/GPTQ-for-LLaMa - https://github.com/oobabooga/text-generation-webui/issues/14... - https://github.com/bigscience-workshop/petals - https://github.com/alpa-projects/alpa
In Show HN: Finetune LLaMA-7B on commodity GPUs using your own text
Do you know if any of them support GPTQ [1], either end-to-end or just by importing weights that were previously quantized with GPTQ? Apparently GPTQ provides a significant quality boost “for free”. I haven’t had time to look into this in detail, but apparently llama.cpp doesn’t support it yet [2] though it will soon. And the original implementation only works with CUDA. [1] https://github.com/qwopqwop200/GPTQ-for-LLaMa/ [2] https://github.com/ggerganov/llama.cpp/issues/9
In Llama.rs – Rust port of llama.cpp for fast LLaMA inference on CPU
WRONG. Research shows effectively imperceptible performance difference at 4-bit and even 3-bit with GPTQ quantization. You cannot tell the difference and if you think you do you're wrong, because it barely even registers on any benchmark. (Note: llama.cpp's 4bit is naive, not GPTQ, and sucks but they are refactoring it to use GPTQ quantization) References: https://arxiv.org/abs/2210.17323 - GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers [Oct, 2022] https://arxiv.org/abs/2212.09720 - The case for 4-bit precision: k-bit Inference Scaling Laws [Dec, 2022] https://github.com/ggerganov/llama.cpp/issues/9 - llama.cpp: GPTQ Quantization (3-bit and 4-bit) #9 https://github.com/qwopqwop200/GPTQ-for-LLaMa/ - 4 bits quantization of LLaMa using GPTQ
In Alpaca: A strong open-source instruction-following model

Showing the 15 most recent of 20 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.