princeton-nlp nazneen commited on
Commit
fee6549
1 Parent(s): 6711247

model documentation (#1)

Browse files

- model documentation (e470bc2165bdac9021d7bf60a1bcd2cb1310285c)


Co-authored-by: Nazneen Rajani <[email protected]>

Files changed (1) hide show
  1. README.md +189 -0
README.md ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - feature-extraction
4
+ - bert
5
+ ---
6
+
7
+ # Model Card for baikal-sentiment-ball
8
+
9
+ # Model Details
10
+
11
+ ## Model Description
12
+
13
+ More information needed
14
+
15
+ - **Developed by:** Princeton NLP group
16
+ - **Shared by [Optional]:** Princeton NLP group
17
+
18
+ - **Model type:** Feature Extraction
19
+ - **Language(s) (NLP):** More information needed
20
+ - **License:** More information needed
21
+ - **Parent Model:** BERT
22
+ - **Resources for more information:**
23
+ - [GitHub Repo](https://github.com/princeton-nlp/SimCSE)
24
+ - [Associated Paper](https://arxiv.org/abs/2104.08821)
25
+
26
+
27
+ # Uses
28
+
29
+
30
+ ## Direct Use
31
+ This model can be used for the task of feature extraction.
32
+
33
+ ## Downstream Use [Optional]
34
+
35
+ More information needed.
36
+
37
+ ## Out-of-Scope Use
38
+
39
+ The model should not be used to intentionally create hostile or alienating environments for people.
40
+
41
+ # Bias, Risks, and Limitations
42
+
43
+
44
+ Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)). Predictions generated by the model may include disturbing and harmful stereotypes across protected classes; identity characteristics; and sensitive, social, and occupational groups.
45
+
46
+
47
+
48
+ ## Recommendations
49
+
50
+
51
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
52
+
53
+ # Training Details
54
+
55
+ ## Training Data
56
+
57
+ The model craters note in the [Github Repository](https://github.com/princeton-nlp/SimCSE/blob/main/README.md)
58
+ > We train unsupervised SimCSE on 106 randomly sampled sentences from English Wikipedia, and train supervised SimCSE on the combination of MNLI and SNLI datasets (314k).
59
+
60
+
61
+ ## Training Procedure
62
+
63
+
64
+ ### Preprocessing
65
+
66
+ More information needed
67
+
68
+
69
+
70
+ ### Speeds, Sizes, Times
71
+
72
+ More information needed
73
+
74
+
75
+ # Evaluation
76
+
77
+
78
+ ## Testing Data, Factors & Metrics
79
+
80
+ ### Testing Data
81
+
82
+ The model craters note in the [associated paper](https://arxiv.org/pdf/2104.08821.pdf)
83
+ > Our evaluation code for sentence embeddings is based on a modified version of [SentEval](https://github.com/facebookresearch/SentEval). It evaluates sentence embeddings on semantic textual similarity (STS) tasks and downstream transfer tasks.
84
+
85
+ For STS tasks, our evaluation takes the "all" setting, and report Spearman's correlation. See [associated paper](https://arxiv.org/pdf/2104.08821.pdf) (Appendix B) for evaluation details.
86
+
87
+
88
+
89
+ ### Factors
90
+ More information needed
91
+
92
+ ### Metrics
93
+
94
+ More information needed
95
+
96
+
97
+ ## Results
98
+
99
+ More information needed
100
+
101
+
102
+ # Model Examination
103
+
104
+ The model craters note in the [associated paper](https://arxiv.org/pdf/2104.08821.pdf):
105
+
106
+ > **Uniformity and alignment.**
107
+ We also observe that (1) though pre-trained embeddings have good alignment, their uniformity is poor (i.e., the embeddings are highly anisotropic); (2) post-processing methods like BERT-flow and BERT-whitening greatly improve uniformity but also suffer a degeneration in alignment; (3) unsupervised SimCSE effectively improves uniformity of pre-trained embeddings whereas keeping a good alignment;(4) incorporating supervised data in SimCSE further amends alignment.
108
+
109
+
110
+
111
+ # Environmental Impact
112
+
113
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
114
+
115
+ - **Hardware Type:** Nvidia 3090 GPUs with CUDA 11
116
+ - **Hours used:** More information needed
117
+ - **Cloud Provider:** More information needed
118
+ - **Compute Region:** More information needed
119
+ - **Carbon Emitted:** More information needed
120
+
121
+ # Technical Specifications [optional]
122
+
123
+ ## Model Architecture and Objective
124
+
125
+ More information needed
126
+
127
+ ## Compute Infrastructure
128
+
129
+ More information needed
130
+
131
+ ### Hardware
132
+
133
+
134
+ More information needed
135
+
136
+ ### Software
137
+
138
+ More information needed.
139
+
140
+ # Citation
141
+
142
+
143
+ **BibTeX:**
144
+
145
+ ```bibtex
146
+ @inproceedings{gao2021simcse,
147
+ title={{SimCSE}: Simple Contrastive Learning of Sentence Embeddings},
148
+ author={Gao, Tianyu and Yao, Xingcheng and Chen, Danqi},
149
+ booktitle={Empirical Methods in Natural Language Processing (EMNLP)},
150
+ year={2021}
151
+ }
152
+ ```
153
+
154
+ # Glossary [optional]
155
+
156
+ More information needed
157
+
158
+ # More Information [optional]
159
+ More information needed
160
+
161
+
162
+ # Model Card Authors [optional]
163
+
164
+ Princeton NLP group in collaboration with Ezi Ozoani and the Hugging Face team.
165
+
166
+ # Model Card Contact
167
+
168
+ If you have any questions related to the code or the paper, feel free to email Tianyu (`[email protected]`) and Xingcheng (`[email protected]`). If you encounter any problems when using the code, or want to report a bug, you can open an issue. Please try to specify the problem with details so we can help you better and quicker!
169
+
170
+
171
+
172
+ # How to Get Started with the Model
173
+
174
+ Use the code below to get started with the model.
175
+
176
+ <details>
177
+ <summary> Click to expand </summary>
178
+
179
+ ```python
180
+ from transformers import AutoTokenizer, AutoModel
181
+
182
+ tokenizer = AutoTokenizer.from_pretrained("princeton-nlp/sup-simcse-bert-large-uncased")
183
+
184
+ model = AutoModel.from_pretrained("princeton-nlp/sup-simcse-bert-large-uncased")
185
+
186
+ ```
187
+ </details>
188
+
189
+