Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Marqo/dunzhang-stella_en_400M_v5 #16

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class HFModelProperties(ModelProperties):
notes: str = ""
text_query_prefix: str = ""
text_chunk_prefix: str = ""
trustRemoteCode: bool = False

@classmethod
def get_all_model_properties_objects(cls) -> Dict[str, "HFModelProperties"]:
Expand Down Expand Up @@ -246,6 +247,13 @@ def get_all_model_properties_objects(cls) -> Dict[str, "HFModelProperties"]:
tokens=512,
text_query_prefix="Represent this sentence for searching relevant passages: ",
),
"Marqo/dunzhang-stella_en_400M_v5": HFModelProperties(
name="Marqo/dunzhang-stella_en_400M_v5",
dimensions=1024,
tokens=512,
type=ModelType.hf_stella,
trustRemoteCode=True,
),
}
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ class ModelProperties(BaseModel, ABC):
vector_numeric_type: VectorNumericType = Field(
..., title="Model vector numeric type"
)
trustRemoteCode: bool = Field(default=False, title="Trust remote code")

def __init__(self, **kwargs):
if "memory_size" not in kwargs:
Expand Down
1 change: 1 addition & 0 deletions src/marqo_commons/shared_utils/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class ModelType(str, Enum):
test = "test"
no_model = "no_model"
languagebind = "languagebind"
hf_stella = "hf_stella"


class VectorNumericType(str, Enum):
Expand Down
Loading