lm-sys / FastChat

An open platform for training, serving, and evaluating large language models. Release repo for Vicuna and Chatbot Arena.
Apache License 2.0
36.63k stars 4.52k forks source link

Local LangChain with FastChat Error #1680

Closed code-ex0 closed 1 year ago

code-ex0 commented 1 year ago

I want to self how open ai API with fastchat and I see this example but i see a error.

I can use the seconde command python3 -m fastchat.serve.model_worker --model-names "gpt-3.5-turbo,text-davinci-003,text-embedding-ada-002" --model-path /path/to/weights

the parameter --model-names doesn't exist and I don't know how to replace it.

 python -m fastchat.serve.model_worker --model-names "gpt-3.5-turbo,text-davinci-003,text-embedding-ada-002" --model-path lmsys/fastchat-t5-3b-v1.0
2023-06-13 15:07:33 | ERROR | stderr | usage: model_worker.py [-h] [--host HOST] [--port PORT] [--worker-address WORKER_ADDRESS] [--controller-address CONTROLLER_ADDRESS] [--model-path MODEL_PATH] [--device {cpu,cuda,m
ps}] [--gpus GPUS]
2023-06-13 15:07:33 | ERROR | stderr |                        [--num-gpus NUM_GPUS] [--max-gpu-memory MAX_GPU_MEMORY] [--load-8bit] [--cpu-offloading] [--model-name MODEL_NAME] [--limit-model-concurrency LIMIT_MODEL_CO
NCURRENCY]
2023-06-13 15:07:33 | ERROR | stderr |                        [--stream-interval STREAM_INTERVAL] [--no-register]
2023-06-13 15:07:33 | ERROR | stderr | model_worker.py: error: unrecognized arguments: --model-names gpt-3.5-turbo,text-davinci-003,text-embedding-ada-002

do you have an idea ??

IlianP commented 1 year ago

It seems you forgot about this part:

Replace /path/to/weights below with the a real path to a local model such as Vicuna. It can also be a Hugging Face repo id such as lmsys/fastchat-t5-3b-v1.0.

code-ex0 commented 1 year ago

i use this python -m fastchat.serve.model_worker --model-names "gpt-3.5-turbo,text-davinci-003,text-embedding-ada-002" --model-path lmsys/fastchat-t5-3b-v1.0 i dont forgot the model path

creatorone1 commented 1 year ago

mybe you should check your FastChat/fastchat/serve/model_worker.pyfile. serch "--model-names" in this file?

volksen commented 1 year ago

the parameter is called --model-name. this is a small bug in the example. you can check the parameters with python3 -m fastchat.serve.model_worker --help

code-ex0 commented 1 year ago

Ok I find error if I install fschat 0.2.13 he solves the problems of the doc. pip install fschat==0.2.13