evalplus
valPlus v0.3.1
EvalPlus() =>大约•快速启动•LLM后端•文档•引文•确认
谁在使用evalplus数据集? LLM团队使用了评估Plus,包括:
下面跟踪EvalPlus的显着更新:
v0.3.1 ] :evalplus v0.3.1正式发布!亮点: (i)代码效率通过esteperf进行评估, (ii)一个运行全部运行的命令:一代 +后处理 +评估, (iii)支持更多推理后端,例如Google Gemini&Anthropic等。v0.3.0 ] :改进了MBPP+任务的地面真相解决方案(IDS:459,102,559)。感谢evalarena。v0.3.0 ] :通过删除一些损坏的任务(399-> 378任务),将MBPP+升级到v0.2.0 。 〜4pp Pass@1可以提高1个。v0.2.1 )您可以通过BigCode-evaluation-Harness使用EvalPlus数据集! HumaneVal+ Oracle修复(32)。v0.2.0 )MBPP+已发布! Humaneval合同和输入修复程序(0/3/9/148/114/1/1/2/99/28/32/35/160)。v0.1.7 )排行榜发布; Humaneval+合同和输入修复程序(32/166/126/6)v0.1.6 )可配置和违约保守的超时设置; Humaneval+合同和地面真相修复(129/148/75/75/53/0/3/9/140)v0.1.5 )当您有太多样本时,HumaneVal+ Mini将进行超快速评估!v0.1.1 )优化用户体验:评估速度,PYPI软件包,Docker等v0.1.0 )HumaneVal+已发布! 评估Plus是LLM4Code的严格评估框架,其中:
为什么要评估?
想知道更多细节吗?阅读我们的论文和材料!
pip install --upgrade " evalplus[vllm] @ git+https://github.com/evalplus/evalplus "
# Or `pip install "evalplus[vllm]" --upgrade` for the latest stable release
evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend vllm
--greedy # Local generation
evalplus.codegen --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset humaneval
--backend vllm
--greedy
# Code execution within Docker
docker run --rm --pull=always -v $( pwd ) /evalplus_results:/app ganler/evalplus:latest
evalplus.evaluate --dataset humaneval
--samples /app/humaneval/ise-uiuc--Magicoder-S-DS-6.7B_vllm_temp_0.0.jsonlpip install --upgrade " evalplus[perf,vllm] @ git+https://github.com/evalplus/evalplus "
# Or `pip install "evalplus[perf,vllm]" --upgrade` for the latest stable release
sudo sh -c ' echo 0 > /proc/sys/kernel/perf_event_paranoid ' # Enable perf
evalplus.evalperf --model " ise-uiuc/Magicoder-S-DS-6.7B " --backend vllm # Local generation
evalplus.codegen --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset evalperf
--backend vllm
--temperature 1.0
--n-samples 100
# Code execution within Docker
sudo sh -c ' echo 0 > /proc/sys/kernel/perf_event_paranoid ' # Enable perf
docker run --cap-add PERFMON --rm --pull=always -v $( pwd ) /evalplus_results:/app ganler/evalplus:latest
evalplus.evalperf --samples /app/evalperf/ise-uiuc--Magicoder-S-DS-6.7B_vllm_temp_1.0.jsonltransformers后端: evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend hf
--greedy笔记
EvalPlus对基础和聊天模型使用不同的提示。默认情况下,使用hf / vllm作为后端时,由tokenizer.chat_template检测到它。对于其他后端,仅允许聊天模式。
因此,如果您的基本型号带有tokenizer.chat_template ,请添加--force-base-prompt ,以避免在聊天模式下评估。
# Install Flash Attention 2
pip install packaging ninja
pip install flash-attn --no-build-isolation
# Note: if you have installation problem, consider using pre-built
# wheels from https://github.com/Dao-AILab/flash-attention/releases
# Run evaluation with FA2
evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend hf
--attn-implementation [flash_attention_2 | sdpa]
--greedyvllm后端: evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--backend vllm
--tp [TENSOR_PARALLEL_SIZE]
--greedyopenai兼容服务器(例如,VLLM): # OpenAI models
export OPENAI_API_KEY= " {KEY} " # https://platform.openai.com/settings/organization/api-keys
evalplus.evaluate --model " gpt-4o-2024-08-06 "
--dataset [humaneval | mbpp]
--backend openai --greedy
# DeepSeek
export OPENAI_API_KEY= " {KEY} " # https://platform.deepseek.com/api_keys
evalplus.evaluate --model " deepseek-chat "
--dataset [humaneval | mbpp]
--base-url https://api.deepseek.com
--backend openai --greedy
# Grok
export OPENAI_API_KEY= " {KEY} " # https://console.x.ai/
evalplus.evaluate --model " grok-beta "
--dataset [humaneval | mbpp]
--base-url https://api.x.ai/v1
--backend openai --greedy
# vLLM server
# First, launch a vLLM server: https://docs.vllm.ai/en/latest/serving/deploying_with_docker.html
evalplus.evaluate --model " ise-uiuc/Magicoder-S-DS-6.7B "
--dataset [humaneval | mbpp]
--base-url http://localhost:8000/v1
--backend openai --greedy export OPENAI_API_KEY= " [YOUR_API_KEY] "
evalplus.evaluate --model " gpt-4o "
--dataset [humaneval | mbpp]
--backend openai
--greedy export ANTHROPIC_API_KEY= " [YOUR_API_KEY] "
evalplus.evaluate --model " claude-3-haiku-20240307 "
--dataset [humaneval | mbpp]
--backend anthropic
--greedy export GOOGLE_API_KEY= " [YOUR_API_KEY] "
evalplus.evaluate --model " gemini-1.5-pro "
--dataset [humaneval | mbpp]
--backend google
--greedy export BEDROCK_ROLE_ARN= " [BEDROCK_ROLE_ARN] "
evalplus.evaluate --model " anthropic.claude-3-5-sonnet-20241022-v2:0 "
--dataset [humaneval | mbpp]
--backend bedrock
--greedy您可以在evalplus_results/[humaneval|mbpp]/
git clone https://github.com/evalplus/evalplus.git
cd evalplus
export PYTHONPATH= $PYTHONPATH : $( pwd )
pip install -r requirements.txt要了解有关如何使用评估Plus的更多信息,请参考以下内容:
@inproceedings { evalplus ,
title = { Is Your Code Generated by Chat{GPT} Really Correct? Rigorous Evaluation of Large Language Models for Code Generation } ,
author = { Liu, Jiawei and Xia, Chunqiu Steven and Wang, Yuyao and Zhang, Lingming } ,
booktitle = { Thirty-seventh Conference on Neural Information Processing Systems } ,
year = { 2023 } ,
url = { https://openreview.net/forum?id=1qvx610Cu7 } ,
}
@inproceedings { evalperf ,
title = { Evaluating Language Models for Efficient Code Generation } ,
author = { Liu, Jiawei and Xie, Songrun and Wang, Junhao and Wei, Yuxiang and Ding, Yifeng and Zhang, Lingming } ,
booktitle = { First Conference on Language Modeling } ,
year = { 2024 } ,
url = { https://openreview.net/forum?id=IBCBMeAhmC } ,
}