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

[Announcement] Breaking changes regarding conversation template #344

Open
CharlieFRuan opened this issue Mar 26, 2024 · 1 comment
Open

Comments

@CharlieFRuan
Copy link
Contributor

CharlieFRuan commented Mar 26, 2024

Hi community, we recently updated our models' mlc-chat-config.json on hugging face to use the latest conversation template. The goal is to make templates more lightweight, hence not requiring an npm bump whenever we support a new model (credit to @rickzx).

If you are not using npm ^0.2.29, you might encounter an issue complaining about an unrecognized conversation template, which can be solved by updating the web-llm npm.

We apologize for the breaking changes. It is possible that we would introduce other breaking changes this week in preparation for a new release of WebLLM.

After the new release (in ~1 week), things should stabilize and we will try our best to mitigate such breaking changes (i.e. not requiring updates of npm). We will also introduce wasm versioning so that npm version can pair with wasm version.

Thank you for your understanding!

@CharlieFRuan CharlieFRuan pinned this issue Mar 26, 2024
@flatsiedatsie
Copy link

A quick fix is to make a small modification to the worker:

function getConversation(conv_template, conv_config) {
	console.error("web_llm_worker: in getConversation. conv_template: ", conv_template);
	if(typeof conv_template == 'object' && typeof conv_template.name == 'string'){
		console.log("web_llm_worker: setting conv_template to conv_template.name");
		conv_template = conv_template.name;
	}
    if (conv_template == "llama-2") return new Conversation(Object.assign({

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants