-
Notifications
You must be signed in to change notification settings - Fork 921
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
Fix nit in LoRA doc #1054
Fix nit in LoRA doc #1054
Conversation
hi @awni , According to OpenAI's official documentation, this may not be a bug, as For details, see: https://platform.openai.com/docs/guides/fine-tuning/fine-tuning-examples |
Yes it is true that it should be like that according to the openai docs, but MLX does not fine-tune well if you adhere to that... |
If you check the chat_temlpate configuration in the meta-llama/Llama-3.1-8B-Instruct repository, you may find that the reason could be the requirement for the function return format, which is inconsistent with the OpenAI format. Llama-3.1-8B-Instruct requires a dictionary to be returned.
So if you return according to the document's format, some issues may arise (the format in the base model is inconsistent with the fine-tuning data format). When I reviewed the HuggingFace chat_template document again, I found it also highlighted this part:
When I checked the mistral-finetune project again, I found that its data usage is consistent with the OpenAI format. So I think there might not be a strictly correct format here. The key point is to ensure that the format of your fine-tuning dataset needs to be consistent with the base model's format, otherwise problems will arise. I think this part can be explained in the documentation. |
I think the right call for this is to leave a pointer in the doc that the data format that works well for tool calling can be different for different models and linking to the page about tool use in HG chat templates that you found @madroidmaq. Thanks for digging into that. I will update the doc and leave the current example as is. |
Very tiny fix, closes #1053