Code Monkey home page Code Monkey logo

Comments (2)

SefaZeng avatar SefaZeng commented on June 12, 2024 2

遇到了同样的问题...脚本如下

python run.py --datasets ceval_gen --hf-path /data/ptm/internlm2-chat-1_8b --tokenizer-path /data/ptm/internlm2-chat-1_8b --tokenizer-kwargs padding_side='left' truncation='left' trust_remote_code=True --model-kwargs trust_remote_code=True device_map='auto' --max-seq-len 1024 --max-out-len 16 --batch-size 2 --num-gpus 1 --debug

然后仔细研究报错发现huggingface_above_v4_33.py这个部分很神奇 打印了下opencompass/opencompass/tasks/openicl_infer.py里面73行的model_cfg,发现里面的type是opencompass.models.huggingface_above_v4_33.HuggingFacewithChatTemplate,不太理解为啥不是我指定的internlm2-chat-1_8b对应的模型

再仔细研究发现,错误在一个看起来不太重要的get_token_len函数,于是用它旁边的opencompass/opencompass/models/huggingface.py里面的get_token_len实现替换了,然后就跑通了...

不一定是正确解法,但能work 有官方解答或者更可信的方案的可以继续来回答下

老实讲感觉这个仓库 bug 挺多的...

from opencompass.

JacquelineXu avatar JacquelineXu commented on June 12, 2024 1

遇到了同样的问题...脚本如下

python run.py --datasets ceval_gen --hf-path /data/ptm/internlm2-chat-1_8b --tokenizer-path /data/ptm/internlm2-chat-1_8b --tokenizer-kwargs padding_side='left' truncation='left' trust_remote_code=True --model-kwargs trust_remote_code=True device_map='auto' --max-seq-len 1024 --max-out-len 16 --batch-size 2 --num-gpus 1 --debug


然后仔细研究报错发现huggingface_above_v4_33.py这个部分很神奇
打印了下opencompass/opencompass/tasks/openicl_infer.py里面73行的model_cfg,发现里面的type是opencompass.models.huggingface_above_v4_33.HuggingFacewithChatTemplate,不太理解为啥不是我指定的internlm2-chat-1_8b对应的模型


再仔细研究发现,错误在一个看起来不太重要的get_token_len函数,于是用它旁边的opencompass/opencompass/models/huggingface.py里面的get_token_len实现替换了,然后就跑通了...


不一定是正确解法,但能work
有官方解答或者更可信的方案的可以继续来回答下

from opencompass.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.