alvarobartt HF Staff commited on
Commit
683fd8e
·
verified ·
1 Parent(s): d21f62f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -29
README.md CHANGED
@@ -72,6 +72,33 @@ print("Sentence embeddings:")
72
  print(sentence_embeddings)
73
  ```
74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
75
  ------
76
 
77
  ## Background
@@ -92,7 +119,6 @@ the semantic information. The sentence vector may be used for information retrie
92
 
93
  By default, input text longer than 128 word pieces is truncated.
94
 
95
-
96
  ## Training procedure
97
 
98
  ### Pre-training
@@ -148,31 +174,4 @@ We sampled each dataset given a weighted probability which configuration is deta
148
  | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 |
149
  | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 |
150
  | [TriviaQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 |
151
- | **Total** | | **1,124,818,467** |
152
-
153
- ## Usage (Text Embeddings Inference (TEI))
154
-
155
- [Text Embeddings Inference (TEI)](https://github.com/huggingface/text-embeddings-inference) is a blazing fast inference solution for text embeddings models.
156
-
157
- - CPU:
158
- ```bash
159
- docker run -p 8080:80 -v hf_cache:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cpu-latest --model-id sentence-transformers/all-mpnet-base-v1 --pooling mean --dtype float16
160
- ```
161
-
162
- - NVIDIA GPU:
163
- ```bash
164
- docker run --gpus all -p 8080:80 -v hf_cache:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cuda-latest --model-id sentence-transformers/all-mpnet-base-v1 --pooling mean --dtype float16
165
- ```
166
-
167
- Send a request to `/v1/embeddings` to generate embeddings via the [OpenAI Embeddings API](https://platform.openai.com/docs/api-reference/embeddings/create):
168
- ```bash
169
- curl http://localhost:8080/v1/embeddings \
170
- -X POST \
171
- -H "Content-Type: application/json" \
172
- -d '{
173
- "model": "sentence-transformers/all-mpnet-base-v1",
174
- "input": ["This is an example sentence", "Each sentence is converted"]
175
- }'
176
- ```
177
-
178
- Or check the [Text Embeddings Inference API specification](https://huggingface.github.io/text-embeddings-inference/) instead.
 
72
  print(sentence_embeddings)
73
  ```
74
 
75
+ ## Usage (Text Embeddings Inference (TEI))
76
+
77
+ [Text Embeddings Inference (TEI)](https://github.com/huggingface/text-embeddings-inference) is a blazing fast inference solution for text embeddings models.
78
+
79
+ - CPU:
80
+ ```bash
81
+ docker run -p 8080:80 -v hf_cache:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cpu-latest --model-id sentence-transformers/all-mpnet-base-v1 --pooling mean --dtype float16
82
+ ```
83
+
84
+ - NVIDIA GPU:
85
+ ```bash
86
+ docker run --gpus all -p 8080:80 -v hf_cache:/data --pull always ghcr.io/huggingface/text-embeddings-inference:cuda-latest --model-id sentence-transformers/all-mpnet-base-v1 --pooling mean --dtype float16
87
+ ```
88
+
89
+ Send a request to `/v1/embeddings` to generate embeddings via the [OpenAI Embeddings API](https://platform.openai.com/docs/api-reference/embeddings/create):
90
+ ```bash
91
+ curl http://localhost:8080/v1/embeddings \
92
+ -X POST \
93
+ -H "Content-Type: application/json" \
94
+ -d '{
95
+ "model": "sentence-transformers/all-mpnet-base-v1",
96
+ "input": ["This is an example sentence", "Each sentence is converted"]
97
+ }'
98
+ ```
99
+
100
+ Or check the [Text Embeddings Inference API specification](https://huggingface.github.io/text-embeddings-inference/) instead.
101
+
102
  ------
103
 
104
  ## Background
 
119
 
120
  By default, input text longer than 128 word pieces is truncated.
121
 
 
122
  ## Training procedure
123
 
124
  ### Pre-training
 
174
  | [Natural Questions (NQ)](https://ai.google.com/research/NaturalQuestions) | [paper](https://transacl.org/ojs/index.php/tacl/article/view/1455) | 100,231 |
175
  | [SQuAD2.0](https://rajpurkar.github.io/SQuAD-explorer/) | [paper](https://aclanthology.org/P18-2124.pdf) | 87,599 |
176
  | [TriviaQA](https://huggingface.co/datasets/trivia_qa) | - | 73,346 |
177
+ | **Total** | | **1,124,818,467** |