Upload ModernBERT model
Browse files- 1_SpladePooling/config.json +5 -0
- README.md +527 -0
- added_tokens.json +7 -0
- config.json +48 -0
- config_sentence_transformers.json +14 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +62 -0
- vocab.json +0 -0
1_SpladePooling/config.json
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"pooling_strategy": "max",
|
3 |
+
"activation_function": "relu",
|
4 |
+
"word_embedding_dimension": 30005
|
5 |
+
}
|
README.md
ADDED
@@ -0,0 +1,527 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- sentence-transformers
|
4 |
+
- sparse-encoder
|
5 |
+
- sparse
|
6 |
+
- splade
|
7 |
+
- generated_from_trainer
|
8 |
+
- dataset_size:1441500
|
9 |
+
- loss:SpladeLoss
|
10 |
+
- loss:SparseMultipleNegativesRankingLoss
|
11 |
+
- loss:FlopsLoss
|
12 |
+
base_model: Shuu12121/CodeModernBERT-Finch
|
13 |
+
widget:
|
14 |
+
- text: "public static TaggableReadPreference secondary(final TagSet tagSet,\n \
|
15 |
+
\ final long maxStaleness, final\
|
16 |
+
\ TimeUnit timeUnit) {\n return new SecondaryReadPreference(singletonList(tagSet),\
|
17 |
+
\ maxStaleness, timeUnit);\n }"
|
18 |
+
- text: '// DoTimeout performs the given request and waits for response during
|
19 |
+
|
20 |
+
// the given timeout duration.
|
21 |
+
|
22 |
+
//
|
23 |
+
|
24 |
+
// Request must contain at least non-zero RequestURI with full url (including
|
25 |
+
|
26 |
+
// scheme and host) or non-zero Host header + RequestURI.
|
27 |
+
|
28 |
+
//
|
29 |
+
|
30 |
+
// Client determines the server to be requested in the following order:
|
31 |
+
|
32 |
+
//
|
33 |
+
|
34 |
+
// - from RequestURI if it contains full url with scheme and host;
|
35 |
+
|
36 |
+
// - from Host header otherwise.
|
37 |
+
|
38 |
+
//
|
39 |
+
|
40 |
+
// The function doesn''t follow redirects. Use Get* for following redirects.
|
41 |
+
|
42 |
+
//
|
43 |
+
|
44 |
+
// Response is ignored if resp is nil.
|
45 |
+
|
46 |
+
//
|
47 |
+
|
48 |
+
// ErrTimeout is returned if the response wasn''t returned during
|
49 |
+
|
50 |
+
// the given timeout.
|
51 |
+
|
52 |
+
//
|
53 |
+
|
54 |
+
// ErrNoFreeConns is returned if all Client.MaxConnsPerHost connections
|
55 |
+
|
56 |
+
// to the requested host are busy.
|
57 |
+
|
58 |
+
//
|
59 |
+
|
60 |
+
// It is recommended obtaining req and resp via AcquireRequest
|
61 |
+
|
62 |
+
// and AcquireResponse in performance-critical code.
|
63 |
+
|
64 |
+
//
|
65 |
+
|
66 |
+
// Warning: DoTimeout does not terminate the request itself. The request will
|
67 |
+
|
68 |
+
// continue in the background and the response will be discarded.
|
69 |
+
|
70 |
+
// If requests take too long and the connection pool gets filled up please
|
71 |
+
|
72 |
+
// try setting a ReadTimeout.'
|
73 |
+
- text: "func (c *Compressor) selectEncoder(h http.Header, w io.Writer) (io.Writer,\
|
74 |
+
\ string, func()) {\n\theader := h.Get(\"Accept-Encoding\")\n\n\t// Parse the\
|
75 |
+
\ names of all accepted algorithms from the header.\n\taccepted := strings.Split(strings.ToLower(header),\
|
76 |
+
\ \",\")\n\n\t// Find supported encoder by accepted list by precedence\n\tfor\
|
77 |
+
\ _, name := range c.encodingPrecedence {\n\t\tif matchAcceptEncoding(accepted,\
|
78 |
+
\ name) {\n\t\t\tif pool, ok := c.pooledEncoders[name]; ok {\n\t\t\t\tencoder\
|
79 |
+
\ := pool.Get().(ioResetterWriter)\n\t\t\t\tcleanup := func() {\n\t\t\t\t\tpool.Put(encoder)\n\
|
80 |
+
\t\t\t\t}\n\t\t\t\tencoder.Reset(w)\n\t\t\t\treturn encoder, name, cleanup\n\n\
|
81 |
+
\t\t\t}\n\t\t\tif fn, ok := c.encoders[name]; ok {\n\t\t\t\treturn fn(w, c.level),\
|
82 |
+
\ name, func() {}\n\t\t\t}\n\t\t}\n\n\t}\n\n\t// No encoder found to match the\
|
83 |
+
\ accepted encoding\n\treturn nil, \"\", func() {}\n}"
|
84 |
+
- text: 'Parse the template file and return it as string
|
85 |
+
|
86 |
+
|
87 |
+
@param array $arrAttributes An optional attributes array
|
88 |
+
|
89 |
+
|
90 |
+
@return string The template markup'
|
91 |
+
- text: "function seed_mix() {\n a ^= b << 11; d = add(d, a); b = add(b, c);\n\
|
92 |
+
\ b ^= c >>> 2; e = add(e, b); c = add(c, d);\n c ^= d << 8; f =\
|
93 |
+
\ add(f, c); d = add(d, e);\n d ^= e >>> 16; g = add(g, d); e = add(e, f);\n\
|
94 |
+
\ e ^= f << 10; h = add(h, e); f = add(f, g);\n f ^= g >>> 4; a =\
|
95 |
+
\ add(a, f); g = add(g, h);\n g ^= h << 8; b = add(b, g); h = add(h, a);\n\
|
96 |
+
\ h ^= a >>> 9; c = add(c, h); a = add(a, b);\n }"
|
97 |
+
pipeline_tag: feature-extraction
|
98 |
+
library_name: sentence-transformers
|
99 |
+
---
|
100 |
+
|
101 |
+
# SPLADE Sparse Encoder
|
102 |
+
|
103 |
+
This is a [SPLADE Sparse Encoder](https://www.sbert.net/docs/sparse_encoder/usage/usage.html) model finetuned from [Shuu12121/CodeModernBERT-Finch](https://huggingface.co/Shuu12121/CodeModernBERT-Finch) using the [sentence-transformers](https://www.SBERT.net) library. It maps sentences & paragraphs to a 30005-dimensional sparse vector space and can be used for semantic search and sparse retrieval.
|
104 |
+
## Model Details
|
105 |
+
|
106 |
+
### Model Description
|
107 |
+
- **Model Type:** SPLADE Sparse Encoder
|
108 |
+
- **Base model:** [Shuu12121/CodeModernBERT-Finch](https://huggingface.co/Shuu12121/CodeModernBERT-Finch) <!-- at revision 8159a3905097a6cea798bb86d548caed9c1ad37d -->
|
109 |
+
- **Maximum Sequence Length:** 8192 tokens
|
110 |
+
- **Output Dimensionality:** 30005 dimensions
|
111 |
+
- **Similarity Function:** Dot Product
|
112 |
+
<!-- - **Training Dataset:** Unknown -->
|
113 |
+
<!-- - **Language:** Unknown -->
|
114 |
+
<!-- - **License:** Unknown -->
|
115 |
+
|
116 |
+
### Model Sources
|
117 |
+
|
118 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
119 |
+
- **Documentation:** [Sparse Encoder Documentation](https://www.sbert.net/docs/sparse_encoder/usage/usage.html)
|
120 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
121 |
+
- **Hugging Face:** [Sparse Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=sparse-encoder)
|
122 |
+
|
123 |
+
### Full Model Architecture
|
124 |
+
|
125 |
+
```
|
126 |
+
SparseEncoder(
|
127 |
+
(0): MLMTransformer({'max_seq_length': 8192, 'do_lower_case': False, 'architecture': 'ModernBertForMaskedLM'})
|
128 |
+
(1): SpladePooling({'pooling_strategy': 'max', 'activation_function': 'relu', 'word_embedding_dimension': 30005})
|
129 |
+
)
|
130 |
+
```
|
131 |
+
|
132 |
+
## Usage
|
133 |
+
|
134 |
+
### Direct Usage (Sentence Transformers)
|
135 |
+
|
136 |
+
First install the Sentence Transformers library:
|
137 |
+
|
138 |
+
```bash
|
139 |
+
pip install -U sentence-transformers
|
140 |
+
```
|
141 |
+
|
142 |
+
Then you can load this model and run inference.
|
143 |
+
```python
|
144 |
+
from sentence_transformers import SparseEncoder
|
145 |
+
|
146 |
+
# Download from the 🤗 Hub
|
147 |
+
model = SparseEncoder("sparse_encoder_model_id")
|
148 |
+
# Run inference
|
149 |
+
sentences = [
|
150 |
+
'Will detect inputs that begin with @MyNamespace/... and replace the namespace with the corresponding path.\n\n@see \\Assetic\\Factory\\AssetFactory::parseInput()',
|
151 |
+
'protected function parseInput($input, array $options = array())\n {\n $matches = null;\n // search for @MyNamespace/path/to/asset\n if (preg_match("|^\\@([a-z_][_a-z0-9]*)/|i", $input, $matches)) {\n $ns = $matches[1];\n if (!array_key_exists($ns, $this->namespaces)) {\n throw new \\RuntimeException("$ns : unknown namespace !");\n }\n $input = $this->namespaces[$ns] . substr($input, strlen($ns) + 1);\n }\n return parent::parseInput($input, $options);\n }',
|
152 |
+
'function seed_mix() {\n a ^= b << 11; d = add(d, a); b = add(b, c);\n b ^= c >>> 2; e = add(e, b); c = add(c, d);\n c ^= d << 8; f = add(f, c); d = add(d, e);\n d ^= e >>> 16; g = add(g, d); e = add(e, f);\n e ^= f << 10; h = add(h, e); f = add(f, g);\n f ^= g >>> 4; a = add(a, f); g = add(g, h);\n g ^= h << 8; b = add(b, g); h = add(h, a);\n h ^= a >>> 9; c = add(c, h); a = add(a, b);\n }',
|
153 |
+
]
|
154 |
+
embeddings = model.encode(sentences)
|
155 |
+
print(embeddings.shape)
|
156 |
+
# [3, 30005]
|
157 |
+
|
158 |
+
# Get the similarity scores for the embeddings
|
159 |
+
similarities = model.similarity(embeddings, embeddings)
|
160 |
+
print(similarities)
|
161 |
+
# tensor([[26.3028, 23.1010, 3.4799],
|
162 |
+
# [23.1010, 42.4588, 6.9869],
|
163 |
+
# [ 3.4799, 6.9869, 59.2962]])
|
164 |
+
```
|
165 |
+
|
166 |
+
<!--
|
167 |
+
### Direct Usage (Transformers)
|
168 |
+
|
169 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
170 |
+
|
171 |
+
</details>
|
172 |
+
-->
|
173 |
+
|
174 |
+
<!--
|
175 |
+
### Downstream Usage (Sentence Transformers)
|
176 |
+
|
177 |
+
You can finetune this model on your own dataset.
|
178 |
+
|
179 |
+
<details><summary>Click to expand</summary>
|
180 |
+
|
181 |
+
</details>
|
182 |
+
-->
|
183 |
+
|
184 |
+
<!--
|
185 |
+
### Out-of-Scope Use
|
186 |
+
|
187 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
188 |
+
-->
|
189 |
+
|
190 |
+
<!--
|
191 |
+
## Bias, Risks and Limitations
|
192 |
+
|
193 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
194 |
+
-->
|
195 |
+
|
196 |
+
<!--
|
197 |
+
### Recommendations
|
198 |
+
|
199 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
200 |
+
-->
|
201 |
+
|
202 |
+
## Training Details
|
203 |
+
|
204 |
+
### Training Dataset
|
205 |
+
|
206 |
+
#### Unnamed Dataset
|
207 |
+
|
208 |
+
* Size: 1,441,500 training samples
|
209 |
+
* Columns: <code>text1</code>, <code>text2</code>, and <code>label</code>
|
210 |
+
* Approximate statistics based on the first 1000 samples:
|
211 |
+
| | text1 | text2 | label |
|
212 |
+
|:--------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
213 |
+
| type | string | string | float |
|
214 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 49.63 tokens</li><li>max: 1024 tokens</li></ul> | <ul><li>min: 28 tokens</li><li>mean: 180.64 tokens</li><li>max: 6082 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
|
215 |
+
* Samples:
|
216 |
+
| text1 | text2 | label |
|
217 |
+
|:----------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
218 |
+
| <code>// makeWin32File makes a new win32File from an existing file handle</code> | <code>func makeWin32File(h syscall.Handle) (*win32File, error) {<br> f := &win32File{handle: h}<br> ioInitOnce.Do(initIo)<br> _, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)<br> if err != nil {<br> return nil, err<br> }<br> err = setFileCompletionNotificationModes(h, cFILE_SKIP_COMPLETION_PORT_ON_SUCCESS|cFILE_SKIP_SET_EVENT_ON_HANDLE)<br> if err != nil {<br> return nil, err<br> }<br> f.readDeadline.channel = make(timeoutChan)<br> f.writeDeadline.channel = make(timeoutChan)<br> return f, nil<br>}</code> | <code>1.0</code> |
|
219 |
+
| <code>// Convert_v1_FlexPersistentVolumeSource_To_core_FlexPersistentVolumeSource is an autogenerated conversion function.</code> | <code>func Convert_v1_FlexPersistentVolumeSource_To_core_FlexPersistentVolumeSource(in *v1.FlexPersistentVolumeSource, out *core.FlexPersistentVolumeSource, s conversion.Scope) error {<br> return autoConvert_v1_FlexPersistentVolumeSource_To_core_FlexPersistentVolumeSource(in, out, s)<br>}</code> | <code>1.0</code> |
|
220 |
+
| <code>// AddRunCmd is defined on the RunCmdsConfig interface.</code> | <code>func (cfg *cloudConfig) AddRunCmd(args ...string) {<br> cfg.attrs["runcmd"] = append(cfg.RunCmds(), strings.Join(args, " "))<br>}</code> | <code>1.0</code> |
|
221 |
+
* Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
|
222 |
+
```json
|
223 |
+
{
|
224 |
+
"loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
|
225 |
+
"document_regularizer_weight": 3e-05,
|
226 |
+
"query_regularizer_weight": 5e-05
|
227 |
+
}
|
228 |
+
```
|
229 |
+
|
230 |
+
### Evaluation Dataset
|
231 |
+
|
232 |
+
#### Unnamed Dataset
|
233 |
+
|
234 |
+
* Size: 6,000 evaluation samples
|
235 |
+
* Columns: <code>text1</code>, <code>text2</code>, and <code>label</code>
|
236 |
+
* Approximate statistics based on the first 1000 samples:
|
237 |
+
| | text1 | text2 | label |
|
238 |
+
|:--------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
239 |
+
| type | string | string | float |
|
240 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 45.53 tokens</li><li>max: 495 tokens</li></ul> | <ul><li>min: 29 tokens</li><li>mean: 183.92 tokens</li><li>max: 7677 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
|
241 |
+
* Samples:
|
242 |
+
| text1 | text2 | label |
|
243 |
+
|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
244 |
+
| <code>// establish data storage, format and dimensions of a renderbuffer object's image</code> | <code>func RenderbufferStorage(target uint32, internalformat uint32, width int32, height int32) {<br> syscall.Syscall6(gpRenderbufferStorage, 4, uintptr(target), uintptr(internalformat), uintptr(width), uintptr(height), 0, 0)<br>}</code> | <code>1.0</code> |
|
245 |
+
| <code>// GetObject is a wrapper around gtk_builder_get_object(). The returned result<br>// is an IObject, so it will need to be type-asserted to the appropriate type before<br>// being used. For example, to get an object and type assert it as a window:<br>//<br>// obj, err := builder.GetObject("window")<br>// if err != nil {<br>// // object not found<br>// return<br>// }<br>// if w, ok := obj.(*gtk.Window); ok {<br>// // do stuff with w here<br>// } else {<br>// // not a *gtk.Window<br>// }<br>//</code> | <code>func (b *Builder) GetObject(name string) (glib.IObject, error) {<br> cstr := C.CString(name)<br> defer C.free(unsafe.Pointer(cstr))<br> c := C.gtk_builder_get_object(b.native(), (*C.gchar)(cstr))<br> if c == nil {<br> return nil, errors.New("object '" + name + "' not found")<br> }<br> obj, err := cast(c)<br> if err != nil {<br> return nil, err<br> }<br> return obj, nil<br>}</code> | <code>1.0</code> |
|
246 |
+
| <code>// augmentGoroutine processes source files to improve call to be more<br>// descriptive.<br>//<br>// It modifies the routine.</code> | <code>func (c *cache) augmentGoroutine(goroutine *Goroutine) {<br> if c.files == nil {<br> c.files = map[string][]byte{}<br> }<br> if c.parsed == nil {<br> c.parsed = map[string]*parsedFile{}<br> }<br> // For each call site, look at the next call and populate it. Then we can<br> // walk back and reformat things.<br> for i := range goroutine.Stack.Calls {<br> c.load(goroutine.Stack.Calls[i].LocalSrcPath)<br> }<br><br> // Once all loaded, we can look at the next call when available.<br> for i := 0; i < len(goroutine.Stack.Calls)-1; i++ {<br> // Get the AST from the previous call and process the call line with it.<br> if f := c.getFuncAST(&goroutine.Stack.Calls[i]); f != nil {<br> processCall(&goroutine.Stack.Calls[i], f)<br> }<br> }<br>}</code> | <code>1.0</code> |
|
247 |
+
* Loss: [<code>SpladeLoss</code>](https://sbert.net/docs/package_reference/sparse_encoder/losses.html#spladeloss) with these parameters:
|
248 |
+
```json
|
249 |
+
{
|
250 |
+
"loss": "SparseMultipleNegativesRankingLoss(scale=1.0, similarity_fct='dot_score')",
|
251 |
+
"document_regularizer_weight": 3e-05,
|
252 |
+
"query_regularizer_weight": 5e-05
|
253 |
+
}
|
254 |
+
```
|
255 |
+
|
256 |
+
### Training Hyperparameters
|
257 |
+
#### Non-Default Hyperparameters
|
258 |
+
|
259 |
+
- `per_device_train_batch_size`: 2
|
260 |
+
- `gradient_accumulation_steps`: 25
|
261 |
+
- `num_train_epochs`: 1
|
262 |
+
- `warmup_ratio`: 0.1
|
263 |
+
- `fp16`: True
|
264 |
+
|
265 |
+
#### All Hyperparameters
|
266 |
+
<details><summary>Click to expand</summary>
|
267 |
+
|
268 |
+
- `overwrite_output_dir`: False
|
269 |
+
- `do_predict`: False
|
270 |
+
- `eval_strategy`: no
|
271 |
+
- `prediction_loss_only`: True
|
272 |
+
- `per_device_train_batch_size`: 2
|
273 |
+
- `per_device_eval_batch_size`: 8
|
274 |
+
- `per_gpu_train_batch_size`: None
|
275 |
+
- `per_gpu_eval_batch_size`: None
|
276 |
+
- `gradient_accumulation_steps`: 25
|
277 |
+
- `eval_accumulation_steps`: None
|
278 |
+
- `torch_empty_cache_steps`: None
|
279 |
+
- `learning_rate`: 5e-05
|
280 |
+
- `weight_decay`: 0.0
|
281 |
+
- `adam_beta1`: 0.9
|
282 |
+
- `adam_beta2`: 0.999
|
283 |
+
- `adam_epsilon`: 1e-08
|
284 |
+
- `max_grad_norm`: 1.0
|
285 |
+
- `num_train_epochs`: 1
|
286 |
+
- `max_steps`: -1
|
287 |
+
- `lr_scheduler_type`: linear
|
288 |
+
- `lr_scheduler_kwargs`: {}
|
289 |
+
- `warmup_ratio`: 0.1
|
290 |
+
- `warmup_steps`: 0
|
291 |
+
- `log_level`: passive
|
292 |
+
- `log_level_replica`: warning
|
293 |
+
- `log_on_each_node`: True
|
294 |
+
- `logging_nan_inf_filter`: True
|
295 |
+
- `save_safetensors`: True
|
296 |
+
- `save_on_each_node`: False
|
297 |
+
- `save_only_model`: False
|
298 |
+
- `restore_callback_states_from_checkpoint`: False
|
299 |
+
- `no_cuda`: False
|
300 |
+
- `use_cpu`: False
|
301 |
+
- `use_mps_device`: False
|
302 |
+
- `seed`: 42
|
303 |
+
- `data_seed`: None
|
304 |
+
- `jit_mode_eval`: False
|
305 |
+
- `use_ipex`: False
|
306 |
+
- `bf16`: False
|
307 |
+
- `fp16`: True
|
308 |
+
- `fp16_opt_level`: O1
|
309 |
+
- `half_precision_backend`: auto
|
310 |
+
- `bf16_full_eval`: False
|
311 |
+
- `fp16_full_eval`: False
|
312 |
+
- `tf32`: None
|
313 |
+
- `local_rank`: 0
|
314 |
+
- `ddp_backend`: None
|
315 |
+
- `tpu_num_cores`: None
|
316 |
+
- `tpu_metrics_debug`: False
|
317 |
+
- `debug`: []
|
318 |
+
- `dataloader_drop_last`: False
|
319 |
+
- `dataloader_num_workers`: 0
|
320 |
+
- `dataloader_prefetch_factor`: None
|
321 |
+
- `past_index`: -1
|
322 |
+
- `disable_tqdm`: False
|
323 |
+
- `remove_unused_columns`: True
|
324 |
+
- `label_names`: None
|
325 |
+
- `load_best_model_at_end`: False
|
326 |
+
- `ignore_data_skip`: False
|
327 |
+
- `fsdp`: []
|
328 |
+
- `fsdp_min_num_params`: 0
|
329 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
330 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
331 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
332 |
+
- `deepspeed`: None
|
333 |
+
- `label_smoothing_factor`: 0.0
|
334 |
+
- `optim`: adamw_torch
|
335 |
+
- `optim_args`: None
|
336 |
+
- `adafactor`: False
|
337 |
+
- `group_by_length`: False
|
338 |
+
- `length_column_name`: length
|
339 |
+
- `ddp_find_unused_parameters`: None
|
340 |
+
- `ddp_bucket_cap_mb`: None
|
341 |
+
- `ddp_broadcast_buffers`: False
|
342 |
+
- `dataloader_pin_memory`: True
|
343 |
+
- `dataloader_persistent_workers`: False
|
344 |
+
- `skip_memory_metrics`: True
|
345 |
+
- `use_legacy_prediction_loop`: False
|
346 |
+
- `push_to_hub`: False
|
347 |
+
- `resume_from_checkpoint`: None
|
348 |
+
- `hub_model_id`: None
|
349 |
+
- `hub_strategy`: every_save
|
350 |
+
- `hub_private_repo`: None
|
351 |
+
- `hub_always_push`: False
|
352 |
+
- `hub_revision`: None
|
353 |
+
- `gradient_checkpointing`: False
|
354 |
+
- `gradient_checkpointing_kwargs`: None
|
355 |
+
- `include_inputs_for_metrics`: False
|
356 |
+
- `include_for_metrics`: []
|
357 |
+
- `eval_do_concat_batches`: True
|
358 |
+
- `fp16_backend`: auto
|
359 |
+
- `push_to_hub_model_id`: None
|
360 |
+
- `push_to_hub_organization`: None
|
361 |
+
- `mp_parameters`:
|
362 |
+
- `auto_find_batch_size`: False
|
363 |
+
- `full_determinism`: False
|
364 |
+
- `torchdynamo`: None
|
365 |
+
- `ray_scope`: last
|
366 |
+
- `ddp_timeout`: 1800
|
367 |
+
- `torch_compile`: False
|
368 |
+
- `torch_compile_backend`: None
|
369 |
+
- `torch_compile_mode`: None
|
370 |
+
- `include_tokens_per_second`: False
|
371 |
+
- `include_num_input_tokens_seen`: False
|
372 |
+
- `neftune_noise_alpha`: None
|
373 |
+
- `optim_target_modules`: None
|
374 |
+
- `batch_eval_metrics`: False
|
375 |
+
- `eval_on_start`: False
|
376 |
+
- `use_liger_kernel`: False
|
377 |
+
- `liger_kernel_config`: None
|
378 |
+
- `eval_use_gather_object`: False
|
379 |
+
- `average_tokens_across_devices`: False
|
380 |
+
- `prompts`: None
|
381 |
+
- `batch_sampler`: batch_sampler
|
382 |
+
- `multi_dataset_batch_sampler`: proportional
|
383 |
+
- `router_mapping`: {}
|
384 |
+
- `learning_rate_mapping`: {}
|
385 |
+
|
386 |
+
</details>
|
387 |
+
|
388 |
+
### Training Logs
|
389 |
+
| Epoch | Step | Training Loss |
|
390 |
+
|:------:|:-----:|:-------------:|
|
391 |
+
| 0.0173 | 500 | 252.5855 |
|
392 |
+
| 0.0347 | 1000 | 0.4281 |
|
393 |
+
| 0.0520 | 1500 | 0.071 |
|
394 |
+
| 0.0694 | 2000 | 0.0579 |
|
395 |
+
| 0.0867 | 2500 | 0.04 |
|
396 |
+
| 0.1041 | 3000 | 0.0422 |
|
397 |
+
| 0.1214 | 3500 | 0.041 |
|
398 |
+
| 0.1387 | 4000 | 0.0347 |
|
399 |
+
| 0.1561 | 4500 | 0.0341 |
|
400 |
+
| 0.1734 | 5000 | 0.0288 |
|
401 |
+
| 0.1908 | 5500 | 0.0243 |
|
402 |
+
| 0.2081 | 6000 | 0.0249 |
|
403 |
+
| 0.2255 | 6500 | 0.0242 |
|
404 |
+
| 0.2428 | 7000 | 0.0204 |
|
405 |
+
| 0.2601 | 7500 | 0.0206 |
|
406 |
+
| 0.2775 | 8000 | 0.0198 |
|
407 |
+
| 0.2948 | 8500 | 0.0205 |
|
408 |
+
| 0.3122 | 9000 | 0.0176 |
|
409 |
+
| 0.3295 | 9500 | 0.0207 |
|
410 |
+
| 0.3469 | 10000 | 0.0196 |
|
411 |
+
| 0.3642 | 10500 | 0.0132 |
|
412 |
+
| 0.3815 | 11000 | 0.016 |
|
413 |
+
| 0.3989 | 11500 | 0.0151 |
|
414 |
+
| 0.4162 | 12000 | 0.0168 |
|
415 |
+
| 0.4336 | 12500 | 0.0161 |
|
416 |
+
| 0.4509 | 13000 | 0.0156 |
|
417 |
+
| 0.4683 | 13500 | 0.0134 |
|
418 |
+
| 0.4856 | 14000 | 0.0156 |
|
419 |
+
| 0.5029 | 14500 | 0.0138 |
|
420 |
+
| 0.5203 | 15000 | 0.0134 |
|
421 |
+
| 0.5376 | 15500 | 0.0146 |
|
422 |
+
| 0.5550 | 16000 | 0.0153 |
|
423 |
+
| 0.5723 | 16500 | 0.0135 |
|
424 |
+
| 0.5897 | 17000 | 0.0136 |
|
425 |
+
| 0.6070 | 17500 | 0.0122 |
|
426 |
+
| 0.6243 | 18000 | 0.0115 |
|
427 |
+
| 0.6417 | 18500 | 0.0132 |
|
428 |
+
| 0.6590 | 19000 | 0.0101 |
|
429 |
+
| 0.6764 | 19500 | 0.0092 |
|
430 |
+
| 0.6937 | 20000 | 0.0117 |
|
431 |
+
| 0.7111 | 20500 | 0.0098 |
|
432 |
+
| 0.7284 | 21000 | 0.0122 |
|
433 |
+
| 0.7458 | 21500 | 0.0102 |
|
434 |
+
| 0.7631 | 22000 | 0.0088 |
|
435 |
+
| 0.7804 | 22500 | 0.0093 |
|
436 |
+
| 0.7978 | 23000 | 0.0101 |
|
437 |
+
| 0.8151 | 23500 | 0.0083 |
|
438 |
+
| 0.8325 | 24000 | 0.0095 |
|
439 |
+
| 0.8498 | 24500 | 0.0081 |
|
440 |
+
| 0.8672 | 25000 | 0.0095 |
|
441 |
+
| 0.8845 | 25500 | 0.009 |
|
442 |
+
| 0.9018 | 26000 | 0.0081 |
|
443 |
+
| 0.9192 | 26500 | 0.0065 |
|
444 |
+
| 0.9365 | 27000 | 0.009 |
|
445 |
+
| 0.9539 | 27500 | 0.0075 |
|
446 |
+
| 0.9712 | 28000 | 0.0078 |
|
447 |
+
| 0.9886 | 28500 | 0.0094 |
|
448 |
+
|
449 |
+
|
450 |
+
### Framework Versions
|
451 |
+
- Python: 3.11.13
|
452 |
+
- Sentence Transformers: 5.0.0
|
453 |
+
- Transformers: 4.53.1
|
454 |
+
- PyTorch: 2.6.0+cu124
|
455 |
+
- Accelerate: 1.8.1
|
456 |
+
- Datasets: 3.6.0
|
457 |
+
- Tokenizers: 0.21.2
|
458 |
+
|
459 |
+
## Citation
|
460 |
+
|
461 |
+
### BibTeX
|
462 |
+
|
463 |
+
#### Sentence Transformers
|
464 |
+
```bibtex
|
465 |
+
@inproceedings{reimers-2019-sentence-bert,
|
466 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
467 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
468 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
469 |
+
month = "11",
|
470 |
+
year = "2019",
|
471 |
+
publisher = "Association for Computational Linguistics",
|
472 |
+
url = "https://arxiv.org/abs/1908.10084",
|
473 |
+
}
|
474 |
+
```
|
475 |
+
|
476 |
+
#### SpladeLoss
|
477 |
+
```bibtex
|
478 |
+
@misc{formal2022distillationhardnegativesampling,
|
479 |
+
title={From Distillation to Hard Negative Sampling: Making Sparse Neural IR Models More Effective},
|
480 |
+
author={Thibault Formal and Carlos Lassance and Benjamin Piwowarski and Stéphane Clinchant},
|
481 |
+
year={2022},
|
482 |
+
eprint={2205.04733},
|
483 |
+
archivePrefix={arXiv},
|
484 |
+
primaryClass={cs.IR},
|
485 |
+
url={https://arxiv.org/abs/2205.04733},
|
486 |
+
}
|
487 |
+
```
|
488 |
+
|
489 |
+
#### SparseMultipleNegativesRankingLoss
|
490 |
+
```bibtex
|
491 |
+
@misc{henderson2017efficient,
|
492 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
493 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
494 |
+
year={2017},
|
495 |
+
eprint={1705.00652},
|
496 |
+
archivePrefix={arXiv},
|
497 |
+
primaryClass={cs.CL}
|
498 |
+
}
|
499 |
+
```
|
500 |
+
|
501 |
+
#### FlopsLoss
|
502 |
+
```bibtex
|
503 |
+
@article{paria2020minimizing,
|
504 |
+
title={Minimizing flops to learn efficient sparse representations},
|
505 |
+
author={Paria, Biswajit and Yeh, Chih-Kuan and Yen, Ian EH and Xu, Ning and Ravikumar, Pradeep and P{'o}czos, Barnab{'a}s},
|
506 |
+
journal={arXiv preprint arXiv:2004.05665},
|
507 |
+
year={2020}
|
508 |
+
}
|
509 |
+
```
|
510 |
+
|
511 |
+
<!--
|
512 |
+
## Glossary
|
513 |
+
|
514 |
+
*Clearly define terms in order to be accessible across audiences.*
|
515 |
+
-->
|
516 |
+
|
517 |
+
<!--
|
518 |
+
## Model Card Authors
|
519 |
+
|
520 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
521 |
+
-->
|
522 |
+
|
523 |
+
<!--
|
524 |
+
## Model Card Contact
|
525 |
+
|
526 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
527 |
+
-->
|
added_tokens.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"</s>": 30001,
|
3 |
+
"<mask>": 30004,
|
4 |
+
"<pad>": 30003,
|
5 |
+
"<s>": 30000,
|
6 |
+
"<unk>": 30002
|
7 |
+
}
|
config.json
ADDED
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"architectures": [
|
3 |
+
"ModernBertForMaskedLM"
|
4 |
+
],
|
5 |
+
"attention_bias": false,
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"attention_probs_dropout_prob": 0.1,
|
8 |
+
"bos_token_id": 30000,
|
9 |
+
"classifier_activation": "gelu",
|
10 |
+
"classifier_bias": false,
|
11 |
+
"classifier_dropout": 0.0,
|
12 |
+
"classifier_pooling": "cls",
|
13 |
+
"cls_token_id": 50281,
|
14 |
+
"decoder_bias": true,
|
15 |
+
"deterministic_flash_attn": false,
|
16 |
+
"embedding_dropout": 0.0,
|
17 |
+
"eos_token_id": 30001,
|
18 |
+
"global_attn_every_n_layers": 3,
|
19 |
+
"global_rope_theta": 160000.0,
|
20 |
+
"hidden_activation": "gelu",
|
21 |
+
"hidden_dropout_prob": 0.1,
|
22 |
+
"hidden_size": 512,
|
23 |
+
"initializer_cutoff_factor": 2.0,
|
24 |
+
"initializer_range": 0.02,
|
25 |
+
"intermediate_size": 2048,
|
26 |
+
"local_attention": 128,
|
27 |
+
"local_attention_rope_theta": 10000,
|
28 |
+
"local_attention_window": 128,
|
29 |
+
"local_rope_theta": 10000.0,
|
30 |
+
"max_position_embeddings": 8192,
|
31 |
+
"mlp_bias": false,
|
32 |
+
"mlp_dropout": 0.0,
|
33 |
+
"model_type": "modernbert",
|
34 |
+
"norm_bias": false,
|
35 |
+
"norm_eps": 1e-05,
|
36 |
+
"num_attention_heads": 8,
|
37 |
+
"num_hidden_layers": 6,
|
38 |
+
"pad_token_id": 1,
|
39 |
+
"repad_logits_with_grad": false,
|
40 |
+
"rope_theta": 160000,
|
41 |
+
"sep_token_id": 50282,
|
42 |
+
"sparse_pred_ignore_index": -100,
|
43 |
+
"sparse_prediction": false,
|
44 |
+
"torch_dtype": "float32",
|
45 |
+
"transformers_version": "4.53.1",
|
46 |
+
"type_vocab_size": 2,
|
47 |
+
"vocab_size": 30005
|
48 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model_type": "SparseEncoder",
|
3 |
+
"__version__": {
|
4 |
+
"sentence_transformers": "5.0.0",
|
5 |
+
"transformers": "4.53.1",
|
6 |
+
"pytorch": "2.6.0+cu124"
|
7 |
+
},
|
8 |
+
"prompts": {
|
9 |
+
"query": "",
|
10 |
+
"document": ""
|
11 |
+
},
|
12 |
+
"default_prompt_name": null,
|
13 |
+
"similarity_fn_name": "dot"
|
14 |
+
}
|
merges.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f05d60a8a6b606ce3d2eb8586679b3da4cb75fafc81fd7faeff0c1e662937482
|
3 |
+
size 163314956
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.sparse_encoder.models.MLMTransformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_SpladePooling",
|
12 |
+
"type": "sentence_transformers.sparse_encoder.models.SpladePooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 8192,
|
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": true,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "<s>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": true,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": true,
|
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": true,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "</s>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": true,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "<unk>",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"30000": {
|
5 |
+
"content": "<s>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"30001": {
|
13 |
+
"content": "</s>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": true,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
},
|
20 |
+
"30002": {
|
21 |
+
"content": "<unk>",
|
22 |
+
"lstrip": false,
|
23 |
+
"normalized": true,
|
24 |
+
"rstrip": false,
|
25 |
+
"single_word": false,
|
26 |
+
"special": true
|
27 |
+
},
|
28 |
+
"30003": {
|
29 |
+
"content": "<pad>",
|
30 |
+
"lstrip": false,
|
31 |
+
"normalized": true,
|
32 |
+
"rstrip": false,
|
33 |
+
"single_word": false,
|
34 |
+
"special": true
|
35 |
+
},
|
36 |
+
"30004": {
|
37 |
+
"content": "<mask>",
|
38 |
+
"lstrip": true,
|
39 |
+
"normalized": false,
|
40 |
+
"rstrip": false,
|
41 |
+
"single_word": false,
|
42 |
+
"special": true
|
43 |
+
}
|
44 |
+
},
|
45 |
+
"bos_token": "<s>",
|
46 |
+
"clean_up_tokenization_spaces": false,
|
47 |
+
"cls_token": "<s>",
|
48 |
+
"eos_token": "</s>",
|
49 |
+
"errors": "replace",
|
50 |
+
"extra_special_tokens": {},
|
51 |
+
"mask_token": "<mask>",
|
52 |
+
"max_length": 256,
|
53 |
+
"model_max_length": 1000000000000000019884624838656,
|
54 |
+
"pad_token": "<pad>",
|
55 |
+
"sep_token": "</s>",
|
56 |
+
"stride": 0,
|
57 |
+
"tokenizer_class": "RobertaTokenizer",
|
58 |
+
"trim_offsets": true,
|
59 |
+
"truncation_side": "right",
|
60 |
+
"truncation_strategy": "longest_first",
|
61 |
+
"unk_token": "<unk>"
|
62 |
+
}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|