Suparious commited on
Commit
b602f95
1 Parent(s): b970fbd

Add model card

Browse files
Files changed (1) hide show
  1. README.md +129 -0
README.md CHANGED
@@ -1,3 +1,132 @@
1
  ---
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
  license: apache-2.0
5
+ tags:
6
+ - open-source
7
+ - code
8
+ - math
9
+ - chemistry
10
+ - biology
11
+ - transformers
12
+ - mistral
13
+ - text-generation-inference
14
+ - question-answering
15
+ - quantized
16
+ - 4-bit
17
+ - AWQ
18
+ - text-generation
19
+ - autotrain_compatible
20
+ - endpoints_compatible
21
+ - chatml
22
+ datasets:
23
+ - Locutusque/OpenCerebrum-dpo
24
+ model_creator: Locutusque
25
+ model_name: OpenCerebrum-1.0-7b-DPO
26
+ model_type: mistral
27
+ pipeline_tag: text-generation
28
+ inference: false
29
+ prompt_template: '<|im_start|>system
30
+
31
+ {system_message}<|im_end|>
32
+
33
+ <|im_start|>user
34
+
35
+ {prompt}<|im_end|>
36
+
37
+ <|im_start|>assistant
38
+
39
+ '
40
+ quantized_by: Suparious
41
  ---
42
+ # Locutusque/OpenCerebrum-1.0-7b-DPO AWQ
43
+
44
+ - Model creator: [macadeliccc](https://huggingface.co/macadeliccc)
45
+ - Original model: [AlphaHitchhiker-7B-v2](https://huggingface.co/macadeliccc/AlphaHitchhiker-7B-v2)
46
+
47
+ ## Model Summary
48
+
49
+ OpenCerebrum-1.0-7B-DPO is an open-source language model fine-tuned from the alpindale/Mistral-7B-v0.2-hf base model on a diverse dataset aimed at replicating capabilities of Aether Research's proprietary Cerebrum model.
50
+
51
+ The model was fine-tuned on approximately 21,000 examples across 6 datasets spanning coding, math, science, reasoning, and general instruction-following. The goal was to assemble public datasets that could help the model achieve strong performance on benchmarks where Cerebrum excels.
52
+
53
+ I used the ChatML prompt format to train this model.
54
+
55
+ - **Base Model:** alpindale/Mistral-7B-v0.2-hf
56
+ - **Parameters:** 7 billion
57
+ - **Fine-Tuning Dataset Size:** ~21,000 examples
58
+ - **Fine-Tuning Data:** Amalgamation of 6 public datasets
59
+ - **Language:** English
60
+ - **License:** Apache 2.0
61
+
62
+ ## How to use
63
+
64
+ ### Install the necessary packages
65
+
66
+ ```bash
67
+ pip install --upgrade autoawq autoawq-kernels
68
+ ```
69
+
70
+ ### Example Python code
71
+
72
+ ```python
73
+ from awq import AutoAWQForCausalLM
74
+ from transformers import AutoTokenizer, TextStreamer
75
+
76
+ model_path = "solidrust/OpenCerebrum-1.0-7b-DPO-AWQ"
77
+ system_message = "You are Cerebrum, incarnated as a powerful AI."
78
+
79
+ # Load model
80
+ model = AutoAWQForCausalLM.from_quantized(model_path,
81
+ fuse_layers=True)
82
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
83
+ trust_remote_code=True)
84
+ streamer = TextStreamer(tokenizer,
85
+ skip_prompt=True,
86
+ skip_special_tokens=True)
87
+
88
+ # Convert prompt to tokens
89
+ prompt_template = """\
90
+ <|im_start|>system
91
+ {system_message}<|im_end|>
92
+ <|im_start|>user
93
+ {prompt}<|im_end|>
94
+ <|im_start|>assistant"""
95
+
96
+ prompt = "You're standing on the surface of the Earth. "\
97
+ "You walk one mile south, one mile west and one mile north. "\
98
+ "You end up exactly where you started. Where are you?"
99
+
100
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
101
+ return_tensors='pt').input_ids.cuda()
102
+
103
+ # Generate output
104
+ generation_output = model.generate(tokens,
105
+ streamer=streamer,
106
+ max_new_tokens=512)
107
+
108
+ ```
109
+
110
+ ### About AWQ
111
+
112
+ 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.
113
+
114
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
115
+
116
+ It is supported by:
117
+
118
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
119
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
120
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
121
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
122
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
123
+
124
+ ## Prompt template: ChatML
125
+
126
+ ```plaintext
127
+ <|im_start|>system
128
+ {system_message}<|im_end|>
129
+ <|im_start|>user
130
+ {prompt}<|im_end|>
131
+ <|im_start|>assistant
132
+ ```