Skip to content

Commit 025fa91

Browse files
committed
ChatOn:User Begin+Prefix note update, keep things simple consistent
1 parent bcc8420 commit 025fa91

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

common/chaton.hpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
*
1010
* 1. Use a json file to configure the needed tags for each of the supported chat-handshake-template-standard
1111
* a. system -> prefix & suffix,
12-
* b. user -> prefix & suffix, assistant -> prefix
13-
* * [main] these override the in-prefix and in-suffix
12+
* b. user -> begin, prefix & suffix; assistant -> prefix
13+
* * [main] these override the in-prefix (begin+prefix) and in-suffix
1414
* c. reverse-prompt
1515
* * [main] this adds to any reverese-prompt specified using cmdline
1616
* d. global -> begin & end
17-
* d. systemuser-1st-user-has-prefix
18-
* * if a combination of system and user messages/prompts is passed,
17+
* e. systemuser-1st-user-has-begin and systemuser-1st-user-has-prefix
18+
* * [chaton-tmpl-apply] if a combination of system and user messages/prompts is passed,
1919
* then for the 1st user message following the 1st system message,
20-
* include user prefix only if this flag is set. [chaton-tmpl-apply]
21-
* * [later] one or two models which I looked at seem to require not just BoS, but also the user-role-prefix-tag
22-
* to also be controlled wrt this case. So not differentiating between BoS and any user-role-prefix-tag.
23-
* However if bos and user-role-prefix-tag need to be decoupled, where only bos needs this treatment,
24-
* then maybe add begin and end keys (to specify the BoS) in addition to prefix and suffix keys (to specify user-role-prefix-tag), to role blocks in the json.
25-
* and inturn control only begin and not prefix, wrt whether to add or not.
20+
* include user begin and prefix only if corresponding flags is set.
21+
* * begin should normally relate to BoS while prefix should relate to Role Identifier tag.
22+
* If there is no need for seperate handling of BoS and RoleIdTag, then one could even
23+
* set both BoS and RoleIdTag to one of these entries itself.
24+
*
2625
* 2. [main] currently the user specified system prompt (-p + -f) is tagged using system role tags,
2726
* and inturn this tagged message is tokenized with parse_special flag.
2827
* So any special token related tags in the user specified system prompt will get parsed as special.
28+
*
2929
* 3. chaton-tmpl-apply uses the json file, which was loaded, to decide on how to generate the tagged messages for tokenisation.
3030
* a. input: [ { role, message }, { role, message}, ....]
3131
* b. output: currently a single string is returned which contains the tagged message(s).

0 commit comments

Comments
 (0)