Skip to content

Commit 08e8885

Browse files
docs: sync Core Integrations API reference (sentence_transformers) on Docusaurus (#11906)
Co-authored-by: julian-risch <4181769+julian-risch@users.noreply.github.com>
1 parent 8d037f2 commit 08e8885

15 files changed

Lines changed: 225 additions & 30 deletions

File tree

docs-website/reference/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.18/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.19/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.20/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.21/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.22/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.23/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

docs-website/reference_versioned_docs/version-2.24/integrations-api/sentence_transformers.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ __init__(
217217
] = "float32",
218218
encode_kwargs: dict[str, Any] | None = None,
219219
backend: Literal["torch", "onnx", "openvino"] = "torch",
220-
revision: str | None = None
220+
revision: str | None = None,
221+
quantization_ranges: list[list[float]] | None = None
221222
) -> None
222223
```
223224

@@ -262,6 +263,12 @@ Creates a SentenceTransformersDocumentEmbedder component.
262263
for more information on acceleration and quantization options.
263264
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
264265
for a stored model on Hugging Face.
266+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
267+
minimum values in the first row and maximum values in the second.
268+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
269+
for small batches and inconsistent across batches. Pass ranges computed from a representative
270+
sample of embeddings to get consistent quantized embeddings, compatible with query embeddings
271+
quantized with the same ranges.
265272

266273
#### to_dict
267274

@@ -621,7 +628,8 @@ __init__(
621628
] = "float32",
622629
encode_kwargs: dict[str, Any] | None = None,
623630
backend: Literal["torch", "onnx", "openvino"] = "torch",
624-
revision: str | None = None
631+
revision: str | None = None,
632+
quantization_ranges: list[list[float]] | None = None
625633
) -> None
626634
```
627635

@@ -664,6 +672,11 @@ Create a SentenceTransformersTextEmbedder component.
664672
for more information on acceleration and quantization options.
665673
- **revision** (<code>str | None</code>) – The specific model version to use. It can be a branch name, a tag name, or a commit id,
666674
for a stored model on Hugging Face.
675+
- **quantization_ranges** (<code>list\[list\[float\]\] | None</code>) – Calibration ranges to use when `precision` is "int8" or "uint8", with shape `(2, embedding_dim)`:
676+
minimum values in the first row and maximum values in the second.
677+
Scalar quantization calibrates the min/max range from the batch being encoded, which is degenerate
678+
for a single text and produces meaningless embeddings. Pass ranges computed from a representative
679+
sample of embeddings to get consistent quantized embeddings.
667680

668681
#### to_dict
669682

0 commit comments

Comments
 (0)