1. 首次运行,from pandas.core import ( 卡住,中断后报错
File "/data/wangzhiwen/anaconda3/lib/python3.10/site-packages/llama_index/legacy/utils.py", line 65, in __init__
nltk.data.find("tokenizers/punkt", paths=[self._nltk_data_dir])
File "/data/wangzhiwen/anaconda3/lib/python3.10/site-packages/nltk/data.py", line 583, in find
raise LookupError(resource_not_found)
LookupError:
**********************************************************************
Resource punkt not found.
Please use the NLTK Downloader to obtain the resource:
>>> import nltk
>>> nltk.download('punkt')
For more information see: https://www.nltk.org/data.html
Attempted to load tokenizers/punkt
Searched in:
- '/data/wangzhiwen/anaconda3/lib/python3.10/site-packages/llama_index/legacy/_static/nltk_cache'
**********************************************************************
原因:无网络,./anaconda3/lib/python3.10/site-packages/llama_index/legacy/_static/nltk_cache/tokenizers/punkt.zip包不能下载并解压,需手动下载后在该目录解压。
2.
ValueError: The current `device_map` had weights offloaded to the disk. Please provide an `offload_folder` for them. Alternatively, make sure you have `safetensors` installed if the model you are using offers the weights in this format.
原因:'max_memory': {1: '10GiB', 2: '10GiB'}内存设置不够。
3. 自定义LLM报错RuntimeError: "topk_cpu" not implemented for 'Half'
原因:输出在cpu上,将输入放至GPU即可(.cuda())
文章讨论了编程中遇到的三个技术问题:1)首次运行时nltk数据包因网络问题无法下载;2)在使用深度学习模型时,由于内存设置不足引发ValueError;3)自定义LLM中topk_cpu函数不适用于Half类型,提示用户将数据移至GPU。
7万+

被折叠的 条评论
为什么被折叠?



