GithubHelp home page GithubHelp logo

Comments (4)

shibing624 avatar shibing624 commented on July 27, 2024

是,不支持chatglm reward模型,原因是chatglm没有实现ModelForSequenceClassification,它的预测代码也没有上传到transformers官方库。我也没单独为它写ChatglmModelForSequenceClassification实现类。

原因是我觉得用chatglm做reward model,可能效果还不如robert,而且预测速度慢很多。

建议:reward model 直接调用chatgpt的api给打分是比较好的,如果可以用gpt4更好。

from medicalgpt.

ymyjl avatar ymyjl commented on July 27, 2024

是,不支持chatglm reward模型,原因是chatglm没有实现ModelForSequenceClassification,它的预测代码也没有上传到transformers官方库。我也没单独为它写ChatglmModelForSequenceClassification实现类。

原因是我觉得用chatglm做reward model,可能效果还不如robert,而且预测速度慢很多。

建议:reward model 直接调用chatgpt的api给打分是比较好的,如果可以用gpt4更好。

非常感谢作者的回复,我还想问一下,如果还是使用chatglm,第四步rl应该没法进行吧?即使第三步可以用其他SequenceClassification打分,但是第四步chatglm也做不到呀,因为这个模型没有SequenceClassification

from medicalgpt.

ymyjl avatar ymyjl commented on July 27, 2024

哦对,如果要自己写一个SequenceClassification,有可能吗? 因为ChatGLMPreTrainedModel这个实现是有的 。可以仿照 LlamaForSequenceClassification(LlamaPreTrainedModel)这种后面加一个分类头来做这个事情吗?我比较菜,希望作者能从高角度给个建议,是否可行,非常感谢!
不过第四步好像还涉及AutoModelForCausalLMWithValueHead,这个也没有。。

from medicalgpt.

shibing624 avatar shibing624 commented on July 27, 2024
  1. SequenceClassification 可以自己写;
  2. AutoModelForCausalLMWithValueHead 也可以自己写,改下trl的trainer。

from medicalgpt.

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.