FronyAI commited on
Commit
4231d5b
·
verified ·
1 Parent(s): 11cafb4

Initial commit

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
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.md ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ko
4
+ - en
5
+ license: apache-2.0
6
+ tags:
7
+ - sentence-transformers
8
+ - sentence-similarity
9
+ - feature-extraction
10
+ pipeline_tag: sentence-similarity
11
+ library_name: sentence-transformers
12
+ ---
13
+
14
+ # FronyAI/frony-embed-small-ko-v1
15
+
16
+ This is a [sentence-transformers](https://www.SBERT.net) model trained. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for Retrieval.
17
+
18
+ ## Model Details
19
+
20
+ ### Model Description
21
+ - **Model Type:** Sentence Transformer
22
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
23
+ - **Maximum Sequence Length:** 512 tokens
24
+ - **Output Dimensionality:** 768 dimensions
25
+ - **Similarity Function:** Cosine Similarity
26
+ <!-- - **Training Dataset:** Unknown -->
27
+ - **Languages:** ko, en
28
+ - **License:** apache-2.0
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
+
38
+ ```
39
+ SentenceTransformer(
40
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: RobertaModel
41
+ (1): Pooling({'word_embedding_dimension': 768, '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})
42
+ (2): Normalize()
43
+ )
44
+ ```
45
+
46
+ ## Usage
47
+
48
+ ### Direct Usage (Sentence Transformers)
49
+
50
+ First install the Sentence Transformers library:
51
+
52
+ ```bash
53
+ pip install -U sentence-transformers
54
+ ```
55
+
56
+ Then you can load this model and run inference.
57
+ ```python
58
+ from sentence_transformers import SentenceTransformer
59
+
60
+ # Download from the 🤗 Hub
61
+ model = SentenceTransformer("FronyAI/frony-embed-small-ko-v1")
62
+ # Run inference
63
+ sentences = [
64
+ 'The weather is lovely today.',
65
+ "It's so sunny outside!",
66
+ 'He drove to the stadium.',
67
+ ]
68
+ embeddings = model.encode(sentences)
69
+ print(embeddings.shape)
70
+ # [3, 768]
71
+
72
+ # Get the similarity scores for the embeddings
73
+ similarities = model.similarity(embeddings, embeddings)
74
+ print(similarities.shape)
75
+ # [3, 3]
76
+ ```
77
+
78
+ <!--
79
+ ### Direct Usage (Transformers)
80
+
81
+ <details><summary>Click to see the direct usage in Transformers</summary>
82
+
83
+ </details>
84
+ -->
85
+
86
+ <!--
87
+ ### Downstream Usage (Sentence Transformers)
88
+
89
+ You can finetune this model on your own dataset.
90
+
91
+ <details><summary>Click to expand</summary>
92
+
93
+ </details>
94
+ -->
95
+
96
+ <!--
97
+ ### Out-of-Scope Use
98
+
99
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
100
+ -->
101
+
102
+ <!--
103
+ ## Bias, Risks and Limitations
104
+
105
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
106
+ -->
107
+
108
+ <!--
109
+ ### Recommendations
110
+
111
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
112
+ -->
113
+
114
+ ## Training Details
115
+
116
+ ### Framework Versions
117
+ - Python: 3.10.16
118
+ - Sentence Transformers: 4.0.2
119
+ - Transformers: 4.47.1
120
+ - PyTorch: 2.5.1+cu121
121
+ - Accelerate: 1.2.1
122
+ - Datasets: 2.21.0
123
+ - Tokenizers: 0.21.0
124
+
125
+ ## Citation
126
+
127
+ ### BibTeX
128
+
129
+ <!--
130
+ ## Glossary
131
+
132
+ *Clearly define terms in order to be accessible across audiences.*
133
+ -->
134
+
135
+ <!--
136
+ ## Model Card Authors
137
+
138
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
139
+ -->
140
+
141
+ <!--
142
+ ## Model Card Contact
143
+
144
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
145
+ -->
added_tokens.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "<P>": 32001,
3
+ "<Q>": 32000
4
+ }
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/hdd_data2/yjk/dpr-v2/architectures/fronyEmbed_baseKlue-base_b8-1_f10-s_2025-04-18_22-12/post/fronyEmbed_baseKlue-base_b8-1-matryo_f10-s_2025-04-19_00-24/model_best",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "tokenizer_class": "BertTokenizer",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.47.1",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 32002
29
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.2",
4
+ "transformers": "4.47.1",
5
+ "pytorch": "2.5.1+cu121"
6
+ },
7
+ "prompts": {
8
+ "query": "<Q>",
9
+ "passage": "<P>"
10
+ },
11
+ "default_prompt_name": null,
12
+ "similarity_fn_name": "cosine"
13
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f118d7694daf69409b427ff56403b3e40fc69be27f5a21c1093abd48bb2df7aa
3
+ size 442500960
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<Q>",
4
+ "<P>"
5
+ ],
6
+ "bos_token": {
7
+ "content": "[CLS]",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "cls_token": {
14
+ "content": "[CLS]",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ },
20
+ "eos_token": {
21
+ "content": "[SEP]",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false
26
+ },
27
+ "mask_token": {
28
+ "content": "[MASK]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ },
34
+ "pad_token": {
35
+ "content": "[PAD]",
36
+ "lstrip": false,
37
+ "normalized": false,
38
+ "rstrip": false,
39
+ "single_word": false
40
+ },
41
+ "sep_token": {
42
+ "content": "[SEP]",
43
+ "lstrip": false,
44
+ "normalized": false,
45
+ "rstrip": false,
46
+ "single_word": false
47
+ },
48
+ "unk_token": {
49
+ "content": "[UNK]",
50
+ "lstrip": false,
51
+ "normalized": false,
52
+ "rstrip": false,
53
+ "single_word": false
54
+ }
55
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,87 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[CLS]",
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": "[SEP]",
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
+ "4": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "32000": {
44
+ "content": "<Q>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "32001": {
52
+ "content": "<P>",
53
+ "lstrip": false,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ }
59
+ },
60
+ "additional_special_tokens": [
61
+ "<Q>",
62
+ "<P>"
63
+ ],
64
+ "bos_token": "[CLS]",
65
+ "clean_up_tokenization_spaces": false,
66
+ "cls_token": "[CLS]",
67
+ "do_basic_tokenize": true,
68
+ "do_lower_case": false,
69
+ "eos_token": "[SEP]",
70
+ "extra_special_tokens": {},
71
+ "mask_token": "[MASK]",
72
+ "max_length": 512,
73
+ "model_max_length": 512,
74
+ "never_split": null,
75
+ "pad_to_multiple_of": null,
76
+ "pad_token": "[PAD]",
77
+ "pad_token_type_id": 0,
78
+ "padding_side": "right",
79
+ "sep_token": "[SEP]",
80
+ "stride": 0,
81
+ "strip_accents": null,
82
+ "tokenize_chinese_chars": true,
83
+ "tokenizer_class": "BertTokenizer",
84
+ "truncation_side": "right",
85
+ "truncation_strategy": "longest_first",
86
+ "unk_token": "[UNK]"
87
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff