OpenLLM
OpenLLM copied to clipboard
bug: Not able to work with locally downloaded model
Describe the bug
hi, i am new to OpenLLM. i am trying to use OpenLLM with a locally downloaded model.
i downloaded the model NousResearch/Llama-2-7b-chat-hf from HuggingFace website. i basically downloaded the file 'model-00001-of-00002.safetensors' into my local directory models under the project directory.
now i tried to run the following command:
openllm start opt --model-id ./models/model-00001-of-00002.safetensors
however when i do this i get the following error:
`(openllm) c:\Self Learning\knowledgeBot>openllm start opt --model-id ./models/model-00001-of-00002.safetensors Passing 'openllm start opt --model-id ./models/model-00001-of-00002.safetensors' is deprecated and will be remove in a future version. Use 'openllm start ./models/model-00001-of-00002.safetensors' instead. It is recommended to specify the backend explicitly. Cascading backend might lead to unexpected behaviour. Traceback (most recent call last): File "C:\Users\dummy\AppData\Local\anaconda3\envs\openllm\Lib\site-packages\bentoml_internal\tag.py", line 109, in from_str return cls(name, version) ^^^^^^^^^^^^^^^^^^ File "C:\Users\dummy\AppData\Local\anaconda3\envs\openllm\Lib\site-packages\bentoml_internal\tag.py", line 63, in init validate_tag_str(lversion) File "C:\Users\dummy\AppData\Local\anaconda3\envs\openllm\Lib\site-packages\bentoml_internal\tag.py", line 40, in validate_tag_str raise ValueError( ValueError: \self learning\knowledgebot\models\model-00001-of-00002.safetensors is not a valid BentoML tag: a tag's name or version must be at most 63 characters in length, and 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 "
(openllm) c:\Self Learning\knowledgeBot>`
Would appreciate if anyone can look into it and confirm if this is an Error ?
To reproduce
No response
Logs
No response
Environment
-
transformers
version: 4.37.0 - Platform: Windows-10-10.0.22621-SP0
- Python version: 3.11.7
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.1
- Accelerate version: 0.26.1
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.2+cpu (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?:
- Using distributed or parallel set-up in script?:
System information (Optional)
No response
I have the same error.
Hi there, model_id is not supposed to be used like this. The file that you pass in here is a shard of the model, meaning we won't know how to load it at all.
You should just pass in openllm start /path/to/dir
which contains the models and all of the required files to run the models.
Since 0.5 you should save your private model to the BentoML's model store, See https://docs.bentoml.com/en/latest/guides/model-store.html?highlight=model%20store%20#model-store for more information.
Then you can serve it directly with openllm start my-private-model
I will close this due to usage error.