maddes8cht commited on
Commit
02a9f70
1 Parent(s): 8db1734

"Update README.md"

Browse files
Files changed (1) hide show
  1. README.md +213 -0
README.md ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - de
6
+ - es
7
+ - fr
8
+ tags:
9
+ - sft
10
+ pipeline_tag: text-generation
11
+ widget:
12
+ - text: >-
13
+ <|prompter|>What is a meme, and what's the history behind this
14
+ word?<|endoftext|><|assistant|>
15
+ - text: <|prompter|>What's the Earth total population<|endoftext|><|assistant|>
16
+ - text: >-
17
+ <|prompter|>Write a story about future of AI
18
+ development<|endoftext|><|assistant|>
19
+ datasets:
20
+ - OpenAssistant/oasst1
21
+ ---
22
+ [![banner](https://maddes8cht.github.io/assets/buttons/Huggingface-banner.jpg)]()
23
+
24
+ I'm constantly enhancing these model descriptions to provide you with the most relevant and comprehensive information
25
+
26
+ # falcon-7b-sft-mix-2000 - GGUF
27
+ - Model creator: [OpenAssistant](https://huggingface.co/OpenAssistant)
28
+ - Original model: [falcon-7b-sft-mix-2000](https://huggingface.co/OpenAssistant/falcon-7b-sft-mix-2000)
29
+
30
+ # K-Quants in Falcon 7b models
31
+
32
+ New releases of Llama.cpp now support K-quantization for previously incompatible models, in particular all Falcon 7B models (While Falcon 40b is and always has been fully compatible with K-Quantisation). This is achieved by employing a fallback solution for model layers that cannot be quantized with real K-quants.
33
+
34
+ For Falcon 7B models, although only a quarter of the layers can be quantized with true K-quants, this approach still benefits from utilizing *different* legacy quantization types Q4_0, Q4_1, Q5_0, and Q5_1. As a result, it offers better quality at the same file size or smaller file sizes with comparable performance.
35
+
36
+ So this solution ensures improved performance and efficiency over legacy Q4_0, Q4_1, Q5_0 and Q5_1 Quantizations.
37
+
38
+
39
+
40
+
41
+
42
+ # About GGUF format
43
+
44
+ `gguf` is the current file format used by the [`ggml`](https://github.com/ggerganov/ggml) library.
45
+ A growing list of Software is using it and can therefore use this model.
46
+ The core project making use of the ggml library is the [llama.cpp](https://github.com/ggerganov/llama.cpp) project by Georgi Gerganov
47
+
48
+ # Quantization variants
49
+
50
+ There is a bunch of quantized files available to cater to your specific needs. Here's how to choose the best option for you:
51
+
52
+ # Legacy quants
53
+
54
+ Q4_0, Q4_1, Q5_0, Q5_1 and Q8 are `legacy` quantization types.
55
+ Nevertheless, they are fully supported, as there are several circumstances that cause certain model not to be compatible with the modern K-quants.
56
+ ## Note:
57
+ Now there's a new option to use K-quants even for previously 'incompatible' models, although this involves some fallback solution that makes them not *real* K-quants. More details can be found in affected model descriptions.
58
+ (This mainly refers to Falcon 7b and Starcoder models)
59
+
60
+ # K-quants
61
+
62
+ K-quants are designed with the idea that different levels of quantization in specific parts of the model can optimize performance, file size, and memory load.
63
+ So, if possible, use K-quants.
64
+ With a Q6_K, you'll likely find it challenging to discern a quality difference from the original model - ask your model two times the same question and you may encounter bigger quality differences.
65
+
66
+
67
+
68
+
69
+ ---
70
+
71
+ # Original Model Card:
72
+ # Open-Assistant Falcon 7B SFT MIX Model
73
+
74
+ This model is a fine-tuning of TII's [Falcon 7B](https://huggingface.co/tiiuae/falcon-7b) LLM.
75
+ It was trained on a mixture of OASST top-2 threads (exported on June 2, 2023), Dolly-15k and synthetic instruction datasets (see dataset configuration below).
76
+
77
+ ## Model Details
78
+
79
+ - **Finetuned from:** [tiiuae/falcon-7b](https://huggingface.co/tiiuae/falcon-7b)
80
+ - **Model type:** Causal decoder-only transformer language model
81
+ - **Language:** English, German, Spanish, French (and limited capabilities in Italian, Portuguese, Polish, Dutch, Romanian, Czech, Swedish);
82
+ - **Weights & Biases:** [Training log](https://wandb.ai/open-assistant/public-sft/runs/tlevhltw) (Checkpoint: 2000 steps, ~2.9 epochs)
83
+ - **Demo:** [Continuations for 250 random prompts](https://open-assistant.github.io/oasst-model-eval/?f=https%3A%2F%2Fraw.githubusercontent.com%2FOpen-Assistant%2Foasst-model-eval%2Fmain%2Fsampling_reports%2Fchat-gpt%2F2023-04-11_gpt-3.5-turbo_lottery.json%0Ahttps%3A%2F%2Fraw.githubusercontent.com%2FOpen-Assistant%2Foasst-model-eval%2Fmain%2Fsampling_reports%2Foasst-sft%2F2023-06-05_OpenAssistant_falcon-7b-sft-mix-2000_sampling_noprefix2.json)
84
+ - **License:** Apache 2.0
85
+ - **Contact:** [Open-Assistant Discord](https://ykilcher.com/open-assistant-discord)
86
+
87
+
88
+ ## Prompting
89
+
90
+ Two special tokens are used to mark the beginning of user and assistant turns:
91
+ `<|prompter|>` and `<|assistant|>`. Each turn ends with a `<|endoftext|>` token.
92
+
93
+ Input prompt example:
94
+ ```
95
+ <|prompter|>What is a meme, and what's the history behind this word?<|endoftext|><|assistant|>
96
+ ```
97
+ The input ends with the `<|assistant|>` token to signal that the model should
98
+ start generating the assistant reply.
99
+
100
+
101
+ ## Sample Code
102
+
103
+ ```python
104
+ from transformers import AutoTokenizer
105
+ import transformers
106
+ import torch
107
+
108
+ model = "OpenAssistant/falcon-7b-sft-mix-2000"
109
+
110
+ tokenizer = AutoTokenizer.from_pretrained(model)
111
+ pipeline = transformers.pipeline(
112
+ "text-generation",
113
+ model=model,
114
+ tokenizer=tokenizer,
115
+ torch_dtype=torch.bfloat16,
116
+ trust_remote_code=True,
117
+ device_map="auto",
118
+ )
119
+
120
+ input_text="<|prompter|>What is a meme, and what's the history behind this word?<|endoftext|><|assistant|>"
121
+
122
+ sequences = pipeline(
123
+ input_text,
124
+ max_length=500,
125
+ do_sample=True,
126
+ return_full_text=False,
127
+ top_k=10,
128
+ num_return_sequences=1,
129
+ eos_token_id=tokenizer.eos_token_id,
130
+ )
131
+ for seq in sequences:
132
+ print(f"Result: {seq['generated_text']}")
133
+ ```
134
+
135
+
136
+ ## Configuration Details
137
+
138
+ Model:
139
+ ```
140
+ falcon-7b:
141
+ dtype: bf16
142
+ log_dir: "falcon_log_7b"
143
+ learning_rate: 1e-5
144
+ model_name: "tiiuae/falcon-7b"
145
+ deepspeed_config: configs/zero_config.json
146
+ output_dir: falcon
147
+ weight_decay: 0.0
148
+ max_length: 2048
149
+ warmup_steps: 20
150
+ gradient_checkpointing: true
151
+ gradient_accumulation_steps: 4
152
+ per_device_train_batch_size: 4
153
+ per_device_eval_batch_size: 8
154
+ eval_steps: 100
155
+ save_steps: 500
156
+ save_strategy: steps
157
+ num_train_epochs: 8
158
+ save_total_limit: 4
159
+ residual_dropout: 0.2
160
+ residual_dropout_lima: true
161
+ ```
162
+
163
+ Dataset:
164
+ ```
165
+ sft9-stage2:
166
+ # oasst_export: 100.00% (29899)
167
+ # vicuna: 50.00% (16963)
168
+ # code_alpaca: 50.00% (9510)
169
+ # oa_wiki_qa_bart_10000row: 100.00% (9434)
170
+ # grade_school_math_instructions: 100.00% (8351)
171
+ # dolly15k: 100.00% (14250)
172
+
173
+ use_custom_sampler: true
174
+ datasets:
175
+ - oasst_export:
176
+ lang: "bg,ca,cs,da,de,en,es,fr,hr,hu,it,nl,pl,pt,ro,ru,sl,sr,sv,uk" # sft-8.0
177
+ input_file_path: 2023-06-02_oasst_all_labels.jsonl.gz
178
+ val_split: 0.05
179
+ top_k: 2
180
+ - vicuna:
181
+ fraction: 0.5
182
+ val_split: 0.025
183
+ max_val_set: 250
184
+ - code_alpaca:
185
+ fraction: 0.5
186
+ val_split: 0.05
187
+ max_val_set: 250
188
+ - oa_wiki_qa_bart_10000row:
189
+ val_split: 0.05
190
+ max_val_set: 250
191
+ - grade_school_math_instructions:
192
+ val_split: 0.05
193
+ - dolly15k:
194
+ val_split: 0.05
195
+ max_val_set: 300
196
+ ```
197
+
198
+ ***End of original Model File***
199
+ ---
200
+
201
+
202
+ ## Please consider to support my work
203
+ **Coming Soon:** I'm in the process of launching a sponsorship/crowdfunding campaign for my work. I'm evaluating Kickstarter, Patreon, or the new GitHub Sponsors platform, and I am hoping for some support and contribution to the continued availability of these kind of models. Your support will enable me to provide even more valuable resources and maintain the models you rely on. Your patience and ongoing support are greatly appreciated as I work to make this page an even more valuable resource for the community.
204
+
205
+ <center>
206
+
207
+ [![GitHub](https://maddes8cht.github.io/assets/buttons/github-io-button.png)](https://maddes8cht.github.io)
208
+ [![Stack Exchange](https://stackexchange.com/users/flair/26485911.png)](https://stackexchange.com/users/26485911)
209
+ [![GitHub](https://maddes8cht.github.io/assets/buttons/github-button.png)](https://github.com/maddes8cht)
210
+ [![HuggingFace](https://maddes8cht.github.io/assets/buttons/huggingface-button.png)](https://huggingface.co/maddes8cht)
211
+ [![Twitter](https://maddes8cht.github.io/assets/buttons/twitter-button.png)](https://twitter.com/maddes1966)
212
+
213
+ </center>