diff --git a/berkeley-function-call-leaderboard/README.md b/berkeley-function-call-leaderboard/README.md index b2f3616ad..a8de89eea 100644 --- a/berkeley-function-call-leaderboard/README.md +++ b/berkeley-function-call-leaderboard/README.md @@ -254,6 +254,7 @@ Some companies have proposed some optimization strategies in their models' handl ## Changelog +* [Sept 7, 2024] [#626](https://github.com/ShishirPatil/gorilla/pull/626): Fix prompt format for Llama models. * [Sept 4, 2024] [#623](https://github.com/ShishirPatil/gorilla/pull/623): Fix decoding issue in the `NvidiaHandler`; remove duplicate `ArcticHandler` class. * [August 29, 2024] [#616](https://github.com/ShishirPatil/gorilla/pull/6160): Add the following new models to the leaderboard: * `Salesforce/xLAM-7b-r` diff --git a/berkeley-function-call-leaderboard/bfcl/model_handler/llama_handler.py b/berkeley-function-call-leaderboard/bfcl/model_handler/llama_handler.py index 3bdb08600..7f3834d8f 100644 --- a/berkeley-function-call-leaderboard/bfcl/model_handler/llama_handler.py +++ b/berkeley-function-call-leaderboard/bfcl/model_handler/llama_handler.py @@ -11,9 +11,9 @@ def _format_prompt(prompts, function, test_category): formatted_prompt = "<|begin_of_text|>" for prompt in prompts: - formatted_prompt += f"<|start_header_id|>{prompt['role']}<|end_header_id|>{prompt['content']}<|eot_id|>" + formatted_prompt += f"<|start_header_id|>{prompt['role']}<|end_header_id|>\n\n{prompt['content']}<|eot_id|>" - formatted_prompt += f"<|start_header_id|>assistant<|end_header_id|>" + formatted_prompt += f"<|start_header_id|>assistant<|end_header_id|>\n\n" return formatted_prompt