Onnx Model
Browse files- .gitattributes +3 -11
- 1_Pooling/config.json +7 -0
- LICENSE +360 -0
- README.md +89 -1
- config.json +27 -0
- config_sentence_transformers.json +7 -0
- modules.json +14 -0
- pytorch_model.bin +3 -0
- quantized_true.onnx +3 -0
- sentence_bert_config.json +4 -0
- sentencepiece.bpe.model +3 -0
- special_tokens_map.json +1 -0
- tokenizer.json +0 -0
- tokenizer_config.json +1 -0
.gitattributes
CHANGED
@@ -1,35 +1,27 @@
|
|
1 |
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
|
|
4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
-
|
26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
29 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
30 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
32 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
-
*.
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
1 |
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bin.* filter=lfs diff=lfs merge=lfs -text
|
5 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
|
6 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
|
|
11 |
*.model filter=lfs diff=lfs merge=lfs -text
|
12 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
13 |
*.onnx filter=lfs diff=lfs merge=lfs -text
|
14 |
*.ot filter=lfs diff=lfs merge=lfs -text
|
15 |
*.parquet filter=lfs diff=lfs merge=lfs -text
|
16 |
*.pb filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
17 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
18 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
19 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
20 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
|
21 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
|
|
22 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
23 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
|
|
24 |
*.xz filter=lfs diff=lfs merge=lfs -text
|
25 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
26 |
+
*.zstandard filter=lfs diff=lfs merge=lfs -text
|
27 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
1_Pooling/config.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
}
|
LICENSE
ADDED
@@ -0,0 +1,360 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
Creative Commons Legal Code
|
2 |
+
|
3 |
+
Attribution-NonCommercial-ShareAlike 3.0 Unported
|
4 |
+
|
5 |
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
6 |
+
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
7 |
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
8 |
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
9 |
+
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
10 |
+
DAMAGES RESULTING FROM ITS USE.
|
11 |
+
|
12 |
+
License
|
13 |
+
|
14 |
+
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
15 |
+
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
16 |
+
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
17 |
+
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
18 |
+
|
19 |
+
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
20 |
+
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
21 |
+
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
22 |
+
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
23 |
+
CONDITIONS.
|
24 |
+
|
25 |
+
1. Definitions
|
26 |
+
|
27 |
+
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
28 |
+
other pre-existing works, such as a translation, adaptation,
|
29 |
+
derivative work, arrangement of music or other alterations of a
|
30 |
+
literary or artistic work, or phonogram or performance and includes
|
31 |
+
cinematographic adaptations or any other form in which the Work may be
|
32 |
+
recast, transformed, or adapted including in any form recognizably
|
33 |
+
derived from the original, except that a work that constitutes a
|
34 |
+
Collection will not be considered an Adaptation for the purpose of
|
35 |
+
this License. For the avoidance of doubt, where the Work is a musical
|
36 |
+
work, performance or phonogram, the synchronization of the Work in
|
37 |
+
timed-relation with a moving image ("synching") will be considered an
|
38 |
+
Adaptation for the purpose of this License.
|
39 |
+
b. "Collection" means a collection of literary or artistic works, such as
|
40 |
+
encyclopedias and anthologies, or performances, phonograms or
|
41 |
+
broadcasts, or other works or subject matter other than works listed
|
42 |
+
in Section 1(g) below, which, by reason of the selection and
|
43 |
+
arrangement of their contents, constitute intellectual creations, in
|
44 |
+
which the Work is included in its entirety in unmodified form along
|
45 |
+
with one or more other contributions, each constituting separate and
|
46 |
+
independent works in themselves, which together are assembled into a
|
47 |
+
collective whole. A work that constitutes a Collection will not be
|
48 |
+
considered an Adaptation (as defined above) for the purposes of this
|
49 |
+
License.
|
50 |
+
c. "Distribute" means to make available to the public the original and
|
51 |
+
copies of the Work or Adaptation, as appropriate, through sale or
|
52 |
+
other transfer of ownership.
|
53 |
+
d. "License Elements" means the following high-level license attributes
|
54 |
+
as selected by Licensor and indicated in the title of this License:
|
55 |
+
Attribution, Noncommercial, ShareAlike.
|
56 |
+
e. "Licensor" means the individual, individuals, entity or entities that
|
57 |
+
offer(s) the Work under the terms of this License.
|
58 |
+
f. "Original Author" means, in the case of a literary or artistic work,
|
59 |
+
the individual, individuals, entity or entities who created the Work
|
60 |
+
or if no individual or entity can be identified, the publisher; and in
|
61 |
+
addition (i) in the case of a performance the actors, singers,
|
62 |
+
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
63 |
+
play in, interpret or otherwise perform literary or artistic works or
|
64 |
+
expressions of folklore; (ii) in the case of a phonogram the producer
|
65 |
+
being the person or legal entity who first fixes the sounds of a
|
66 |
+
performance or other sounds; and, (iii) in the case of broadcasts, the
|
67 |
+
organization that transmits the broadcast.
|
68 |
+
g. "Work" means the literary and/or artistic work offered under the terms
|
69 |
+
of this License including without limitation any production in the
|
70 |
+
literary, scientific and artistic domain, whatever may be the mode or
|
71 |
+
form of its expression including digital form, such as a book,
|
72 |
+
pamphlet and other writing; a lecture, address, sermon or other work
|
73 |
+
of the same nature; a dramatic or dramatico-musical work; a
|
74 |
+
choreographic work or entertainment in dumb show; a musical
|
75 |
+
composition with or without words; a cinematographic work to which are
|
76 |
+
assimilated works expressed by a process analogous to cinematography;
|
77 |
+
a work of drawing, painting, architecture, sculpture, engraving or
|
78 |
+
lithography; a photographic work to which are assimilated works
|
79 |
+
expressed by a process analogous to photography; a work of applied
|
80 |
+
art; an illustration, map, plan, sketch or three-dimensional work
|
81 |
+
relative to geography, topography, architecture or science; a
|
82 |
+
performance; a broadcast; a phonogram; a compilation of data to the
|
83 |
+
extent it is protected as a copyrightable work; or a work performed by
|
84 |
+
a variety or circus performer to the extent it is not otherwise
|
85 |
+
considered a literary or artistic work.
|
86 |
+
h. "You" means an individual or entity exercising rights under this
|
87 |
+
License who has not previously violated the terms of this License with
|
88 |
+
respect to the Work, or who has received express permission from the
|
89 |
+
Licensor to exercise rights under this License despite a previous
|
90 |
+
violation.
|
91 |
+
i. "Publicly Perform" means to perform public recitations of the Work and
|
92 |
+
to communicate to the public those public recitations, by any means or
|
93 |
+
process, including by wire or wireless means or public digital
|
94 |
+
performances; to make available to the public Works in such a way that
|
95 |
+
members of the public may access these Works from a place and at a
|
96 |
+
place individually chosen by them; to perform the Work to the public
|
97 |
+
by any means or process and the communication to the public of the
|
98 |
+
performances of the Work, including by public digital performance; to
|
99 |
+
broadcast and rebroadcast the Work by any means including signs,
|
100 |
+
sounds or images.
|
101 |
+
j. "Reproduce" means to make copies of the Work by any means including
|
102 |
+
without limitation by sound or visual recordings and the right of
|
103 |
+
fixation and reproducing fixations of the Work, including storage of a
|
104 |
+
protected performance or phonogram in digital form or other electronic
|
105 |
+
medium.
|
106 |
+
|
107 |
+
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
108 |
+
limit, or restrict any uses free from copyright or rights arising from
|
109 |
+
limitations or exceptions that are provided for in connection with the
|
110 |
+
copyright protection under copyright law or other applicable laws.
|
111 |
+
|
112 |
+
3. License Grant. Subject to the terms and conditions of this License,
|
113 |
+
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
114 |
+
perpetual (for the duration of the applicable copyright) license to
|
115 |
+
exercise the rights in the Work as stated below:
|
116 |
+
|
117 |
+
a. to Reproduce the Work, to incorporate the Work into one or more
|
118 |
+
Collections, and to Reproduce the Work as incorporated in the
|
119 |
+
Collections;
|
120 |
+
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
121 |
+
including any translation in any medium, takes reasonable steps to
|
122 |
+
clearly label, demarcate or otherwise identify that changes were made
|
123 |
+
to the original Work. For example, a translation could be marked "The
|
124 |
+
original work was translated from English to Spanish," or a
|
125 |
+
modification could indicate "The original work has been modified.";
|
126 |
+
c. to Distribute and Publicly Perform the Work including as incorporated
|
127 |
+
in Collections; and,
|
128 |
+
d. to Distribute and Publicly Perform Adaptations.
|
129 |
+
|
130 |
+
The above rights may be exercised in all media and formats whether now
|
131 |
+
known or hereafter devised. The above rights include the right to make
|
132 |
+
such modifications as are technically necessary to exercise the rights in
|
133 |
+
other media and formats. Subject to Section 8(f), all rights not expressly
|
134 |
+
granted by Licensor are hereby reserved, including but not limited to the
|
135 |
+
rights described in Section 4(e).
|
136 |
+
|
137 |
+
4. Restrictions. The license granted in Section 3 above is expressly made
|
138 |
+
subject to and limited by the following restrictions:
|
139 |
+
|
140 |
+
a. You may Distribute or Publicly Perform the Work only under the terms
|
141 |
+
of this License. You must include a copy of, or the Uniform Resource
|
142 |
+
Identifier (URI) for, this License with every copy of the Work You
|
143 |
+
Distribute or Publicly Perform. You may not offer or impose any terms
|
144 |
+
on the Work that restrict the terms of this License or the ability of
|
145 |
+
the recipient of the Work to exercise the rights granted to that
|
146 |
+
recipient under the terms of the License. You may not sublicense the
|
147 |
+
Work. You must keep intact all notices that refer to this License and
|
148 |
+
to the disclaimer of warranties with every copy of the Work You
|
149 |
+
Distribute or Publicly Perform. When You Distribute or Publicly
|
150 |
+
Perform the Work, You may not impose any effective technological
|
151 |
+
measures on the Work that restrict the ability of a recipient of the
|
152 |
+
Work from You to exercise the rights granted to that recipient under
|
153 |
+
the terms of the License. This Section 4(a) applies to the Work as
|
154 |
+
incorporated in a Collection, but this does not require the Collection
|
155 |
+
apart from the Work itself to be made subject to the terms of this
|
156 |
+
License. If You create a Collection, upon notice from any Licensor You
|
157 |
+
must, to the extent practicable, remove from the Collection any credit
|
158 |
+
as required by Section 4(d), as requested. If You create an
|
159 |
+
Adaptation, upon notice from any Licensor You must, to the extent
|
160 |
+
practicable, remove from the Adaptation any credit as required by
|
161 |
+
Section 4(d), as requested.
|
162 |
+
b. You may Distribute or Publicly Perform an Adaptation only under: (i)
|
163 |
+
the terms of this License; (ii) a later version of this License with
|
164 |
+
the same License Elements as this License; (iii) a Creative Commons
|
165 |
+
jurisdiction license (either this or a later license version) that
|
166 |
+
contains the same License Elements as this License (e.g.,
|
167 |
+
Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License").
|
168 |
+
You must include a copy of, or the URI, for Applicable License with
|
169 |
+
every copy of each Adaptation You Distribute or Publicly Perform. You
|
170 |
+
may not offer or impose any terms on the Adaptation that restrict the
|
171 |
+
terms of the Applicable License or the ability of the recipient of the
|
172 |
+
Adaptation to exercise the rights granted to that recipient under the
|
173 |
+
terms of the Applicable License. You must keep intact all notices that
|
174 |
+
refer to the Applicable License and to the disclaimer of warranties
|
175 |
+
with every copy of the Work as included in the Adaptation You
|
176 |
+
Distribute or Publicly Perform. When You Distribute or Publicly
|
177 |
+
Perform the Adaptation, You may not impose any effective technological
|
178 |
+
measures on the Adaptation that restrict the ability of a recipient of
|
179 |
+
the Adaptation from You to exercise the rights granted to that
|
180 |
+
recipient under the terms of the Applicable License. This Section 4(b)
|
181 |
+
applies to the Adaptation as incorporated in a Collection, but this
|
182 |
+
does not require the Collection apart from the Adaptation itself to be
|
183 |
+
made subject to the terms of the Applicable License.
|
184 |
+
c. You may not exercise any of the rights granted to You in Section 3
|
185 |
+
above in any manner that is primarily intended for or directed toward
|
186 |
+
commercial advantage or private monetary compensation. The exchange of
|
187 |
+
the Work for other copyrighted works by means of digital file-sharing
|
188 |
+
or otherwise shall not be considered to be intended for or directed
|
189 |
+
toward commercial advantage or private monetary compensation, provided
|
190 |
+
there is no payment of any monetary compensation in con-nection with
|
191 |
+
the exchange of copyrighted works.
|
192 |
+
d. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
193 |
+
Collections, You must, unless a request has been made pursuant to
|
194 |
+
Section 4(a), keep intact all copyright notices for the Work and
|
195 |
+
provide, reasonable to the medium or means You are utilizing: (i) the
|
196 |
+
name of the Original Author (or pseudonym, if applicable) if supplied,
|
197 |
+
and/or if the Original Author and/or Licensor designate another party
|
198 |
+
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
199 |
+
attribution ("Attribution Parties") in Licensor's copyright notice,
|
200 |
+
terms of service or by other reasonable means, the name of such party
|
201 |
+
or parties; (ii) the title of the Work if supplied; (iii) to the
|
202 |
+
extent reasonably practicable, the URI, if any, that Licensor
|
203 |
+
specifies to be associated with the Work, unless such URI does not
|
204 |
+
refer to the copyright notice or licensing information for the Work;
|
205 |
+
and, (iv) consistent with Section 3(b), in the case of an Adaptation,
|
206 |
+
a credit identifying the use of the Work in the Adaptation (e.g.,
|
207 |
+
"French translation of the Work by Original Author," or "Screenplay
|
208 |
+
based on original Work by Original Author"). The credit required by
|
209 |
+
this Section 4(d) may be implemented in any reasonable manner;
|
210 |
+
provided, however, that in the case of a Adaptation or Collection, at
|
211 |
+
a minimum such credit will appear, if a credit for all contributing
|
212 |
+
authors of the Adaptation or Collection appears, then as part of these
|
213 |
+
credits and in a manner at least as prominent as the credits for the
|
214 |
+
other contributing authors. For the avoidance of doubt, You may only
|
215 |
+
use the credit required by this Section for the purpose of attribution
|
216 |
+
in the manner set out above and, by exercising Your rights under this
|
217 |
+
License, You may not implicitly or explicitly assert or imply any
|
218 |
+
connection with, sponsorship or endorsement by the Original Author,
|
219 |
+
Licensor and/or Attribution Parties, as appropriate, of You or Your
|
220 |
+
use of the Work, without the separate, express prior written
|
221 |
+
permission of the Original Author, Licensor and/or Attribution
|
222 |
+
Parties.
|
223 |
+
e. For the avoidance of doubt:
|
224 |
+
|
225 |
+
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
226 |
+
which the right to collect royalties through any statutory or
|
227 |
+
compulsory licensing scheme cannot be waived, the Licensor
|
228 |
+
reserves the exclusive right to collect such royalties for any
|
229 |
+
exercise by You of the rights granted under this License;
|
230 |
+
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
231 |
+
which the right to collect royalties through any statutory or
|
232 |
+
compulsory licensing scheme can be waived, the Licensor reserves
|
233 |
+
the exclusive right to collect such royalties for any exercise by
|
234 |
+
You of the rights granted under this License if Your exercise of
|
235 |
+
such rights is for a purpose or use which is otherwise than
|
236 |
+
noncommercial as permitted under Section 4(c) and otherwise waives
|
237 |
+
the right to collect royalties through any statutory or compulsory
|
238 |
+
licensing scheme; and,
|
239 |
+
iii. Voluntary License Schemes. The Licensor reserves the right to
|
240 |
+
collect royalties, whether individually or, in the event that the
|
241 |
+
Licensor is a member of a collecting society that administers
|
242 |
+
voluntary licensing schemes, via that society, from any exercise
|
243 |
+
by You of the rights granted under this License that is for a
|
244 |
+
purpose or use which is otherwise than noncommercial as permitted
|
245 |
+
under Section 4(c).
|
246 |
+
f. Except as otherwise agreed in writing by the Licensor or as may be
|
247 |
+
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
248 |
+
Publicly Perform the Work either by itself or as part of any
|
249 |
+
Adaptations or Collections, You must not distort, mutilate, modify or
|
250 |
+
take other derogatory action in relation to the Work which would be
|
251 |
+
prejudicial to the Original Author's honor or reputation. Licensor
|
252 |
+
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
253 |
+
of the right granted in Section 3(b) of this License (the right to
|
254 |
+
make Adaptations) would be deemed to be a distortion, mutilation,
|
255 |
+
modification or other derogatory action prejudicial to the Original
|
256 |
+
Author's honor and reputation, the Licensor will waive or not assert,
|
257 |
+
as appropriate, this Section, to the fullest extent permitted by the
|
258 |
+
applicable national law, to enable You to reasonably exercise Your
|
259 |
+
right under Section 3(b) of this License (right to make Adaptations)
|
260 |
+
but not otherwise.
|
261 |
+
|
262 |
+
5. Representations, Warranties and Disclaimer
|
263 |
+
|
264 |
+
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE
|
265 |
+
FULLEST EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS
|
266 |
+
AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE
|
267 |
+
WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT
|
268 |
+
LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
269 |
+
PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS,
|
270 |
+
ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT
|
271 |
+
DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED
|
272 |
+
WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU.
|
273 |
+
|
274 |
+
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
275 |
+
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
276 |
+
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
277 |
+
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
278 |
+
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
279 |
+
|
280 |
+
7. Termination
|
281 |
+
|
282 |
+
a. This License and the rights granted hereunder will terminate
|
283 |
+
automatically upon any breach by You of the terms of this License.
|
284 |
+
Individuals or entities who have received Adaptations or Collections
|
285 |
+
from You under this License, however, will not have their licenses
|
286 |
+
terminated provided such individuals or entities remain in full
|
287 |
+
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
288 |
+
survive any termination of this License.
|
289 |
+
b. Subject to the above terms and conditions, the license granted here is
|
290 |
+
perpetual (for the duration of the applicable copyright in the Work).
|
291 |
+
Notwithstanding the above, Licensor reserves the right to release the
|
292 |
+
Work under different license terms or to stop distributing the Work at
|
293 |
+
any time; provided, however that any such election will not serve to
|
294 |
+
withdraw this License (or any other license that has been, or is
|
295 |
+
required to be, granted under the terms of this License), and this
|
296 |
+
License will continue in full force and effect unless terminated as
|
297 |
+
stated above.
|
298 |
+
|
299 |
+
8. Miscellaneous
|
300 |
+
|
301 |
+
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
302 |
+
the Licensor offers to the recipient a license to the Work on the same
|
303 |
+
terms and conditions as the license granted to You under this License.
|
304 |
+
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
305 |
+
offers to the recipient a license to the original Work on the same
|
306 |
+
terms and conditions as the license granted to You under this License.
|
307 |
+
c. If any provision of this License is invalid or unenforceable under
|
308 |
+
applicable law, it shall not affect the validity or enforceability of
|
309 |
+
the remainder of the terms of this License, and without further action
|
310 |
+
by the parties to this agreement, such provision shall be reformed to
|
311 |
+
the minimum extent necessary to make such provision valid and
|
312 |
+
enforceable.
|
313 |
+
d. No term or provision of this License shall be deemed waived and no
|
314 |
+
breach consented to unless such waiver or consent shall be in writing
|
315 |
+
and signed by the party to be charged with such waiver or consent.
|
316 |
+
e. This License constitutes the entire agreement between the parties with
|
317 |
+
respect to the Work licensed here. There are no understandings,
|
318 |
+
agreements or representations with respect to the Work not specified
|
319 |
+
here. Licensor shall not be bound by any additional provisions that
|
320 |
+
may appear in any communication from You. This License may not be
|
321 |
+
modified without the mutual written agreement of the Licensor and You.
|
322 |
+
f. The rights granted under, and the subject matter referenced, in this
|
323 |
+
License were drafted utilizing the terminology of the Berne Convention
|
324 |
+
for the Protection of Literary and Artistic Works (as amended on
|
325 |
+
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
326 |
+
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
327 |
+
and the Universal Copyright Convention (as revised on July 24, 1971).
|
328 |
+
These rights and subject matter take effect in the relevant
|
329 |
+
jurisdiction in which the License terms are sought to be enforced
|
330 |
+
according to the corresponding provisions of the implementation of
|
331 |
+
those treaty provisions in the applicable national law. If the
|
332 |
+
standard suite of rights granted under applicable copyright law
|
333 |
+
includes additional rights not granted under this License, such
|
334 |
+
additional rights are deemed to be included in the License; this
|
335 |
+
License is not intended to restrict the license of any rights under
|
336 |
+
applicable law.
|
337 |
+
|
338 |
+
|
339 |
+
Creative Commons Notice
|
340 |
+
|
341 |
+
Creative Commons is not a party to this License, and makes no warranty
|
342 |
+
whatsoever in connection with the Work. Creative Commons will not be
|
343 |
+
liable to You or any party on any legal theory for any damages
|
344 |
+
whatsoever, including without limitation any general, special,
|
345 |
+
incidental or consequential damages arising in connection to this
|
346 |
+
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
347 |
+
Commons has expressly identified itself as the Licensor hereunder, it
|
348 |
+
shall have all rights and obligations of Licensor.
|
349 |
+
|
350 |
+
Except for the limited purpose of indicating to the public that the
|
351 |
+
Work is licensed under the CCPL, Creative Commons does not authorize
|
352 |
+
the use by either party of the trademark "Creative Commons" or any
|
353 |
+
related trademark or logo of Creative Commons without the prior
|
354 |
+
written consent of Creative Commons. Any permitted use will be in
|
355 |
+
compliance with Creative Commons' then-current trademark usage
|
356 |
+
guidelines, as may be published on its website or otherwise made
|
357 |
+
available upon request from time to time. For the avoidance of doubt,
|
358 |
+
this trademark restriction does not form part of this License.
|
359 |
+
|
360 |
+
Creative Commons may be contacted at https://creativecommons.org/.
|
README.md
CHANGED
@@ -1,3 +1,91 @@
|
|
1 |
---
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- ar
|
4 |
+
- bg
|
5 |
+
- de
|
6 |
+
- el
|
7 |
+
- en
|
8 |
+
- es
|
9 |
+
- fr
|
10 |
+
- ru
|
11 |
+
- th
|
12 |
+
- tr
|
13 |
+
- ur
|
14 |
+
- vn
|
15 |
+
- zh
|
16 |
+
datasets:
|
17 |
+
- SNLI
|
18 |
+
- MNLI
|
19 |
+
- ANLI
|
20 |
+
- XNLI
|
21 |
+
pipeline_tag: sentence-similarity
|
22 |
+
tags:
|
23 |
+
- zero-shot-classification
|
24 |
+
- sentence-transformers
|
25 |
+
- feature-extraction
|
26 |
+
- sentence-similarity
|
27 |
+
- transformers
|
28 |
---
|
29 |
+
|
30 |
+
A Siamese network model trained for zero-shot and few-shot text classification.
|
31 |
+
|
32 |
+
The base model is [xlm-roberta-base](https://huggingface.co/xlm-roberta-base).
|
33 |
+
It was trained on [SNLI](https://nlp.stanford.edu/projects/snli/), [MNLI](https://cims.nyu.edu/~sbowman/multinli/), [ANLI](https://github.com/facebookresearch/anli) and [XNLI](https://github.com/facebookresearch/XNLI).
|
34 |
+
|
35 |
+
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space.
|
36 |
+
|
37 |
+
## Usage (Sentence-Transformers)
|
38 |
+
|
39 |
+
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
40 |
+
|
41 |
+
```
|
42 |
+
pip install -U sentence-transformers
|
43 |
+
```
|
44 |
+
|
45 |
+
Then you can use the model like this:
|
46 |
+
|
47 |
+
```python
|
48 |
+
from sentence_transformers import SentenceTransformer
|
49 |
+
sentences = ["This is an example sentence", "Each sentence is converted"]
|
50 |
+
|
51 |
+
model = SentenceTransformer('{MODEL_NAME}')
|
52 |
+
embeddings = model.encode(sentences)
|
53 |
+
print(embeddings)
|
54 |
+
```
|
55 |
+
|
56 |
+
|
57 |
+
## Usage (HuggingFace Transformers)
|
58 |
+
Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
|
59 |
+
|
60 |
+
```python
|
61 |
+
from transformers import AutoTokenizer, AutoModel
|
62 |
+
import torch
|
63 |
+
|
64 |
+
|
65 |
+
#Mean Pooling - Take attention mask into account for correct averaging
|
66 |
+
def mean_pooling(model_output, attention_mask):
|
67 |
+
token_embeddings = model_output[0] #First element of model_output contains all token embeddings
|
68 |
+
input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
|
69 |
+
return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
|
70 |
+
|
71 |
+
|
72 |
+
# Sentences we want sentence embeddings for
|
73 |
+
sentences = ['This is an example sentence', 'Each sentence is converted']
|
74 |
+
|
75 |
+
# Load model from HuggingFace Hub
|
76 |
+
tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
|
77 |
+
model = AutoModel.from_pretrained('{MODEL_NAME}')
|
78 |
+
|
79 |
+
# Tokenize sentences
|
80 |
+
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
81 |
+
|
82 |
+
# Compute token embeddings
|
83 |
+
with torch.no_grad():
|
84 |
+
model_output = model(**encoded_input)
|
85 |
+
|
86 |
+
# Perform pooling. In this case, mean pooling.
|
87 |
+
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
|
88 |
+
|
89 |
+
print("Sentence embeddings:")
|
90 |
+
print(sentence_embeddings)
|
91 |
+
```
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "xlm-roberta-base",
|
3 |
+
"architectures": [
|
4 |
+
"XLMRobertaModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"bos_token_id": 0,
|
8 |
+
"eos_token_id": 2,
|
9 |
+
"gradient_checkpointing": false,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_dropout_prob": 0.1,
|
12 |
+
"hidden_size": 768,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 3072,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 514,
|
17 |
+
"model_type": "xlm-roberta",
|
18 |
+
"num_attention_heads": 12,
|
19 |
+
"num_hidden_layers": 12,
|
20 |
+
"output_past": true,
|
21 |
+
"pad_token_id": 1,
|
22 |
+
"position_embedding_type": "absolute",
|
23 |
+
"transformers_version": "4.6.0",
|
24 |
+
"type_vocab_size": 1,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 250002
|
27 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "2.0.0",
|
4 |
+
"transformers": "4.6.0",
|
5 |
+
"pytorch": "1.7.0"
|
6 |
+
}
|
7 |
+
}
|
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 |
+
]
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3505e3293a6fa0622d7eb4a0c261c7cbe1f21d6dbbeab0826f08ceb78b69a507
|
3 |
+
size 1112259141
|
quantized_true.onnx
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:91511c38aa9600dd1753ae87af253a1a0a82f880c35485ccbfa4914fdde718f3
|
3 |
+
size 278679841
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 128,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
sentencepiece.bpe.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
|
3 |
+
size 5069051
|
special_tokens_map.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "unk_token": "<unk>", "sep_token": "</s>", "pad_token": "<pad>", "cls_token": "<s>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": false}}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"bos_token": "<s>", "eos_token": "</s>", "sep_token": "</s>", "cls_token": "<s>", "unk_token": "<unk>", "pad_token": "<pad>", "mask_token": {"content": "<mask>", "single_word": false, "lstrip": true, "rstrip": false, "normalized": true, "__type": "AddedToken"}, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "xlm-roberta-base"}
|