RichardErkhov commited on
Commit
8052a17
1 Parent(s): 2aec33a

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +196 -0
README.md ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ AmberChat - GGUF
11
+ - Model creator: https://huggingface.co/LLM360/
12
+ - Original model: https://huggingface.co/LLM360/AmberChat/
13
+
14
+
15
+ | Name | Quant method | Size |
16
+ | ---- | ---- | ---- |
17
+ | [AmberChat.Q2_K.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q2_K.gguf) | Q2_K | 2.36GB |
18
+ | [AmberChat.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.IQ3_XS.gguf) | IQ3_XS | 2.6GB |
19
+ | [AmberChat.IQ3_S.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.IQ3_S.gguf) | IQ3_S | 2.75GB |
20
+ | [AmberChat.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q3_K_S.gguf) | Q3_K_S | 2.75GB |
21
+ | [AmberChat.IQ3_M.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.IQ3_M.gguf) | IQ3_M | 2.9GB |
22
+ | [AmberChat.Q3_K.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q3_K.gguf) | Q3_K | 3.07GB |
23
+ | [AmberChat.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q3_K_M.gguf) | Q3_K_M | 3.07GB |
24
+ | [AmberChat.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q3_K_L.gguf) | Q3_K_L | 3.35GB |
25
+ | [AmberChat.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.IQ4_XS.gguf) | IQ4_XS | 3.4GB |
26
+ | [AmberChat.Q4_0.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q4_0.gguf) | Q4_0 | 3.56GB |
27
+ | [AmberChat.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.IQ4_NL.gguf) | IQ4_NL | 1.23GB |
28
+ | [AmberChat.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q4_K_S.gguf) | Q4_K_S | 3.59GB |
29
+ | [AmberChat.Q4_K.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q4_K.gguf) | Q4_K | 3.8GB |
30
+ | [AmberChat.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q4_K_M.gguf) | Q4_K_M | 3.8GB |
31
+ | [AmberChat.Q4_1.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q4_1.gguf) | Q4_1 | 3.95GB |
32
+ | [AmberChat.Q5_0.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q5_0.gguf) | Q5_0 | 4.33GB |
33
+ | [AmberChat.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q5_K_S.gguf) | Q5_K_S | 1.64GB |
34
+ | [AmberChat.Q5_K.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q5_K.gguf) | Q5_K | 4.45GB |
35
+ | [AmberChat.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q5_K_M.gguf) | Q5_K_M | 4.45GB |
36
+ | [AmberChat.Q5_1.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q5_1.gguf) | Q5_1 | 4.72GB |
37
+ | [AmberChat.Q6_K.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q6_K.gguf) | Q6_K | 5.15GB |
38
+ | [AmberChat.Q8_0.gguf](https://huggingface.co/RichardErkhov/LLM360_-_AmberChat-gguf/blob/main/AmberChat.Q8_0.gguf) | Q8_0 | 6.67GB |
39
+
40
+
41
+
42
+
43
+ Original model description:
44
+ ---
45
+ license: apache-2.0
46
+ datasets:
47
+ - WizardLM/WizardLM_evol_instruct_V2_196k
48
+ - icybee/share_gpt_90k_v1
49
+ language:
50
+ - en
51
+ widget:
52
+ - example_title: "example 1"
53
+ text: "How do I mount a tv to drywall safely?"
54
+ output:
55
+ text: "Mounting a TV to drywall safely is crucial to ensure the longevity of your TV and the wall. Here's a step-by-step guide on how to do it safely:\n 1. Choose the right mount: Choose a mount that is compatible with your TV and the wall. Make sure the mount is rated for drywall and not just wood or concrete.\n 2. Prepare the wall: Before mounting the TV, make sure the wall is clean and free from any debris or paint. Use a stud finder to locate the studs in the wall.\n 3. Install the mount: Follow the manufacturer's instructions for mounting the TV to the wall. Use appropriate hardware and tools to secure the mount to the wall.\n 4. Level the TV: Level the TV on the mount using a spirit level or a leveling kit provided by the mount manufacturer.\n 5. Attach the TV to the mount: Attach the TV to the mount using the appropriate hardware and tools. Tighten the bolts and screws to ensure the TV is securely attached.\n 6. Connect the cables: Connect the TV cables to the appropriate ports on the back of the TV and the mount.\n 7. Test the mount: Test the mount to ensure it's secure and stable. Adjust the mount as needed to ensure the TV is level and secure.\n Mounting a TV to drywall safely is crucial to avoid damaging the wall or the TV. Follow these steps carefully and use appropriate tools and hardware to ensure a secure and stable installation."
56
+ - example_title: "example 2"
57
+ text: "Happy is to sad as calm is to _."
58
+ output:
59
+ text: "The adjective that can be used to describe the opposite of calm is \"anxious\" or \"stressed.\" So, from happy to sad, we can say that happy is to sad as calm is to anxious or stressed."
60
+ library_name: transformers
61
+ pipeline_tag: text-generation
62
+ tags:
63
+ - nlp
64
+ - llm
65
+ ---
66
+ # AmberChat
67
+
68
+
69
+ We present AmberChat, an instruction following model finetuned from [LLM360/Amber](https://huggingface.co/LLM360/Amber).
70
+
71
+ # Evaluation
72
+
73
+ | Model | MT-Bench |
74
+ |------------------------------------------------------|------------------------------------------------------------|
75
+ | **LLM360/AmberChat** | **5.428125** |
76
+ | [LLM360/Amber](https://huggingface.co/LLM360/Amber) | 2.48750 |
77
+ | [Falcon-40B-Instruct](https://huggingface.co/tiiuae/falcon-40b-instruct) | 5.17 |
78
+ | [MPT-7B-Chat](https://huggingface.co/mosaicml/mpt-7b-chat) | 5.42 |
79
+ | [Nous-Hermes-13B](https://huggingface.co/NousResearch/Nous-Hermes-13b) | 5.51 |
80
+
81
+ ## Model Description
82
+
83
+ - **Model type:** Language model with the same architecture as LLaMA-7B
84
+ - **Language(s) (NLP):** English
85
+ - **License:** Apache 2.0
86
+ - **Resources for more information:**
87
+ - [Metrics](https://github.com/LLM360/Analysis360)
88
+ - [Fully processed Amber pretraining data](https://huggingface.co/datasets/LLM360/AmberDatasets)
89
+ - [Finetuning Code](https://github.com/LLM360/amber-train/tree/main/finetune/amberchat)
90
+
91
+
92
+ # Loading AmberChat
93
+
94
+ ```python
95
+ import torch
96
+ from transformers import LlamaTokenizer, LlamaForCausalLM
97
+
98
+ tokenizer = LlamaTokenizer.from_pretrained("LLM360/AmberChat")
99
+ model = LlamaForCausalLM.from_pretrained("LLM360/AmberChat")
100
+
101
+ #template adapated from fastchat
102
+ template= "A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions.\n### Human: Got any creative ideas for a 10 year old’s birthday?\n### Assistant: Of course! Here are some creative ideas for a 10-year-old's birthday party:\n1. Treasure Hunt: Organize a treasure hunt in your backyard or nearby park. Create clues and riddles for the kids to solve, leading them to hidden treasures and surprises.\n2. Science Party: Plan a science-themed party where kids can engage in fun and interactive experiments. You can set up different stations with activities like making slime, erupting volcanoes, or creating simple chemical reactions.\n3. Outdoor Movie Night: Set up a backyard movie night with a projector and a large screen or white sheet. Create a cozy seating area with blankets and pillows, and serve popcorn and snacks while the kids enjoy a favorite movie under the stars.\n4. DIY Crafts Party: Arrange a craft party where kids can unleash their creativity. Provide a variety of craft supplies like beads, paints, and fabrics, and let them create their own unique masterpieces to take home as party favors.\n5. Sports Olympics: Host a mini Olympics event with various sports and games. Set up different stations for activities like sack races, relay races, basketball shooting, and obstacle courses. Give out medals or certificates to the participants.\n6. Cooking Party: Have a cooking-themed party where the kids can prepare their own mini pizzas, cupcakes, or cookies. Provide toppings, frosting, and decorating supplies, and let them get hands-on in the kitchen.\n7. Superhero Training Camp: Create a superhero-themed party where the kids can engage in fun training activities. Set up an obstacle course, have them design their own superhero capes or masks, and organize superhero-themed games and challenges.\n8. Outdoor Adventure: Plan an outdoor adventure party at a local park or nature reserve. Arrange activities like hiking, nature scavenger hunts, or a picnic with games. Encourage exploration and appreciation for the outdoors.\nRemember to tailor the activities to the birthday child's interests and preferences. Have a great celebration!\n### Human: {prompt}\n### Assistant:"
103
+
104
+ prompt = "How do I mount a tv to drywall safely?"
105
+
106
+ input_str = template.format(prompt=prompt)
107
+ input_ids = tokenizer(input_str, return_tensors="pt").input_ids
108
+ outputs = model.generate(input_ids, max_length=1000)
109
+ print(tokenizer.batch_decode(outputs[:, input_ids.shape[1]:-1])[0].strip())
110
+ ```
111
+
112
+ Alternatively, you may use [FastChat](https://github.com/lm-sys/FastChat):
113
+ ```bash
114
+ python3 -m fastchat.serve.cli --model-path LLM360/AmberChat
115
+ ```
116
+
117
+ # AmberChat Finetuning Details
118
+
119
+ ## DataMix
120
+ | Subset | Number of rows | License |
121
+ | ----------- | ----------- | ----------- |
122
+ | WizardLM/WizardLM_evol_instruct_V2_196k | 143k | |
123
+ | icybee/share_gpt_90k_v1 | 90k | cc0-1.0 |
124
+ | Total | 233k | |
125
+
126
+ ## Hyperparameters
127
+ | Hyperparameter | Value |
128
+ | ----------- | ----------- |
129
+ | Total Parameters | 6.7B |
130
+ | Hidden Size | 4096 |
131
+ | Intermediate Size (MLPs) | 11008 |
132
+ | Number of Attention Heads | 32 |
133
+ | Number of Hidden Lyaers | 32 |
134
+ | RMSNorm ɛ | 1e^-6 |
135
+ | Max Seq Length | 2048 |
136
+ | Vocab Size | 32000 |
137
+
138
+ | Training Hyperparameter | Value |
139
+ | ----------- | ----------- |
140
+ | learning_rate | 2e-5 |
141
+ | num_train_epochs | 3 |
142
+ | per_device_train_batch_size | 2 |
143
+ | gradient_accumulation_steps | 16 |
144
+ | warmup_ratio | 0.04 |
145
+ | model_max_length | 2048 |
146
+
147
+
148
+
149
+ # Using Quantized Models with Ollama
150
+
151
+ Please follow these steps to use a quantized version of AmberChat on your personal computer or laptop:
152
+
153
+ 1. First, install Ollama by following the instructions provided [here](https://github.com/jmorganca/ollama/tree/main?tab=readme-ov-file#ollama). Next, download a quantized model checkpoint (such as [amberchat.Q8_0.gguf](https://huggingface.co/TheBloke/AmberChat-GGUF/blob/main/amberchat.Q8_0.gguf) for the 8 bit version) from [TheBloke/AmberChat-GGUF](https://huggingface.co/TheBloke/AmberChat-GGUF/tree/main). Create an Ollama Modelfile locally using the template provided below:
154
+ ```
155
+ FROM amberchat.Q8_0.gguf
156
+
157
+ TEMPLATE """{{ .System }}
158
+ USER: {{ .Prompt }}
159
+ ASSISTANT:
160
+ """
161
+ SYSTEM """A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.
162
+ """
163
+ PARAMETER stop "USER:"
164
+ PARAMETER stop "ASSISTANT:"
165
+ PARAMETER repeat_last_n 0
166
+ PARAMETER num_ctx 2048
167
+ PARAMETER seed 0
168
+ PARAMETER num_predict -1
169
+ ```
170
+ Ensure that the FROM directive points to the downloaded checkpoint file.
171
+
172
+ 2. Now, you can proceed to build the model by running:
173
+ ```bash
174
+ ollama create amberchat -f Modelfile
175
+ ```
176
+ 3. To run the model from the command line, execute the following:
177
+ ```bash
178
+ ollama run amberchat
179
+ ```
180
+ You need to build the model once and can just run it afterwards.
181
+
182
+ # Citation
183
+
184
+ **BibTeX:**
185
+
186
+ ```bibtex
187
+ @misc{liu2023llm360,
188
+ title={LLM360: Towards Fully Transparent Open-Source LLMs},
189
+ author={Zhengzhong Liu and Aurick Qiao and Willie Neiswanger and Hongyi Wang and Bowen Tan and Tianhua Tao and Junbo Li and Yuqi Wang and Suqi Sun and Omkar Pangarkar and Richard Fan and Yi Gu and Victor Miller and Yonghao Zhuang and Guowei He and Haonan Li and Fajri Koto and Liping Tang and Nikhil Ranjan and Zhiqiang Shen and Xuguang Ren and Roberto Iriondo and Cun Mu and Zhiting Hu and Mark Schulze and Preslav Nakov and Tim Baldwin and Eric P. Xing},
190
+ year={2023},
191
+ eprint={2312.06550},
192
+ archivePrefix={arXiv},
193
+ primaryClass={cs.CL}
194
+ }
195
+ ```
196
+