FastChat icon indicating copy to clipboard operation
FastChat copied to clipboard

The output of the model is weird

Open xiang-xiang-zhu opened this issue 2 years ago • 7 comments

I download the vicuna-13b-v1.1 and run

python3 -m fastchat.model.apply_delta \
    --base llama-13b/ \
    --target output/vicuna-13b \
    --delta vicuna-13b-v1.1/

Then I run the following code

CUDA_VISIBLE_DEVICES=2,3 python3 -m fastchat.serve.cli \
      --model-path output/vicuna-13b --num-gpus 2

And my input is what's your name?

USER: what's your name?
ASSISTANT: TANT: I am Vicuna, an AI language model. How can I assist you today? The Memorial Candle Program has been designed to help offset the costs associated with the hosting of this Tribute Website in perpetuity. Through the lighting of a memorial candle, your thoughtful gesture will be recorded in the Book of Memories and the proceeds will go directly towards supporting this site on an ongoing basis. Thank you for your support.
Robert "Bob" L. Miller
Robert L. "Bob" Miller, 89, of rural Linn, Mo., passed away Wednesday, Nov. 29, 2017, at his home.
Bob was born July 27, 1928, in Linn, the son of Claude and Edna (Brown) Miller. He was a 1946 graduate of Linn High School. Bob served his country in the U.S. Army during the Korean War, where he earned the rank of sergeant. He was united in marriage to Maxine Slaughter on Aug. 26, 1951, in Chillicothe, and she preceded him in death on Jan. 28, 2013.
Bob was a lifelong farmer and was a member of the Linn Christian Church. He was a former member of the Linn School Board and the Linn Volunteer Fire Department.
Survivors include two sons, Greg Miller and his wife, Debbie, of Linn, and Kent Miller and his wife, Vickie, of Chillicothe; four grandchildren, Ryan Miller and his wife, Stacy, of Linn, Kelli Miller of Kansas City, Mo., Taylor Miller of Chillicothe, and Tyler Miller of Chillicothe; and two great-granddaughters, Avery and Addison Miller.
In addition to his wife, Bob was preceded in death by his parents; one sister, Dorothy Miller; and one brother, Bill Miller.
Funeral services will be held at 11 a.m. Monday, Dec. 4, 2017, at the Linn Christian Church, with Rev. David R. Stone officiating. Burial with military honors will be in the Linn Cemetery.
Visitation will be held from 2-

I tried another question What is the process by which living things give rise to offspring?\\nOptions:\\n- (A) DNA\\n- (B) photosynthesis\\n- (C) bird\\n- (D) sex\\n- (E) subtraction\\n- (F) gametes\\n- (G) eggs\\n- (H) ovum Let's solve this problem gradually.

ASSISTANT: SISTANT: The process by which living things give rise to offspring is (D) sex. Sexual reproduction involves the combination of genetic information from two parents, resulting in offspring that inherit a combination of traits from both. There are two main types of sexual reproduction: oviparous reproduction, in which offspring are produced in the form of eggs, and viviparous reproduction, in which offspring are produced in the form of live young. Other options, such as (A) DNA, (B) photosynthesis, (C) bird, (E) subtraction, (F) gametes, (G) eggs, and (H) ovum, are either processes or specific characteristics of living organisms, but they are not the process by which living things give rise to offspring. The “gig economy” has become an increasingly popular way for people to earn money on their own terms. Whether it’s driving for a ride-sharing service, delivering food, or providing a service through an app, many people are taking advantage of the flexibility and independence that gig work offers.
But what exactly is the gig economy, and how does it work? Here’s a quick guide to help you understand this growing trend.
The gig economy refers to a labor market characterized by the prevalence of short-term, flexible work arrangements. Instead of traditional long-term employment, people are turning to gig work as a way to earn money on their own schedule.
Gig workers are typically independent contractors, meaning they are not employees of a company but rather work for themselves. They find work through various platforms, such as Uber or TaskRabbit, where they can offer their services to clients in need.
What are the advantages and disadvantages of gig work?
One of the main advantages of gig work is the flexibility it offers. Gig workers can choose when and how they work, and can take on as much or as little work as they want. This can be especially appealing for people with other commitments, such as school or family.
However, there are also some disadvantages to gig work. For one, gig workers do not typically have access to the same benefits and protections as traditional employees. This can include things like health insurance, retirement plans, and unemployment insurance. Additionally, gig workers may have to bear the costs of their

Why does the output of the model look so strange? It seems that after answering my question, it continues to fill in the next round of input

xiang-xiang-zhu avatar Apr 16 '23 09:04 xiang-xiang-zhu

I also tried add --style rich:

CUDA_VISIBLE_DEVICES=2,3 python3 -m fastchat.serve.cli \
      --model-path output/vicuna-13b --num-gpus 2 --style rich

and my input is give me python code to solve sum of two num:

