adowu commited on
Commit
209735d
1 Parent(s): 6aa3ed7

Create .env.local

Browse files
Files changed (1) hide show
  1. .env.local +246 -0
.env.local ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # template used in production for HuggingChat.
2
+
3
+ MODELS=`[
4
+ {
5
+ "name" : "mistralai/Mixtral-8x7B-Instruct-v0.1",
6
+ "description" : "The latest MoE model from Mistral AI! 8x7B and outperforms Llama 2 70B in most benchmarks.",
7
+ "websiteUrl" : "https://mistral.ai/news/mixtral-of-experts/",
8
+ "preprompt" : "",
9
+ "chatPromptTemplate": "<s> {{#each messages}}{{#ifUser}}[INST]{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}} {{content}} [/INST]{{/ifUser}}{{#ifAssistant}} {{content}}</s> {{/ifAssistant}}{{/each}}",
10
+ "parameters" : {
11
+ "temperature" : 0.6,
12
+ "top_p" : 0.95,
13
+ "repetition_penalty" : 1.2,
14
+ "top_k" : 50,
15
+ "truncate" : 24576,
16
+ "max_new_tokens" : 8192,
17
+ "stop" : ["</s>"]
18
+ },
19
+ "promptExamples" : [
20
+ {
21
+ "title": "Write an email from bullet list",
22
+ "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
23
+ }, {
24
+ "title": "Code a snake game",
25
+ "prompt": "Code a basic snake game in python, give explanations for each step."
26
+ }, {
27
+ "title": "Assist in a task",
28
+ "prompt": "How do I make a delicious lemon cheesecake?"
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "name": "meta-llama/Llama-2-70b-chat-hf",
34
+ "description": "The latest and biggest model from Meta, fine-tuned for chat.",
35
+ "websiteUrl": "https://ai.meta.com/llama/",
36
+ "preprompt": " ",
37
+ "chatPromptTemplate" : "<s>[INST] <<SYS>>\n{{preprompt}}\n<</SYS>>\n\n{{#each messages}}{{#ifUser}}{{content}} [/INST] {{/ifUser}}{{#ifAssistant}}{{content}} </s><s>[INST] {{/ifAssistant}}{{/each}}",
38
+ "promptExamples": [
39
+ {
40
+ "title": "Write an email from bullet list",
41
+ "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
42
+ }, {
43
+ "title": "Code a snake game",
44
+ "prompt": "Code a basic snake game in python, give explanations for each step."
45
+ }, {
46
+ "title": "Assist in a task",
47
+ "prompt": "How do I make a delicious lemon cheesecake?"
48
+ }
49
+ ],
50
+ "parameters": {
51
+ "temperature": 0.1,
52
+ "top_p": 0.95,
53
+ "repetition_penalty": 1.2,
54
+ "top_k": 50,
55
+ "truncate": 3072,
56
+ "max_new_tokens": 1024,
57
+ "stop" : ["</s>", "</s><s>[INST]"]
58
+ }
59
+ },
60
+ {
61
+ "name" : "NousResearch/Nous-Hermes-2-Mixtral-8x7B-DPO",
62
+ "description" : "Nous Hermes 2 Mixtral 8x7B DPO is the new flagship Nous Research model trained over the Mixtral 8x7B MoE LLM.",
63
+ "websiteUrl" : "https://nousresearch.com/",
64
+ "chatPromptTemplate" : "{{#if @root.preprompt}}<|im_start|>system\n{{@root.preprompt}}<|im_end|>\n{{/if}}{{#each messages}}{{#ifUser}}<|im_start|>user\n{{content}}<|im_end|>\n<|im_start|>assistant\n{{/ifUser}}{{#ifAssistant}}{{content}}<|im_end|>\n{{/ifAssistant}}{{/each}}",
65
+ "promptExamples": [
66
+ {
67
+ "title": "Write an email from bullet list",
68
+ "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
69
+ }, {
70
+ "title": "Code a snake game",
71
+ "prompt": "Code a basic snake game in python, give explanations for each step."
72
+ }, {
73
+ "title": "Assist in a task",
74
+ "prompt": "How do I make a delicious lemon cheesecake?"
75
+ }
76
+ ],
77
+ "parameters": {
78
+ "temperature": 0.7,
79
+ "top_p": 0.95,
80
+ "repetition_penalty": 1,
81
+ "top_k": 50,
82
+ "truncate": 24576,
83
+ "max_new_tokens": 2048,
84
+ "stop": ["<|im_end|>"]
85
+ }
86
+ },
87
+ {
88
+ "name": "codellama/CodeLlama-70b-Instruct-hf",
89
+ "displayName": "codellama/CodeLlama-70b-Instruct-hf",
90
+ "description": "Code Llama, a state of the art code model from Meta. Now in 70B!",
91
+ "websiteUrl": "https://ai.meta.com/blog/code-llama-large-language-model-coding/",
92
+ "preprompt": "",
93
+ "chatPromptTemplate" : "<s>{{#if @root.preprompt}}Source: system\n\n {{@root.preprompt}} <step> {{/if}}{{#each messages}}{{#ifUser}}Source: user\n\n {{content}} <step> {{/ifUser}}{{#ifAssistant}}Source: assistant\n\n {{content}} <step> {{/ifAssistant}}{{/each}}Source: assistant\nDestination: user\n\n ",
94
+ "promptExamples": [
95
+ {
96
+ "title": "Fibonacci in Python",
97
+ "prompt": "Write a python function to calculate the nth fibonacci number."
98
+ }, {
99
+ "title": "JavaScript promises",
100
+ "prompt": "How can I wait for multiple JavaScript promises to fulfill before doing something with their values?"
101
+ }, {
102
+ "title": "Rust filesystem",
103
+ "prompt": "How can I load a file from disk in Rust?"
104
+ }
105
+ ],
106
+ "parameters": {
107
+ "temperature": 0.1,
108
+ "top_p": 0.95,
109
+ "repetition_penalty": 1.2,
110
+ "top_k": 50,
111
+ "truncate": 4096,
112
+ "max_new_tokens": 4096,
113
+ "stop": ["<step>", " <step>", " <step> "],
114
+ }
115
+ },
116
+ {
117
+ "name": "mistralai/Mistral-7B-Instruct-v0.1",
118
+ "displayName": "mistralai/Mistral-7B-Instruct-v0.1",
119
+ "description": "Mistral 7B is a new Apache 2.0 model, released by Mistral AI that outperforms Llama2 13B in benchmarks.",
120
+ "websiteUrl": "https://mistral.ai/news/announcing-mistral-7b/",
121
+ "preprompt": "",
122
+ "chatPromptTemplate" : "<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}",
123
+ "parameters": {
124
+ "temperature": 0.1,
125
+ "top_p": 0.95,
126
+ "repetition_penalty": 1.2,
127
+ "top_k": 50,
128
+ "truncate": 3072,
129
+ "max_new_tokens": 1024,
130
+ "stop": ["</s>"]
131
+ },
132
+ "promptExamples": [
133
+ {
134
+ "title": "Write an email from bullet list",
135
+ "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
136
+ }, {
137
+ "title": "Code a snake game",
138
+ "prompt": "Code a basic snake game in python, give explanations for each step."
139
+ }, {
140
+ "title": "Assist in a task",
141
+ "prompt": "How do I make a delicious lemon cheesecake?"
142
+ }
143
+ ],
144
+ "unlisted": true
145
+ },
146
+ {
147
+ "name": "mistralai/Mistral-7B-Instruct-v0.2",
148
+ "displayName": "mistralai/Mistral-7B-Instruct-v0.2",
149
+ "description": "Mistral 7B is a new Apache 2.0 model, released by Mistral AI that outperforms Llama2 13B in benchmarks.",
150
+ "websiteUrl": "https://mistral.ai/news/announcing-mistral-7b/",
151
+ "preprompt": "",
152
+ "chatPromptTemplate" : "<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}",
153
+ "parameters": {
154
+ "temperature": 0.3,
155
+ "top_p": 0.95,
156
+ "repetition_penalty": 1.2,
157
+ "top_k": 50,
158
+ "truncate": 3072,
159
+ "max_new_tokens": 1024,
160
+ "stop": ["</s>"]
161
+ },
162
+ "promptExamples": [
163
+ {
164
+ "title": "Write an email from bullet list",
165
+ "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
166
+ }, {
167
+ "title": "Code a snake game",
168
+ "prompt": "Code a basic snake game in python, give explanations for each step."
169
+ }, {
170
+ "title": "Assist in a task",
171
+ "prompt": "How do I make a delicious lemon cheesecake?"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ "name": "openchat/openchat-3.5-0106",
177
+ "displayName": "openchat/openchat-3.5-0106",
178
+ "description": "OpenChat 3.5 is the #1 model on MT-Bench, with only 7B parameters.",
179
+ "websiteUrl": "https://huggingface.co/openchat/openchat-3.5-0106",
180
+ "preprompt": "",
181
+ "chatPromptTemplate" : "<s>{{#each messages}}{{#ifUser}}GPT4 Correct User: {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}}{{content}}<|end_of_turn|>GPT4 Correct Assistant:{{/ifUser}}{{#ifAssistant}}{{content}}<|end_of_turn|>{{/ifAssistant}}{{/each}}",
182
+ "parameters": {
183
+ "temperature": 0.6,
184
+ "top_p": 0.95,
185
+ "repetition_penalty": 1.2,
186
+ "top_k": 50,
187
+ "truncate": 6016,
188
+ "max_new_tokens": 2048,
189
+ "stop": ["<|end_of_turn|>"]
190
+ },
191
+ "promptExamples": [
192
+ {
193
+ "title": "Write an email from bullet list",
194
+ "prompt": "As a restaurant owner, write a professional email to the supplier to get these products every week: \n\n- Wine (x10)\n- Eggs (x24)\n- Bread (x12)"
195
+ }, {
196
+ "title": "Code a snake game",
197
+ "prompt": "Code a basic snake game in python, give explanations for each step."
198
+ }, {
199
+ "title": "Assist in a task",
200
+ "prompt": "How do I make a delicious lemon cheesecake?"
201
+ }
202
+ ]
203
+ }
204
+ ]`
205
+
206
+ OLD_MODELS=`[
207
+ {"name":"bigcode/starcoder"},
208
+ {"name":"OpenAssistant/oasst-sft-6-llama-30b-xor"},
209
+ {"name":"HuggingFaceH4/zephyr-7b-alpha"},
210
+ {"name":"openchat/openchat_3.5"},
211
+ {"name":"openchat/openchat-3.5-1210"},
212
+ {"name": "tiiuae/falcon-180B-chat"},
213
+ {"name": "codellama/CodeLlama-34b-Instruct-hf"}
214
+ ]`
215
+
216
+ TASK_MODEL='mistralai/Mistral-7B-Instruct-v0.1'
217
+
218
+ APP_BASE="/ch"
219
+ PUBLIC_ORIGIN=https://huggingface.co
220
+ PUBLIC_SHARE_PREFIX=https://hf.co/chat
221
+ PUBLIC_ANNOUNCEMENT_BANNERS=`[]`
222
+
223
+ PUBLIC_APP_NAME=HuggingChat
224
+ PUBLIC_APP_ASSETS=huggingchat
225
+ PUBLIC_APP_COLOR=yellow
226
+ PUBLIC_APP_DESCRIPTION="Making the community's best AI chat models available to everyone."
227
+ PUBLIC_APP_DISCLAIMER_MESSAGE="Disclaimer: AI is an area of active research with known problems such as biased generation and misinformation. Do not use this application for high-stakes decisions or advice."
228
+ PUBLIC_APP_DATA_SHARING=1
229
+ PUBLIC_APP_DISCLAIMER=1
230
+
231
+ RATE_LIMIT=16
232
+ MESSAGES_BEFORE_LOGIN=5# how many messages a user can send in a conversation before having to login. set to 0 to force login right away
233
+
234
+ PUBLIC_GOOGLE_ANALYTICS_ID=G-8Q63TH4CSL
235
+ PUBLIC_PLAUSIBLE_SCRIPT_URL="/js/script.js"
236
+
237
+ # Not part of the .env but set as other variables in the space
238
+ # ADDRESS_HEADER=X-Forwarded-For
239
+ # XFF_DEPTH=2
240
+
241
+ ENABLE_ASSISTANTS=true
242
+ EXPOSE_API=true
243
+
244
+ ALTERNATIVE_REDIRECT_URLS=`[
245
+ huggingchat://login/callback
246
+ ]`