Suparious commited on
Commit
4b5e76b
·
verified ·
1 Parent(s): 2af8e46

add model card

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