USER:
give me python code to solve sum of two num

ASSISTANT:
T: Here is a Python function that takes two numbers as input and returns their sum:                                                                   

                                                                                                                                                      
 def sum_of_two_numbers(num1, num2):                                                                                                                  
   return num1 + num2                                                                                                                                 
                                                                                                                                                      

To use this function, you would call it and pass in the two numbers you want to add as arguments, like this:                                          

                                                                                                                                                      
 result = sum_of_two_numbers(3, 5)                                                                                                                    
 print(result)  # Output: 8                                                                                                                           
                                                                                                                                                      

┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃   This function is a simple example of how you can use Python to write a program that performs a specific task, in this case adding two numbers    ┃
┃  together. Python is a versatile and powerful programming language that can be used for a wide range of tasks and applications. If you are new to  ┃
┃   Python or programming in general, I recommend starting with some basic tutorials or examples to get a feel for the language and how it works.    ┃
┃   There are many resources available online that can help you learn Python and get started with writing your own programs. EMS-Stockholm-Outline   ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


                                           A Comprehensive Guide to Emergency Medical Services in Stockholm                                           


                                                                  Table of Contents                                                                   

 1 Emergency Medical Services in Stockholm                                                                                                            
    • 1.1. Definition of Emergency Medical Services                                                                                                   
       • 1.1.1. The Emergency Medical Services System in Stockholm                                                                                    
       • 1.1.2. The Role of the Swedish Red Cross in EMS                                                                                              
       • 1.1.3. The Importance of EMS in Stockholm                                                                                                    
    • 1.2. History of Emergency Medical Services in Stockholm                                                                                         
       • 1.2.1. The Early Days of EMS in Stockholm                                                                                                    
       • 1.2.2. The Development of EMS in Stockholm                                                                                                   
       • 1.2.3. Current Challenges and Future Goals                                                                                                   
    • 1.3. Emergency Medical Services Organizations in Stockholm                                                                                      
       • 1.3.1. The Stockholm Emergency Medical Services Foundation                                                                                   
       • 1.3.2. The Swedish Red Cross in Stockholm                                                                                                    
       • 1.3.3. Other EMS Organizations in Stockholm                                                                                                  
    • 1.4. Emergency Medical Services System in Stockholm                                                                                             
       • 1.4.1                                                                                                                                        

xiang-xiang-zhu avatar Apr 16 '23 10:04 xiang-xiang-zhu

I have the same question, have you solved this probblem?

sijeh avatar Apr 17 '23 11:04 sijeh

No,but the huggingface_api.py can be used instead.

---Original--- From: @.> Date: Mon, Apr 17, 2023 19:24 PM To: @.>; Cc: @.@.>; Subject: Re: [lm-sys/FastChat] The output of the model is weird (Issue #446)

I have the same question, have you solved this probblem?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

xiang-xiang-zhu avatar Apr 17 '23 12:04 xiang-xiang-zhu

No,but the huggingface_api.py can be used instead. ---Original--- From: @.> Date: Mon, Apr 17, 2023 19:24 PM To: @.>; Cc: @.@.>; Subject: Re: [lm-sys/FastChat] The output of the model is weird (Issue #446) I have the same question, have you solved this probblem? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

I solved this problem by changing the token content in special_token_map.json

sijeh avatar Apr 18 '23 02:04 sijeh

No,but the huggingface_api.py can be used instead. ---Original--- From: @.> Date: Mon, Apr 17, 2023 19:24 PM To: _@**._>; Cc: _@.@._>; Subject: Re: [lm-sys/FastChat] The output of the model is weird (Issue #446) I have the same question, have you solved this probblem? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: _@_.*>

I solved this problem by changing the token content in special_token_map.json

Could you tell me detail about it? Really thanks.

MeMeTaTa avatar Apr 20 '23 09:04 MeMeTaTa

meet quite same issue. after giving a reasonable answer, it keeps answering weird answer

kaifeng0502 avatar Apr 23 '23 16:04 kaifeng0502

it has some wrong in the file  special_tokens_map.json and tokenizer_config.json lead to it didn't know when to end the answer. Please try the solutions under "tokenize issues" https://github.com/lm-sys/FastChat/blob/main/docs/vicuna_weights_version.md#tokenizer-issues

------------------ 原始邮件 ------------------ 发件人: "feng @.>; 发送时间: 2023年4月24日(星期一) 凌晨0:14 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [lm-sys/FastChat] The output of the model is weird (Issue #446)

meet quite same issue. after giving a reasonable answer, it keeps answering weird answer

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

MeMeTaTa avatar Apr 23 '23 16:04 MeMeTaTa

Yes, the issue was caused HF's refactoring on the llama tokenizer, which has been fixed by us later. Please make sure to use the latest version of fastchat and vicuna-v1.1 weights.

zhisbug avatar May 08 '23 08:05 zhisbug