You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.9 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. # HumanEval Benchmark
  2. This scenario implements a modified version of the [HumanEval](https://arxiv.org/abs/2107.03374) benchmark.
  3. Compared to the original benchmark, there are **two key differences** here:
  4. - A chat model rather than a completion model is used.
  5. - The agents get pass/fail feedback about their implementations, and can keep trying until they succeed or run out of tokens or turns.
  6. ## Running the tasks
  7. Navigate to HumanEval
  8. ```bash
  9. cd benchmarks/HumanEval
  10. ```
  11. Create a file called ENV.json with the following (required) contents (If you're using MagenticOne)
  12. ```json
  13. {
  14. "CHAT_COMPLETION_KWARGS_JSON": "{\"api_version\": \"2024-02-15-preview\", \"azure_endpoint\": \"YOUR_ENDPOINT/\", \"model_capabilities\": {\"function_calling\": true, \"json_output\": true, \"vision\": true}, \"azure_ad_token_provider\": \"DEFAULT\", \"model\": \"gpt-4o-2024-05-13\"}",
  15. "CHAT_COMPLETION_PROVIDER": "azure"
  16. }
  17. ```
  18. You can also use the openai client by replacing the last two entries in the ENV file by:
  19. - `CHAT_COMPLETION_PROVIDER='openai'`
  20. - `CHAT_COMPLETION_KWARGS_JSON` with the following JSON structure:
  21. ```json
  22. {
  23. "api_key": "REPLACE_WITH_YOUR_API",
  24. "model": "gpt-4o-2024-05-13"
  25. }
  26. ```
  27. Now initialize the tasks.
  28. ```bash
  29. python Scripts/init_tasks.py
  30. ```
  31. Note: This will attempt to download HumanEval
  32. Then run `Scripts/init_tasks.py` again.
  33. Once the script completes, you should now see a folder in your current directory called `Tasks` that contains one JSONL file per template in `Templates`.
  34. Now to run a specific subset of HumanEval use:
  35. ```bash
  36. agbench run Tasks/human_eval_MagenticOne.jsonl
  37. ```
  38. You should see the command line print the raw logs that shows the agents in action To see a summary of the results (e.g., task completion rates), in a new terminal run the following:
  39. ```bash
  40. agbench tabulate Results/human_eval_MagenticOne
  41. ```
  42. ## References
  43. **Evaluating Large Language Models Trained on Code**`<br/>`
  44. Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde de Oliveira Pinto, Jared Kaplan, Harri Edwards, Yuri Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, Dave Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William Hebgen Guss, Alex Nichol, Alex Paino, Nikolas Tezak, Jie Tang, Igor Babuschkin, Suchir Balaji, Shantanu Jain, William Saunders, Christopher Hesse, Andrew N. Carr, Jan Leike, Josh Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, Wojciech Zaremba`<br/>`
  45. [https://arxiv.org/abs/2107.03374](https://arxiv.org/abs/2107.03374)