Skip to content

Commit 5520cdc

Browse files
authored
Fixed dims bug and bumped version (#24)
1 parent 9a0d0a9 commit 5520cdc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

model2vec/distill/inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def create_output_embeddings_from_model_name_and_tokens(
8181

8282
def _get_embedder_output_dim(output_value: OutputValue, embedder: SentenceTransformer) -> int:
8383
"""Get the embeddings dimension of a sentence transformer, given an output value."""
84-
embedder_output_dim = embedder.encode(["a"], show_progress_bar=False, output_value=output_value)[0].shape[0]
84+
embedder_output_dim = embedder.encode(["a"], show_progress_bar=False, output_value=output_value)[0].shape[1]
8585

8686
return embedder_output_dim
8787

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "model2vec"
33
description = "Distill a Small Fast Model from any Sentence Transformer"
44
readme = { file = "README.md", content-type = "text/markdown" }
55
license = { file = "LICENSE" }
6-
version = "0.1.1"
6+
version = "0.1.2"
77
requires-python = ">=3.10"
88
authors = [{ name = "Stéphan Tulkens", email = "[email protected]"}, {name = "Thomas van Dongen", email = "[email protected]"}]
99

0 commit comments

Comments
 (0)