mlabonne commited on
Commit
1a570cf
1 Parent(s): 87fb5ca

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ tags:
7
+ - AutoGPTQ
8
+ - 4bit
9
+ - GPTQ
10
+ ---
11
+
12
+ Model created using [AutoGPTQ](https://github.com/PanQiWei/AutoGPTQ) on a [GPT-2](https://huggingface.co/gpt2) model with 4-bit quantization.
13
+
14
+ You can load this model with the AutoGPTQ library, installed with the following command:
15
+
16
+ ```
17
+ pip install auto-gptq
18
+ ```
19
+
20
+ You can then download the model from the hub using the following code:
21
+
22
+ ```python
23
+ from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
24
+ from transformers import AutoTokenizer
25
+
26
+ model_id = "mlabonne/gpt2-GPTQ-4bit"
27
+ quantize_config = BaseQuantizeConfig(bits=4, group_size=128)
28
+ model = AutoGPTQForCausalLM.from_pretrained(model_id, quantize_config)
29
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
30
+ ```
31
+
32
+ This model works with the traditional [Text Generation pipeline](https://huggingface.co/docs/transformers/main_classes/pipelines#transformers.TextGenerationPipeline).