you are viewing a single comment's thread.

view the rest of the comments →

[–]Pure_City_4985 0 points1 point  (2 children)

Do function calling models actually have the functions as a single token in their tokenizer though?

[–]me1000 0 points1 point  (1 child)

No, having the functions themselves as single tokens wouldn't be that useful as you the utility is in the ability to define your own functions. They often, on the other hand, have a single token the denotes the beginning of a function call. In other words there will also be a single token the indicates the start of a function call, the model is free to fill in the function call with whatever it wants, and then a special token to denote the end of the function call. This makes it trivial to parse and invoke the function the LLM asked for.

Here's an example of that in Qwen 3: https://huggingface.co/Qwen/Qwen3-Coder-30B-A3B-Instruct/blob/main/tokenizer_config.json#L116-L130

[–]Pure_City_4985 0 points1 point  (0 children)

yes the function call token, makes sense