lm-sys / lm-sys/FastChat

Regarding issue with output format for Vicuna (lmsys/vicuna-7b-v1.5) using fastchat/serve/huggingface_api.py

Open
#3,795 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
39.5k
Forks
4.8k
PR merge metrics
No merged PRs in 30d

Description

Hi!

I was using the [huggingface_api](https://github.com/lm-sys/FastChat/blob/main/fastchat/serve/huggingface_api.py) for inference on `lmsys/vicuna-7b-v1.5` using the following command:

`python3 -m fastchat.serve.huggingface_api --model lmsys/vicuna-7b-v1.5`

The **ASSISTANT's** output looks like (with the special characters "▁" and additional spaces):

> USER: Hello! Who are you?
> **ASSISTANT**: ▁I ' m ▁a ▁language ▁model ▁called ▁Vic una , ▁and ▁I ▁was ▁trained ▁by ▁Lar ge ▁Model ▁Systems ▁Organ ization ▁( L MS YS ) ▁research ers .

However, I was expecting the output to be clean:

> USER: Hello! Who are you?
> **ASSISTANT**: I'm a language model called Vicuna , and I was trained by Large Model Systems Organization (LMSYS) researchers.

I need to have clean output because I am performing multi-turn generation (i.e. pass the first response of the assistant back to the assistant as context for generating next response).

Sorry if I am missing something fundamental here but any help would be much appreciated!

Image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with fastchat/serve/huggingface_api.py and reproduce the issue using `python3 -m fastchat.serve.huggingface_api --model lmsys/vicuna-7b-v1.5`. Trace how the generated response is decoded and displayed, paying attention to the special characters and extra spaces. Done means the assistant output is clean enough to pass back as context for multi-turn generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python
Domain
ai
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.