Giter VIP home page Giter VIP logo

Comments (8)

NovTi avatar NovTi commented on June 26, 2024

We have tested with the above precisions and reproduced the issue not only for int4 but also fp32
baichuan_outoput

We found this error might caused by the Baichuan's prompt format. The original format used by BigDL-LLM is "<human>{prompt} <bot>". After we changed the format to "<human>{prompt} <bot> 回答是:" to stress the output generation, the model could generate output as usual in all the above precisions

baichuan2

from bigdl.

hkvision avatar hkvision commented on June 26, 2024

@NovTi Let's find a better prompt template for Baichuan2.

from bigdl.

NovTi avatar NovTi commented on June 26, 2024

@NovTi Let's find a better prompt template for Baichuan2.

Found the official prompt template from link1 and link2, which is "<reserved_106> {prompt} <reserved_107>". Now the model can generate output at multiple precisions.
baichuan_fixed_outoput

from bigdl.

NovTi avatar NovTi commented on June 26, 2024

When using the new prompt format, sometimes it will generate Chinese output for English prompt. For example, in the following two questions, first prompt is What is Deep Learning? but it answers in Chinese. The second example has no problem.

Prompt: What is Deep Learning?
baichuan_eng1

Prompt: Tell me a story
baichuan_eng2

from bigdl.

hkvision avatar hkvision commented on June 26, 2024

@plusbang Take a look. Seems the official template may not working well for Chinese input as well.
Can we still update this to the official template at this moment since no better templates could be found and we mainly focus on Chinese inputs for Baichuan?

from bigdl.

hkvision avatar hkvision commented on June 26, 2024

And also <reserved_106> may seem not that user friendly in the raw input string, but seems no better solutions so far?

from bigdl.

plusbang avatar plusbang commented on June 26, 2024

@plusbang Take a look. Seems the official template may not working well for Chinese input as well. Can we still update this to the official template at this moment since no better templates could be found and we mainly focus on Chinese inputs for Baichuan?

I feel we could use the official template, and add some comments to include the reference links and explanatory notes which demonstrates that other template may need for English prompt.

from bigdl.

hkvision avatar hkvision commented on June 26, 2024

Updated the prompt format: #10334
Closing this issue.

from bigdl.

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.