Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

.env.template 9.2 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
  1. # template used in production for HuggingChat.
  2. MODELS=`[
  3. {
  4. "name" : "mistralai/Mixtral-8x7B-Instruct-v0.1",
  5. "description" : "The latest MoE model from Mistral AI! 8x7B and outperforms Llama 2 70B in most benchmarks.",
  6. "websiteUrl" : "https://mistral.ai/news/mixtral-of-experts/",
  7. "preprompt" : "",
  8. "chatPromptTemplate": "<s> {{#each messages}}{{#ifUser}}[INST]{{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}} {{content}} [/INST]{{/ifUser}}{{#ifAssistant}} {{content}}</s> {{/ifAssistant}}{{/each}}",
  9. "parameters" : {
  10. "temperature" : 0.6,
  11. "top_p" : 0.95,
  12. "repetition_penalty" : 1.2,
  13. "top_k" : 50,
  14. "truncate" : 24576,
  15. "max_new_tokens" : 8192,
  16. "stop" : ["</s>"]
  17. },
  18. "promptExamples" : [
  19. {
  20. "title": "Write an email from bullet list",
  21. "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)"
  22. }, {
  23. "title": "Code a snake game",
  24. "prompt": "Code a basic snake game in python, give explanations for each step."
  25. }, {
  26. "title": "Assist in a task",
  27. "prompt": "How do I make a delicious lemon cheesecake?"
  28. }
  29. ]
  30. },
  31. {
  32. "name": "meta-llama/Llama-2-70b-chat-hf",
  33. "description": "The latest and biggest model from Meta, fine-tuned for chat.",
  34. "websiteUrl": "https://ai.meta.com/llama/",
  35. "userMessageToken": "",
  36. "userMessageEndToken": " [/INST] ",
  37. "assistantMessageToken": "",
  38. "assistantMessageEndToken": " </s><s>[INST] ",
  39. "preprompt": " ",
  40. "chatPromptTemplate" : "<s>[INST] <<SYS>>\n{{preprompt}}\n<</SYS>>\n\n{{#each messages}}{{#ifUser}}{{content}} [/INST] {{/ifUser}}{{#ifAssistant}}{{content}} </s><s>[INST] {{/ifAssistant}}{{/each}}",
  41. "promptExamples": [
  42. {
  43. "title": "Write an email from bullet list",
  44. "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)"
  45. }, {
  46. "title": "Code a snake game",
  47. "prompt": "Code a basic snake game in python, give explanations for each step."
  48. }, {
  49. "title": "Assist in a task",
  50. "prompt": "How do I make a delicious lemon cheesecake?"
  51. }
  52. ],
  53. "parameters": {
  54. "temperature": 0.1,
  55. "top_p": 0.95,
  56. "repetition_penalty": 1.2,
  57. "top_k": 50,
  58. "truncate": 3072,
  59. "max_new_tokens": 1024
  60. }
  61. },
  62. {
  63. "name": "codellama/CodeLlama-34b-Instruct-hf",
  64. "displayName": "codellama/CodeLlama-34b-Instruct-hf",
  65. "description": "Code Llama, a state of the art code model from Meta.",
  66. "websiteUrl": "https://about.fb.com/news/2023/08/code-llama-ai-for-coding/",
  67. "userMessageToken": "",
  68. "userMessageEndToken": " [/INST] ",
  69. "assistantMessageToken": "",
  70. "assistantMessageEndToken": " </s><s>[INST] ",
  71. "preprompt": " ",
  72. "chatPromptTemplate" : "<s>[INST] <<SYS>>\n{{preprompt}}\n<</SYS>>\n\n{{#each messages}}{{#ifUser}}{{content}} [/INST] {{/ifUser}}{{#ifAssistant}}{{content}} </s><s>[INST] {{/ifAssistant}}{{/each}}",
  73. "promptExamples": [
  74. {
  75. "title": "Fibonacci in Python",
  76. "prompt": "Write a python function to calculate the nth fibonacci number."
  77. }, {
  78. "title": "JavaScript promises",
  79. "prompt": "How can I wait for multiple JavaScript promises to fulfill before doing something with their values?"
  80. }, {
  81. "title": "Rust filesystem",
  82. "prompt": "How can I load a file from disk in Rust?"
  83. }
  84. ],
  85. "parameters": {
  86. "temperature": 0.1,
  87. "top_p": 0.95,
  88. "repetition_penalty": 1.2,
  89. "top_k": 50,
  90. "truncate": 4096,
  91. "max_new_tokens": 4096
  92. }
  93. },
  94. {
  95. "name": "mistralai/Mistral-7B-Instruct-v0.1",
  96. "displayName": "mistralai/Mistral-7B-Instruct-v0.1",
  97. "description": "Mistral 7B is a new Apache 2.0 model, released by Mistral AI that outperforms Llama2 13B in benchmarks.",
  98. "websiteUrl": "https://mistral.ai/news/announcing-mistral-7b/",
  99. "preprompt": "",
  100. "chatPromptTemplate" : "<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}",
  101. "parameters": {
  102. "temperature": 0.1,
  103. "top_p": 0.95,
  104. "repetition_penalty": 1.2,
  105. "top_k": 50,
  106. "truncate": 3072,
  107. "max_new_tokens": 1024,
  108. "stop": ["</s>"]
  109. },
  110. "promptExamples": [
  111. {
  112. "title": "Write an email from bullet list",
  113. "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)"
  114. }, {
  115. "title": "Code a snake game",
  116. "prompt": "Code a basic snake game in python, give explanations for each step."
  117. }, {
  118. "title": "Assist in a task",
  119. "prompt": "How do I make a delicious lemon cheesecake?"
  120. }
  121. ],
  122. "unlisted": true
  123. },
  124. {
  125. "name": "mistralai/Mistral-7B-Instruct-v0.2",
  126. "displayName": "mistralai/Mistral-7B-Instruct-v0.2",
  127. "description": "Mistral 7B is a new Apache 2.0 model, released by Mistral AI that outperforms Llama2 13B in benchmarks.",
  128. "websiteUrl": "https://mistral.ai/news/announcing-mistral-7b/",
  129. "preprompt": "",
  130. "chatPromptTemplate" : "<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}",
  131. "parameters": {
  132. "temperature": 0.3,
  133. "top_p": 0.95,
  134. "repetition_penalty": 1.2,
  135. "top_k": 50,
  136. "truncate": 3072,
  137. "max_new_tokens": 1024,
  138. "stop": ["</s>"]
  139. },
  140. "promptExamples": [
  141. {
  142. "title": "Write an email from bullet list",
  143. "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)"
  144. }, {
  145. "title": "Code a snake game",
  146. "prompt": "Code a basic snake game in python, give explanations for each step."
  147. }, {
  148. "title": "Assist in a task",
  149. "prompt": "How do I make a delicious lemon cheesecake?"
  150. }
  151. ]
  152. },
  153. {
  154. "name": "openchat/openchat-3.5-0106",
  155. "displayName": "openchat/openchat-3.5-0106",
  156. "description": "OpenChat 3.5 is the #1 model on MT-Bench, with only 7B parameters.",
  157. "websiteUrl": "https://huggingface.co/openchat/openchat-3.5-0106",
  158. "preprompt": "",
  159. "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}}",
  160. "parameters": {
  161. "temperature": 0.6,
  162. "top_p": 0.95,
  163. "repetition_penalty": 1.2,
  164. "top_k": 50,
  165. "truncate": 6016,
  166. "max_new_tokens": 2048,
  167. "stop": ["<|end_of_turn|>"]
  168. },
  169. "promptExamples": [
  170. {
  171. "title": "Write an email from bullet list",
  172. "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)"
  173. }, {
  174. "title": "Code a snake game",
  175. "prompt": "Code a basic snake game in python, give explanations for each step."
  176. }, {
  177. "title": "Assist in a task",
  178. "prompt": "How do I make a delicious lemon cheesecake?"
  179. }
  180. ]
  181. }
  182. ]`
  183. OLD_MODELS=`[
  184. {"name":"bigcode/starcoder"},
  185. {"name":"OpenAssistant/oasst-sft-6-llama-30b-xor"},
  186. {"name":"HuggingFaceH4/zephyr-7b-alpha"},
  187. {"name":"openchat/openchat_3.5"},
  188. {"name":"openchat/openchat-3.5-1210"},
  189. {"name": "tiiuae/falcon-180B-chat"}
  190. ]`
  191. TASK_MODEL='mistralai/Mistral-7B-Instruct-v0.2'
  192. # TASK_MODEL=`{
  193. # "name": "mistralai/Mistral-7B-Instruct-v0.2",
  194. # "chatPromptTemplate" : "<s>{{#each messages}}{{#ifUser}}[INST] {{#if @first}}{{#if @root.preprompt}}{{@root.preprompt}}\n{{/if}}{{/if}}{{content}} [/INST]{{/ifUser}}{{#ifAssistant}}{{content}}</s>{{/ifAssistant}}{{/each}}",
  195. # "parameters": {
  196. # "temperature": 0.1,
  197. # "top_p": 0.95,
  198. # "repetition_penalty": 1.2,
  199. # "top_k": 50,
  200. # "truncate": 3072,
  201. # "max_new_tokens": 1024,
  202. # "stop": ["</s>"]
  203. # }}`
  204. APP_BASE="/chat"
  205. PUBLIC_ORIGIN=https://huggingface.co
  206. PUBLIC_SHARE_PREFIX=https://hf.co/chat
  207. PUBLIC_ANNOUNCEMENT_BANNERS=`[]`
  208. PUBLIC_APP_NAME=HuggingChat
  209. PUBLIC_APP_ASSETS=huggingchat
  210. PUBLIC_APP_COLOR=yellow
  211. PUBLIC_APP_DESCRIPTION="Making the community's best AI chat models available to everyone."
  212. PUBLIC_APP_DATA_SHARING=1
  213. PUBLIC_APP_DISCLAIMER=1
  214. RATE_LIMIT=16
  215. 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
  216. PUBLIC_GOOGLE_ANALYTICS_ID=G-8Q63TH4CSL
  217. # Not part of the .env but set as other variables in the space
  218. # ADDRESS_HEADER=X-Forwarded-For
  219. # XFF_DEPTH=2
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...