Skip to content

SJTU-DDST/LLMTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLMTest

对 LLM 进行性能测试,包括 F1-Score,Rogue-L,困惑度等

以下内容均以 uv 为例

安装方式(快速,推荐)

uv pip install git+ssh://git@github.com/SJTU-DDST/LLMTest.git

安装方式(可修改)

下载并放入 3rd 文件夹

git submodule add git@github.com:SJTU-DDST/LLMTest.git 3rd/llmtest
# git submodule update --init --recursive

安装

# uv venv / uv sync
uv pip install -e 3rd/llmtest

使用方式

创建 test.py,写入

from LLMTest import LLMTest

# from LLMTest import change_log_level
# change_log_level("DEBUG")

def LLM(prompts):
    return ["The Answer is C"] * len(prompts)

tester = LLMTest("cais/mmlu", 'high_school_biology')
batch_id, prompts = tester.get()
answers = LLM(prompts)
score = tester.score(batch_id, answers)

print(score)
uv run test.py

开发

uv pip install -e .
uv run tests/test.py

About

an easy-to-use test for LLMs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages