eugene-yang commited on
Commit
09d8023
1 Parent(s): 616b7de

push model

Browse files
.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,91 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ - zh
5
+ tags:
6
+ - clir
7
+ - colbertx
8
+ - plaidx
9
+ - xlm-roberta-large
10
+ datasets:
11
+ - ms_marco
12
+ - hltcoe/tdist-msmarco-scores
13
+ task_categories:
14
+ - text-retrieval
15
+ - information-retrieval
16
+ task_ids:
17
+ - passage-retrieval
18
+ - cross-language-retrieval
19
  license: mit
20
  ---
21
+
22
+ # ColBERT-X for English-Chinese CLIR using Translate-Distill
23
+
24
+ ## CLIR Model Setting
25
+
26
+ - Query language: English
27
+ - Query length: 32 token max
28
+ - Document language: Chinese
29
+ - Document length: 180 token max (please use MaxP to aggregate the passage score if needed)
30
+
31
+ ## Model Description
32
+
33
+ Translate-Distill is a training technique that produces state-of-the-art CLIR dense retrieval model through translation and distillation.
34
+ `plaidx-large-zho-tdist-mt5xxl-engeng` is trained with KL-Divergence from the mt5xxl MonoT5 reranker inferenced on
35
+ English MS MARCO training queries and English passages.
36
+
37
+ ### Teacher Models:
38
+
39
+ - `t53b`: [`castorini/monot5-3b-msmarco-10k`](https://huggingface.co/castorini/monot5-3b-msmarco-10k)
40
+ - `mt5xxl`: [`unicamp-dl/mt5-13b-mmarco-100k`](https://huggingface.co/unicamp-dl/mt5-13b-mmarco-100k)
41
+
42
+ ### Training Parameters
43
+
44
+ - learning rate: 5e-6
45
+ - update steps: 200,000
46
+ - nway (number of passages per query): 6 (randomly selected from 50)
47
+ - per device batch size (number of query-passage set): 8
48
+ - training GPU: 8 NVIDIA V100 with 32 GB memory
49
+
50
+ ## Usage
51
+
52
+ To properly load ColBERT-X models from Huggingface Hub, please use the following version of PLAID-X.
53
+ ```bash
54
+ pip install git+https://github.com/hltcoe/ColBERT-X.git@plaid-x
55
+ ```
56
+
57
+ Following code snippet loads the model through Huggingface API.
58
+ ```python
59
+ from colbert.modeling.checkpoint import Checkpoint
60
+ from colbert.infra import ColBERTConfig
61
+
62
+ Checkpoint('hltcoe/plaidx-large-zho-tdist-mt5xxl-engeng', colbert_config=ColBERTConfig())
63
+ ```
64
+
65
+ For full tutorial, please refer to the [PLAID-X Jupyter Notebook](https://colab.research.google.com/github/hltcoe/clir-tutorial/blob/main/notebooks/clir_tutorial_plaidx.ipynb),
66
+ which is part of the [SIGIR 2023 CLIR Tutorial](https://github.com/hltcoe/clir-tutorial).
67
+
68
+ ## BibTeX entry and Citation Info
69
+
70
+ Please cite the following two papers if you use the model.
71
+
72
+
73
+ ```bibtex
74
+ @inproceedings{colbert-x,
75
+ 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},
76
+ title = {Transfer Learning Approaches for Building Cross-Language Dense Retrieval Models},
77
+ booktitle = {Proceedings of the 44th European Conference on Information Retrieval (ECIR)},
78
+ year = {2022},
79
+ url = {https://arxiv.org/abs/2201.08471}
80
+ }
81
+ ```
82
+
83
+ ```bibtex
84
+ @inproceedings{translate-distill,
85
+ author = {Eugene Yang and Dawn Lawrie and James Mayfield and Douglas W. Oard and Scott Miller},
86
+ title = {Translate-Distill: Learning Cross-Language Dense Retrieval by Translation and Distillation},
87
+ booktitle = {Proceedings of the 46th European Conference on Information Retrieval (ECIR)},
88
+ year = {2024},
89
+ url = {https://arxiv.org/abs/2401.04810}
90
+ }
91
+ ```
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "[unused0]": 250002,
3
+ "[unused1]": 250003
4
+ }
artifact.metadata ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "reuse_centroids_from": null,
17
+ "similarity": "cosine",
18
+ "bsize": 8,
19
+ "accumsteps": 1,
20
+ "lr": 5e-6,
21
+ "maxsteps": 200000,
22
+ "save_every": null,
23
+ "resume_optimizer": false,
24
+ "fix_broken_optimizer_state": false,
25
+ "warmup": null,
26
+ "warmup_bert": null,
27
+ "relu": false,
28
+ "nway": 6,
29
+ "n_query_alternative": 1,
30
+ "use_ib_negatives": false,
31
+ "kd_loss": "KLD",
32
+ "reranker": false,
33
+ "distillation_alpha": 1.0,
34
+ "ignore_scores": false,
35
+ "model_name": "xlm-roberta-large",
36
+ "force_resize_embeddings": true,
37
+ "shuffle_passages": true,
38
+ "sampling_max_beta": 1.0,
39
+ "over_one_epoch": true,
40
+ "query_maxlen": 32,
41
+ "attend_to_mask_tokens": false,
42
+ "interaction": "colbert",
43
+ "dim": 128,
44
+ "doc_maxlen": 220,
45
+ "mask_punctuation": true,
46
+ "checkpoint": "xlm-roberta-large",
47
+ "triples": "\/expscratch\/eyang\/workspace\/plaid-aux\/training_triples\/msmarco-passages\/triples_mt5xxl-monot5-mmarco-engeng.jsonl",
48
+ "collection": null,
49
+ "queries": null,
50
+ "index_name": null,
51
+ "overwrite": false,
52
+ "root": "\/expscratch\/eyang\/workspace\/plaid-aux\/experiments",
53
+ "experiment": "plaid_xlm-roberta-large_fixeddp",
54
+ "index_root": null,
55
+ "name": "zho-KLD-shuf-5e-6\/mt5xxl-monot5-mmarco-engeng\/64bat.6way",
56
+ "rank": 0,
57
+ "nranks": 8,
58
+ "amp": true,
59
+ "ivf_num_processes": 20,
60
+ "gpus": 8,
61
+ "meta": {
62
+ "hostname": "r10n01",
63
+ "git_branch": "eugene-training",
64
+ "git_hash": "220bdf8155f0615e1bb2d997d8efe924ffe806b5",
65
+ "git_commit_datetime": "2023-09-29 16:36:59-04:00",
66
+ "current_datetime": "Oct 03, 2023 ; 9:41PM EDT (-0400)",
67
+ "cmd": "train.py --model_name xlm-roberta-large --training_triples \/expscratch\/eyang\/workspace\/plaid-aux\/training_triples\/msmarco-passages\/triples_mt5xxl-monot5-mmarco-engeng.jsonl --training_irds_id neumarco\/zh\/train --maxsteps 200000 --learning_rate 5e-6 --kd_loss KLD --per_device_batch_size 8 --nway 6 --run_tag zho-KLD-shuf-5e-6\/mt5xxl-monot5-mmarco-engeng --experiment plaid_xlm-roberta-large_fixeddp",
68
+ "version": "colbert-v0.4"
69
+ }
70
+ }
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:b254bf1f2f4eb36becb6524e787d55e66e64e1782e53282d6293e398b87a0787
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
+ }