Skip to content

Commit

Permalink
Clarify custom format example (#729)
Browse files Browse the repository at this point in the history
* Clarify custom prompt format

* Simplify format
  • Loading branch information
casper-hansen committed Oct 14, 2023
1 parent 3553172 commit e1b214c
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,25 +297,24 @@ Have dataset(s) in one of the following format (JSONL recommended):

#### How to add custom prompts

Using yaml. Example:
For a dataset that is preprocessed for instruction purposes:

```json
{"instruction": "...", "output": "..."}
```

You can use this example in your YAML config:

```yaml
datasets:
- path: repo
type:
system_prompt: ""
no_input_format: |-
User: {instruction}<|end_of_turn|>
Assistant:
format: |-
User: {instruction}
{input}<|end_of_turn|>
Assistant:
field_system: system
format: "[INST] {instruction} [/INST]"
no_input_format: "[INST] {instruction} [/INST]"
```

Using file:
1. Add your method to a file in [prompt_strategies](src/axolotl/prompt_strategies). Please see other files as example.
2. Use your custom file name as the dataset type `<prompt_strategies_file>.load_<load_fn>`.

#### How to use your custom pretokenized dataset

- Do not pass a `type:`
Expand Down

0 comments on commit e1b214c

Please sign in to comment.