Commit
•
c662d57
1
Parent(s):
1415739
push model
Browse files- .gitattributes +1 -0
- README.md +79 -0
- added_tokens.json +4 -0
- artifact.metadata +67 -0
- config.json +28 -0
- pytorch_model.bin +3 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +3 -0
- tokenizer_config.json +19 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,82 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
license: mit
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- fa
|
5 |
+
license: cc-by-nc-4.0
|
6 |
+
tags:
|
7 |
+
- clir
|
8 |
+
- colbertx
|
9 |
+
- plaidx
|
10 |
+
- xlm-roberta-large
|
11 |
+
datasets:
|
12 |
+
- ms_marco
|
13 |
+
- eugene-yang/tdill-msmarco-scores
|
14 |
+
task_categories:
|
15 |
+
- text-retrieval
|
16 |
+
- information-retrieval
|
17 |
+
task_ids:
|
18 |
+
- passage-retrieval
|
19 |
+
- cross-language-retrieval
|
20 |
license: mit
|
21 |
---
|
22 |
+
|
23 |
+
# ColBERT-X for English-Persian CLIR using Translate-Distill
|
24 |
+
|
25 |
+
## Model Description
|
26 |
+
|
27 |
+
Translate-Distill is a training technique that produces state-of-the-art CLIR dense retrieval model through translation and distillation.
|
28 |
+
`plaidx-large-fas-tdist-t53b-engeng` is trained with KL-Divergence from the t53b MonoT5 reranker inferenced on
|
29 |
+
English MS MARCO training queries and English passages.
|
30 |
+
|
31 |
+
### Teacher Models:
|
32 |
+
|
33 |
+
- `t53b`: [`castorini/monot5-3b-msmarco-10k`](https://huggingface.co/castorini/monot5-3b-msmarco-10k)
|
34 |
+
- `mt5xxl`: [`unicamp-dl/mt5-13b-mmarco-100k`](https://huggingface.co/unicamp-dl/mt5-13b-mmarco-100k)
|
35 |
+
|
36 |
+
### Training Parameters
|
37 |
+
|
38 |
+
- learning rate: 5e-6
|
39 |
+
- update steps: 200,000
|
40 |
+
- nway (number of passages per query): 6 (randomly selected from 50)
|
41 |
+
- per device batch size (number of query-passage set): 8
|
42 |
+
- training GPU: 8 NVIDIA V100 with 32 GB memory
|
43 |
+
|
44 |
+
## Usage
|
45 |
+
|
46 |
+
To properly load ColBERT-X models from Huggingface Hub, please use the following version of PLAID-X.
|
47 |
+
```bash
|
48 |
+
pip install git+https://github.com/hltcoe/ColBERT-X.git@plaid-x
|
49 |
+
```
|
50 |
+
|
51 |
+
Following code snippet loads the model through Huggingface API.
|
52 |
+
```python
|
53 |
+
from colbert.modeling.checkpoint import Checkpoint
|
54 |
+
from colbert.infra import ColBERTConfig
|
55 |
+
|
56 |
+
Checkpoint('plaidx-large-fas-tdist-t53b-engeng', colbert_config=ColBERTConfig())
|
57 |
+
```
|
58 |
+
|
59 |
+
## BibTeX entry and Citation Info
|
60 |
+
|
61 |
+
Please cite the following two papers if you use the model.
|
62 |
+
|
63 |
+
|
64 |
+
```bibtex
|
65 |
+
@inproceedings{colbert-x,
|
66 |
+
author = {Suraj Nair and Eugene Yang and Dawn Lawrie and Kevin Duh and Paul McNamee and Kenton Murray and James Mayfield and Douglas W. Oard},
|
67 |
+
title = {Transfer Learning Approaches for Building Cross-Language Dense Retrieval Models},
|
68 |
+
booktitle = {Proceedings of the 44th European Conference on Information Retrieval (ECIR)},
|
69 |
+
year = {2022},
|
70 |
+
url = {https://arxiv.org/abs/2201.08471}
|
71 |
+
}
|
72 |
+
```
|
73 |
+
|
74 |
+
```bibtex
|
75 |
+
@inproceedings{translate-distill,
|
76 |
+
author = {Eugene Yang and Dawn Lawrie and James Mayfield and Douglas W. Oard and Scott Miller},
|
77 |
+
title = {Translate-Distill: Learning Cross-Language \ Dense Retrieval by Translation and Distillation},
|
78 |
+
booktitle = {Proceedings of the 46th European Conference on Information Retrieval (ECIR)},
|
79 |
+
year = {2024},
|
80 |
+
url = {tba}
|
81 |
+
}
|
82 |
+
```
|
added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[unused0]": 250002,
|
3 |
+
"[unused1]": 250003
|
4 |
+
}
|
artifact.metadata
ADDED
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"query_token_id": "[unused0]",
|
3 |
+
"doc_token_id": "[unused1]",
|
4 |
+
"query_token": "[Q]",
|
5 |
+
"doc_token": "[D]",
|
6 |
+
"ncells": null,
|
7 |
+
"centroid_score_threshold": null,
|
8 |
+
"ndocs": null,
|
9 |
+
"index_path": null,
|
10 |
+
"nbits": 1,
|
11 |
+
"kmeans_niters": 4,
|
12 |
+
"resume": false,
|
13 |
+
"max_sampled_pid": -1,
|
14 |
+
"max_num_partitions": -1,
|
15 |
+
"use_lagacy_build_ivf": false,
|
16 |
+
"similarity": "cosine",
|
17 |
+
"bsize": 8,
|
18 |
+
"accumsteps": 1,
|
19 |
+
"lr": 5e-6,
|
20 |
+
"maxsteps": 200000,
|
21 |
+
"save_every": null,
|
22 |
+
"warmup": null,
|
23 |
+
"warmup_bert": null,
|
24 |
+
"relu": false,
|
25 |
+
"nway": 6,
|
26 |
+
"n_query_alternative": 1,
|
27 |
+
"use_ib_negatives": false,
|
28 |
+
"kd_loss": "KLD",
|
29 |
+
"reranker": false,
|
30 |
+
"distillation_alpha": 1.0,
|
31 |
+
"ignore_scores": false,
|
32 |
+
"model_name": "xlm-roberta-large",
|
33 |
+
"force_resize_embeddings": true,
|
34 |
+
"shuffle_passages": true,
|
35 |
+
"sampling_max_beta": 1.0,
|
36 |
+
"over_one_epoch": true,
|
37 |
+
"query_maxlen": 32,
|
38 |
+
"attend_to_mask_tokens": false,
|
39 |
+
"interaction": "colbert",
|
40 |
+
"dim": 128,
|
41 |
+
"doc_maxlen": 220,
|
42 |
+
"mask_punctuation": true,
|
43 |
+
"checkpoint": null,
|
44 |
+
"triples": "\/expscratch\/eyang\/workspace\/plaid-aux\/training_triples\/msmarco-passages\/triples_t53b-monot5-msmarco-eng.jsonl",
|
45 |
+
"collection": null,
|
46 |
+
"queries": null,
|
47 |
+
"index_name": null,
|
48 |
+
"overwrite": false,
|
49 |
+
"root": "\/expscratch\/eyang\/workspace\/plaid-aux\/experiments",
|
50 |
+
"experiment": "plaid_xlm-roberta-large_fixeddp",
|
51 |
+
"index_root": null,
|
52 |
+
"name": "fas-KLD-shuf-5e-6\/t53b-monot5-msmarco-eng\/64bat.6way",
|
53 |
+
"rank": 0,
|
54 |
+
"nranks": 8,
|
55 |
+
"amp": true,
|
56 |
+
"ivf_num_processes": 20,
|
57 |
+
"gpus": 8,
|
58 |
+
"meta": {
|
59 |
+
"hostname": "r10n05",
|
60 |
+
"git_branch": "eugene-training",
|
61 |
+
"git_hash": "ae15fcb5fb811bd34d7d66ed8d151f9df7fc29d8",
|
62 |
+
"git_commit_datetime": "2023-09-07 10:59:26-04:00",
|
63 |
+
"current_datetime": "Sep 16, 2023 ; 3:37PM EDT (-0400)",
|
64 |
+
"cmd": "train.py --model_name xlm-roberta-large --training_triples \/expscratch\/eyang\/workspace\/plaid-aux\/training_triples\/msmarco-passages\/triples_t53b-monot5-msmarco-eng.jsonl --training_irds_id neumarco\/fa\/train --maxsteps 200000 --learning_rate 5e-6 --kd_loss KLD --per_device_batch_size 8 --nway 6 --run_tag fas-KLD-shuf-5e-6\/t53b-monot5-msmarco-eng --experiment plaid_xlm-roberta-large_fixeddp",
|
65 |
+
"version": "colbert-v0.4"
|
66 |
+
}
|
67 |
+
}
|
config.json
ADDED
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "xlm-roberta-large",
|
3 |
+
"architectures": [
|
4 |
+
"HF_ColBERT"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"classifier_dropout": null,
|
9 |
+
"eos_token_id": 2,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 1024,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 4096,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 514,
|
17 |
+
"model_type": "xlm-roberta",
|
18 |
+
"num_attention_heads": 16,
|
19 |
+
"num_hidden_layers": 24,
|
20 |
+
"output_past": true,
|
21 |
+
"pad_token_id": 1,
|
22 |
+
"position_embedding_type": "absolute",
|
23 |
+
"torch_dtype": "float32",
|
24 |
+
"transformers_version": "4.28.0",
|
25 |
+
"type_vocab_size": 1,
|
26 |
+
"use_cache": true,
|
27 |
+
"vocab_size": 250004
|
28 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:628fd6b6cc29edd3ee3209b19fdcc15241982136d59d31cbca3fb88bb5a2ede5
|
3 |
+
size 2240233969
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
special_tokens_map.json
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"cls_token": "<s>",
|
4 |
+
"eos_token": "</s>",
|
5 |
+
"mask_token": {
|
6 |
+
"content": "<mask>",
|
7 |
+
"lstrip": true,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false
|
11 |
+
},
|
12 |
+
"pad_token": "<pad>",
|
13 |
+
"sep_token": "</s>",
|
14 |
+
"unk_token": "<unk>"
|
15 |
+
}
|
tokenizer.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c19ec03247ee31e5f42772ac32bde8dca2727b30c8310c2e585df4980a8db230
|
3 |
+
size 17083032
|
tokenizer_config.json
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": "<s>",
|
3 |
+
"clean_up_tokenization_spaces": true,
|
4 |
+
"cls_token": "<s>",
|
5 |
+
"eos_token": "</s>",
|
6 |
+
"mask_token": {
|
7 |
+
"__type": "AddedToken",
|
8 |
+
"content": "<mask>",
|
9 |
+
"lstrip": true,
|
10 |
+
"normalized": true,
|
11 |
+
"rstrip": false,
|
12 |
+
"single_word": false
|
13 |
+
},
|
14 |
+
"model_max_length": 512,
|
15 |
+
"pad_token": "<pad>",
|
16 |
+
"sep_token": "</s>",
|
17 |
+
"tokenizer_class": "XLMRobertaTokenizer",
|
18 |
+
"unk_token": "<unk>"
|
19 |
+
}
|