-
Notifications
You must be signed in to change notification settings - Fork 7
Question about Hammer-2.1-7b chat template #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Additionally, I'd like to ask: I noticed that the Model Card mentions "better multi-turn" capabilities, but the current training data, custom chat template, and the LlamaFactory training format used ({ "instruction": content, "input": "", "output": label}) don't seem to support multi-turn function calling? (Indeed, using Qwen2.5's own chat template would have made it easier to train for multi-turn function calling) |
|
Regarding why we didn't use Qwen - 2.5's own chat template for fine - tuning, when we were training Hammer 1.0, we found that attempting to switch to Qwen's own tool calls prompt didn't bring any benefits. Therefore, we didn't continue with that approach. |
For Hammer 2.1, we have used some multi turn data mixing training, and we will also open source this data in the future |
sorry, I misunderstood. Currently, it does not support calling the built-in parse directly, but you can use json.loads() to complete the parsing directly |
And the current custom chat template supports multi-turn function calling. |
Oh I see, so the data_processing file should also be updated accordingly to use tokenizer.apply_chat_template(), right? Also, was multi-turn function calling also fine-tuned using llama_factory? If so, it probably no longer uses the Alpaca data format as Hammer 2.0 did, right? |
Currently, we are only leveraging data processing files to augment single-turn data. Looking ahead, we'll also take into account the application of these files for multi-turn scenarios. Our multi-turn function calling is fine-tuned with the Llama_factory. Initially, we had planned to conduct training based on the ShareGPT format. However, during the process, we discovered that Llama_factory appears to restrict even-numbered roles to be assistant. Given that the potential data might encompass diverse roles, we ultimately opted to train using the Alpaca data format, with the sole modification being made to the template. |
Sorry, what I meant to say was that the template in data_processing.py is not exactly the same as the one in chat_template - for example, the template in data_processing.py doesn't include roles. Shouldn't we construct the fine-tuning data based on chat_template + tokenizer.apply_chat_template()? |
You're right. Constructing fine-tuning data based on chat_template + tokenizer.apply_chat_template() is indeed a great approach. |
Ok, thanks, looking forward to the updated data_processing logic and vllm tool parser support~ |
Congratulations on your new progress with Hammer-2.1! I have a question: I noticed that when using vllm serve, the tool call parser being used is
hermes
, but your training data uses a custom tool output format. How does the hermes XML template implement the parsing?Additionally, I noticed that you modified the chat template of Qwen-2.5-coder-7B. I'm curious why you didn't directly use Qwen-2.5's own chat template for training (which already supports tool calls and appropriate Hermes output format)? Are there any additional considerations behind this decision?
The text was updated successfully, but these errors were encountered: