hkust-nlp / ceval

Official github repo for C-Eval, a Chinese evaluation suite for foundation models [NeurIPS 2023]
https://cevalbenchmark.com/
MIT License
1.63k stars 78 forks source link

看不懂怎么用。。eval_llama.py是给基于llama的模型用的吗,有很多报错不知道怎么解决 #49

Open starevelyn opened 1 year ago

starevelyn commented 1 year ago

要是想评测用自己数据训练过的llama-7b模型,命令行是 torchrun --nproc_per_node 8 code/evaluator_series/eval_llama.py --ckpt_dir [PATH TO CKPT] --param_size 7 --few_shot --cot --ntrain 5 --subject [SUBJECT NAME]

然后报错: image 是要在命令行参数里面加local_rank, world_size这些吗

starevelyn commented 1 year ago

有没有完整示例教程之类的。。

yuanzhiyong1999 commented 1 year ago

请问找到解决方法了吗

entropy2333 commented 1 year ago

应该使用这个库进行评测:https://github.com/EleutherAI/lm-evaluation-harness

git clone https://github.com/EleutherAI/lm-evaluation-harness.git
cd lm-evaluation-harness/
pip install -e .

评测脚本:

python main.py --model hf-causal-experimental \
    --model_args pretrained=/path/to/model \
    --tasks Ceval-valid-computer_network \
    --device cuda:0