zhengr commited on
Commit
787f61b
·
verified ·
1 Parent(s): 69b9280

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -1
README.md CHANGED
@@ -11,4 +11,47 @@ MixTAO-7Bx2-MoE-Instruct is a Mixure of Experts (MoE).
11
  ## 💻 Usage
12
 
13
  ### text-generation-webui - Model Tab
14
- ![Model Tab](https://huggingface.co/zhengr/text-generation-webui/resolve/main/text-generation-webui-003.png "Model Tab")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ## 💻 Usage
12
 
13
  ### text-generation-webui - Model Tab
14
+ ![Model Tab](https://huggingface.co/zhengr/text-generation-webui/resolve/main/text-generation-webui-003.png "Model Tab")
15
+
16
+ ### Chat template
17
+ ```
18
+ {%- for message in messages %}
19
+ {%- if message['role'] == 'system' -%}
20
+ {{- message['content'] + '\n\n' -}}
21
+ {%- else -%}
22
+ {%- if message['role'] == 'user' -%}
23
+ {{- name1 + ': ' + message['content'] + '\n'-}}
24
+ {%- else -%}
25
+ {{- name2 + ': ' + message['content'] + '\n' -}}
26
+ {%- endif -%}
27
+ {%- endif -%}
28
+ {%- endfor -%}
29
+ ```
30
+
31
+ ### Instruction template :Alpaca
32
+ #### Change this according to the model/LoRA that you are using. Used in instruct and chat-instruct modes.
33
+ ```
34
+ {%- set ns = namespace(found=false) -%}
35
+ {%- for message in messages -%}
36
+ {%- if message['role'] == 'system' -%}
37
+ {%- set ns.found = true -%}
38
+ {%- endif -%}
39
+ {%- endfor -%}
40
+ {%- if not ns.found -%}
41
+ {{- '' + 'Below is an instruction that describes a task. Write a response that appropriately completes the request.' + '\n\n' -}}
42
+ {%- endif %}
43
+ {%- for message in messages %}
44
+ {%- if message['role'] == 'system' -%}
45
+ {{- '' + message['content'] + '\n\n' -}}
46
+ {%- else -%}
47
+ {%- if message['role'] == 'user' -%}
48
+ {{-'### Instruction:\n' + message['content'] + '\n\n'-}}
49
+ {%- else -%}
50
+ {{-'### Response:\n' + message['content'] + '\n\n' -}}
51
+ {%- endif -%}
52
+ {%- endif -%}
53
+ {%- endfor -%}
54
+ {%- if add_generation_prompt -%}
55
+ {{-'### Response:\n'-}}
56
+ {%- endif -%}
57
+ ```