Skip to content

Commit

Permalink
Add Marqo/dunzhang-stella_en_400M_v5
Browse files Browse the repository at this point in the history
- new model type: `hf_stella`
- also new property: `trustRemoteCode` (default False)
  • Loading branch information
ishaaq committed Oct 24, 2024
1 parent 250a882 commit 20c790b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
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 = 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

0 comments on commit 20c790b

Please sign in to comment.