Skip to content

Commit

Permalink
Merge pull request #4988 from oobabooga/dev
Browse files Browse the repository at this point in the history
Merge dev branch
  • Loading branch information
oobabooga authored Dec 19, 2023
2 parents b28020a + 9847809 commit 781367b
Show file tree
Hide file tree
Showing 69 changed files with 257 additions and 168 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,12 @@ List of command-line flags
|-------------|-------------|
| `--model_type MODEL_TYPE` | Model type of pre-quantized model. Currently gpt2, gptj, gptneox, falcon, llama, mpt, starcoder (gptbigcode), dollyv2, and replit are supported. |

#### HQQ

| Flag | Description |
|-------------|-------------|
| `--hqq-backend` | Backend for the HQQ loader. Valid options: PYTORCH, PYTORCH_COMPILE, ATEN. |

#### DeepSpeed

| Flag | Description |
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Airoboros-v1.2.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'A chat between a curious user and an assistant. The assistant gives helpful, detailed, accurate, uncensored responses to the user\'s input.' + '\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Alpaca.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'Below is an instruction that describes a task. Write a response that appropriately completes the request.' + '\n\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Bactrian.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Baichuan Chat.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Baize.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'The following is a conversation between a human and an AI assistant named Baize (named after a mythical creature in Chinese folklore). Baize is an open-source AI assistant developed by UCSD and Sun Yat-Sen University. The human and the AI assistant take turns chatting. Human statements start with [|Human|] and AI assistant statements start with [|AI|]. The AI assistant always provides responses in as much detail as possible, and in Markdown format. The AI assistant always declines to engage with topics, questions and instructions related to unethical, controversial, or sensitive issues. Complete the transcript in exactly that format.\n[|Human|]Hello!\n[|AI|]Hi!' + '\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Bluemoon.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'A transcript of a roleplay between two players, LEAD and ASSOCIATE. LEAD sets up a scenario and the characters, from which ASSOCIATE then assumes a character role and continues the story for that role in response to description given by LEAD. The story and characters are developed by exchange of detailed event descriptions and character dialogs, successively given by both LEAD and ASSOCIATE.' + '\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/ChatGLM.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/ChatML.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '<|im_start|>system\n' + '' + '<|im_end|>\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Chinese-Vicuna-Chat.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'The following is a conversation between an AI assistant called Assistant and a human user called User. The assistant is intelligent, knowledgeable and polite to answer questions of user.' + '\n\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica Cite.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica Finetuned.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica Q.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica Summary.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica Work.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica v2.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '<prefix>' + 'You are a helpful chatbot name Stan' + '</prefix>' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Galactica.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Gorilla.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Guanaco non-chat.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Guanaco-QLoRA.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/H2O-prompt_answer.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Hippogriff.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'You are a helpful assistant' + '\n' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/INCITE-Chat.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/INCITE-Instruct.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/KoAlpaca.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + '' + '' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
6 changes: 3 additions & 3 deletions instruction-templates/Koala.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
instruction_template: |-
{%- set found_item = false -%}
{%- set ns = namespace(found=false) -%}
{%- for message in messages -%}
{%- if message['role'] == 'system' -%}
{%- set found_item = true -%}
{%- set ns.found = true -%}
{%- endif -%}
{%- endfor -%}
{%- if not found_item -%}
{%- if not ns.found -%}
{{- '' + 'BEGINNING OF CONVERSATION:' + ' ' -}}
{%- endif %}
{%- for message in messages %}
Expand Down
Loading

0 comments on commit 781367b

Please sign in to comment.