Update README.md
Browse files
README.md
CHANGED
@@ -9,7 +9,7 @@ tags:
|
|
9 |
|
10 |
---
|
11 |
|
12 |
-
# dbourget/philai-v1
|
13 |
|
14 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search. The base model is BERT-large, which was fine-tuned using TSDAE on 60,000 philosophical examples drawn from PhilArchive.org.
|
15 |
|
@@ -29,7 +29,7 @@ Then you can use the model like this:
|
|
29 |
from sentence_transformers import SentenceTransformer
|
30 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
31 |
|
32 |
-
model = SentenceTransformer('dbourget/philai-
|
33 |
embeddings = model.encode(sentences)
|
34 |
print(embeddings)
|
35 |
```
|
@@ -52,8 +52,8 @@ def cls_pooling(model_output, attention_mask):
|
|
52 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
53 |
|
54 |
# Load model from HuggingFace Hub
|
55 |
-
tokenizer = AutoTokenizer.from_pretrained('dbourget/philai-
|
56 |
-
model = AutoModel.from_pretrained('dbourget/philai-
|
57 |
|
58 |
# Tokenize sentences
|
59 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
9 |
|
10 |
---
|
11 |
|
12 |
+
# dbourget/philai-embeddings-v1
|
13 |
|
14 |
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1024 dimensional dense vector space and can be used for tasks like clustering or semantic search. The base model is BERT-large, which was fine-tuned using TSDAE on 60,000 philosophical examples drawn from PhilArchive.org.
|
15 |
|
|
|
29 |
from sentence_transformers import SentenceTransformer
|
30 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
31 |
|
32 |
+
model = SentenceTransformer('dbourget/philai-embeddings-v1')
|
33 |
embeddings = model.encode(sentences)
|
34 |
print(embeddings)
|
35 |
```
|
|
|
52 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
53 |
|
54 |
# Load model from HuggingFace Hub
|
55 |
+
tokenizer = AutoTokenizer.from_pretrained('dbourget/philai-embeddings-v1')
|
56 |
+
model = AutoModel.from_pretrained('dbourget/philai-embeddings-v1')
|
57 |
|
58 |
# Tokenize sentences
|
59 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|