amixh commited on
Commit
e3ca62b
·
verified ·
1 Parent(s): 10ddde0

Add new SentenceTransformer model

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,543 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:1788
8
+ - loss:TripletLoss
9
+ base_model: law-ai/InLegalBERT
10
+ widget:
11
+ - source_sentence: '[IPC_SECTION_351] According to Whoever makes any gesture, or any
12
+ preparation intending or knowing it to be likely that such gesture or preparation
13
+ will cause any person present to apprehend that he who makes that gesture or preparation
14
+ is about to use criminal force to that person, is said to commit an assault. IPC
15
+ 351 in Simple Words they are considered to have committed an assault.'
16
+ sentences:
17
+ - '[CRPC_SECTION_162] Section 162, No statement made by any person to a police officer
18
+ in the course of an investigation under this Chapter, shall, if reduced to writing,
19
+ be signed by the person making it; nor shall any such statement or any record
20
+ thereof, whether in a police diary or otherwise, or any part of such statement
21
+ or record, be used for any purpose, save as hereinafter provided, at any inquiry
22
+ or trial in respect of any offence under investigation at the time when such statement
23
+ was made; Provided that when any witness is called for the prosecution in such
24
+ inquiry or trial whose statement has been reduced into writing as aforesaid, any
25
+ part of his statement, if duly proved, may be used by the accused, and with the
26
+ permission of the Court, by the prosecution, to contradict such witness in the
27
+ manner provided by section 145 of the , 1872 (1 of 1872); and when any part of
28
+ such statement is so used, any part thereof may also be used in the re-examination
29
+ of such witness, but for the purpose only of explaining any matter referred to
30
+ in his cross-examination. Nothing in this section shall be deemed to apply to
31
+ any statement falling within the provisions of clause (1) of section 32 of the
32
+ , 1872 (1 of 1872), or to affect the provisions of section 27 of that Act.'
33
+ - Section 446A, Without prejudice to the provisions of section 446, where a bond
34
+ under this Code is for appearance of a person in a case and it is forfeited for
35
+ breach of a condition— the bond executed by such person as well as the bond, if
36
+ any, executed by one or more of his sureties in that case shall stand cancelled;
37
+ and thereafter no such person shall be released only on his own bond in that case,
38
+ if the Police Officer or the Court, as the case may be, for appearance before
39
+ whom the bond was executed, is satisfied that there was no sufficient cause for
40
+ the failure of the person bound by the bond to comply with its condition; Provided
41
+ that subject to any other provision of this Code he may be released in that case
42
+ upon the execution of a fresh personal bond for such sum of money and bond by
43
+ one or more of such sureties as the Police Officer or the Court, as the case may
44
+ be, thinks sufficient.
45
+ - According to Whoever makes any gesture, or any preparation intending or knowing
46
+ it to be likely that such gesture or preparation will cause any person present
47
+ to apprehend that he who makes that gesture or preparation is about to use criminal
48
+ force to that person, is said to commit an assault. IPC 351 in Simple Words they
49
+ are considered to have committed an assault.
50
+ - source_sentence: '[NIA_SECTION_71] Section 71, If the maker, drawee or acceptor
51
+ of a negotiable instrument has no known place of business or fixed residence,
52
+ and no place is specified in the instrument for presentment for acceptance or
53
+ payment, such presentment may be made to him in person wherever be can be found.'
54
+ sentences:
55
+ - Section 123, Whenever the District Magistrate in the case of an order passed by
56
+ an Executive Magistrate under section 117, or the Chief Judicial Magistrate in
57
+ any other case is of opinion that any person imprisoned for failing to give security
58
+ under this Chapter may be released without hazard to the community or to any other
59
+ person, he may order such person to be discharged. Whenever any person has been
60
+ imprisoned for failing to give security under this Chapter, the High Court or
61
+ Court of Session, or, where the order was made by any other Court, the District
62
+ Magistrate, in the case of an order passed by an Executive Magistrate under section
63
+ 117, or the Chief Judicial Magistrate in any other case, may make an order reducing
64
+ the amount of the security or the number of sureties or the time for which security
65
+ has been required. An order under Sub-Section (1) may direct the discharge of
66
+ such person either without conditions or upon any conditions which such person
67
+ accepts; Provided that any condition imposed shall cease to be operative when
68
+ the period for which such person was ordered to give security has expired. The
69
+ State Government may prescribe the conditions upon which a conditional discharge
70
+ may be made. If any condition upon which any person has been discharged is, in
71
+ the opinion of the District Magistrate, in the case of an order passed by an Executive
72
+ Magistrate under section 117, or the Chief Judicial Magistrate in any other case
73
+ by whom the order of discharge was made or of his successor, not fulfilled, he
74
+ may cancel the same. When a conditional order of discharge has been cancelled
75
+ under Sub-Section (5), such person may be arrested by any police officer without
76
+ warrant, and shall thereupon be produced before the District Magistrate, in the
77
+ case of an order passed by an Executive Magistrate under section 117, or the Chief
78
+ Judicial Magistrate in any other case. Unless such person gives security in accordance
79
+ with the terms of the original order for the unexpired portion of the term for
80
+ which he was in the first instance committed or ordered to be detained (such portion
81
+ being deemed to be a period equal to the period between the date of the breach
82
+ of the conditions of discharge and the date on which, except for such conditional
83
+ discharge, he would have been entitled to release), the District Magistrate, in
84
+ the case of an order passed by an Executive Magistrate under section 117, or the
85
+ Chief Judicial Magistrate in any other case may remand such person to prison to
86
+ undergo such unexpired portion. A person remanded to prison under Sub-Section
87
+ (7) shall, subject to the provisions of section 122, be released at any lime on
88
+ giving security in accordance with the terms of the original order for the unexpired
89
+ portion aforesaid to the Court or Magistrate by whom such order was made, or to
90
+ its or his successor. The High Court or Court of Sessions may at any time, for
91
+ sufficient reasons to be recorded in writing, cancel any bond for keeping the
92
+ peace or for good behaviour executed under this Chapter by any order made by it,
93
+ and the District Magistrate, in the case of an order passed by an Executive Magistrate
94
+ under section 117, or the Chief Judicial Magistrate in any other case may make
95
+ such cancellation where such bond was executed under his order or under the order
96
+ of any other Court in his district. Any surety for the peaceable conduct or good
97
+ behaviour of another person, ordered to execute a bond under this Chapter may
98
+ at any time apply to the Court making such order to cancel the bond and on such
99
+ application being made, the Court shall issue a summons or warrant, as it thinks
100
+ fit, requiring the person for whom such surety is bound to appear or to be brought
101
+ before it.
102
+ - Section 71, If the maker, drawee or acceptor of a negotiable instrument has no
103
+ known place of business or fixed residence, and no place is specified in the instrument
104
+ for presentment for acceptance or payment, such presentment may be made to him
105
+ in person wherever be can be found.
106
+ - '[NIA_SECTION_121] Section 121, No maker of a promissory note and no acceptor
107
+ of a bill of exchange payable to order shall, in a suit thereon by a holder in
108
+ due course, be permitted to deny the payee’s capacity, at the date of the note
109
+ or bill, to indorse the same.'
110
+ - source_sentence: '[IPC_SECTION_343] According to Whoever wrongfully confines any
111
+ person for three days or more, shall be punished with imprisonment of either description
112
+ for a term which may extend to two years, or with fine, or with both. IPC 343
113
+ in Simple Words or a fine, or both.'
114
+ sentences:
115
+ - D, D According to section 354D of , (1) Any man who— follows a woman and contacts,
116
+ or attempts to contact such woman to foster personal interaction repeatedly despite
117
+ a clear indication of disinterest by such woman; or monitors the use by a woman
118
+ of the internet, email or any other form of electronic communication, commits
119
+ the offence of stalking; Provided that such conduct shall not amount to stalking
120
+ if the man who pursued it proves that— it was pursued for the purpose of preventing
121
+ or detecting crime and the man accused of stalking had been entrusted with the
122
+ responsibility of prevention and detection of crime by the State; or it was pursued
123
+ under any law or to comply with any condition or requirement imposed by any person
124
+ under any law; or in the particular circumstances such conduct was reasonable
125
+ and justified. (2) Whoever commits the offence of stalking shall be punished on
126
+ first conviction with imprisonment of either description for a term which may
127
+ extend to three years, and shall also be liable to fine; and be punished on a
128
+ second or subsequent conviction, with imprisonment of either description for a
129
+ term which may extend to five years, and shall also be liable to fine. IPC 354D
130
+ in Simple Words According to section 354D of the , any man who repeatedly follows,
131
+ contacts, or monitors a woman's electronic communications despite her clear disinterest
132
+ commits the offence of stalking and can be imprisoned for up to three years on
133
+ first conviction and up to five years on subsequent convictions, along with a
134
+ fine. However, certain justifiable circumstances may not be considered stalking.
135
+ - '[CONSTITUTION_ARTICLE_173] Qualification for membership of the State Legislature
136
+ A person shall not be qualified to be chosen to fill a seat in the Legislature
137
+ of a State unless he (a) is a citizen of India, and makes and subscribes before
138
+ some person authorised in that behalf by the Election Commission an oath or affirmation
139
+ according to the form set out for the purpose in the Third Schedule; (b) is, in
140
+ the case of a seat in the Legislative Assembly, not less than twenty five years
141
+ of age and in the case of a seat in the Legislative Council, not less than thirty
142
+ years of age; and (c) possesses such other qualifications as may be prescribed
143
+ in that behalf by or under any law made by Parliament'
144
+ - According to Whoever wrongfully confines any person for three days or more, shall
145
+ be punished with imprisonment of either description for a term which may extend
146
+ to two years, or with fine, or with both. IPC 343 in Simple Words or a fine, or
147
+ both.
148
+ - source_sentence: '[CPC_SECTION_82] Section 82, 1[(I) Where, in a suit by or against
149
+ the Government or by or against a public officer in respect of any act purporting
150
+ to be done by him in his official capacity, a decree is passed against the Union
151
+ of India or a State or, as the case may be, the public officer, such decree shall
152
+ not be executed except in accordance with the provisions of sub-section (2).]
153
+ (2) Execution shall not be issued on any such decree unless it remains unsatisfied
154
+ for the period of three months computed from the date of 2 [such decree.] 3[(3)
155
+ The provisions of sub-sections (1) and (2) shall apply in relation to an order
156
+ or award as they apply in relation to a decree, if the order or award — (a) is
157
+ passed or made against 4 [the Union of India or a State or a public officer in
158
+ respect of any such act as aforesaid, whether by a Court or by any other authority;
159
+ and (b) is capable of being executed under the provisions of this Code or of any
160
+ other law for the time being in force as if it were a decree.]'
161
+ sentences:
162
+ - Section 82, 1 (2) Execution shall not be issued on any such decree unless it remains
163
+ unsatisfied for the period of three months computed from the date of 2 3
164
+ - Section 131, No one shall be compelled to produce documents in his possession
165
+ or electronic records under his control, which any other person would be entitled
166
+ to refuse to produce if they were in his possession or control, unless such last-mentioned
167
+ person consents to their production.
168
+ - '[CONSTITUTION_ARTICLE_93] The Speaker and Deputy Speaker of the House of the
169
+ People The House of the People shall, as soon as may be, choose two members of
170
+ the House to be respectively Speaker and Deputy Speaker thereof and, so often
171
+ as the office of Speaker or Deputy Speaker becomes vacant, the House shall choose
172
+ another member to be Speaker or Deputy Speaker, as the case may be'
173
+ - source_sentence: '[CONSTITUTION_ARTICLE_252] Power of Parliament to legislate for
174
+ two or more States by consent and adoption of such legislation by any other State
175
+ (1) If it appears to the Legislatures of two or more States to be desirable that
176
+ any of the matters with respect to which Parliament has no power to make laws
177
+ for the States except as provided in Articles 249 and 250 should be regulated
178
+ in such States by Parliament by law, and if resolutions to that effect are passed
179
+ by all the House of the Legislatures of those States, it shall be lawful for Parliament
180
+ to pass an Act for regulating that matter accordingly, and any Act so passed shall
181
+ apply to such States and to any other State by which it is adopted afterwards
182
+ by resolution passed in that behalf by the House or, where there are two Houses,
183
+ by each of the Houses of the Legislature of that State (2) Any Act so passed by
184
+ Parliament may be amended or repealed by an Act of Parliament passed or adopted
185
+ in like manner but shall not, as respects any State to which it applies, be amended
186
+ or repealed by an Act of the Legislature of that State'
187
+ sentences:
188
+ - Section 9, Facts necessary to explain or introduce a fact in issue or relevant
189
+ fact, or which support or rebut an inference suggested by a fact in issue or relevant
190
+ fact, or which establish the identity of any thing or person whose identity is
191
+ relevant, or fix the time or place at which any fact in issue or relevant fact
192
+ happened, or which show the relation of parties by whom any such fact was transacted,
193
+ are relevant in so far as they are necessary for that purpose.
194
+ - Power of Parliament to legislate for two or more States by consent and adoption
195
+ of such legislation by any other State (1) If it appears to the Legislatures of
196
+ two or more States to be desirable that any of the matters with respect to which
197
+ Parliament has no power to make laws for the States except as provided in Articles
198
+ 249 and 250 should be regulated in such States by Parliament by law, and if resolutions
199
+ to that effect are passed by all the House of the Legislatures of those States,
200
+ it shall be lawful for Parliament to pass an Act for regulating that matter accordingly,
201
+ and any Act so passed shall apply to such States and to any other State by which
202
+ it is adopted afterwards by resolution passed in that behalf by the House or,
203
+ where there are two Houses, by each of the Houses of the Legislature of that State
204
+ (2) Any Act so passed by Parliament may be amended or repealed by an Act of Parliament
205
+ passed or adopted in like manner but shall not, as respects any State to which
206
+ it applies, be amended or repealed by an Act of the Legislature of that State
207
+ - '[CRPC_SECTION_206] Section 206, If, in the opinion of a Magistrate taking cognizance
208
+ of a petty offence, the case may be summarily disposed of under section 260 or
209
+ section 261, the Magistrate shall, except where he is, for reasons to be recorded
210
+ in writing of a contrary opinion, issue summons to the accused requiring him either
211
+ to appear in person or by pleader before the Magistrate on a specified date, or
212
+ if he desires to plead guilty to the charge without appearing before the Magistrate,
213
+ to transmit before the specified date, by post or by messenger to the Magistrate,
214
+ the said plea in writing and the amount of fine specified in the summons or if
215
+ he desires to appear by pleader and to plead guilty to the charge through such
216
+ pleader, to authorise, in writing, the pleader to plead guilty to the charge on
217
+ his behalf and to pay the fine through such pleader; Provided that the amount
218
+ of the fine specified in such summons shall not exceed one thousand rupees. For
219
+ the purposes of this section, “petty offence” means any offence punishable only
220
+ with fine not exceeding one thousand rupees, but does not include any offence
221
+ so punishable under the Motor Vehicles Act, 1931, or under any other law which
222
+ provides for convicting the accused person in his absence on a plea of guilty.
223
+ The State Government may, by notification, specially empower any Magistrate to
224
+ exercise the powers conferred by Sub-Section (1) in relation to any offence which
225
+ is compoundable under section 320 or any offence punishable with imprisonment
226
+ for a term not exceeding three months, or with fine or with both where the Magistrate
227
+ is of opinion that, having regard to the facts and circumstances of the case,
228
+ the imposition of fine only would meet the ends of justice.'
229
+ pipeline_tag: sentence-similarity
230
+ library_name: sentence-transformers
231
+ ---
232
+
233
+ # SentenceTransformer based on law-ai/InLegalBERT
234
+
235
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [law-ai/InLegalBERT](https://huggingface.co/law-ai/InLegalBERT). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
236
+
237
+ ## Model Details
238
+
239
+ ### Model Description
240
+ - **Model Type:** Sentence Transformer
241
+ - **Base model:** [law-ai/InLegalBERT](https://huggingface.co/law-ai/InLegalBERT) <!-- at revision b5ecfed8ed6cf9d25a3cb8225a8c52f161f7401a -->
242
+ - **Maximum Sequence Length:** 320 tokens
243
+ - **Output Dimensionality:** 768 dimensions
244
+ - **Similarity Function:** Cosine Similarity
245
+ <!-- - **Training Dataset:** Unknown -->
246
+ <!-- - **Language:** Unknown -->
247
+ <!-- - **License:** Unknown -->
248
+
249
+ ### Model Sources
250
+
251
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
252
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
253
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
254
+
255
+ ### Full Model Architecture
256
+
257
+ ```
258
+ SentenceTransformer(
259
+ (0): Transformer({'max_seq_length': 320, 'do_lower_case': False}) with Transformer model: BertModel
260
+ (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})
261
+ )
262
+ ```
263
+
264
+ ## Usage
265
+
266
+ ### Direct Usage (Sentence Transformers)
267
+
268
+ First install the Sentence Transformers library:
269
+
270
+ ```bash
271
+ pip install -U sentence-transformers
272
+ ```
273
+
274
+ Then you can load this model and run inference.
275
+ ```python
276
+ from sentence_transformers import SentenceTransformer
277
+
278
+ # Download from the 🤗 Hub
279
+ model = SentenceTransformer("amixh/sentence-embedding-model-InLegalBERT-2")
280
+ # Run inference
281
+ sentences = [
282
+ '[CONSTITUTION_ARTICLE_252] Power of Parliament to legislate for two or more States by consent and adoption of such legislation by any other State (1) If it appears to the Legislatures of two or more States to be desirable that any of the matters with respect to which Parliament has no power to make laws for the States except as provided in Articles 249 and 250 should be regulated in such States by Parliament by law, and if resolutions to that effect are passed by all the House of the Legislatures of those States, it shall be lawful for Parliament to pass an Act for regulating that matter accordingly, and any Act so passed shall apply to such States and to any other State by which it is adopted afterwards by resolution passed in that behalf by the House or, where there are two Houses, by each of the Houses of the Legislature of that State (2) Any Act so passed by Parliament may be amended or repealed by an Act of Parliament passed or adopted in like manner but shall not, as respects any State to which it applies, be amended or repealed by an Act of the Legislature of that State',
283
+ 'Power of Parliament to legislate for two or more States by consent and adoption of such legislation by any other State (1) If it appears to the Legislatures of two or more States to be desirable that any of the matters with respect to which Parliament has no power to make laws for the States except as provided in Articles 249 and 250 should be regulated in such States by Parliament by law, and if resolutions to that effect are passed by all the House of the Legislatures of those States, it shall be lawful for Parliament to pass an Act for regulating that matter accordingly, and any Act so passed shall apply to such States and to any other State by which it is adopted afterwards by resolution passed in that behalf by the House or, where there are two Houses, by each of the Houses of the Legislature of that State (2) Any Act so passed by Parliament may be amended or repealed by an Act of Parliament passed or adopted in like manner but shall not, as respects any State to which it applies, be amended or repealed by an Act of the Legislature of that State',
284
+ '[CRPC_SECTION_206] Section 206, If, in the opinion of a Magistrate taking cognizance of a petty offence, the case may be summarily disposed of under section 260 or section 261, the Magistrate shall, except where he is, for reasons to be recorded in writing of a contrary opinion, issue summons to the accused requiring him either to appear in person or by pleader before the Magistrate on a specified date, or if he desires to plead guilty to the charge without appearing before the Magistrate, to transmit before the specified date, by post or by messenger to the Magistrate, the said plea in writing and the amount of fine specified in the summons or if he desires to appear by pleader and to plead guilty to the charge through such pleader, to authorise, in writing, the pleader to plead guilty to the charge on his behalf and to pay the fine through such pleader; Provided that the amount of the fine specified in such summons shall not exceed one thousand rupees. For the purposes of this section, “petty offence” means any offence punishable only with fine not exceeding one thousand rupees, but does not include any offence so punishable under the Motor Vehicles Act, 1931, or under any other law which provides for convicting the accused person in his absence on a plea of guilty. The State Government may, by notification, specially empower any Magistrate to exercise the powers conferred by Sub-Section (1) in relation to any offence which is compoundable under section 320 or any offence punishable with imprisonment for a term not exceeding three months, or with fine or with both where the Magistrate is of opinion that, having regard to the facts and circumstances of the case, the imposition of fine only would meet the ends of justice.',
285
+ ]
286
+ embeddings = model.encode(sentences)
287
+ print(embeddings.shape)
288
+ # [3, 768]
289
+
290
+ # Get the similarity scores for the embeddings
291
+ similarities = model.similarity(embeddings, embeddings)
292
+ print(similarities.shape)
293
+ # [3, 3]
294
+ ```
295
+
296
+ <!--
297
+ ### Direct Usage (Transformers)
298
+
299
+ <details><summary>Click to see the direct usage in Transformers</summary>
300
+
301
+ </details>
302
+ -->
303
+
304
+ <!--
305
+ ### Downstream Usage (Sentence Transformers)
306
+
307
+ You can finetune this model on your own dataset.
308
+
309
+ <details><summary>Click to expand</summary>
310
+
311
+ </details>
312
+ -->
313
+
314
+ <!--
315
+ ### Out-of-Scope Use
316
+
317
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
318
+ -->
319
+
320
+ <!--
321
+ ## Bias, Risks and Limitations
322
+
323
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
324
+ -->
325
+
326
+ <!--
327
+ ### Recommendations
328
+
329
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
330
+ -->
331
+
332
+ ## Training Details
333
+
334
+ ### Training Dataset
335
+
336
+ #### Unnamed Dataset
337
+
338
+ * Size: 1,788 training samples
339
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
340
+ * Approximate statistics based on the first 1000 samples:
341
+ | | sentence_0 | sentence_1 | sentence_2 |
342
+ |:--------|:-------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
343
+ | type | string | string | string |
344
+ | details | <ul><li>min: 14 tokens</li><li>mean: 138.36 tokens</li><li>max: 320 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 130.74 tokens</li><li>max: 320 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 138.37 tokens</li><li>max: 320 tokens</li></ul> |
345
+ * Samples:
346
+ | sentence_0 | sentence_1 | sentence_2 |
347
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
348
+ | <code>[IPC_SECTION_395] According to Whoever commits dacoity shall be punished with imprisonment for life, or with rigorous imprisonment for a term which may extend to ten years, and shall also be liable to fine. IPC 395 in Simple Words Whoever commits dacoity shall be punished with either life imprisonment or rigorous imprisonment up to ten years, and may also face a fine.</code> | <code>According to Whoever commits dacoity shall be punished with imprisonment for life, or with rigorous imprisonment for a term which may extend to ten years, and shall also be liable to fine. IPC 395 in Simple Words Whoever commits dacoity shall be punished with either life imprisonment or rigorous imprisonment up to ten years, and may also face a fine.</code> | <code>[CONSTITUTION_ARTICLE_293] Borrowing by States (1) Subject to the provisions of this article, the executive power of a State extends to borrowing within the territory of India upon the security of the Consolidated Fund of the State within such limits, if any, as may from time to time be fixed by the Legislature of such State by law and to the giving of guarantees within such limits, if any, as may be so fixed (2) The Government of India may, subject to such conditions as may be laid down by or under any law made by Parliament, make loans to any State or, so long as any limits fixed under Article 292 are not exceeded, give guarantees in respect of loans raised by any State, and any sums required for the purpose of making such loans shall be charged on the Consolidated Fund of India (3) A State may not without the consent of the Government of India raise any loan if there is still outstanding any part of a loan which has been made to the State by the Government of India or by its predece...</code> |
349
+ | <code>[IPC_SECTION_344] According to Whoever wrongfully confines any person for ten days, or more, shall be punished with imprisonment of either description for a term which may extend to three years, and shall also be liable to fine. IPC 344 in Simple Words Section 344 of the states that anyone who wrongfully confines a person for ten days or more can be punished with imprisonment for up to three years and may also be fined.</code> | <code>According to Whoever wrongfully confines any person for ten days, or more, shall be punished with imprisonment of either description for a term which may extend to three years, and shall also be liable to fine. IPC 344 in Simple Words Section 344 of the states that anyone who wrongfully confines a person for ten days or more can be punished with imprisonment for up to three years and may also be fined.</code> | <code>[CRPC_SECTION_296] Section 296, The evidence of any person whose evidence is of a formal character may be given by affidavit and may, subject to all just exceptions, be read in evidence in any inquiry, trial or other proceeding under this Code. The Court may, if it thinks fit, and shall, on the application of the prosecution or the accused, summon and examine any such person as to the facts contained in his affidavit.</code> |
350
+ | <code>[CRPC_SECTION_263] Section 263, In every case tried summarily, the Magistrate shall enter, in such form as the Stale Government may direct, the following particulars, namely— the serial number of the case; the date of the commission of the offence; the date of the report of complaint; the name of the complainant (if any); the name, parentage and residence of the accused; the offence complained of and the offence (if any) proved, and in cases coming under clause (ii), clause (iii) or clause (iv) of Sub-Section (1) of section 260, the value of the property in respect of which the offence has been committed; the plea of the accused and his examination (if any); the finding; the sentence or other final order; the date on which proceedings terminated.</code> | <code>Section 263, In every case tried summarily, the Magistrate shall enter, in such form as the Stale Government may direct, the following particulars, namely— the serial number of the case; the date of the commission of the offence; the date of the report of complaint; the name of the complainant (if any); the name, parentage and residence of the accused; the offence complained of and the offence (if any) proved, and in cases coming under clause (ii), clause (iii) or clause (iv) of Sub-Section (1) of section 260, the value of the property in respect of which the offence has been committed; the plea of the accused and his examination (if any); the finding; the sentence or other final order; the date on which proceedings terminated.</code> | <code>[CRPC_SECTION_342] Section 342, Any Court dealing with an application made to it for filing a complaint under section 340 or an appeal under section 341, shall have power to make such order as to costs as may be just.</code> |
351
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
352
+ ```json
353
+ {
354
+ "distance_metric": "TripletDistanceMetric.COSINE",
355
+ "triplet_margin": 0.5
356
+ }
357
+ ```
358
+
359
+ ### Training Hyperparameters
360
+ #### Non-Default Hyperparameters
361
+
362
+ - `per_device_train_batch_size`: 16
363
+ - `per_device_eval_batch_size`: 16
364
+ - `fp16`: True
365
+ - `multi_dataset_batch_sampler`: round_robin
366
+
367
+ #### All Hyperparameters
368
+ <details><summary>Click to expand</summary>
369
+
370
+ - `overwrite_output_dir`: False
371
+ - `do_predict`: False
372
+ - `eval_strategy`: no
373
+ - `prediction_loss_only`: True
374
+ - `per_device_train_batch_size`: 16
375
+ - `per_device_eval_batch_size`: 16
376
+ - `per_gpu_train_batch_size`: None
377
+ - `per_gpu_eval_batch_size`: None
378
+ - `gradient_accumulation_steps`: 1
379
+ - `eval_accumulation_steps`: None
380
+ - `torch_empty_cache_steps`: None
381
+ - `learning_rate`: 5e-05
382
+ - `weight_decay`: 0.0
383
+ - `adam_beta1`: 0.9
384
+ - `adam_beta2`: 0.999
385
+ - `adam_epsilon`: 1e-08
386
+ - `max_grad_norm`: 1
387
+ - `num_train_epochs`: 3
388
+ - `max_steps`: -1
389
+ - `lr_scheduler_type`: linear
390
+ - `lr_scheduler_kwargs`: {}
391
+ - `warmup_ratio`: 0.0
392
+ - `warmup_steps`: 0
393
+ - `log_level`: passive
394
+ - `log_level_replica`: warning
395
+ - `log_on_each_node`: True
396
+ - `logging_nan_inf_filter`: True
397
+ - `save_safetensors`: True
398
+ - `save_on_each_node`: False
399
+ - `save_only_model`: False
400
+ - `restore_callback_states_from_checkpoint`: False
401
+ - `no_cuda`: False
402
+ - `use_cpu`: False
403
+ - `use_mps_device`: False
404
+ - `seed`: 42
405
+ - `data_seed`: None
406
+ - `jit_mode_eval`: False
407
+ - `use_ipex`: False
408
+ - `bf16`: False
409
+ - `fp16`: True
410
+ - `fp16_opt_level`: O1
411
+ - `half_precision_backend`: auto
412
+ - `bf16_full_eval`: False
413
+ - `fp16_full_eval`: False
414
+ - `tf32`: None
415
+ - `local_rank`: 0
416
+ - `ddp_backend`: None
417
+ - `tpu_num_cores`: None
418
+ - `tpu_metrics_debug`: False
419
+ - `debug`: []
420
+ - `dataloader_drop_last`: False
421
+ - `dataloader_num_workers`: 0
422
+ - `dataloader_prefetch_factor`: None
423
+ - `past_index`: -1
424
+ - `disable_tqdm`: False
425
+ - `remove_unused_columns`: True
426
+ - `label_names`: None
427
+ - `load_best_model_at_end`: False
428
+ - `ignore_data_skip`: False
429
+ - `fsdp`: []
430
+ - `fsdp_min_num_params`: 0
431
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
432
+ - `tp_size`: 0
433
+ - `fsdp_transformer_layer_cls_to_wrap`: None
434
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
435
+ - `deepspeed`: None
436
+ - `label_smoothing_factor`: 0.0
437
+ - `optim`: adamw_torch
438
+ - `optim_args`: None
439
+ - `adafactor`: False
440
+ - `group_by_length`: False
441
+ - `length_column_name`: length
442
+ - `ddp_find_unused_parameters`: None
443
+ - `ddp_bucket_cap_mb`: None
444
+ - `ddp_broadcast_buffers`: False
445
+ - `dataloader_pin_memory`: True
446
+ - `dataloader_persistent_workers`: False
447
+ - `skip_memory_metrics`: True
448
+ - `use_legacy_prediction_loop`: False
449
+ - `push_to_hub`: False
450
+ - `resume_from_checkpoint`: None
451
+ - `hub_model_id`: None
452
+ - `hub_strategy`: every_save
453
+ - `hub_private_repo`: None
454
+ - `hub_always_push`: False
455
+ - `gradient_checkpointing`: False
456
+ - `gradient_checkpointing_kwargs`: None
457
+ - `include_inputs_for_metrics`: False
458
+ - `include_for_metrics`: []
459
+ - `eval_do_concat_batches`: True
460
+ - `fp16_backend`: auto
461
+ - `push_to_hub_model_id`: None
462
+ - `push_to_hub_organization`: None
463
+ - `mp_parameters`:
464
+ - `auto_find_batch_size`: False
465
+ - `full_determinism`: False
466
+ - `torchdynamo`: None
467
+ - `ray_scope`: last
468
+ - `ddp_timeout`: 1800
469
+ - `torch_compile`: False
470
+ - `torch_compile_backend`: None
471
+ - `torch_compile_mode`: None
472
+ - `dispatch_batches`: None
473
+ - `split_batches`: None
474
+ - `include_tokens_per_second`: False
475
+ - `include_num_input_tokens_seen`: False
476
+ - `neftune_noise_alpha`: None
477
+ - `optim_target_modules`: None
478
+ - `batch_eval_metrics`: False
479
+ - `eval_on_start`: False
480
+ - `use_liger_kernel`: False
481
+ - `eval_use_gather_object`: False
482
+ - `average_tokens_across_devices`: False
483
+ - `prompts`: None
484
+ - `batch_sampler`: batch_sampler
485
+ - `multi_dataset_batch_sampler`: round_robin
486
+
487
+ </details>
488
+
489
+ ### Framework Versions
490
+ - Python: 3.11.11
491
+ - Sentence Transformers: 4.0.1
492
+ - Transformers: 4.50.2
493
+ - PyTorch: 2.6.0+cu124
494
+ - Accelerate: 1.5.2
495
+ - Datasets: 3.5.0
496
+ - Tokenizers: 0.21.1
497
+
498
+ ## Citation
499
+
500
+ ### BibTeX
501
+
502
+ #### Sentence Transformers
503
+ ```bibtex
504
+ @inproceedings{reimers-2019-sentence-bert,
505
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
506
+ author = "Reimers, Nils and Gurevych, Iryna",
507
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
508
+ month = "11",
509
+ year = "2019",
510
+ publisher = "Association for Computational Linguistics",
511
+ url = "https://arxiv.org/abs/1908.10084",
512
+ }
513
+ ```
514
+
515
+ #### TripletLoss
516
+ ```bibtex
517
+ @misc{hermans2017defense,
518
+ title={In Defense of the Triplet Loss for Person Re-Identification},
519
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
520
+ year={2017},
521
+ eprint={1703.07737},
522
+ archivePrefix={arXiv},
523
+ primaryClass={cs.CV}
524
+ }
525
+ ```
526
+
527
+ <!--
528
+ ## Glossary
529
+
530
+ *Clearly define terms in order to be accessible across audiences.*
531
+ -->
532
+
533
+ <!--
534
+ ## Model Card Authors
535
+
536
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
537
+ -->
538
+
539
+ <!--
540
+ ## Model Card Contact
541
+
542
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
543
+ -->
added_tokens.json ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "bos_token_id": 0,
7
+ "classifier_dropout": null,
8
+ "eos_token_ids": 0,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
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
+ "output_past": true,
20
+ "pad_token_id": 0,
21
+ "position_embedding_type": "absolute",
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.50.2",
24
+ "type_vocab_size": 2,
25
+ "use_cache": true,
26
+ "vocab_size": 33516
27
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.1",
4
+ "transformers": "4.50.2",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fbaeed44afa71349abb9baa0708ef52bd974906e5333bfd6e181d20bc4020022
3
+ size 447148904
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
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 320,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
The diff for this file is too large to render. See raw diff
 
vocab.txt ADDED
The diff for this file is too large to render. See raw diff