Kronikus commited on
Commit
cd8490c
1 Parent(s): a211d38

Add model card

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