FlagOpen / FlagEmbedding

Retrieval and Retrieval-augmented LLMs
MIT License
6.54k stars 466 forks source link

Empty lexical weights #954

Open salbatarni opened 1 month ago

salbatarni commented 1 month ago

I get empty lexical weights although I set the retrun_sparse to True.

model = BGEM3FlagModel(checkpoint_path, use_fp16=True)

text_bge = model.encode([text], return_dense=True, return_sparse=True, return_colbert_vecs=True, max_length=max_length)

I get:

..., 'lexical_weights': [defaultdict(<class 'int'>, {})], ...

staoxiao commented 1 month ago

@salbatarni , please make sure that the text you provided is not a empty string.