Upload folder using huggingface_hub
Browse files
README.md
ADDED
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
---
|
3 |
+
library_name: sentence-transformers
|
4 |
+
tags:
|
5 |
+
- sentence-transformers
|
6 |
+
- sentence-similarity
|
7 |
+
- feature-extraction
|
8 |
+
- autotrain
|
9 |
+
base_model: HuggingFaceTB/SmolLM-135M-Instruct
|
10 |
+
widget:
|
11 |
+
- source_sentence: 'search_query: i love autotrain'
|
12 |
+
sentences:
|
13 |
+
- 'search_query: huggingface auto train'
|
14 |
+
- 'search_query: hugging face auto train'
|
15 |
+
- 'search_query: i love autotrain'
|
16 |
+
pipeline_tag: sentence-similarity
|
17 |
+
datasets:
|
18 |
+
- skratos115/opendevin_DataDevinator
|
19 |
+
---
|
20 |
+
|
21 |
+
# Model Trained Using AutoTrain
|
22 |
+
|
23 |
+
- Problem type: Sentence Transformers
|
24 |
+
|
25 |
+
## Validation Metrics
|
26 |
+
No validation metrics available
|
27 |
+
|
28 |
+
## Usage
|
29 |
+
|
30 |
+
### Direct Usage (Sentence Transformers)
|
31 |
+
|
32 |
+
First install the Sentence Transformers library:
|
33 |
+
|
34 |
+
```bash
|
35 |
+
pip install -U sentence-transformers
|
36 |
+
```
|
37 |
+
|
38 |
+
Then you can load this model and run inference.
|
39 |
+
```python
|
40 |
+
from sentence_transformers import SentenceTransformer
|
41 |
+
|
42 |
+
# Download from the Hugging Face Hub
|
43 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
44 |
+
# Run inference
|
45 |
+
sentences = [
|
46 |
+
'search_query: autotrain',
|
47 |
+
'search_query: auto train',
|
48 |
+
'search_query: i love autotrain',
|
49 |
+
]
|
50 |
+
embeddings = model.encode(sentences)
|
51 |
+
print(embeddings.shape)
|
52 |
+
|
53 |
+
# Get the similarity scores for the embeddings
|
54 |
+
similarities = model.similarity(embeddings, embeddings)
|
55 |
+
print(similarities.shape)
|
56 |
+
```
|