Views
No views yet
princeton-nlp/sup-simcse-roberta-large and the student model is nreimers/TinyBERT_L-4_H-312_v2.pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2model = SentenceTransformer('Xuandong/HPD-TinyBERT-F128')1sentences = ['He plays guitar.', 'A street vendor is outside.']
2sentence_embeddings = model.encode(sentences)
3
4for sentence, embedding in zip(sentences, sentence_embeddings):
5 print("Sentence:", sentence)
6 print("Embedding:", embedding)
7 print("")| STS12 | STS13 | STS14 | STS15 | STS16 | STS-B | SICK-R | Avg. |
|---|---|---|---|---|---|---|---|
| 74.29 | 83.05 | 78.80 | 84.62 | 81.17 | 84.36 | 80.83 | 81.02 |
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 312, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
(2): Dense({'in_features': 312, 'out_features': 128, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
)1@article{zhao2022compressing,
2 title={Compressing Sentence Representation for Semantic Retrieval via Homomorphic Projective Distillation},
3 author={Zhao, Xuandong and Yu, Zhiguo and Wu, Ming and Li, Lei},
4 journal={arXiv preprint arXiv:2203.07687},
5 year={2022}
6}