GGUF
English
Indonesian
asyafiqe commited on
Commit
c55fff9
1 Parent(s): ac541a2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +188 -0
README.md CHANGED
@@ -1,3 +1,191 @@
1
  ---
 
2
  license: cc-by-nc-sa-4.0
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ inference: false
3
  license: cc-by-nc-sa-4.0
4
+ datasets:
5
+ - asyafiqe/orca_mini_v1_indonesia
6
+ language:
7
+ - en
8
+ - id
9
  ---
10
+ # 🦚Merak-7B-v3-Mini-Orca-GGUF🐳
11
+ <p align="center">
12
+ <img src="https://i.imgur.com/39sQd3h.png" alt="Merak Orca" width="300" height="300"/>
13
+ </p>
14
+
15
+ ## Description
16
+ These files are GGUF format model files for [Merak-7B-v3-Mini-Orca](https://huggingface.co/asyafiqe/Merak-7B-v3-Mini-Orca-Indo).
17
+
18
+ ### About GGUF
19
+
20
+ GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML, which is no longer supported by llama.cpp.
21
+
22
+ The key benefit of GGUF is that it is a extensible, future-proof format which stores more information about the model as metadata. It also includes significantly improved tokenization code, including for the first time full support for special tokens. This should improve performance, especially with models that use new special tokens and implement custom prompt templates.
23
+
24
+ Here are a list of clients and libraries that are known to support GGUF:
25
+ * [llama.cpp](https://github.com/ggerganov/llama.cpp).
26
+ * [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions.
27
+ * [KoboldCpp](https://github.com/LostRuins/koboldcpp), a fully featured web UI, with full GPU accel across multiple platforms and GPU architectures. Especially good for story telling.
28
+ * [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI with GPU acceleration on both Windows (NVidia and AMD), and macOS.
29
+ * [LoLLMS Web UI](https://github.com/ParisNeo/lollms-webui), a great web UI with many interesting and unique features, including a full model library for easy model selection.
30
+ * [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
31
+ * [llama-cpp-python](https://github.com/abetlen/llama-cpp-python), a Python library with GPU accel, LangChain support, and OpenAI-compatible API server.
32
+ * [candle](https://github.com/huggingface/candle), a Rust ML framework with a focus on performance, including GPU support, and ease of use.
33
+
34
+ ## Prompt template:
35
+
36
+ You can use [Vicuna 1.1](https://github.com/oobabooga/text-generation-webui/blob/main/instruction-templates/Vicuna-v1.1.yaml)
37
+ format for Ooobabooga's text generation webui.
38
+
39
+ ```
40
+ SYSTEM: Anda adalah asisten AI. Anda akan diberi tugas. Anda harus memberikan jawaban yang rinci dan panjang.
41
+ USER: <prompt> (without the <>)
42
+ ASSISTANT:
43
+ ```
44
+
45
+ ## Compatibility
46
+
47
+ These quantised GGUF files are compatible with llama.cpp from August 21st 2023 onwards, as of commit [6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9](https://github.com/ggerganov/llama.cpp/commit/6381d4e110bd0ec02843a60bbeb8b6fc37a9ace9)
48
+
49
+ They are now also compatible with many third party UIs and libraries - please see the list at the top of the README.
50
+
51
+ ## Explanation of quantisation methods
52
+ <details>
53
+ <summary>Click to see details</summary>
54
+
55
+ The new methods available are:
56
+ * GGML_TYPE_Q2_K - "type-1" 2-bit quantization in super-blocks containing 16 blocks, each block having 16 weight. Block scales and mins are quantized with 4 bits. This ends up effectively using 2.5625 bits per weight (bpw)
57
+ * GGML_TYPE_Q3_K - "type-0" 3-bit quantization in super-blocks containing 16 blocks, each block having 16 weights. Scales are quantized with 6 bits. This end up using 3.4375 bpw.
58
+ * GGML_TYPE_Q4_K - "type-1" 4-bit quantization in super-blocks containing 8 blocks, each block having 32 weights. Scales and mins are quantized with 6 bits. This ends up using 4.5 bpw.
59
+ * GGML_TYPE_Q5_K - "type-1" 5-bit quantization. Same super-block structure as GGML_TYPE_Q4_K resulting in 5.5 bpw
60
+ * GGML_TYPE_Q6_K - "type-0" 6-bit quantization. Super-blocks with 16 blocks, each block having 16 weights. Scales are quantized with 8 bits. This ends up using 6.5625 bpw
61
+
62
+ ## Provided files
63
+
64
+ | Name | Quant method | Bits | Use case |
65
+ | ---- | ---- | ---- | ---- | ---- | ----- |
66
+ | Merak-7B-v3-Mini-Orca-Indo.gguf | Q2_K | 2 | smallest, significant quality loss - not recommended for most purposes |
67
+ | Merak-7B-v3-Mini-Orca-Indo.q3_K_S.gguf | Q3_K_S | 3 | very small, high quality loss |
68
+ | Merak-7B-v3-Mini-Orca-Indo.q3_K_M.gguf | Q3_K_M | 3 | very small, high quality loss |
69
+ | Merak-7B-v3-Mini-Orca-Indo.q3_K_L.gguf | Q3_K_L | 3 | small, substantial quality loss |
70
+ | Merak-7B-v3-Mini-Orca-Indo.q4_0.gguf| Q4_0 | 4 | legacy; small, very high quality loss - prefer using Q3_K_M |
71
+ | Merak-7B-v3-Mini-Orca-Indo.q4_K_S.gguf| Q4_K_S | 4 | small, greater quality loss |
72
+ | Merak-7B-v3-Mini-Orca-Indo.q4_K_M.gguf | Q4_K_M | 4 | medium, balanced quality - recommended |
73
+ | Merak-7B-v3-Mini-Orca-Indo.q5_0.gguf | Q5_0 | 5 | legacy; medium, balanced quality - prefer using Q4_K_M |
74
+ | Merak-7B-v3-Mini-Orca-Indo.q5_K_S.gguf | Q5_K_S | large, low quality loss - recommended |
75
+ | Merak-7B-v3-Mini-Orca-Indo.q5_K_M.gguf | Q5_K_M | 5 | large, very low quality loss - recommended |
76
+ | Merak-7B-v3-Mini-Orca-Indo.q6_K.gguf| Q6_K | 6 | very large, extremely low quality loss |
77
+ | Merak-7B-v3-Mini-Orca-Indo.q8_0.gguf| Q8_0 | 8 | very large, extremely low quality loss - not recommended |
78
+
79
+ **Note**: the above RAM figures assume no GPU offloading. If layers are offloaded to the GPU, this will reduce RAM usage and use VRAM instead.
80
+
81
+ readme adapted from [TheBloke](https://huggingface.co/TheBloke)
82
+
83
+ ## How to run in `text-generation-webui`
84
+
85
+ Further instructions here: [text-generation-webui/docs/llama.cpp.md](https://github.com/oobabooga/text-generation-webui/blob/main/docs/llama.cpp.md).
86
+
87
+ # Original model card: 🦚Merak-7B-v3-Mini-Orca🐳
88
+
89
+ **Merak-7B-v3-Mini-Orca** is Ichsan2895's [Merak-7B-v3](https://huggingface.co/Ichsan2895/Merak-7B-v3) fine-tuned
90
+ on Bahasa Indonesia translated psmathur's [orca_mini_v1_dataset](https://huggingface.co/datasets/psmathur/orca_mini_v1_dataset).
91
+
92
+
93
+ ## Usage
94
+ This model fit on 16GB VRAM GPU (Google Collab T4 wil do), by using BitsandBytes it can run on 6GB VRAM GPU.
95
+
96
+ [![Open in Google Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/11xmPcRNirGwZcpgmNPNpUioJUG4PQBuh)
97
+
98
+ **Quantized** versions is available:
99
+
100
+ GPTQ: https://huggingface.co/asyafiqe/Merak-7B-v3-Mini-Orca-Indo-GPTQ
101
+
102
+ GGML/GGUF: I will try to make this version once GGUF merge is stable.
103
+
104
+
105
+
106
+ Start chatting with Merak Mini Orca using the following code snippet:
107
+ ```
108
+ import torch
109
+ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
110
+ tokenizer = AutoTokenizer.from_pretrained("asyafiqe/Merak-7B-v3-Mini-Orca-Indo")
111
+ model = AutoModelForCausalLM.from_pretrained("asyafiqe/Merak-7B-v3-Mini-Orca-Indo", torch_dtype=torch.float16, device_map="auto")
112
+
113
+ system_prompt = "SYSTEM: 'Anda adalah asisten AI. Anda akan diberi tugas. Anda harus menghasilkan jawaban yang rinci dan panjang.\n"
114
+
115
+ message = "Buatlah rencana untuk mengurangi penggunaan listrik di rumah."
116
+
117
+ prompt = f"{system_prompt}USER: {message}\nASSISTANT:"
118
+ inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
119
+ output = model.generate(**inputs, do_sample=True, temperature=0.1, max_new_tokens=200)
120
+
121
+ print(tokenizer.decode(output[0], skip_special_tokens=True))
122
+ ```
123
+
124
+ ### Prompt format
125
+ You can use [Vicuna 1.1](https://github.com/oobabooga/text-generation-webui/blob/main/instruction-templates/Vicuna-v1.1.yaml)
126
+ format for Ooobabooga's text generation webui.
127
+
128
+ ```
129
+ SYSTEM: Anda adalah asisten AI. Anda akan diberi tugas. Anda harus memberikan jawaban yang rinci dan panjang.
130
+ USER: <prompt> (without the <>)
131
+ ASSISTANT:
132
+ ```
133
+ ## Training details
134
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="150" height="24"/>](https://github.com/OpenAccess-AI-Collective/axolotl)
135
+
136
+ Merak-7B-v3-Mini-Orca was instruction fine-tuned on 2 x 3090-24GB for 6 hours. [LoRA](https://github.com/microsoft/LoRA), [DeepSpeed ZeRO-2](https://github.com/microsoft/DeepSpeed), and [FlashAttention](https://github.com/Dao-AILab/flash-attention) were implemented during training using [Axolotl](https://github.com/OpenAccess-AI-Collective/axolotl).
137
+ Hyperparameter | value |
138
+ | ------ | ------ |
139
+ learning rate | 0.0004 |
140
+ batch size | 16 |
141
+ microbatch size | 2 |
142
+ warmup step | 100 |
143
+ epochs | 2 |
144
+ weight decay | 0.0 |
145
+ lr scheduler | cosine |
146
+ lora alpha | 16 |
147
+ lora rank | 16 |
148
+ lora dropout | 0.05 |
149
+ lora target modules | q_proj, v_proj, k_proj, o_proj |
150
+ cutoff length | 4096 |
151
+ #### Training loss
152
+ Step |Train Loss |
153
+ | ------ | ------ |
154
+ 1 |0.9578 |
155
+ 100 |0.816 |
156
+ 200 |0.7819 |
157
+ 300 |0.7279 |
158
+ 400 |0.732 |
159
+ 500 |0.7139 |
160
+ 600 |0.6829 |
161
+ 700 |0.6641 |
162
+ 800 |0.6553 |
163
+
164
+ #### Limitations and bias
165
+ Llama 2 and fine-tuned variants are a new technology that carries risks with use. Testing conducted to date has been in English, and has not covered, nor could it cover all scenarios. For these reasons, as with all LLMs, Llama 2 and any fine-tuned varient's potential outputs cannot be predicted in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses to user prompts. Therefore, before deploying any applications of Llama 2 variants, developers should perform safety testing and tuning tailored to their specific applications of the model.
166
+
167
+ Please see the Responsible Use Guide available at https://ai.meta.com/llama/responsible-use-guide/
168
+
169
+ ## Citation
170
+ ```
171
+ @Paper{arXiv,
172
+ author = {Touvron, et al},
173
+ title = {Llama 2: Open Foundation and Fine-Tuned Chat Models},
174
+ journal = {arXiv preprint arXiv:2307.09288},
175
+ year = {2023}
176
+ }
177
+ @misc{orca_mini_v3_70b,
178
+ author = {Pankaj Mathur},
179
+ title = {orca_mini_v3_70b: An Orca Style Llama2-70b model},
180
+ year = {2023},
181
+ publisher = {HuggingFace},
182
+ journal = {HuggingFace repository},
183
+ howpublished = {\url{https://https://huggingface.co/psmathur/orca_mini_v3_70b},
184
+ }
185
+ @article{hu2021lora,
186
+ title={LoRA: Low-Rank Adaptation of Large Language Models},
187
+ author={Hu, Edward J. and Shen, Yelong and Wallis, Phillip and Allen-Zhu, Zeyuan and Li, Yuanzhi and Wang, Shean and Chen, Weizhu},
188
+ journal={CoRR},
189
+ year={2021}
190
+ }
191
+ ```