Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
/aigc_evalsPublic archive

aigc evals

License

NotificationsYou must be signed in to change notification settings

ssbuild/aigc_evals

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aigc_evals 是在openai/evals基础上修改而来,用于评估基于 aigc_serving 等仿openai 接口开源模型服务的脚本。
部署开源模型移步至aigc_serving

当前支持评估数据集

目前支持 cmmlu , ceval, mmlu , 翻译数据集 和 结构化抽取 评估

安装

pip install aigc_evals>=0.0.3# 源码安装git clone -b dev https://github.com/ssbuild/aigc_evals.gitpip install -e .

修改环境变量

auto_eval/config.py设置openai url等参数或者export OPENAI_API_KEY="your key"export OPENAI_API_BASE="http://192.168.2.180:8081/v1"

修改自定义评估模型

修改 registry/completion_fns/langchain_aigc_serving

langchain/chat_model/chatglm2-6b-int4:  class: aigc_evals.completion_fns.langchain_llm:LangChainChatModelCompletionFn  args:    llm: ChatOpenAI    chat_model_kwargs:      model_name: chatglm2-6b-int4      model_kwargs: # langchain 未明确实现的参数        adapter_model: default        top_k: 1      max_retries: 10      request_timeout: 200      top_p: 1.0      temperature: 1.0      max_tokens: 2000

修改替换 chatglm2-6b-int4 成自己的开放模型,chat_model_kwargs 为 langchain ChatOpenAI 参数

一键评估

cd auto_evalpython run_ceval.py
cd auto_evalpython run_cmmlu.py
wget https://people.eecs.berkeley.edu/~hendrycks/data.tar下载mmlu数据集cd auto_evalpython run_mmlu.py
cd auto_evalpython run_bleu.py
cd auto_evalpython run_rouge.py
cd auto_evalpython run_struct.py

ceval 评测结果

HumanitiesOtherSTEMSocial Scienceavgupdate
Qwen-72B-Chat0.8698480.8357240.7738700.9070480.8466232023-12-02
Yi-34B-Chat0.8485860.7984560.6814620.8925820.8052712023-11-29
qwen-14b-chat0.7685780.6502240.6739240.8473510.7350192023-11-29
CausalLM-14B0.6917170.6345160.6089860.7657700.6752472023-11-29
qwen-7b-chat-1.10.6780340.5400180.5228060.7262230.6167702023-11-29
baichuan2-13b-chat0.6505060.5702320.4823500.6944620.5993872023-11-29
XVERSE-13B-Chat0.6393400.5700260.4569270.6573280.5809052023-11-29
Qwen-1_8B-Chat0.5871820.5263440.4928930.6948920.5753282023-12-02
baichuan2-7b-chat0.5792320.5028890.4786740.6864900.5618212023-11-29
chatglm3-6b0.5847530.5239700.4679020.6639970.5601552023-11-29
chatglm2-6b0.5863500.4922390.4714400.6505740.5501512023-11-29
internlm-chat-20b0.5620720.4885220.4535690.6351890.5348382023-11-29
tigerbot-70b-chat0.4900360.5015150.4695670.6162960.519353
internlm-chat-7b0.4798160.3945110.3423060.6068200.4558632023-11-29
baichuan-13b-chat0.4578220.3828940.3622100.5000720.425749
qwen-7b-chat0.4698500.3833620.2779420.5400770.417808
openbubddy-70b-hf0.4297610.4067130.3167850.4793820.408160
moss-moon-003-sft0.3247610.3409640.2971750.3610350.330984

cevalcevalcevalcevalcevalcevalceval

exec_aigc_evals 使用帮助

exec_aigc_evals --helpusage: exec_aigc_evals [-h] [--extra_eval_params EXTRA_EVAL_PARAMS] [--max_samples MAX_SAMPLES] [--cache CACHE]                       [--visible VISIBLE] [--seed SEED] [--user USER] [--record_path RECORD_PATH]                       [--log_to_file LOG_TO_FILE] [--registry_path REGISTRY_PATH] [--debug DEBUG]                       [--local-run LOCAL_RUN] [--http-run HTTP_RUN] [--http-run-url HTTP_RUN_URL]                       [--http-batch-size HTTP_BATCH_SIZE] [--http-fail-percent-threshold HTTP_FAIL_PERCENT_THRESHOLD]                       [--dry-run DRY_RUN] [--dry-run-logging DRY_RUN_LOGGING]                       completion_fn evalRun evals through the APIpositional arguments:  completion_fn         One or more CompletionFn URLs, separated by commas (,). A CompletionFn can either be the name                        of a model available in the OpenAI API or a key in the registry (see                        evals/registry/completion_fns).  eval                  Name of an eval. See registry.optional arguments:  -h, --help            show this help message and exit  --extra_eval_params EXTRA_EVAL_PARAMS  --max_samples MAX_SAMPLES  --cache CACHE  --visible VISIBLE  --seed SEED  --user USER  --record_path RECORD_PATH  --log_to_file LOG_TO_FILE                        Log to a file instead of stdout  --registry_path REGISTRY_PATH                        Path to the registry  --debug DEBUG  --local-run LOCAL_RUN                        Enable local mode for running evaluations. In this mode, the evaluation results are stored                        locally in a JSON file. This mode is enabled by default.  --http-run HTTP_RUN   Enable HTTP mode for running evaluations. In this mode, the evaluation results are sent to a                        specified URL rather than being stored locally or in Snowflake. This mode should be used in                        conjunction with the '--http-run-url' and '--http-batch-size' arguments.  --http-run-url HTTP_RUN_URL                        URL to send the evaluation results when in HTTP mode. This option should be used in                        conjunction with the '--http-run' flag.  --http-batch-size HTTP_BATCH_SIZE                        Number of events to send in each HTTP request when in HTTP mode. Default is 1, i.e., send                        events individually. Set to a larger number to send events in batches. This option should be                        used in conjunction with the '--http-run' flag.  --http-fail-percent-threshold HTTP_FAIL_PERCENT_THRESHOLD                        The acceptable percentage threshold of HTTP requests that can fail. Default is 5, meaning 5%                        of total HTTP requests can fail without causing any issues. If the failure rate goes beyond                        this threshold, suitable action should be taken or the process will be deemed as failing, but                        still stored locally.  --dry-run DRY_RUN  --dry-run-logging DRY_RUN_LOGGING

Licenses

MIT license

本项目遵循MIT License.

CC BY-NC-SA 4.0

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp