-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Description
Do you need to file an issue?
- I have searched the existing issues and this bug is not already filed.
- I believe this is a legitimate bug, not just a question or feature request.
Describe the bug
**INFO: [] Created new empty graph file: /appdata/zhangkailin/rag/LightRAG-main/examples/dickens/graph_chunk_entity_relation.graphml
INFO:nano-vectordb:Init {'embedding_dim': 1024, 'metric': 'cosine', 'storage_file': '/appdata/zhangkailin/rag/LightRAG-main/examples/dickens/vdb_entities.json'} 0 data
INFO:nano-vectordb:Init {'embedding_dim': 1024, 'metric': 'cosine', 'storage_file': '/appdata/zhangkailin/rag/LightRAG-main/examples/dickens/vdb_relationships.json'} 0 data
INFO:nano-vectordb:Init {'embedding_dim': 1024, 'metric': 'cosine', 'storage_file': '/appdata/zhangkailin/rag/LightRAG-main/examples/dickens/vdb_chunks.json'} 0 data
INFO: [] Process 2382604 KV load full_docs with 0 records
INFO: [] Process 2382604 KV load text_chunks with 0 records
INFO: [] Process 2382604 KV load full_entities with 0 records
INFO: [] Process 2382604 KV load full_relations with 0 records
INFO: [] Process 2382604 KV load entity_chunks with 0 records
INFO: [] Process 2382604 KV load relation_chunks with 0 records
INFO: [] Process 2382604 KV load llm_response_cache with 3 records
INFO: [_] Process 2382604 doc status load doc_status with 0 records
INFO: Creating a new event loop in main thread.
INFO: Processing 1 document(s)
INFO: Extracting stage 1/1: unknown_source
INFO: Processing d-id: doc-9dd21c656577a71c3c3d833944ffdf0c
INFO: Embedding func: 8 new workers initialized (Timeouts: Func: 30s, Worker: 60s, Health Check: 75s)
Asking to truncate to max_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation.
ERROR: Embedding func: Error in decorated function for task 140362767918144_3457890.323076727: The expanded size of the tensor (1277) must match the existing size (512) at non-singleton dimension 1. Target sizes: [10, 1277]. Tensor sizes: [1, 512]
Asking to truncate to max_length but no maximum length is provided and the model has no predefined maximum length. Default to no truncation.
ERROR: Embedding func: Error in decorated function for task 140362767918336_3457890.323268502: The expanded size of the tensor (1256) must match the existing size (512) at non-singleton dimension 1. Target sizes: [8, 1256]. Tensor sizes: [1, 512]
ERROR: Traceback (most recent call last):
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/lightrag/lightrag.py", line 1830, in process_document
await asyncio.gather(*first_stage_tasks)
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/lightrag/kg/nano_vector_db_impl.py", line 119, in upsert
embeddings_list = await asyncio.gather(*embedding_tasks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/lightrag/utils.py", line 847, in wait_func
return await future
^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/lightrag/utils.py", line 551, in worker
result = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/asyncio/tasks.py", line 510, in wait_for
return await fut
^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/lightrag/utils.py", line 358, in call
return await self.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/lightrag/llm/hf.py", line 163, in hf_embed
outputs = embed_model(
^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1773, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1784, in _call_impl
return forward_call(*args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zhangkailin/.conda/envs/rag/lib/python3.12/site-packages/transformers/models/bert/modeling_bert.py", line 931, in forward
buffered_token_type_ids_expanded = buffered_token_type_ids.expand(batch_size, seq_length)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: The expanded size of the tensor (1277) must match the existing size (512) at non-singleton dimension 1. Target sizes: [10, 1277]. Tensor sizes: [1, 512]
Steps to reproduce
No response
Expected Behavior
No response
LightRAG Config Used
Paste your config here
Logs and screenshots
No response
Additional Information
- LightRAG Version:
- Operating System:
- Python Version:
- Related Issues: