| Post Reply | RetroFed Forum Forum Index » Qwen |
| Author | Message | ||
|---|---|---|---|
maria ~
lemmy.blahaj.zone
Smorty@lemmy.blahaj.zoneJoined: 2023-07-05 |
yes, thats right! i know that all yall ai-haters can't wait for me to stop posting about this absolutely overblown subject of tool-call parsers and --- I ALSO CANT WAIT. its not even that interesting. ANYWAY! u know what's sucks for LMs to generate?... tool calls. they hate it. But! u know what doest feel like a tool call but actually is one? think about it. its something u have likely already used plenty times yourself. its! - - - drumroll The Slash Command!wowie zowie how have i missed this one. now oooobviously basic slash commands would only suffice for very basic calls like
or
~(skills~ ~rule)~ but like - pffff this gets exhausting quick when writing larger stuff, like files!
yea this sucks. No human would want to write this to do stuff. lets spread out those args, and pull the idea from my last post (about multiline-strings as codeblocks) /write
now looks at this! ~ 🥁 ~ ~ absolute bliss! ~ ~ ~oh what a shock!! :o watch where u walk! >o< what an awesome song. anyway- and best of all: we are saving TWO TOLENS (!!!) compared to my last format per tool call:
compared to:
do u see it? thats TWO (2!!!!) TOKENS freeing up infron of our eyes:
yes, we are saving two tokens per tool call. looking at YOU, opencode, which puts 16k tokens JUST for the system prompt! >:( why dies this work? wellll-
absolute insanity. here a sys prompt to make an LM work with the format
thats enough for basic tool usage with todays models. yes, even with 4B ones. 487 characters long, tokenizes to 118 tokens (when converting the triple ` strings to actual code blocks). it works! makes the LM generate the calls correctly, even with banter as a prefix.... to keep itself on-course. horray we solved climate change /s oh well, time to actually implement this stuff tho.... its not difficult, but when ya want stable partial-tool-call-parsing, its a bit annoying. UPDATE: wowie writing string parsers is difficult. |
||
| -1 Original | |||
|
Another Catgirl
lemmy.blahaj.zone
anothercatgirl@lemmy.blahaj.zone Joined: 2023-06-15 |
yeah I agree, string parsers need to be redefined for like every usecase of them, there is no standard is there? |
||
| 1 | |||
maria ~
Moderator
Smorty@lemmy.blahaj.zoneJoined: 2023-07-05 |
yeah I agree, string parsers need to be redefined for like every usecase of them, there is no standard is there?
naw, there are plenty standards: jsoooon (Writing json inside some tags) { "tool": "name of the tool", "args": { "frist_arg_name: value, ... } }aaaand xml, which is the most frequently used (but also most tone-heavy) value here another valuethose are two two standards right now. |
||
| 1 | |||
|
Another Catgirl
lemmy.blahaj.zone
anothercatgirl@lemmy.blahaj.zone Joined: 2023-06-15 |
wait a second, did you just reinvent Polish Notation? |
||
| 1 | |||
maria ~
Moderator
Smorty@lemmy.blahaj.zoneJoined: 2023-07-05 |
wait a second, did you just reinvent Polish Notation?
hmmm..I looked into it and honestly dont see many similarities. I gave up on constructing... my own tool call pipeline, since most LMs already come with one built in. only problem is that its craaaaazy verbose and eats up at least like 70 tokens per tool definition. but its reliable... kinda. model has been trained to call tools this way. so.... thats how its meant to be iguess. |
||
| 2 | |||
| Post Reply |
Back to top |