Suparious commited on
Commit
cb5cf8e
1 Parent(s): 12ccfb7

update model card

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