johnpaulbin commited on
Commit
ce9fa40
1 Parent(s): be11476

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -35,3 +35,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  checkpoint-36/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  checkpoint-36/unigram.json filter=lfs diff=lfs merge=lfs -text
 
 
 
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  checkpoint-36/tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
  checkpoint-36/unigram.json filter=lfs diff=lfs merge=lfs -text
38
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
39
+ unigram.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.txt ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - loss:CoSENTLoss
8
+ base_model: sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
9
+ widget:
10
+ - source_sentence: I'm important.
11
+ sentences:
12
+ - I'm big.
13
+ - kili li tawa anpa poka kasi.
14
+ - mi suli.
15
+ - source_sentence: mi suli.
16
+ sentences:
17
+ - I'm fat.
18
+ - I'm big.
19
+ - kili li tawa anpa poka kasi.
20
+ - source_sentence: I am tall.
21
+ sentences:
22
+ - I'm fat.
23
+ - mi suli.
24
+ - The apple does not fall far from the tree.
25
+ - source_sentence: I am tall.
26
+ sentences:
27
+ - I'm important.
28
+ - kili li tawa anpa poka kasi.
29
+ - mi suli.
30
+ - source_sentence: mi suli.
31
+ sentences:
32
+ - The apple does not fall far from the tree.
33
+ - The apple does not fall far from the tree.
34
+ - mi suli.
35
+ pipeline_tag: sentence-similarity
36
+ library_name: sentence-transformers
37
+ ---
38
+
39
+ # SentenceTransformer based on sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2
40
+
41
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
42
+
43
+ ## Model Details
44
+
45
+ ### Model Description
46
+ - **Model Type:** Sentence Transformer
47
+ - **Base model:** [sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2](https://huggingface.co/sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2) <!-- at revision 8d6b950845285729817bf8e1af1861502c2fed0c -->
48
+ - **Maximum Sequence Length:** 128 tokens
49
+ - **Output Dimensionality:** 384 tokens
50
+ - **Similarity Function:** Cosine Similarity
51
+ <!-- - **Training Dataset:** Unknown -->
52
+ <!-- - **Language:** Unknown -->
53
+ <!-- - **License:** Unknown -->
54
+
55
+ ### Model Sources
56
+
57
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
58
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
59
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
60
+
61
+ ### Full Model Architecture
62
+
63
+ ```
64
+ SentenceTransformer(
65
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: BertModel
66
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
67
+ )
68
+ ```
69
+
70
+ ## Usage
71
+
72
+ ### Direct Usage (Sentence Transformers)
73
+
74
+ First install the Sentence Transformers library:
75
+
76
+ ```bash
77
+ pip install -U sentence-transformers
78
+ ```
79
+
80
+ Then you can load this model and run inference.
81
+ ```python
82
+ from sentence_transformers import SentenceTransformer
83
+
84
+ # Download from the 🤗 Hub
85
+ model = SentenceTransformer("sentence_transformers_model_id")
86
+ # Run inference
87
+ sentences = [
88
+ 'mi suli.',
89
+ 'The apple does not fall far from the tree.',
90
+ 'The apple does not fall far from the tree.',
91
+ ]
92
+ embeddings = model.encode(sentences)
93
+ print(embeddings.shape)
94
+ # [3, 384]
95
+
96
+ # Get the similarity scores for the embeddings
97
+ similarities = model.similarity(embeddings, embeddings)
98
+ print(similarities.shape)
99
+ # [3, 3]
100
+ ```
101
+
102
+ ## Training Details
103
+
104
+ ### Framework Versions
105
+ - Python: 3.10.12
106
+ - Sentence Transformers: 3.2.1
107
+ - Transformers: 4.42.2
108
+ - PyTorch: 2.5.1+cu121
109
+ - Accelerate: 1.1.1
110
+ - Datasets: 3.1.0
111
+ - Tokenizers: 0.19.1
112
+
113
+ #### Sentence Transformers
114
+ ```bibtex
115
+ @inproceedings{reimers-2019-sentence-bert,
116
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
117
+ author = "Reimers, Nils and Gurevych, Iryna",
118
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
119
+ month = "11",
120
+ year = "2019",
121
+ publisher = "Association for Computational Linguistics",
122
+ url = "https://arxiv.org/abs/1908.10084",
123
+ }
124
+ ```
125
+
126
+ #### CoSENTLoss
127
+ ```bibtex
128
+ @online{kexuefm-8847,
129
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
130
+ author={Su Jianlin},
131
+ year={2022},
132
+ month={Jan},
133
+ url={https://kexue.fm/archives/8847},
134
+ }
135
+ ```
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.42.2",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 250037
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.2.1",
4
+ "transformers": "4.42.2",
5
+ "pytorch": "2.5.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d73f46832bc6a3a854a14e4ca73cde863b9f85f50db4e1ba708e430b7924e258
3
+ size 470637416
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0a4a82f72a3dfc35522e3d7fdf99b9251435685bfd25a183acf039727376c13
3
+ size 940212218
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:686ba12dfb9e250dd326d28f1899cfb155958fddb34c1fd6e0ff61b7c76f4af3
3
+ size 14244
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2fd2743287d156cd04c7839d1c540f41c34a34bc9c901ef1a26c3825917fc7aa
3
+ size 1064
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 128,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
3
+ size 17082987
tokenizer_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": true,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "do_lower_case": true,
48
+ "eos_token": "</s>",
49
+ "mask_token": "<mask>",
50
+ "max_length": 128,
51
+ "model_max_length": 128,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "<pad>",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "</s>",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "<unk>"
64
+ }
trainer_state.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": 0.15345074236392975,
3
+ "best_model_checkpoint": "checkpoints/checkpoint-36",
4
+ "epoch": 4.0,
5
+ "eval_steps": 500,
6
+ "global_step": 36,
7
+ "is_hyper_param_search": false,
8
+ "is_local_process_zero": true,
9
+ "is_world_process_zero": true,
10
+ "log_history": [
11
+ {
12
+ "embedding_loss": 0.4647,
13
+ "epoch": 0.1111111111111111,
14
+ "grad_norm": 3.230494976043701,
15
+ "learning_rate": 5e-06,
16
+ "step": 1
17
+ },
18
+ {
19
+ "epoch": 1.0,
20
+ "eval_embedding_loss": 0.17025126516819,
21
+ "eval_embedding_runtime": 0.1505,
22
+ "eval_embedding_samples_per_second": 398.721,
23
+ "eval_embedding_steps_per_second": 26.581,
24
+ "step": 9
25
+ },
26
+ {
27
+ "epoch": 2.0,
28
+ "eval_embedding_loss": 0.16353432834148407,
29
+ "eval_embedding_runtime": 0.1844,
30
+ "eval_embedding_samples_per_second": 325.435,
31
+ "eval_embedding_steps_per_second": 21.696,
32
+ "step": 18
33
+ },
34
+ {
35
+ "epoch": 3.0,
36
+ "eval_embedding_loss": 0.15655823051929474,
37
+ "eval_embedding_runtime": 0.1458,
38
+ "eval_embedding_samples_per_second": 411.565,
39
+ "eval_embedding_steps_per_second": 27.438,
40
+ "step": 27
41
+ },
42
+ {
43
+ "epoch": 4.0,
44
+ "eval_embedding_loss": 0.15345074236392975,
45
+ "eval_embedding_runtime": 0.1356,
46
+ "eval_embedding_samples_per_second": 442.32,
47
+ "eval_embedding_steps_per_second": 29.488,
48
+ "step": 36
49
+ }
50
+ ],
51
+ "logging_steps": 50,
52
+ "max_steps": 36,
53
+ "num_input_tokens_seen": 0,
54
+ "num_train_epochs": 4,
55
+ "save_steps": 500,
56
+ "stateful_callbacks": {
57
+ "TrainerControl": {
58
+ "args": {
59
+ "should_epoch_stop": false,
60
+ "should_evaluate": false,
61
+ "should_log": false,
62
+ "should_save": true,
63
+ "should_training_stop": true
64
+ },
65
+ "attributes": {}
66
+ }
67
+ },
68
+ "total_flos": 0.0,
69
+ "train_batch_size": 16,
70
+ "trial_name": null,
71
+ "trial_params": null
72
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:072e4ac4d55b5dff78155a373f4105f1c084fac079502c7317b22e71b2416538
3
+ size 5368
unigram.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:da145b5e7700ae40f16691ec32a0b1fdc1ee3298db22a31ea55f57a966c4a65d
3
+ size 14763260