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

Clarify custom format example #729

merged 2 commits into from
Oct 14, 2023

Conversation

casper-hansen
Copy link
Collaborator

The current README seems a bit unclear on specifying a custom prompt format. In this PR, I modify the example to show a common scenario where you want a generation pair of prompt/completion.

I get rid of the YAML formatting of |- as it can quickly lead to unexpected behavior. One should just use a string, although it looks less fancy, it will be easier to ensure correctness.

    type:
      system_prompt: ""
      field_system: system
      format: "[INST] {instruction} [/INST]"
      no_input_format: "[INST] {instruction} [/INST]"

There are other more complicated formats that I choose to omit as you are better off using something that is not error-prone, especially when you are already using a custom dataset. Here is one example with Alpaca instruct, perhaps this can be included somewhere else in the docs:

    type:
      system_prompt: ""
      field_system: system
      format: "\n### Instruction: \n{instruction}\n### Output: \n"
      no_input_format: "\n### Instruction: \n{instruction}\n### Output: \n"

Copy link
Collaborator

@winglian winglian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@winglian winglian merged commit e1b214c into axolotl-ai-cloud:main Oct 14, 2023
mkeoliya pushed a commit to mkeoliya/axolotl that referenced this pull request Dec 15, 2023
* Clarify custom prompt format

* Simplify format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants