Codingchild commited on
Commit
baddcaf
·
verified ·
1 Parent(s): e89c7f5

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +138 -0
README.md ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ ---
9
+ # SentenceTransformer
10
+
11
+ This is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
12
+
13
+ ## Model Details
14
+
15
+ ### Model Description
16
+ - **Model Type:** Sentence Transformer
17
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
18
+ - **Maximum Sequence Length:** 512 tokens
19
+ - **Output Dimensionality:** 1024 dimensions
20
+ - **Similarity Function:** Cosine Similarity
21
+ <!-- - **Training Dataset:** Unknown -->
22
+ <!-- - **Language:** Unknown -->
23
+ <!-- - **License:** Unknown -->
24
+
25
+ ### Model Sources
26
+
27
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
28
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
29
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
30
+
31
+ ### Full Model Architecture
32
+
33
+ ```
34
+ SentenceTransformer(
35
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
36
+ (1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
37
+ (2): Normalize()
38
+ )
39
+ ```
40
+
41
+ ## Usage
42
+
43
+ ### Direct Usage (Sentence Transformers)
44
+
45
+ First install the Sentence Transformers library:
46
+
47
+ ```bash
48
+ pip install -U sentence-transformers
49
+ ```
50
+
51
+ Then you can load this model and run inference.
52
+ ```python
53
+ from sentence_transformers import SentenceTransformer
54
+ # Download from the 🤗 Hub
55
+ model = SentenceTransformer("sentence_transformers_model_id")
56
+ # Run inference
57
+ sentences = [
58
+ 'The weather is lovely today.',
59
+ "It's so sunny outside!",
60
+ 'He drove to the stadium.',
61
+ ]
62
+ embeddings = model.encode(sentences)
63
+ print(embeddings.shape)
64
+ # [3, 1024]
65
+ # Get the similarity scores for the embeddings
66
+ similarities = model.similarity(embeddings, embeddings)
67
+ print(similarities.shape)
68
+ # [3, 3]
69
+ ```
70
+
71
+ <!--
72
+ ### Direct Usage (Transformers)
73
+
74
+ <details><summary>Click to see the direct usage in Transformers</summary>
75
+
76
+ </details>
77
+ -->
78
+
79
+ <!--
80
+ ### Downstream Usage (Sentence Transformers)
81
+
82
+ You can finetune this model on your own dataset.
83
+
84
+ <details><summary>Click to expand</summary>
85
+
86
+ </details>
87
+ -->
88
+
89
+ <!--
90
+ ### Out-of-Scope Use
91
+
92
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
93
+ -->
94
+
95
+ <!--
96
+ ## Bias, Risks and Limitations
97
+
98
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
99
+ -->
100
+
101
+ <!--
102
+ ### Recommendations
103
+
104
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
105
+ -->
106
+
107
+ ## Training Details
108
+
109
+ ### Framework Versions
110
+ - Python: 3.10.12
111
+ - Sentence Transformers: 3.3.1
112
+ - Transformers: 4.44.2
113
+ - PyTorch: 2.5.0+cu124
114
+ - Accelerate: 1.2.0
115
+ - Datasets: 3.2.0
116
+ - Tokenizers: 0.19.1
117
+
118
+ ## Citation
119
+
120
+ ### BibTeX
121
+
122
+ <!--
123
+ ## Glossary
124
+
125
+ *Clearly define terms in order to be accessible across audiences.*
126
+ -->
127
+
128
+ <!--
129
+ ## Model Card Authors
130
+
131
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
132
+ -->
133
+
134
+ <!--
135
+ ## Model Card Contact
136
+
137
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
138
+ -->