You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(.py3) play@mini ~ % lep photon run --name mygpt2 --local
Launching photon on port: 8080
2024-03-25 16:47:02.089 | INFO | leptonai.photon.hf.hf:pipeline:213 - Creating pipeline for text-generation(model=gpt2, revision=607a30d7).
HuggingFace download might take a while, please be patient...
2024-03-25 16:47:02.089 | INFO | leptonai.photon.hf.hf:pipeline:218 - Note: HuggingFace caches the downloaded models in ~/.cache/huggingface/ (or C:\Users\<username>\.cache\huggingface\ on Windows). If you have already downloaded the model before, the download should be much faster. If you run out of disk space, you can delete the cache folder.
While loading and launching photon, some modules are not found. Details:
Traceback (most recent call last):
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/cli/photon.py", line 785, in run
photon.launch(port=port)
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/photon.py", line 897, in launch
self._call_init_once()
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/photon.py", line 614, in _call_init_once
self._init_res = self.init()
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf.py", line 254, in init
self.pipeline
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/functools.py", line 969, in __get__
val = self.func(instance)
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf.py", line 247, in pipeline
raise e
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf.py", line 225, in pipeline
pipeline = pipeline_creator(
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf_utils.py", line 279, in create_transformers_pipeline
return _create_hf_transformers_pipeline(task, model, revision)
File "/Users/play/.py3/lib/python3.9/site-packages/leptonai/photon/hf/hf_utils.py", line 186, in _create_hf_transformers_pipeline
from transformers import pipeline, AutoTokenizer, AutoConfig, AutoModelForCausalLM
ModuleNotFoundError: No module named 'transformers'
It seems that you are missing some dependencies. This is not a bug of LeptonAI library, and is due to the
underlying photon requiring dependencies. When running photons locally, we intentionally refrain from installing
these dependencies for you, in order to not mess with your local environment. You can manually install the
missing dependencies by looking at the exception above.
According to the photon's metadata, dependencies can be installed via:
pip install ctransformers
Kindly install the dependencies and try again.
2个问题
HuggingFace 没有下载模型
(.py3) play@mini ~ % ls ~/.cache/huggingface/
ls: /Users/play/.cache/huggingface/: No such file or directory
按照https://www.lepton.ai/docs/overview/quickstart 执行
打开代理软件后,执行成功
然后 local执行有bug
2个问题
怎么解决?
pip安装的 代码有问题?
The text was updated successfully, but these errors were encountered: