Skip to content

Whats the difference between input prefix / suffix (inp_pfx/inp_sfx) and line prefix / suffix (line_pfx/line_sfx)? #3691

Answered by KerfuffleV2
danemadsen asked this question in Q&A
Discussion options

You must be logged in to vote

Trying to understand the logic in main? Good luck!

inp_pfx and inp_sfx are (as far as I know) only used when instruct mode is turned on.

// prefix & suffix for instruct mode
const auto inp_pfx = ::llama_tokenize(ctx, "\n\n### Instruction:\n\n", add_bos, true);
const auto inp_sfx = ::llama_tokenize(ctx, "\n\n### Response:\n\n", false, true);

The values are hardcoded to the old Alpaca format.

On the other hand, line_prefix and line_suffix seem to come from the user specified parameters (on the commandline --in-prefix, --in-suffix)

c…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by danemadsen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants