正在将 samples/llm/大模型技术栈-算法与原理.md 添加到向量库,共包含30条文档 Batches: 0%| | 0/1 [00:00<?, ?it/s] 2024-05-10 10:21:36,963 - embeddings_api.py[line:39] - ERROR: CUDA out of memory. Tried to allocate 254.00 MiB. GPU 0 has a total capacty of 15.78 GiB of which 205.75 MiB is free. Process 3252 has 13.19 GiB memory in use. Process 29000 has 2.39 GiB memory in use. Of the allocated memory 1.48 GiB is allocated by PyTorch, and 23.80 MiB is reserved by PyTorch but unallocated. If reserved but unallocated memory is large try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF Traceback (most recent call last): File "/mnt/workspace/langchain-ChatGLM/init_database.py", line 107, in <module> folder2db(kb_names=args.kb_name, mode="recreate_vs", embed_model=args.embed_model) File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/migrate.py", line 128, in folder2db files2vs(kb_name, kb_files) File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/migrate.py", line 113, in files2vs kb.add_doc(kb_file=kb_file, not_refresh_vs_cache=True) File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/base.py", line 131, in add_doc doc_infos = self.do_add_doc(docs, **kwargs) File "/mnt/workspace/langchain-ChatGLM/server/knowledge_base/kb_service/faiss_kb_service.py", line 78, in do_add_doc ids = vs.add_embeddings(text_embeddings=zip(data["texts"], data["embeddings"]), TypeError: 'NoneType' object is not subscriptable (chat) root@dsw-372547-597b6db8d7-sn86f:/mnt/workspace/langchain-ChatGLM#
清理内存,重新执行即可
标签:kb,Tried,254.00,MiB,mnt,langchain,add,workspace,ChatGLM From: https://www.cnblogs.com/notonlydba/p/18183962