Text Generation
Transformers
Safetensors
mistral
4-bit precision
AWQ
Inference Endpoints
chatml
text-generation-inference
awq
Suparious commited on
Commit
1c8f571
·
verified ·
1 Parent(s): a312ee0

Update Model card

Browse files
Files changed (1) hide show
  1. README.md +111 -1
README.md CHANGED
@@ -1,6 +1,116 @@
1
  ---
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
4
  # RESMPDEV/Wukong-0.1-Mistral-7B-v0.2 AWQ
5
 
6
- **UPLOAD IN PROGRESS**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ library_name: transformers
3
+ tags:
4
+ - mistral
5
+ - 4-bit
6
+ - AWQ
7
+ - text-generation
8
+ - autotrain_compatible
9
+ - endpoints_compatible
10
+ - chatml
11
  license: apache-2.0
12
+ datasets:
13
+ - teknium/OpenHermes-2.5
14
+ - m-a-p/CodeFeedback-Filtered-Instruction
15
+ - m-a-p/Code-Feedback
16
+ pipeline_tag: text-generation
17
+ inference: false
18
+ prompt_template: '<|im_start|>system
19
+
20
+ {system_message}<|im_end|>
21
+
22
+ <|im_start|>user
23
+
24
+ {prompt}<|im_end|>
25
+
26
+ <|im_start|>assistant
27
+
28
+ '
29
+ quantized_by: Suparious
30
  ---
31
  # RESMPDEV/Wukong-0.1-Mistral-7B-v0.2 AWQ
32
 
33
+ - Model creator: [RESMPDEV](https://huggingface.co/Locutusque)
34
+ - Original model: [Wukong-0.1-Mistral-7B-v0.2](https://huggingface.co/RESMPDEV/Wukong-0.1-Mistral-7B-v0.2)
35
+
36
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/655dc641accde1bbc8b41aec/xOe1Nb3S9Nb53us7_Ja3s.jpeg)
37
+
38
+ ## Model Summary
39
+
40
+ Wukong-0.1-Mistral-7B-v0.2 is a dealigned chat finetune of the original fantastic Mistral-7B-v0.2 model by the Mistral team.
41
+
42
+ This model was trained on the teknium OpenHeremes-2.5 dataset, code datasets from Multimodal Art Projection https://m-a-p.ai, and the Dolphin dataset from Cognitive Computations https://erichartford.com/dolphin 🐬
43
+
44
+ This model was trained for 3 epochs over 4 4090's.
45
+
46
+ ## How to use
47
+
48
+ ### Install the necessary packages
49
+
50
+ ```bash
51
+ pip install --upgrade autoawq autoawq-kernels
52
+ ```
53
+
54
+ ### Example Python code
55
+
56
+ ```python
57
+ from awq import AutoAWQForCausalLM
58
+ from transformers import AutoTokenizer, TextStreamer
59
+
60
+ model_path = "solidrust/Wukong-0.1-Mistral-7B-v0.2-AWQ"
61
+ system_message = "You are Wukong, incarnated as a powerful AI."
62
+
63
+ # Load model
64
+ model = AutoAWQForCausalLM.from_quantized(model_path,
65
+ fuse_layers=True)
66
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
67
+ trust_remote_code=True)
68
+ streamer = TextStreamer(tokenizer,
69
+ skip_prompt=True,
70
+ skip_special_tokens=True)
71
+
72
+ # Convert prompt to tokens
73
+ prompt_template = """\
74
+ <|im_start|>system
75
+ {system_message}<|im_end|>
76
+ <|im_start|>user
77
+ {prompt}<|im_end|>
78
+ <|im_start|>assistant"""
79
+
80
+ prompt = "You're standing on the surface of the Earth. "\
81
+ "You walk one mile south, one mile west and one mile north. "\
82
+ "You end up exactly where you started. Where are you?"
83
+
84
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
85
+ return_tensors='pt').input_ids.cuda()
86
+
87
+ # Generate output
88
+ generation_output = model.generate(tokens,
89
+ streamer=streamer,
90
+ max_new_tokens=512)
91
+
92
+ ```
93
+
94
+ ### About AWQ
95
+
96
+ 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.
97
+
98
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
99
+
100
+ It is supported by:
101
+
102
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
103
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
104
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
105
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
106
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
107
+
108
+ ## Prompt template: ChatML
109
+
110
+ ```plaintext
111
+ <|im_start|>system
112
+ {system_message}<|im_end|>
113
+ <|im_start|>user
114
+ {prompt}<|im_end|>
115
+ <|im_start|>assistant
116
+ ```