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

Feature Request: Add support for chatglm3 in example server. #9164

Closed
4 tasks done
themanyone opened this issue Aug 25, 2024 · 3 comments
Closed
4 tasks done

Feature Request: Add support for chatglm3 in example server. #9164

themanyone opened this issue Aug 25, 2024 · 3 comments
Labels
enhancement New feature or request stale

Comments

@themanyone
Copy link

themanyone commented Aug 25, 2024

Prerequisites

  • I am running the latest code. Mention the version if possible as well.
  • I carefully followed the README.md.
  • I searched using keywords relevant to my issue to make sure that I am creating a new issue that is not already open (or closed).
  • I reviewed the Discussions, and have a new and useful enhancement to share.

Feature Description

ChatGLM3 uses a completely new prompt format. See https://github.com/THUDM/ChatGLM3/blob/main/PROMPT_en.md

I have created patch fd3492e for examples/server/public/prompt-formats.js

Motivation

Fixes chat errors, repetitions, and role reversals when playing with the example server.

Possible Implementation

From ChatGLM3 README:

Overall Structure

The format of the ChatGLM3 dialogue consists of several conversations, each of which contains a dialogue header and content. A typical multi-turn dialogue structure is as follows:

<|system|>
You are ChatGLM3, a large language model trained by Zhipu.AI. Follow the user's instructions carefully. Respond using markdown.
<|user|>
Hello
<|assistant|>
Hello, I'm ChatGLM3. What can I assist you today?
@themanyone themanyone added the enhancement New feature or request label Aug 25, 2024
@ngxson
Copy link
Collaborator

ngxson commented Aug 27, 2024

AFAIK support for gml3 and gml4 is already added: #8031

@themanyone
Copy link
Author

themanyone commented Aug 28, 2024

Those are completely different files. That #8031 was for the CLI version (which is also used/made into a server by some other projects like ollama). And the GGUF creation. This is for the gradio app server example that lets you choose a chat template when you run ./llama-server from the whisper.cpp github repo and navigate to http://localhost:port in the browser.

@themanyone themanyone changed the title Feature Request: Add server support for chatglm3 Feature Request: Add support for chatglm3 in example server. Aug 28, 2024
@github-actions github-actions bot added the stale label Sep 28, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

2 participants