Giter VIP home page Giter VIP logo

Comments (6)

okwinds avatar okwinds commented on June 14, 2024

reserved_107是什么?
请教一下,这类chat template一般应该怎么写?
有的模型是支持工具调用以及代码解释器的,这类又应该怎么写?也可以写入chat template吗?
多谢!

from baichuan2.

YanshekWoo avatar YanshekWoo commented on June 14, 2024

reserved_107是什么? 请教一下,这类chat template一般应该怎么写? 有的模型是支持工具调用以及代码解释器的,这类又应该怎么写?也可以写入chat template吗? 多谢!

<reserved_107>是预定义的special token。
chat template是参考huggingface官方文档写的。该template是为了多轮对话的prompt设计的。
我理解的工具调用之类的template应该由你自己设计定义好后输入到user轮的对话内容中

from baichuan2.

supdizh avatar supdizh commented on June 14, 2024

给LZ点赞,vllm 文档支持bc2但其实用的hf chat template, 还在想咋改
发现LZ这,好用,chat template jinja是什么魔法写法

from baichuan2.

okwinds avatar okwinds commented on June 14, 2024

谢谢回复

reserved_107是什么? 请教一下,这类chat template一般应该怎么写? 有的模型是支持工具调用以及代码解释器的,这类又应该怎么写?也可以写入chat template吗? 多谢!

<reserved_107>是预定义的special token。

chat template是参考huggingface官方文档写的。该template是为了多轮对话的prompt设计的。

我理解的工具调用之类的template应该由你自己设计定义好后输入到user轮的对话内容中

from baichuan2.

QwertyJack avatar QwertyJack commented on June 14, 2024

是不是没有考虑 system ? 另外,请问 </s> 是为什么?

from baichuan2.

YanshekWoo avatar YanshekWoo commented on June 14, 2024

是不是没有考虑 system ? 另外,请问 </s> 是为什么?

Baichuan原生就没有system message,这段代码是可以兼容处理有system message的messages列表的。
</s>之类special token都是baichuan chat模型微调用的,参照他代码里给的prompt

from baichuan2.

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.