model2vec 0.3.6__tar.gz → 0.3.7__tar.gz
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.
- {model2vec-0.3.6 → model2vec-0.3.7}/PKG-INFO +1 -1
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/hf_utils.py +9 -2
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/version.py +1 -1
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec.egg-info/PKG-INFO +1 -1
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/test_model.py +1 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/uv.lock +15 -15
- {model2vec-0.3.6 → model2vec-0.3.7}/.github/workflows/ci.yaml +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/.gitignore +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/.pre-commit-config.yaml +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/LICENSE +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/Makefile +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/README.md +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/logo.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/logo_v2.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/model2vec_model_diagram.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/model2vec_model_diagram_transparant_dark.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/model2vec_model_diagram_transparant_light.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/sentences_per_second_vs_average_score.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/speed_vs_accuracy.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/speed_vs_accuracy_v2.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/speed_vs_accuracy_v3.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/speed_vs_accuracy_v4.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/speed_vs_mteb_score.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/speed_vs_mteb_score_v2.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/assets/images/tutorial_ezlo.png +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/__init__.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/distill/__init__.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/distill/distillation.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/distill/inference.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/distill/tokenizer.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/distill/utils.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/model.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/model_card_template.md +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec/utils.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec.egg-info/SOURCES.txt +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec.egg-info/dependency_links.txt +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec.egg-info/requires.txt +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/model2vec.egg-info/top_level.txt +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/pyproject.toml +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/results/README.md +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/scripts/export_to_onnx.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/setup.cfg +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/__init__.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/conftest.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/data/test_tokenizer/special_tokens_map.json +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/data/test_tokenizer/tokenizer.json +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/data/test_tokenizer/tokenizer_config.json +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/test_distillation.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tests/test_utils.py +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tutorials/README.md +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tutorials/recipe_search.ipynb +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tutorials/semantic_chunking.ipynb +0 -0
- {model2vec-0.3.6 → model2vec-0.3.7}/tutorials/semantic_deduplication.ipynb +0 -0
|
@@ -39,7 +39,14 @@ def save_pretrained(
|
|
|
39
39
|
folder_path.mkdir(exist_ok=True, parents=True)
|
|
40
40
|
save_file({"embeddings": embeddings}, folder_path / "model.safetensors")
|
|
41
41
|
tokenizer.save(str(folder_path / "tokenizer.json"))
|
|
42
|
-
json.dump(config, open(folder_path / "config.json", "w"))
|
|
42
|
+
json.dump(config, open(folder_path / "config.json", "w"), indent=4)
|
|
43
|
+
|
|
44
|
+
# Create modules.json
|
|
45
|
+
modules = [{"idx": 0, "name": "0", "path": ".", "type": "sentence_transformers.models.StaticEmbedding"}]
|
|
46
|
+
if config.get("normalize"):
|
|
47
|
+
# If normalize=True, add sentence_transformers.models.Normalize
|
|
48
|
+
modules.append({"idx": 1, "name": "1", "path": "1_Normalize", "type": "sentence_transformers.models.Normalize"})
|
|
49
|
+
json.dump(modules, open(folder_path / "modules.json", "w"), indent=4)
|
|
43
50
|
|
|
44
51
|
logger.info(f"Saved model to {folder_path}")
|
|
45
52
|
|
|
@@ -75,7 +82,7 @@ def _create_model_card(
|
|
|
75
82
|
base_model=base_model_name,
|
|
76
83
|
license=license,
|
|
77
84
|
language=language,
|
|
78
|
-
tags=["embeddings", "static-embeddings"],
|
|
85
|
+
tags=["embeddings", "static-embeddings", "sentence-transformers"],
|
|
79
86
|
library_name="model2vec",
|
|
80
87
|
**kwargs,
|
|
81
88
|
)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
__version_triple__ = (0, 3,
|
|
1
|
+
__version_triple__ = (0, 3, 7)
|
|
2
2
|
__version__ = ".".join(map(str, __version_triple__))
|
|
@@ -161,6 +161,7 @@ def test_save_pretrained(
|
|
|
161
161
|
assert (save_path / "model.safetensors").exists()
|
|
162
162
|
assert (save_path / "tokenizer.json").exists()
|
|
163
163
|
assert (save_path / "config.json").exists()
|
|
164
|
+
assert (save_path / "modules.json").exists()
|
|
164
165
|
|
|
165
166
|
|
|
166
167
|
def test_load_pretrained(
|
|
@@ -160,7 +160,7 @@ name = "click"
|
|
|
160
160
|
version = "8.1.8"
|
|
161
161
|
source = { registry = "https://pypi.org/simple" }
|
|
162
162
|
dependencies = [
|
|
163
|
-
{ name = "colorama", marker = "
|
|
163
|
+
{ name = "colorama", marker = "platform_system == 'Windows'" },
|
|
164
164
|
]
|
|
165
165
|
sdist = { url = "https://files.pythonhosted.org/packages/b9/2e/0090cbf739cee7d23781ad4b89a9894a41538e4fcf4c31dcdd705b78eb8b/click-8.1.8.tar.gz", hash = "sha256:ed53c9d8990d83c2a27deae68e4ee337473f6330c040a31d4225c9574d16096a", size = 226593 }
|
|
166
166
|
wheels = [
|
|
@@ -536,7 +536,7 @@ wheels = [
|
|
|
536
536
|
|
|
537
537
|
[[package]]
|
|
538
538
|
name = "model2vec"
|
|
539
|
-
version = "0.3.
|
|
539
|
+
version = "0.3.6"
|
|
540
540
|
source = { editable = "." }
|
|
541
541
|
dependencies = [
|
|
542
542
|
{ name = "jinja2" },
|
|
@@ -1627,19 +1627,19 @@ dependencies = [
|
|
|
1627
1627
|
{ name = "jinja2" },
|
|
1628
1628
|
{ name = "networkx", version = "3.2.1", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" },
|
|
1629
1629
|
{ name = "networkx", version = "3.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" },
|
|
1630
|
-
{ name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and
|
|
1631
|
-
{ name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and
|
|
1632
|
-
{ name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and
|
|
1633
|
-
{ name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and
|
|
1634
|
-
{ name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and
|
|
1635
|
-
{ name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and
|
|
1636
|
-
{ name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and
|
|
1637
|
-
{ name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and
|
|
1638
|
-
{ name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and
|
|
1639
|
-
{ name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and
|
|
1640
|
-
{ name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and
|
|
1630
|
+
{ name = "nvidia-cublas-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1631
|
+
{ name = "nvidia-cuda-cupti-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1632
|
+
{ name = "nvidia-cuda-nvrtc-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1633
|
+
{ name = "nvidia-cuda-runtime-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1634
|
+
{ name = "nvidia-cudnn-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1635
|
+
{ name = "nvidia-cufft-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1636
|
+
{ name = "nvidia-curand-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1637
|
+
{ name = "nvidia-cusolver-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1638
|
+
{ name = "nvidia-cusparse-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1639
|
+
{ name = "nvidia-nccl-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1640
|
+
{ name = "nvidia-nvtx-cu12", marker = "platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1641
1641
|
{ name = "sympy" },
|
|
1642
|
-
{ name = "triton", marker = "python_full_version < '3.13' and platform_machine == 'x86_64' and
|
|
1642
|
+
{ name = "triton", marker = "python_full_version < '3.13' and platform_machine == 'x86_64' and platform_system == 'Linux'" },
|
|
1643
1643
|
{ name = "typing-extensions" },
|
|
1644
1644
|
]
|
|
1645
1645
|
wheels = [
|
|
@@ -1666,7 +1666,7 @@ name = "tqdm"
|
|
|
1666
1666
|
version = "4.67.1"
|
|
1667
1667
|
source = { registry = "https://pypi.org/simple" }
|
|
1668
1668
|
dependencies = [
|
|
1669
|
-
{ name = "colorama", marker = "
|
|
1669
|
+
{ name = "colorama", marker = "platform_system == 'Windows'" },
|
|
1670
1670
|
]
|
|
1671
1671
|
sdist = { url = "https://files.pythonhosted.org/packages/a8/4b/29b4ef32e036bb34e4ab51796dd745cdba7ed47ad142a9f4a1eb8e0c744d/tqdm-4.67.1.tar.gz", hash = "sha256:f8aef9c52c08c13a65f30ea34f4e5aac3fd1a34959879d7e59e63027286627f2", size = 169737 }
|
|
1672
1672
|
wheels = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{model2vec-0.3.6 → model2vec-0.3.7}/assets/images/model2vec_model_diagram_transparant_dark.png
RENAMED
|
File without changes
|
{model2vec-0.3.6 → model2vec-0.3.7}/assets/images/model2vec_model_diagram_transparant_light.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|