Suparious commited on
Commit
f9be482
1 Parent(s): 5a42e5c

Adding model card

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