hjxdl 0.0.14__py3-none-any.whl → 0.0.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hdl/_version.py +2 -2
- hdl/utils/llm/embs.py +4 -2
- {hjxdl-0.0.14.dist-info → hjxdl-0.0.15.dist-info}/METADATA +1 -1
- {hjxdl-0.0.14.dist-info → hjxdl-0.0.15.dist-info}/RECORD +6 -6
- {hjxdl-0.0.14.dist-info → hjxdl-0.0.15.dist-info}/WHEEL +0 -0
- {hjxdl-0.0.14.dist-info → hjxdl-0.0.15.dist-info}/top_level.txt +0 -0
hdl/_version.py
CHANGED
hdl/utils/llm/embs.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
class
|
1
|
+
class HFEmbedder():
|
2
2
|
def __init__(
|
3
3
|
self,
|
4
4
|
emb_name: str = "bge",
|
@@ -41,6 +41,8 @@ class FlagEmbedder():
|
|
41
41
|
Returns:
|
42
42
|
numpy.ndarray: Encoded representation of the input sentences.
|
43
43
|
"""
|
44
|
+
if isinstance(sentences, str):
|
45
|
+
sentences = [sentences]
|
44
46
|
output = self.model.encode(
|
45
47
|
sentences,
|
46
48
|
return_dense=True,
|
@@ -68,4 +70,4 @@ class FlagEmbedder():
|
|
68
70
|
output_1 = self.encode(sentences_1)
|
69
71
|
output_2 = self.encode(sentences_2)
|
70
72
|
similarity = output_1 @ output_2.T
|
71
|
-
return similarity
|
73
|
+
return similarity
|
@@ -1,5 +1,5 @@
|
|
1
1
|
hdl/__init__.py,sha256=5sZZNySv08wwfzJcSDssGTqUn9wlmDsR6R4XB8J8mFM,70
|
2
|
-
hdl/_version.py,sha256=
|
2
|
+
hdl/_version.py,sha256=pzShTmESM-5FMm5QD9BQxtLcs8dS3tIY17WJZlF9dSQ,413
|
3
3
|
hdl/args/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
4
|
hdl/args/loss_args.py,sha256=s7YzSdd7IjD24rZvvOrxLLFqMZQb9YylxKeyelSdrTk,70
|
5
5
|
hdl/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -85,10 +85,10 @@ hdl/utils/general/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
85
85
|
hdl/utils/general/glob.py,sha256=8-RCnt6L297wMIfn34ZAMCsGCZUjHG3MGglGZI1cX0g,491
|
86
86
|
hdl/utils/llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
87
87
|
hdl/utils/llm/chat.py,sha256=NEbWdrPpQqS5ArU7ghA6xuam8wwvWXk3LL_CiNEEuIg,7055
|
88
|
-
hdl/utils/llm/embs.py,sha256=
|
88
|
+
hdl/utils/llm/embs.py,sha256=yCFtc25gUFas6kwgOGBFydeaHNyQMq5y1Chxl8TNEUQ,2190
|
89
89
|
hdl/utils/schedulers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
90
90
|
hdl/utils/schedulers/norm_lr.py,sha256=bDwCmdEK-WkgxQMFBiMuchv8Mm7C0-GZJ6usm-PQk14,4461
|
91
|
-
hjxdl-0.0.
|
92
|
-
hjxdl-0.0.
|
93
|
-
hjxdl-0.0.
|
94
|
-
hjxdl-0.0.
|
91
|
+
hjxdl-0.0.15.dist-info/METADATA,sha256=uVY_O0levGtYTHXWtCIstsHzulDmM4JLwQ7Xu6uZ5sg,543
|
92
|
+
hjxdl-0.0.15.dist-info/WHEEL,sha256=Z4pYXqR_rTB7OWNDYFOm1qRk0RX6GFP2o8LgvP453Hk,91
|
93
|
+
hjxdl-0.0.15.dist-info/top_level.txt,sha256=-kxwTM5JPhylp06z3zAVO3w6_h7wtBfBo2zgM6YZoTk,4
|
94
|
+
hjxdl-0.0.15.dist-info/RECORD,,
|
File without changes
|
File without changes
|