Tom Aarsen
commited on
Commit
•
96b7da4
1
Parent(s):
d70deb4
Specify add_pooling_layer=False via configuration instead
Browse files- README.md +1 -3
- sentence_bert_config.json +4 -1
README.md
CHANGED
@@ -8722,9 +8722,7 @@ queries = ['what is snowflake?', 'Where can I get the best tacos?']
|
|
8722 |
documents = ['The Data Cloud!', 'Mexico City of Course!']
|
8723 |
|
8724 |
# Load the model.
|
8725 |
-
model = SentenceTransformer(
|
8726 |
-
MODEL_ID, model_kwargs=dict(add_pooling_layer=False),
|
8727 |
-
)
|
8728 |
|
8729 |
# Generate text embeddings.
|
8730 |
query_embeddings = model.encode(queries, prompt_name="query")
|
|
|
8722 |
documents = ['The Data Cloud!', 'Mexico City of Course!']
|
8723 |
|
8724 |
# Load the model.
|
8725 |
+
model = SentenceTransformer(MODEL_ID)
|
|
|
|
|
8726 |
|
8727 |
# Generate text embeddings.
|
8728 |
query_embeddings = model.encode(queries, prompt_name="query")
|
sentence_bert_config.json
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
{
|
2 |
"max_seq_length": 512,
|
3 |
-
"do_lower_case": false
|
|
|
|
|
|
|
4 |
}
|
|
|
1 |
{
|
2 |
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false,
|
4 |
+
"model_args": {
|
5 |
+
"add_pooling_layer": false
|
6 |
+
}
|
7 |
}
|