Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify custom format example #729

Merged
merged 2 commits into from
Oct 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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