Instructions to use hku-nlp/instructor-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use hku-nlp/instructor-base with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("hku-nlp/instructor-base") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use hku-nlp/instructor-base with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("hku-nlp/instructor-base") model = AutoModel.from_pretrained("hku-nlp/instructor-base") - Notebooks
- Google Colab
- Kaggle
Adding `safetensors` variant of this model
#3
by SFconvertbot - opened
- 2_Dense/model.safetensors +3 -0
- model.safetensors +3 -0
2_Dense/model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d83d6cf750278d1d692ea7b74256c7f530d7f5975500dea02f43c98ceb671d35
|
| 3 |
+
size 2359416
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92517eb0428c6e6850b640c0f1d710a1c9720e95e8cd7e4e6880e76e95b3840a
|
| 3 |
+
size 438525920
|