Upload gte-base ONNX model
Browse files- README.md +52 -0
- model.onnx +3 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
library_name: onnx
|
| 3 |
+
tags:
|
| 4 |
+
- gte
|
| 5 |
+
- sentence-transformers
|
| 6 |
+
- sentence-similarity
|
| 7 |
+
- feature-extraction
|
| 8 |
+
- onnx
|
| 9 |
+
- inference4j
|
| 10 |
+
license: mit
|
| 11 |
+
pipeline_tag: sentence-similarity
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# GTE Base — ONNX
|
| 15 |
+
|
| 16 |
+
ONNX export of [thenlper/gte-base](https://huggingface.co/thenlper/gte-base), an English embedding model from Alibaba. Maps sentences to 768-dimensional dense vectors using CLS pooling with L2 normalization.
|
| 17 |
+
|
| 18 |
+
Mirrored for use with [inference4j](https://github.com/inference4j/inference4j), an inference-only AI library for Java.
|
| 19 |
+
|
| 20 |
+
## Original Source
|
| 21 |
+
|
| 22 |
+
- **Repository:** [thenlper/Alibaba (ONNX by Xenova)](https://huggingface.co/thenlper/gte-base)
|
| 23 |
+
- **License:** mit
|
| 24 |
+
|
| 25 |
+
## Usage with inference4j
|
| 26 |
+
|
| 27 |
+
```java
|
| 28 |
+
try (SentenceTransformerEmbedder model = SentenceTransformerEmbedder.builder()
|
| 29 |
+
.modelId("inference4j/gte-base")
|
| 30 |
+
.poolingStrategy(PoolingStrategy.CLS)
|
| 31 |
+
.normalize()
|
| 32 |
+
.build()) {
|
| 33 |
+
float[] embedding = model.encode("Hello, world!");
|
| 34 |
+
System.out.println("Dimension: " + embedding.length); // 768
|
| 35 |
+
}
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Model Details
|
| 39 |
+
|
| 40 |
+
| Property | Value |
|
| 41 |
+
|----------|-------|
|
| 42 |
+
| Architecture | BERT Base (12 layers, 768 hidden) |
|
| 43 |
+
| Task | Sentence embeddings / semantic similarity |
|
| 44 |
+
| Output dimension | 768 |
|
| 45 |
+
| Pooling | CLS |
|
| 46 |
+
| Normalization | L2 |
|
| 47 |
+
| Max sequence length | 512 |
|
| 48 |
+
| Original framework | PyTorch (HuggingFace Transformers) |
|
| 49 |
+
|
| 50 |
+
## License
|
| 51 |
+
|
| 52 |
+
This model is licensed under the [MIT License](https://opensource.org/licenses/MIT). Original model by [thenlper/Alibaba](https://huggingface.co/thenlper/gte-base), ONNX export by [Xenova](https://huggingface.co/Xenova).
|
model.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5a2a2a94a85a7e4645bfe7bf7635b010ba1a3e46752780f4d4172af062a260e1
|
| 3 |
+
size 435811539
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|