Clarify custom format example (#729)
* Clarify custom prompt format * Simplify format
This commit is contained in:
23
README.md
23
README.md
@@ -297,25 +297,24 @@ Have dataset(s) in one of the following format (JSONL recommended):
|
|||||||
|
|
||||||
#### How to add custom prompts
|
#### 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
|
```yaml
|
||||||
datasets:
|
datasets:
|
||||||
- path: repo
|
- path: repo
|
||||||
type:
|
type:
|
||||||
system_prompt: ""
|
system_prompt: ""
|
||||||
no_input_format: |-
|
field_system: system
|
||||||
User: {instruction}<|end_of_turn|>
|
format: "[INST] {instruction} [/INST]"
|
||||||
Assistant:
|
no_input_format: "[INST] {instruction} [/INST]"
|
||||||
format: |-
|
|
||||||
User: {instruction}
|
|
||||||
{input}<|end_of_turn|>
|
|
||||||
Assistant:
|
|
||||||
```
|
```
|
||||||
|
|
||||||
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
|
#### How to use your custom pretokenized dataset
|
||||||
|
|
||||||
- Do not pass a `type:`
|
- Do not pass a `type:`
|
||||||
|
|||||||
Reference in New Issue
Block a user