Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tracking] Create a uniform schema for conversation template and embed into mlc-chat-config.json #1766

Closed
5 tasks
rickzx opened this issue Feb 15, 2024 · 1 comment
Labels
status: tracking Tracking work in progress

Comments

@rickzx
Copy link
Contributor

rickzx commented Feb 15, 2024

Overview

Currently, with every new model architecture supported, we need to manually add a conversation template object in c++, i.e. here. This is not very scalable, and we also need to make sure web-llm is catching up with every conversation template added, i.e. here.

We should instead create a uniform json schema for all conversation templates (we already have one here for MLC serve: https://github.com/mlc-ai/mlc-llm/blob/main/python/mlc_chat/protocol/conversation_protocol.py) and embed it into mlc-chat-config.json. This way both mlc-llm and web-llm can read the conversation template directly from mlc-chat-config.json, without needing to add a c++ template every time with a new model support.

Action Items

  • Create a uniform json schema for all conversation templates and embed it into mlc-chat-config.json
  • Update the current HF prebuilt weights with the new mlc-chat-config.json
  • Clean-up the old C++ conv_template.cc
  • Update docs on adding new conversation template
  • Future support for Jinja chat template: example

Links to Related Issues and PRs

@tqchen
Copy link
Contributor

tqchen commented May 11, 2024

this now landed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: tracking Tracking work in progress
Projects
Status: Done
Development

No branches or pull requests

2 participants