Closed skywolf123 closed 1 year ago
see #87 for fixes
Will release a patch soon
update to v0.1.19, but same error
openllm.exceptions.OpenLLMException: Model type <class 'transformers_modules.chatglm-6b-int4.configuration_chatglm.ChatGLMConfig'> is not supported yet.
Hey there, we discussed internally about more extensive custom path support, and want to share the decision:
With custom model path, it is best that when you do openllm start opt --model-id /path/to/custom-path
, OpenLLM will first copy this to local BentoML store, and will serve from there. This is to decouple a lot of loading logics within OpenLLM for custom path and pretrained
openllm start
under the hood does two things it it detects custom path:
openllm import opt /path/to/custom-path
-> this will add the custom path to the BentoML storeopenllm start
run the server
(Note that this is already the case with pretrained model)openllm build
will behave the same.
To ensure hermeticity, openllm import
can provide optional --model-version
to make sure we don’t copy the same path multiple times. If not passed, then we will generate the name based on the path (get the base name of the path) and the version would be a hash of the last modified time
“openllm import ”?I can't see this option.
Please try out 0.1.20
Please try out 0.1.20
Traceback (most recent call last): File "D:\Anaconda3\envs\llm_env\Lib\site-packages\bentoml_internal\tag.py", line 109, in from_str return cls(name, version) ^^^^^^^^^^^^^^^^^^ File "D:\Anaconda3\envs\llm_env\Lib\site-packages\bentoml_internal\tag.py", line 63, in init validate_tag_str(lversion) File "D:\Anaconda3\envs\llm_env\Lib\site-packages\bentoml_internal\tag.py", line 40, in validate_tagstr raise ValueError( ValueError: \chatglm2-6b-int4 is not a valid BentoML tag: a tag's name or version must consist of alphanumeric characters, '', '-', or '.', and must start and end with an alphanumeric character
can you send the full traceback here?
can you send the full traceback here?
openllm import chatglm D:\chatglm-6b-int4
Converting 'D' to lowercase: 'd'. Traceback (most recent call last): File "D:\Anaconda3\envs\llm_env\Lib\site-packages\bentoml_internal\tag.py", line 109, in from_str return cls(name, version) ^^^^^^^^^^^^^^^^^^ File "D:\Anaconda3\envs\llm_env\Lib\site-packages\bentoml_internal\tag.py", line 63, in init validate_tag_str(lversion) File "D:\Anaconda3\envs\llm_env\Lib\site-packages\bentoml_internal\tag.py", line 40, in validate_tagstr raise ValueError( ValueError: \chatglm-6b-int4 is not a valid BentoML tag: a tag's name or version must consist of alphanumeric characters, '', '-', or '.', and must start and end with an alphanumeric character
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "
I also encountered this issue.
Hey there, we discussed internally about more extensive custom path support, and want to share the decision: With custom model path, it is best that when you do o
penllm start opt --model-id /path/to/custom-path
, OpenLLM will first copy this to local BentoML store, and will serve from there. This is to decouple a lot of loading logics within OpenLLM for custom path and pretrainedopenllm start
under the hood does two things it it detects custom path:
openllm import opt /path/to/custom-path
-> this will add the custom path to the BentoML storeopenllm start
run the server (Note that this is already the case with pretrained model)
openllm build
will behave the same.To ensure hermeticity,
openllm import
can provide optional--model-version
to make sure we don’t copy the same path multiple times. If not passed, then we will generate the name based on the path (get the base name of the path) and the version would be a hash of the last modified time
Hey, loading the model from a local folder should also be possible from a docker container, correct?
I have the following as my last command in the Dockerfile: CMD ["openllm", "start" , "bigcode/starcoder", "--model-id", "/path/to/local/starcoder/model"]
Of course the path is mounted when running the container.
您的来信已收到,祝您每天有个好心情。
Hello again, @aarnphm your described way to use a local model instead of downloading it every time seems not to work at the moment. Here is my Dockerfile plus the run command. It's starting up fine w/o any errors but it is downloading the model completely from the internet anyways. Do you need a new ticket / further information?
Dockerfile used to build image:
FROM python:3.10-slim
WORKDIR /code
ENV BENTOML_HOME="/root/srv/user/starcoder/"
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
RUN pip install --upgrade pip
RUN --mount=type=secret,id=huggingfacetoken \
huggingface-cli login --token $(cat /run/secrets/huggingfacetoken)
EXPOSE 3000
COPY . .
CMD ["openllm", "start" , "bigcode/starcoder", "--workers-per-resource", "0.5", "--model-id", "/root/srv/user/starcoder/starcoder"]
requirements.txt
huggingface_hub[cli]
bentoml
psutil
wheel
vllm==0.2.2
torch
transformers
openllm
docker run command to start from image:
nvidia-docker run --mount type=bind,source=/srv/user/starcoder/starcoder,target=/srv/user/starcoder/models/vllm-bigcode--starcoder/<hash> --gpus all -d -p 3005:3000 <starcoder_image>
You only need to run CMD ["openllm", "start", "/mount/path", ...]
Describe the bug
when I load my local model
openllm start chatglm --model-id /chatglm-6b
I get a error
openllm.exceptions.OpenLLMException: Model type <class 'transformers_modules.chatglm-6b.configuration_chatglm.ChatGLMConfig'> is not supported yet.
How can I do?
To reproduce
No response
Logs
No response
Environment
cli
System information (Optional)
No response