Skip to content

Commit

Permalink
Merge branch 'modernbert'
Browse files Browse the repository at this point in the history
  • Loading branch information
akshayballal95 committed Jan 5, 2025
2 parents 7d458ce + 5c8b3e1 commit 4a904fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion python/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "embed_anything_python"
version = "0.4.18"
version = "0.5.0"
edition = "2021"

[lib]
Expand Down
13 changes: 13 additions & 0 deletions python/python/embed_anything/_embed_anything.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ class Reranker:
"""

class Dtype(Enum):
"""
Represents the data type of the model.
"""
F16 = "F16"
INT8 = "INT8"
Q4 = "Q4"
Expand All @@ -345,18 +348,28 @@ class Dtype(Enum):
class RerankerResult:
"""
Represents the result of the reranking process.
Attributes:
query: The query to rerank.
documents: The list of documents to rerank.
"""
query: str
documents: list[DocumentRank]

class DocumentRank:
"""
Represents the rank of a document.
Attributes:
document: The document to rank.
relevance_score: The relevance score of the document.
rank: The rank of the document.
"""
document: str
relevance_score: float
rank: int


class TextEmbedConfig:
"""
Represents the configuration for the Text Embedding model.
Expand Down

0 comments on commit 4a904fb

Please sign in to comment.