NohTow commited on
Commit
3f565cb
1 Parent(s): cb0bdfc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +31 -112
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  base_model: colbert-ir/colbertv2.0
3
- datasets: []
4
- language: []
5
  library_name: sentence-transformers
6
  pipeline_tag: sentence-similarity
7
  tags:
@@ -9,29 +9,25 @@ tags:
9
  - sentence-similarity
10
  - feature-extraction
11
  widget: []
 
12
  ---
13
 
14
- # SentenceTransformer based on colbert-ir/colbertv2.0
 
15
 
16
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [colbert-ir/colbertv2.0](https://huggingface.co/colbert-ir/colbertv2.0). It maps sentences & paragraphs to a 128-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
 
 
17
 
18
  ## Model Details
 
19
 
20
  ### Model Description
21
- - **Model Type:** Sentence Transformer
22
  - **Base model:** [colbert-ir/colbertv2.0](https://huggingface.co/colbert-ir/colbertv2.0) <!-- at revision c1e84128e85ef755c096a95bdb06b47793b13acf -->
23
  - **Maximum Sequence Length:** 512 tokens
24
  - **Output Dimensionality:** 128 tokens
25
  - **Similarity Function:** Cosine Similarity
26
- <!-- - **Training Dataset:** Unknown -->
27
- <!-- - **Language:** Unknown -->
28
- <!-- - **License:** Unknown -->
29
-
30
- ### Model Sources
31
-
32
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
33
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
34
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
35
 
36
  ### Full Model Architecture
37
 
@@ -42,103 +38,26 @@ ColBERT(
42
  )
43
  ```
44
 
45
- ## Usage
46
-
47
- ### Direct Usage (Sentence Transformers)
48
-
49
- First install the Sentence Transformers library:
50
-
51
- ```bash
52
- pip install -U sentence-transformers
53
  ```
54
-
55
- Then you can load this model and run inference.
56
- ```python
57
- from sentence_transformers import SentenceTransformer
58
-
59
- # Download from the 🤗 Hub
60
- model = SentenceTransformer("sentence_transformers_model_id")
61
- # Run inference
62
- sentences = [
63
- 'The weather is lovely today.',
64
- "It's so sunny outside!",
65
- 'He drove to the stadium.',
66
- ]
67
- embeddings = model.encode(sentences)
68
- print(embeddings.shape)
69
- # [3, 128]
70
-
71
- # Get the similarity scores for the embeddings
72
- similarities = model.similarity(embeddings, embeddings)
73
- print(similarities.shape)
74
- # [3, 3]
75
  ```
76
-
77
- <!--
78
- ### Direct Usage (Transformers)
79
-
80
- <details><summary>Click to see the direct usage in Transformers</summary>
81
-
82
- </details>
83
- -->
84
-
85
- <!--
86
- ### Downstream Usage (Sentence Transformers)
87
-
88
- You can finetune this model on your own dataset.
89
-
90
- <details><summary>Click to expand</summary>
91
-
92
- </details>
93
- -->
94
-
95
- <!--
96
- ### Out-of-Scope Use
97
-
98
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
99
- -->
100
-
101
- <!--
102
- ## Bias, Risks and Limitations
103
-
104
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
105
- -->
106
-
107
- <!--
108
- ### Recommendations
109
-
110
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
111
- -->
112
-
113
- ## Training Details
114
-
115
- ### Framework Versions
116
- - Python: 3.12.4
117
- - Sentence Transformers: 3.0.1
118
- - Transformers: 4.45.0.dev0
119
- - PyTorch: 2.4.0+cu121
120
- - Accelerate: 0.33.0
121
- - Datasets: 2.20.0
122
- - Tokenizers: 0.19.1
123
-
124
- ## Citation
125
-
126
- ### BibTeX
127
-
128
- <!--
129
- ## Glossary
130
-
131
- *Clearly define terms in order to be accessible across audiences.*
132
- -->
133
-
134
- <!--
135
- ## Model Card Authors
136
-
137
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
138
- -->
139
-
140
- <!--
141
- ## Model Card Contact
142
-
143
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
144
- -->
 
1
  ---
2
  base_model: colbert-ir/colbertv2.0
3
+ language:
4
+ - en
5
  library_name: sentence-transformers
6
  pipeline_tag: sentence-similarity
7
  tags:
 
9
  - sentence-similarity
10
  - feature-extraction
11
  widget: []
12
+ license: mit
13
  ---
14
 
15
+ # PyLate version of colbert-ir/colbertv2.0
16
+ This checkpoint is a version of [colbert-ir/colbertv2.0](https://huggingface.co/colbert-ir/colbertv2.0) compatible with the [PyLate](https://github.com/lightonai/pylate) library.
17
 
18
+ All the credits belong to the original authors and we thank Omar Khattab for allowing us to share this version of the model.
19
+
20
+ Please refer to the [original repository](https://huggingface.co/colbert-ir/colbertv2.0) and [paper](https://arxiv.org/abs/2112.01488) for more information about the model and to [PyLate repository](https://github.com/lightonai/pylate) for information about usage of the model.
21
 
22
  ## Model Details
23
+ The model maps query and documents to sequences of 128-dimensional dense vectors and can be used for semantic textual similarity using the MaxSim operator.
24
 
25
  ### Model Description
26
+ - **Model Type:** PyLate model
27
  - **Base model:** [colbert-ir/colbertv2.0](https://huggingface.co/colbert-ir/colbertv2.0) <!-- at revision c1e84128e85ef755c096a95bdb06b47793b13acf -->
28
  - **Maximum Sequence Length:** 512 tokens
29
  - **Output Dimensionality:** 128 tokens
30
  - **Similarity Function:** Cosine Similarity
 
 
 
 
 
 
 
 
 
31
 
32
  ### Full Model Architecture
33
 
 
38
  )
39
  ```
40
 
41
+ ### Citation
 
 
 
 
 
 
 
42
  ```
43
+ @inproceedings{santhanam-etal-2022-colbertv2,
44
+ title = "{C}ol{BERT}v2: Effective and Efficient Retrieval via Lightweight Late Interaction",
45
+ author = "Santhanam, Keshav and
46
+ Khattab, Omar and
47
+ Saad-Falcon, Jon and
48
+ Potts, Christopher and
49
+ Zaharia, Matei",
50
+ editor = "Carpuat, Marine and
51
+ de Marneffe, Marie-Catherine and
52
+ Meza Ruiz, Ivan Vladimir",
53
+ booktitle = "Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
54
+ month = jul,
55
+ year = "2022",
56
+ address = "Seattle, United States",
57
+ publisher = "Association for Computational Linguistics",
58
+ url = "https://aclanthology.org/2022.naacl-main.272",
59
+ doi = "10.18653/v1/2022.naacl-main.272",
60
+ pages = "3715--3734",
61
+ abstract = "Neural information retrieval (IR) has greatly advanced search and other knowledge-intensive language tasks. While many neural IR methods encode queries and documents into single-vector representations, late interaction models produce multi-vector representations at the granularity of each token and decompose relevance modeling into scalable token-level computations. This decomposition has been shown to make late interaction more effective, but it inflates the space footprint of these models by an order of magnitude. In this work, we introduce ColBERTv2, a retriever that couples an aggressive residual compression mechanism with a denoised supervision strategy to simultaneously improve the quality and space footprint of late interaction. We evaluate ColBERTv2 across a wide range of benchmarks, establishing state-of-the-art quality within and outside the training domain while reducing the space footprint of late interaction models by 6{--}10x.",
62
+ }
 
63
  ```