Skip to content
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
14 changes: 13 additions & 1 deletion fastembed/common/model_management.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import shutil
import tarfile
import tempfile
import warnings
import contextlib
from copy import deepcopy
from pathlib import Path, PureWindowsPath
Expand Down Expand Up @@ -374,6 +375,18 @@ def retrieve_model_gcs(

# check if the model_dir and the model files are both present for macOS
if model_dir.exists() and len(list(model_dir.glob("*"))) > 0:
if deprecated_tar_struct:
# No built-in model is served from the bucket anymore, only copies of it remain.
# stacklevel points at the caller of TextEmbedding(...), the path that gets here.
warnings.warn(
f"Loading {model_name} from {model_dir}, a copy downloaded from Google Cloud "
"Storage by an older fastembed version. Support for such copies is deprecated "
"and will be removed in a future release. To switch to Hugging Face, load the "
"model once with network access (without `local_files_only=True` or "
f"`HF_HUB_OFFLINE=1`), then delete {model_dir}.",
FutureWarning,
stacklevel=5,
)
return model_dir

if local_files_only:
Expand Down Expand Up @@ -440,7 +453,6 @@ def download_model(cls, model: T, cache_dir: str, retries: int = 3, **kwargs: An
"description": "Base English model, v1.5",
"size_in_GB": 0.44,
"sources": {
"url": "https://storage.googleapis.com/qdrant-fastembed/fast-bge-base-en-v1.5.tar.gz",
"hf": "qdrant/bge-base-en-v1.5-onnx-q",
}
}
Expand Down
4 changes: 0 additions & 4 deletions fastembed/text/onnx_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
size_in_GB=0.42,
sources=ModelSource(
hf="Qdrant/fast-bge-base-en",
url="https://storage.googleapis.com/qdrant-fastembed/fast-bge-base-en.tar.gz",
_deprecated_tar_struct=True,
),
model_file="model_optimized.onnx",
Expand All @@ -35,7 +34,6 @@
size_in_GB=0.21,
sources=ModelSource(
hf="Qdrant/bge-base-en-v1.5-onnx-Q",
url="https://storage.googleapis.com/qdrant-fastembed/fast-bge-base-en-v1.5.tar.gz",
_deprecated_tar_struct=True,
),
model_file="model_optimized.onnx",
Expand Down Expand Up @@ -63,7 +61,6 @@
size_in_GB=0.13,
sources=ModelSource(
hf="Qdrant/bge-small-en",
url="https://storage.googleapis.com/qdrant-fastembed/BAAI-bge-small-en.tar.gz",
_deprecated_tar_struct=True,
),
model_file="model_optimized.onnx",
Expand Down Expand Up @@ -91,7 +88,6 @@
size_in_GB=0.09,
sources=ModelSource(
hf="Qdrant/bge-small-zh-v1.5",
url="https://storage.googleapis.com/qdrant-fastembed/fast-bge-small-zh-v1.5.tar.gz",
_deprecated_tar_struct=True,
),
model_file="model_optimized.onnx",
Expand Down
1 change: 0 additions & 1 deletion fastembed/text/pooled_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
size_in_GB=2.24,
sources=ModelSource(
hf="qdrant/multilingual-e5-large-onnx",
url="https://storage.googleapis.com/qdrant-fastembed/fast-multilingual-e5-large.tar.gz",
_deprecated_tar_struct=True,
),
model_file="model.onnx",
Expand Down
1 change: 0 additions & 1 deletion fastembed/text/pooled_normalized_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
license="apache-2.0",
size_in_GB=0.09,
sources=ModelSource(
url="https://storage.googleapis.com/qdrant-fastembed/sentence-transformers-all-MiniLM-L6-v2.tar.gz",
hf="qdrant/all-MiniLM-L6-v2-onnx",
_deprecated_tar_struct=True,
),
Expand Down
Loading