FlagOpen / FlagEmbedding

Retrieval and Retrieval-augmented LLMs
MIT License
7.77k stars 565 forks source link

Empty lexical weights #954

Open salbatarni opened 4 months ago

salbatarni commented 4 months 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 4 months ago

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