cognitivecomputations / OpenChatML

144 stars 10 forks source link

Proposals: Dedicated tag for each role, Tag start/end in regex style #6

Open SamuelTallet opened 4 months ago

SamuelTallet commented 4 months ago

Hello community,

  1. How about indicating the speaker role with a dedicated tag?
  2. And we could also use the regex symbols ^ and $ to respectively mark the start and the end of each tag.

A mix between semantic and compactness. For example:

<^chat^>
<^user^>Eric
What is 17 * 34?
<$user$>
<^assistant^>
<^thought^>To multiply 17 by 34, we can break it down:
17 * 34 = 17 * (30 + 4)
        = (17 * 30) + (17 * 4)
        = 510 + 68
        = 578
<$thought$>
17 * 34 = 578.
<$assistant$>
<$chat$>

Pros:

  1. The role and the optional name of the speaker take up little space while remaining relatively explicit.
  2. Say, when we click on assistant in a code editor, we can clearly see the start and the end of the tag.

Cons: (your turn 😄)

WolframRavenwolf commented 4 months ago

As far as I know, you can't add properties to tags, as they're special tokens and atomic. So <^user name= would be one token and ^> another, surrounding a string that the model would be tuned to consider the character/user name.

I'm not a fan of the regex-like style with ^ and $ for multiple reasons, like ligatures commonly available for <| |> and ^ being a dead key on my keyboards, making the original style more appealing and compatible.

SamuelTallet commented 4 months ago

you can't add properties to tags, as they're special tokens and atomic.

@StefanDanielSchwarz I think you are right, I've just updated my proposal from <^user name=Eric^> to <^user^>Eric. Thanks for your feedback!