Suparious commited on
Commit
39350eb
·
verified ·
1 Parent(s): bf74cd0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +120 -0
README.md CHANGED
@@ -1,3 +1,123 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - finetuned
4
+ - quantized
5
+ - 4-bit
6
+ - AWQ
7
+ - transformers
8
+ - pytorch
9
+ - mistral
10
+ - instruct
11
+ - text-generation
12
+ - conversational
13
+ - license:apache-2.0
14
+ - autotrain_compatible
15
+ - endpoints_compatible
16
+ - text-generation-inference
17
+ - finetune
18
+ - chatml
19
+ model-index:
20
+ - name: Ignis-7B-DPO
21
+ results: []
22
  license: apache-2.0
23
+ base_model: mistralai/Mistral-7B-instruct-v0.2
24
+ language:
25
+ - en
26
+ quantized_by: Suparious
27
+ pipeline_tag: text-generation
28
+ model_creator: NeuralNovel
29
+ model_name: Ignis 7B DPO
30
+ inference: false
31
+ prompt_template: '<|im_start|>system
32
+
33
+ {system_message}<|im_end|>
34
+
35
+ <|im_start|>user
36
+
37
+ {prompt}<|im_end|>
38
+
39
+ <|im_start|>assistant
40
+
41
+ '
42
  ---
43
+
44
+ # Ignis 7B DPO AWQ
45
+
46
+ - Model creator: [NeuralNovel](https://huggingface.co/NeuralNovel)
47
+ - Original model: [Ignis-7B-DPO](https://huggingface.co/NeuralNovel/Ignis-7B-DPO)
48
+
49
+ ![image/jpeg](ttps://i.ibb.co/C8jZ6FW/OIG3.jpg)
50
+
51
+ - Community Organization: [ConvexAI](https://huggingface.co/ConvexAI)
52
+
53
+ ## How to use
54
+
55
+ ### Install the necessary packages
56
+
57
+ ```bash
58
+ pip install --upgrade autoawq autoawq-kernels
59
+ ```
60
+
61
+ ### Example Python code
62
+
63
+ ```python
64
+ from awq import AutoAWQForCausalLM
65
+ from transformers import AutoTokenizer, TextStreamer
66
+
67
+ model_path = "solidrust/Ignis-7B-DPO-AWQ"
68
+ system_message = "You are Ignis, incarnated as a powerful AI."
69
+
70
+ # Load model
71
+ model = AutoAWQForCausalLM.from_quantized(model_path,
72
+ fuse_layers=True)
73
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
74
+ trust_remote_code=True)
75
+ streamer = TextStreamer(tokenizer,
76
+ skip_prompt=True,
77
+ skip_special_tokens=True)
78
+
79
+ # Convert prompt to tokens
80
+ prompt_template = """\
81
+ <|im_start|>system
82
+ {system_message}<|im_end|>
83
+ <|im_start|>user
84
+ {prompt}<|im_end|>
85
+ <|im_start|>assistant"""
86
+
87
+ prompt = "You're standing on the surface of the Earth. "\
88
+ "You walk one mile south, one mile west and one mile north. "\
89
+ "You end up exactly where you started. Where are you?"
90
+
91
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
92
+ return_tensors='pt').input_ids.cuda()
93
+
94
+ # Generate output
95
+ generation_output = model.generate(tokens,
96
+ streamer=streamer,
97
+ max_new_tokens=512)
98
+
99
+ ```
100
+
101
+ ### About AWQ
102
+
103
+ 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.
104
+
105
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
106
+
107
+ It is supported by:
108
+
109
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
110
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
111
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
112
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
113
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
114
+
115
+ ## Prompt template: ChatML
116
+
117
+ ```plaintext
118
+ <|im_start|>system
119
+ {system_message}<|im_end|>
120
+ <|im_start|>user
121
+ {prompt}<|im_end|>
122
+ <|im_start|>assistant
123
+ ```