feat: format the readme in black
Browse files
README.md
CHANGED
@@ -146,16 +146,12 @@ pip install -U colbert-ai
|
|
146 |
from ragatouille import RAGPretrainedModel
|
147 |
|
148 |
RAG = RAGPretrainedModel.from_pretrained("jinaai/jina-colbert-v2")
|
149 |
-
|
150 |
docs = [
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
RAG.index(docs, index_name="demo")
|
156 |
-
|
157 |
-
query = 'What does ColBERT do?'
|
158 |
-
|
159 |
results = RAG.search(query)
|
160 |
```
|
161 |
|
@@ -167,11 +163,10 @@ from colbert.modeling.checkpoint import Checkpoint
|
|
167 |
|
168 |
ckpt = Checkpoint("jinaai/jina-colbert-v2", colbert_config=ColBERTConfig())
|
169 |
docs = [
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
query_vectors = ckpt.queryFromText(
|
174 |
-
print(query_vectors)
|
175 |
```
|
176 |
|
177 |
## Evaluation Results
|
|
|
146 |
from ragatouille import RAGPretrainedModel
|
147 |
|
148 |
RAG = RAGPretrainedModel.from_pretrained("jinaai/jina-colbert-v2")
|
|
|
149 |
docs = [
|
150 |
+
"ColBERT is a novel ranking model that adapts deep LMs for efficient retrieval.",
|
151 |
+
"Jina-ColBERT is a ColBERT-style model but based on JinaBERT so it can support both 8k context length, fast and accurate retrieval.",
|
152 |
+
]
|
|
|
153 |
RAG.index(docs, index_name="demo")
|
154 |
+
query = "What does ColBERT do?"
|
|
|
|
|
155 |
results = RAG.search(query)
|
156 |
```
|
157 |
|
|
|
163 |
|
164 |
ckpt = Checkpoint("jinaai/jina-colbert-v2", colbert_config=ColBERTConfig())
|
165 |
docs = [
|
166 |
+
"ColBERT is a novel ranking model that adapts deep LMs for efficient retrieval.",
|
167 |
+
"Jina-ColBERT is a ColBERT-style model but based on JinaBERT so it can support both 8k context length, fast and accurate retrieval.",
|
168 |
+
]
|
169 |
+
query_vectors = ckpt.queryFromText(docs, bsize=2)
|
|
|
170 |
```
|
171 |
|
172 |
## Evaluation Results
|