tokenizers 0.6.3-aarch64-linux → 0.7.0-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d7720d598fbaf0a57f2ae905e22751dfbac500f8512fa4d9b9efc3432035993
4
- data.tar.gz: 03f009eb196e26a18d983d1de3ab3261c73cc078a5dec7ac245d0d4030edff0b
3
+ metadata.gz: 903da084f9c3e643aebf261899e742da50ed700d8ccd5ebb7a11e9279e6c8f53
4
+ data.tar.gz: 74a88800659128425a140b448035db059fa48fd7e062fb6285e389900285c6bc
5
5
  SHA512:
6
- metadata.gz: 824b7fdec1ef5aa005343f271d9a09a4bcdb38026a1f118a0cb73aaafb30a2496c6473248cec00c189ae9380f34ecde30356ae2a955e80923eb3445a65219b20
7
- data.tar.gz: c25ebf5226634ac2e91672c9f8e0c6ebc01917c61fb86330655e5df758b1489d16d28bdc205c18a94947a65c819197a502b99aa8507f5858a1f9689b8b8d4ce2
6
+ metadata.gz: 0732f779cd71596a18c719f18eb00999596ac008be81c7cceeea0bdd8012c6e7e278e85ae34000ce0a24a7660763657c25c78093b42ad449774e138015a8575c
7
+ data.tar.gz: a7150f1fd1d04df5b9c886acdecaaf0092417aa9231bb504afd4dd4d5d241f54188fce2248f103e8833d07ff1e26dd84411518f493a2155ab92af85b33aeecf7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,14 @@
1
+ ## 0.7.0 (2026-04-27)
2
+
3
+ - Updated Tokenizers to 0.23.1
4
+ - Added support for releasing GVL
5
+ - Added `encode_batch_fast` method to `Tokenizer`
6
+ - Dropped support for Ruby < 3.3
7
+
8
+ ## 0.6.4 (2026-04-09)
9
+
10
+ - Fixed caching
11
+
1
12
  ## 0.6.3 (2026-01-05)
2
13
 
3
14
  - Updated Tokenizers to 0.22.2
data/Cargo.lock CHANGED
@@ -33,16 +33,14 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
33
33
 
34
34
  [[package]]
35
35
  name = "bindgen"
36
- version = "0.69.5"
36
+ version = "0.72.1"
37
37
  source = "registry+https://github.com/rust-lang/crates.io-index"
38
- checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
38
+ checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
39
39
  dependencies = [
40
40
  "bitflags",
41
41
  "cexpr",
42
42
  "clang-sys",
43
43
  "itertools 0.12.1",
44
- "lazy_static",
45
- "lazycell",
46
44
  "proc-macro2",
47
45
  "quote",
48
46
  "regex",
@@ -160,6 +158,12 @@ version = "0.8.21"
160
158
  source = "registry+https://github.com/rust-lang/crates.io-index"
161
159
  checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
162
160
 
161
+ [[package]]
162
+ name = "daachorse"
163
+ version = "1.0.1"
164
+ source = "registry+https://github.com/rust-lang/crates.io-index"
165
+ checksum = "6f55d7153ba3b507595872a3874803f07a8a81d1e888abed8e5db7da0597d6e2"
166
+
163
167
  [[package]]
164
168
  name = "darling"
165
169
  version = "0.20.11"
@@ -339,12 +343,6 @@ version = "1.5.0"
339
343
  source = "registry+https://github.com/rust-lang/crates.io-index"
340
344
  checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
341
345
 
342
- [[package]]
343
- name = "lazycell"
344
- version = "1.3.0"
345
- source = "registry+https://github.com/rust-lang/crates.io-index"
346
- checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
347
-
348
346
  [[package]]
349
347
  name = "libc"
350
348
  version = "0.2.172"
@@ -530,9 +528,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
530
528
 
531
529
  [[package]]
532
530
  name = "rand"
533
- version = "0.9.1"
531
+ version = "0.9.4"
534
532
  source = "registry+https://github.com/rust-lang/crates.io-index"
535
- checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97"
533
+ checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
536
534
  dependencies = [
537
535
  "rand_chacha",
538
536
  "rand_core",
@@ -590,18 +588,18 @@ dependencies = [
590
588
 
591
589
  [[package]]
592
590
  name = "rb-sys"
593
- version = "0.9.124"
591
+ version = "0.9.127"
594
592
  source = "registry+https://github.com/rust-lang/crates.io-index"
595
- checksum = "c85c4188462601e2aa1469def389c17228566f82ea72f137ed096f21591bc489"
593
+ checksum = "d7d7c9560fe42dcffa576941394075f18a17dce89fcf718a2fa90b7dc2134d12"
596
594
  dependencies = [
597
595
  "rb-sys-build",
598
596
  ]
599
597
 
600
598
  [[package]]
601
599
  name = "rb-sys-build"
602
- version = "0.9.124"
600
+ version = "0.9.127"
603
601
  source = "registry+https://github.com/rust-lang/crates.io-index"
604
- checksum = "568068db4102230882e6d4ae8de6632e224ca75fe5970f6e026a04e91ed635d3"
602
+ checksum = "f1688e8f32967ba48c89e4dfa283b57f901075f542fc7ee9c3d7c5f9091ca1d9"
605
603
  dependencies = [
606
604
  "bindgen",
607
605
  "lazy_static",
@@ -649,9 +647,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
649
647
 
650
648
  [[package]]
651
649
  name = "rustc-hash"
652
- version = "1.1.0"
650
+ version = "2.1.2"
653
651
  source = "registry+https://github.com/rust-lang/crates.io-index"
654
- checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
652
+ checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
655
653
 
656
654
  [[package]]
657
655
  name = "rustversion"
@@ -778,13 +776,13 @@ dependencies = [
778
776
 
779
777
  [[package]]
780
778
  name = "tokenizers"
781
- version = "0.22.2"
779
+ version = "0.23.1"
782
780
  source = "registry+https://github.com/rust-lang/crates.io-index"
783
- checksum = "b238e22d44a15349529690fb07bd645cf58149a1b1e44d6cb5bd1641ff1a6223"
781
+ checksum = "44e5bea67576e04b6ff8564c5d9e09c2ef0cf476502245f2f120e497769d3112"
784
782
  dependencies = [
785
783
  "ahash",
786
- "aho-corasick",
787
784
  "compact_str",
785
+ "daachorse",
788
786
  "dary_heap",
789
787
  "derive_builder",
790
788
  "esaxx-rs",
@@ -812,11 +810,12 @@ dependencies = [
812
810
 
813
811
  [[package]]
814
812
  name = "tokenizers-ruby"
815
- version = "0.6.3"
813
+ version = "0.7.0"
816
814
  dependencies = [
817
815
  "ahash",
818
816
  "magnus",
819
817
  "onig",
818
+ "rb-sys",
820
819
  "serde",
821
820
  "tokenizers",
822
821
  ]
@@ -14,7 +14,7 @@ base64 v0.13.1
14
14
  https://github.com/marshallpierce/rust-base64
15
15
  MIT/Apache-2.0
16
16
 
17
- bindgen v0.69.5
17
+ bindgen v0.72.1
18
18
  https://rust-lang.github.io/rust-bindgen/
19
19
  BSD-3-Clause
20
20
 
@@ -62,6 +62,10 @@ crossbeam-utils v0.8.21
62
62
  https://github.com/crossbeam-rs/crossbeam/tree/master/crossbeam-utils
63
63
  MIT OR Apache-2.0
64
64
 
65
+ daachorse v1.0.1
66
+ https://github.com/daac-tools/daachorse
67
+ MIT OR Apache-2.0
68
+
65
69
  darling v0.20.11
66
70
  https://github.com/TedDriggs/darling
67
71
  MIT
@@ -134,10 +138,6 @@ lazy_static v1.5.0
134
138
  https://github.com/rust-lang-nursery/lazy-static.rs
135
139
  MIT OR Apache-2.0
136
140
 
137
- lazycell v1.3.0
138
- https://github.com/indiv0/lazycell
139
- MIT/Apache-2.0
140
-
141
141
  libc v0.2.172
142
142
  https://github.com/rust-lang/libc
143
143
  MIT OR Apache-2.0
@@ -222,7 +222,7 @@ quote v1.0.40
222
222
  https://github.com/dtolnay/quote
223
223
  MIT OR Apache-2.0
224
224
 
225
- rand v0.9.1
225
+ rand v0.9.4
226
226
  https://rust-random.github.io/book
227
227
  MIT OR Apache-2.0
228
228
 
@@ -246,11 +246,11 @@ rayon-core v1.12.1
246
246
  https://github.com/rayon-rs/rayon
247
247
  MIT OR Apache-2.0
248
248
 
249
- rb-sys v0.9.124
249
+ rb-sys v0.9.127
250
250
  https://github.com/oxidize-rb/rb-sys
251
251
  MIT OR Apache-2.0
252
252
 
253
- rb-sys-build v0.9.124
253
+ rb-sys-build v0.9.127
254
254
  https://github.com/oxidize-rb/rb-sys
255
255
  MIT OR Apache-2.0
256
256
 
@@ -270,9 +270,9 @@ regex-syntax v0.8.5
270
270
  https://github.com/rust-lang/regex/tree/master/regex-syntax
271
271
  MIT OR Apache-2.0
272
272
 
273
- rustc-hash v1.1.0
274
- https://github.com/rust-lang-nursery/rustc-hash
275
- Apache-2.0/MIT
273
+ rustc-hash v2.1.2
274
+ https://github.com/rust-lang/rustc-hash
275
+ Apache-2.0 OR MIT
276
276
 
277
277
  rustversion v1.0.21
278
278
  https://github.com/dtolnay/rustversion
@@ -334,7 +334,7 @@ thiserror-impl v2.0.12
334
334
  https://github.com/dtolnay/thiserror
335
335
  MIT OR Apache-2.0
336
336
 
337
- tokenizers v0.22.2
337
+ tokenizers v0.23.1
338
338
  https://github.com/huggingface/tokenizers
339
339
  Apache-2.0
340
340
 
@@ -2879,6 +2879,215 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
2879
2879
  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2880
2880
  DEALINGS IN THE SOFTWARE.
2881
2881
 
2882
+ ================================================================================
2883
+ daachorse LICENSE-APACHE
2884
+ ================================================================================
2885
+
2886
+ Apache License
2887
+ Version 2.0, January 2004
2888
+ http://www.apache.org/licenses/
2889
+
2890
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
2891
+
2892
+ 1. Definitions.
2893
+
2894
+ "License" shall mean the terms and conditions for use, reproduction,
2895
+ and distribution as defined by Sections 1 through 9 of this document.
2896
+
2897
+ "Licensor" shall mean the copyright owner or entity authorized by
2898
+ the copyright owner that is granting the License.
2899
+
2900
+ "Legal Entity" shall mean the union of the acting entity and all
2901
+ other entities that control, are controlled by, or are under common
2902
+ control with that entity. For the purposes of this definition,
2903
+ "control" means (i) the power, direct or indirect, to cause the
2904
+ direction or management of such entity, whether by contract or
2905
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
2906
+ outstanding shares, or (iii) beneficial ownership of such entity.
2907
+
2908
+ "You" (or "Your") shall mean an individual or Legal Entity
2909
+ exercising permissions granted by this License.
2910
+
2911
+ "Source" form shall mean the preferred form for making modifications,
2912
+ including but not limited to software source code, documentation
2913
+ source, and configuration files.
2914
+
2915
+ "Object" form shall mean any form resulting from mechanical
2916
+ transformation or translation of a Source form, including but
2917
+ not limited to compiled object code, generated documentation,
2918
+ and conversions to other media types.
2919
+
2920
+ "Work" shall mean the work of authorship, whether in Source or
2921
+ Object form, made available under the License, as indicated by a
2922
+ copyright notice that is included in or attached to the work
2923
+ (an example is provided in the Appendix below).
2924
+
2925
+ "Derivative Works" shall mean any work, whether in Source or Object
2926
+ form, that is based on (or derived from) the Work and for which the
2927
+ editorial revisions, annotations, elaborations, or other modifications
2928
+ represent, as a whole, an original work of authorship. For the purposes
2929
+ of this License, Derivative Works shall not include works that remain
2930
+ separable from, or merely link (or bind by name) to the interfaces of,
2931
+ the Work and Derivative Works thereof.
2932
+
2933
+ "Contribution" shall mean any work of authorship, including
2934
+ the original version of the Work and any modifications or additions
2935
+ to that Work or Derivative Works thereof, that is intentionally
2936
+ submitted to Licensor for inclusion in the Work by the copyright owner
2937
+ or by an individual or Legal Entity authorized to submit on behalf of
2938
+ the copyright owner. For the purposes of this definition, "submitted"
2939
+ means any form of electronic, verbal, or written communication sent
2940
+ to the Licensor or its representatives, including but not limited to
2941
+ communication on electronic mailing lists, source code control systems,
2942
+ and issue tracking systems that are managed by, or on behalf of, the
2943
+ Licensor for the purpose of discussing and improving the Work, but
2944
+ excluding communication that is conspicuously marked or otherwise
2945
+ designated in writing by the copyright owner as "Not a Contribution."
2946
+
2947
+ "Contributor" shall mean Licensor and any individual or Legal Entity
2948
+ on behalf of whom a Contribution has been received by Licensor and
2949
+ subsequently incorporated within the Work.
2950
+
2951
+ 2. Grant of Copyright License. Subject to the terms and conditions of
2952
+ this License, each Contributor hereby grants to You a perpetual,
2953
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
2954
+ copyright license to reproduce, prepare Derivative Works of,
2955
+ publicly display, publicly perform, sublicense, and distribute the
2956
+ Work and such Derivative Works in Source or Object form.
2957
+
2958
+ 3. Grant of Patent License. Subject to the terms and conditions of
2959
+ this License, each Contributor hereby grants to You a perpetual,
2960
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
2961
+ (except as stated in this section) patent license to make, have made,
2962
+ use, offer to sell, sell, import, and otherwise transfer the Work,
2963
+ where such license applies only to those patent claims licensable
2964
+ by such Contributor that are necessarily infringed by their
2965
+ Contribution(s) alone or by combination of their Contribution(s)
2966
+ with the Work to which such Contribution(s) was submitted. If You
2967
+ institute patent litigation against any entity (including a
2968
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
2969
+ or a Contribution incorporated within the Work constitutes direct
2970
+ or contributory patent infringement, then any patent licenses
2971
+ granted to You under this License for that Work shall terminate
2972
+ as of the date such litigation is filed.
2973
+
2974
+ 4. Redistribution. You may reproduce and distribute copies of the
2975
+ Work or Derivative Works thereof in any medium, with or without
2976
+ modifications, and in Source or Object form, provided that You
2977
+ meet the following conditions:
2978
+
2979
+ (a) You must give any other recipients of the Work or
2980
+ Derivative Works a copy of this License; and
2981
+
2982
+ (b) You must cause any modified files to carry prominent notices
2983
+ stating that You changed the files; and
2984
+
2985
+ (c) You must retain, in the Source form of any Derivative Works
2986
+ that You distribute, all copyright, patent, trademark, and
2987
+ attribution notices from the Source form of the Work,
2988
+ excluding those notices that do not pertain to any part of
2989
+ the Derivative Works; and
2990
+
2991
+ (d) If the Work includes a "NOTICE" text file as part of its
2992
+ distribution, then any Derivative Works that You distribute must
2993
+ include a readable copy of the attribution notices contained
2994
+ within such NOTICE file, excluding those notices that do not
2995
+ pertain to any part of the Derivative Works, in at least one
2996
+ of the following places: within a NOTICE text file distributed
2997
+ as part of the Derivative Works; within the Source form or
2998
+ documentation, if provided along with the Derivative Works; or,
2999
+ within a display generated by the Derivative Works, if and
3000
+ wherever such third-party notices normally appear. The contents
3001
+ of the NOTICE file are for informational purposes only and
3002
+ do not modify the License. You may add Your own attribution
3003
+ notices within Derivative Works that You distribute, alongside
3004
+ or as an addendum to the NOTICE text from the Work, provided
3005
+ that such additional attribution notices cannot be construed
3006
+ as modifying the License.
3007
+
3008
+ You may add Your own copyright statement to Your modifications and
3009
+ may provide additional or different license terms and conditions
3010
+ for use, reproduction, or distribution of Your modifications, or
3011
+ for any such Derivative Works as a whole, provided Your use,
3012
+ reproduction, and distribution of the Work otherwise complies with
3013
+ the conditions stated in this License.
3014
+
3015
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
3016
+ any Contribution intentionally submitted for inclusion in the Work
3017
+ by You to the Licensor shall be under the terms and conditions of
3018
+ this License, without any additional terms or conditions.
3019
+ Notwithstanding the above, nothing herein shall supersede or modify
3020
+ the terms of any separate license agreement you may have executed
3021
+ with Licensor regarding such Contributions.
3022
+
3023
+ 6. Trademarks. This License does not grant permission to use the trade
3024
+ names, trademarks, service marks, or product names of the Licensor,
3025
+ except as required for reasonable and customary use in describing the
3026
+ origin of the Work and reproducing the content of the NOTICE file.
3027
+
3028
+ 7. Disclaimer of Warranty. Unless required by applicable law or
3029
+ agreed to in writing, Licensor provides the Work (and each
3030
+ Contributor provides its Contributions) on an "AS IS" BASIS,
3031
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
3032
+ implied, including, without limitation, any warranties or conditions
3033
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
3034
+ PARTICULAR PURPOSE. You are solely responsible for determining the
3035
+ appropriateness of using or redistributing the Work and assume any
3036
+ risks associated with Your exercise of permissions under this License.
3037
+
3038
+ 8. Limitation of Liability. In no event and under no legal theory,
3039
+ whether in tort (including negligence), contract, or otherwise,
3040
+ unless required by applicable law (such as deliberate and grossly
3041
+ negligent acts) or agreed to in writing, shall any Contributor be
3042
+ liable to You for damages, including any direct, indirect, special,
3043
+ incidental, or consequential damages of any character arising as a
3044
+ result of this License or out of the use or inability to use the
3045
+ Work (including but not limited to damages for loss of goodwill,
3046
+ work stoppage, computer failure or malfunction, or any and all
3047
+ other commercial damages or losses), even if such Contributor
3048
+ has been advised of the possibility of such damages.
3049
+
3050
+ 9. Accepting Warranty or Additional Liability. While redistributing
3051
+ the Work or Derivative Works thereof, You may choose to offer,
3052
+ and charge a fee for, acceptance of support, warranty, indemnity,
3053
+ or other liability obligations and/or rights consistent with this
3054
+ License. However, in accepting such obligations, You may act only
3055
+ on Your own behalf and on Your sole responsibility, not on behalf
3056
+ of any other Contributor, and only if You agree to indemnify,
3057
+ defend, and hold each Contributor harmless for any liability
3058
+ incurred by, or claims asserted against, such Contributor by reason
3059
+ of your accepting any such warranty or additional liability.
3060
+
3061
+ END OF TERMS AND CONDITIONS
3062
+
3063
+ ================================================================================
3064
+ daachorse LICENSE-MIT
3065
+ ================================================================================
3066
+
3067
+ Permission is hereby granted, free of charge, to any
3068
+ person obtaining a copy of this software and associated
3069
+ documentation files (the "Software"), to deal in the
3070
+ Software without restriction, including without
3071
+ limitation the rights to use, copy, modify, merge,
3072
+ publish, distribute, sublicense, and/or sell copies of
3073
+ the Software, and to permit persons to whom the Software
3074
+ is furnished to do so, subject to the following
3075
+ conditions:
3076
+
3077
+ The above copyright notice and this permission notice
3078
+ shall be included in all copies or substantial portions
3079
+ of the Software.
3080
+
3081
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
3082
+ ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
3083
+ TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
3084
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
3085
+ SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
3086
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
3087
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
3088
+ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
3089
+ DEALINGS IN THE SOFTWARE.
3090
+
2882
3091
  ================================================================================
2883
3092
  darling LICENSE
2884
3093
  ================================================================================
@@ -5984,243 +6193,6 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
5984
6193
  IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
5985
6194
  DEALINGS IN THE SOFTWARE.
5986
6195
 
5987
- ================================================================================
5988
- lazycell LICENSE-APACHE
5989
- ================================================================================
5990
-
5991
- Apache License
5992
- Version 2.0, January 2004
5993
- http://www.apache.org/licenses/
5994
-
5995
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5996
-
5997
- 1. Definitions.
5998
-
5999
- "License" shall mean the terms and conditions for use, reproduction,
6000
- and distribution as defined by Sections 1 through 9 of this document.
6001
-
6002
- "Licensor" shall mean the copyright owner or entity authorized by
6003
- the copyright owner that is granting the License.
6004
-
6005
- "Legal Entity" shall mean the union of the acting entity and all
6006
- other entities that control, are controlled by, or are under common
6007
- control with that entity. For the purposes of this definition,
6008
- "control" means (i) the power, direct or indirect, to cause the
6009
- direction or management of such entity, whether by contract or
6010
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
6011
- outstanding shares, or (iii) beneficial ownership of such entity.
6012
-
6013
- "You" (or "Your") shall mean an individual or Legal Entity
6014
- exercising permissions granted by this License.
6015
-
6016
- "Source" form shall mean the preferred form for making modifications,
6017
- including but not limited to software source code, documentation
6018
- source, and configuration files.
6019
-
6020
- "Object" form shall mean any form resulting from mechanical
6021
- transformation or translation of a Source form, including but
6022
- not limited to compiled object code, generated documentation,
6023
- and conversions to other media types.
6024
-
6025
- "Work" shall mean the work of authorship, whether in Source or
6026
- Object form, made available under the License, as indicated by a
6027
- copyright notice that is included in or attached to the work
6028
- (an example is provided in the Appendix below).
6029
-
6030
- "Derivative Works" shall mean any work, whether in Source or Object
6031
- form, that is based on (or derived from) the Work and for which the
6032
- editorial revisions, annotations, elaborations, or other modifications
6033
- represent, as a whole, an original work of authorship. For the purposes
6034
- of this License, Derivative Works shall not include works that remain
6035
- separable from, or merely link (or bind by name) to the interfaces of,
6036
- the Work and Derivative Works thereof.
6037
-
6038
- "Contribution" shall mean any work of authorship, including
6039
- the original version of the Work and any modifications or additions
6040
- to that Work or Derivative Works thereof, that is intentionally
6041
- submitted to Licensor for inclusion in the Work by the copyright owner
6042
- or by an individual or Legal Entity authorized to submit on behalf of
6043
- the copyright owner. For the purposes of this definition, "submitted"
6044
- means any form of electronic, verbal, or written communication sent
6045
- to the Licensor or its representatives, including but not limited to
6046
- communication on electronic mailing lists, source code control systems,
6047
- and issue tracking systems that are managed by, or on behalf of, the
6048
- Licensor for the purpose of discussing and improving the Work, but
6049
- excluding communication that is conspicuously marked or otherwise
6050
- designated in writing by the copyright owner as "Not a Contribution."
6051
-
6052
- "Contributor" shall mean Licensor and any individual or Legal Entity
6053
- on behalf of whom a Contribution has been received by Licensor and
6054
- subsequently incorporated within the Work.
6055
-
6056
- 2. Grant of Copyright License. Subject to the terms and conditions of
6057
- this License, each Contributor hereby grants to You a perpetual,
6058
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6059
- copyright license to reproduce, prepare Derivative Works of,
6060
- publicly display, publicly perform, sublicense, and distribute the
6061
- Work and such Derivative Works in Source or Object form.
6062
-
6063
- 3. Grant of Patent License. Subject to the terms and conditions of
6064
- this License, each Contributor hereby grants to You a perpetual,
6065
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
6066
- (except as stated in this section) patent license to make, have made,
6067
- use, offer to sell, sell, import, and otherwise transfer the Work,
6068
- where such license applies only to those patent claims licensable
6069
- by such Contributor that are necessarily infringed by their
6070
- Contribution(s) alone or by combination of their Contribution(s)
6071
- with the Work to which such Contribution(s) was submitted. If You
6072
- institute patent litigation against any entity (including a
6073
- cross-claim or counterclaim in a lawsuit) alleging that the Work
6074
- or a Contribution incorporated within the Work constitutes direct
6075
- or contributory patent infringement, then any patent licenses
6076
- granted to You under this License for that Work shall terminate
6077
- as of the date such litigation is filed.
6078
-
6079
- 4. Redistribution. You may reproduce and distribute copies of the
6080
- Work or Derivative Works thereof in any medium, with or without
6081
- modifications, and in Source or Object form, provided that You
6082
- meet the following conditions:
6083
-
6084
- (a) You must give any other recipients of the Work or
6085
- Derivative Works a copy of this License; and
6086
-
6087
- (b) You must cause any modified files to carry prominent notices
6088
- stating that You changed the files; and
6089
-
6090
- (c) You must retain, in the Source form of any Derivative Works
6091
- that You distribute, all copyright, patent, trademark, and
6092
- attribution notices from the Source form of the Work,
6093
- excluding those notices that do not pertain to any part of
6094
- the Derivative Works; and
6095
-
6096
- (d) If the Work includes a "NOTICE" text file as part of its
6097
- distribution, then any Derivative Works that You distribute must
6098
- include a readable copy of the attribution notices contained
6099
- within such NOTICE file, excluding those notices that do not
6100
- pertain to any part of the Derivative Works, in at least one
6101
- of the following places: within a NOTICE text file distributed
6102
- as part of the Derivative Works; within the Source form or
6103
- documentation, if provided along with the Derivative Works; or,
6104
- within a display generated by the Derivative Works, if and
6105
- wherever such third-party notices normally appear. The contents
6106
- of the NOTICE file are for informational purposes only and
6107
- do not modify the License. You may add Your own attribution
6108
- notices within Derivative Works that You distribute, alongside
6109
- or as an addendum to the NOTICE text from the Work, provided
6110
- that such additional attribution notices cannot be construed
6111
- as modifying the License.
6112
-
6113
- You may add Your own copyright statement to Your modifications and
6114
- may provide additional or different license terms and conditions
6115
- for use, reproduction, or distribution of Your modifications, or
6116
- for any such Derivative Works as a whole, provided Your use,
6117
- reproduction, and distribution of the Work otherwise complies with
6118
- the conditions stated in this License.
6119
-
6120
- 5. Submission of Contributions. Unless You explicitly state otherwise,
6121
- any Contribution intentionally submitted for inclusion in the Work
6122
- by You to the Licensor shall be under the terms and conditions of
6123
- this License, without any additional terms or conditions.
6124
- Notwithstanding the above, nothing herein shall supersede or modify
6125
- the terms of any separate license agreement you may have executed
6126
- with Licensor regarding such Contributions.
6127
-
6128
- 6. Trademarks. This License does not grant permission to use the trade
6129
- names, trademarks, service marks, or product names of the Licensor,
6130
- except as required for reasonable and customary use in describing the
6131
- origin of the Work and reproducing the content of the NOTICE file.
6132
-
6133
- 7. Disclaimer of Warranty. Unless required by applicable law or
6134
- agreed to in writing, Licensor provides the Work (and each
6135
- Contributor provides its Contributions) on an "AS IS" BASIS,
6136
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
6137
- implied, including, without limitation, any warranties or conditions
6138
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
6139
- PARTICULAR PURPOSE. You are solely responsible for determining the
6140
- appropriateness of using or redistributing the Work and assume any
6141
- risks associated with Your exercise of permissions under this License.
6142
-
6143
- 8. Limitation of Liability. In no event and under no legal theory,
6144
- whether in tort (including negligence), contract, or otherwise,
6145
- unless required by applicable law (such as deliberate and grossly
6146
- negligent acts) or agreed to in writing, shall any Contributor be
6147
- liable to You for damages, including any direct, indirect, special,
6148
- incidental, or consequential damages of any character arising as a
6149
- result of this License or out of the use or inability to use the
6150
- Work (including but not limited to damages for loss of goodwill,
6151
- work stoppage, computer failure or malfunction, or any and all
6152
- other commercial damages or losses), even if such Contributor
6153
- has been advised of the possibility of such damages.
6154
-
6155
- 9. Accepting Warranty or Additional Liability. While redistributing
6156
- the Work or Derivative Works thereof, You may choose to offer,
6157
- and charge a fee for, acceptance of support, warranty, indemnity,
6158
- or other liability obligations and/or rights consistent with this
6159
- License. However, in accepting such obligations, You may act only
6160
- on Your own behalf and on Your sole responsibility, not on behalf
6161
- of any other Contributor, and only if You agree to indemnify,
6162
- defend, and hold each Contributor harmless for any liability
6163
- incurred by, or claims asserted against, such Contributor by reason
6164
- of your accepting any such warranty or additional liability.
6165
-
6166
- END OF TERMS AND CONDITIONS
6167
-
6168
- APPENDIX: How to apply the Apache License to your work.
6169
-
6170
- To apply the Apache License to your work, attach the following
6171
- boilerplate notice, with the fields enclosed by brackets "[]"
6172
- replaced with your own identifying information. (Don't include
6173
- the brackets!) The text should be enclosed in the appropriate
6174
- comment syntax for the file format. We also recommend that a
6175
- file or class name and description of purpose be included on the
6176
- same "printed page" as the copyright notice for easier
6177
- identification within third-party archives.
6178
-
6179
- Copyright [yyyy] [name of copyright owner]
6180
-
6181
- Licensed under the Apache License, Version 2.0 (the "License");
6182
- you may not use this file except in compliance with the License.
6183
- You may obtain a copy of the License at
6184
-
6185
- http://www.apache.org/licenses/LICENSE-2.0
6186
-
6187
- Unless required by applicable law or agreed to in writing, software
6188
- distributed under the License is distributed on an "AS IS" BASIS,
6189
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
6190
- See the License for the specific language governing permissions and
6191
- limitations under the License.
6192
-
6193
- ================================================================================
6194
- lazycell LICENSE-MIT
6195
- ================================================================================
6196
-
6197
- Original work Copyright (c) 2014 The Rust Project Developers
6198
- Modified work Copyright (c) 2016-2018 Nikita Pekin and lazycell contributors
6199
-
6200
- Permission is hereby granted, free of charge, to any
6201
- person obtaining a copy of this software and associated
6202
- documentation files (the "Software"), to deal in the
6203
- Software without restriction, including without
6204
- limitation the rights to use, copy, modify, merge,
6205
- publish, distribute, sublicense, and/or sell copies of
6206
- the Software, and to permit persons to whom the Software
6207
- is furnished to do so, subject to the following
6208
- conditions:
6209
-
6210
- The above copyright notice and this permission notice
6211
- shall be included in all copies or substantial portions
6212
- of the Software.
6213
-
6214
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
6215
- ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
6216
- TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
6217
- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
6218
- SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
6219
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
6220
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
6221
- IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
6222
- DEALINGS IN THE SOFTWARE.
6223
-
6224
6196
  ================================================================================
6225
6197
  libc LICENSE-APACHE
6226
6198
  ================================================================================
@@ -12643,31 +12615,6 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
12643
12615
 
12644
12616
  END OF TERMS AND CONDITIONS
12645
12617
 
12646
- APPENDIX: How to apply the Apache License to your work.
12647
-
12648
- To apply the Apache License to your work, attach the following
12649
- boilerplate notice, with the fields enclosed by brackets "[]"
12650
- replaced with your own identifying information. (Don't include
12651
- the brackets!) The text should be enclosed in the appropriate
12652
- comment syntax for the file format. We also recommend that a
12653
- file or class name and description of purpose be included on the
12654
- same "printed page" as the copyright notice for easier
12655
- identification within third-party archives.
12656
-
12657
- Copyright [yyyy] [name of copyright owner]
12658
-
12659
- Licensed under the Apache License, Version 2.0 (the "License");
12660
- you may not use this file except in compliance with the License.
12661
- You may obtain a copy of the License at
12662
-
12663
- http://www.apache.org/licenses/LICENSE-2.0
12664
-
12665
- Unless required by applicable law or agreed to in writing, software
12666
- distributed under the License is distributed on an "AS IS" BASIS,
12667
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12668
- See the License for the specific language governing permissions and
12669
- limitations under the License.
12670
-
12671
12618
  ================================================================================
12672
12619
  rustc-hash LICENSE-MIT
12673
12620
  ================================================================================
Binary file
Binary file
Binary file
@@ -1,7 +1,7 @@
1
1
  module Tokenizers
2
2
  module FromPretrained
3
3
  # for user agent
4
- TOKENIZERS_VERSION = "0.22.2"
4
+ TOKENIZERS_VERSION = "0.23.1"
5
5
 
6
6
  # use Ruby for downloads
7
7
  # this avoids the need to vendor OpenSSL on Linux
@@ -55,7 +55,7 @@ module Tokenizers
55
55
  resource_path = File.join(cache_dir, "#{fsum}.#{esum}")
56
56
  if File.exist?(resource_path)
57
57
  res = head_request(url, headers, options)
58
- if res["etag"] == etag
58
+ if normalize_etag(res["etag"]) == normalize_etag(etag)
59
59
  return resource_path
60
60
  end
61
61
  end
@@ -106,6 +106,10 @@ module Tokenizers
106
106
  res
107
107
  end
108
108
 
109
+ def normalize_etag(etag)
110
+ etag.delete_prefix("W/") if etag
111
+ end
112
+
109
113
  def cache_dir
110
114
  cache_dir =
111
115
  if ENV["TOKENIZERS_CACHE"]
@@ -0,0 +1,9 @@
1
+ module Tokenizers
2
+ module Processors
3
+ class Sequence
4
+ def self.new(processors)
5
+ _new(processors)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -18,6 +18,10 @@ module Tokenizers
18
18
  _encode_batch(input, is_pretokenized, add_special_tokens)
19
19
  end
20
20
 
21
+ def encode_batch_fast(input, is_pretokenized: false, add_special_tokens: true)
22
+ _encode_batch_fast(input, is_pretokenized, add_special_tokens)
23
+ end
24
+
21
25
  def decode(ids, skip_special_tokens: true)
22
26
  _decode(ids, skip_special_tokens)
23
27
  end
@@ -1,3 +1,3 @@
1
1
  module Tokenizers
2
- VERSION = "0.6.3"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tokenizers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.3
4
+ version: 0.7.0
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-01-06 00:00:00.000000000 Z
11
+ date: 2026-04-27 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -23,7 +23,6 @@ files:
23
23
  - LICENSE.txt
24
24
  - README.md
25
25
  - lib/tokenizers.rb
26
- - lib/tokenizers/3.2/tokenizers.so
27
26
  - lib/tokenizers/3.3/tokenizers.so
28
27
  - lib/tokenizers/3.4/tokenizers.so
29
28
  - lib/tokenizers/4.0/tokenizers.so
@@ -50,6 +49,7 @@ files:
50
49
  - lib/tokenizers/pre_tokenizers/split.rb
51
50
  - lib/tokenizers/processors/byte_level.rb
52
51
  - lib/tokenizers/processors/roberta_processing.rb
52
+ - lib/tokenizers/processors/sequence.rb
53
53
  - lib/tokenizers/processors/template_processing.rb
54
54
  - lib/tokenizers/tokenizer.rb
55
55
  - lib/tokenizers/trainers/bpe_trainer.rb
@@ -69,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
69
  requirements:
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: '3.2'
72
+ version: '3.3'
73
73
  - - "<"
74
74
  - !ruby/object:Gem::Version
75
75
  version: 4.1.dev
Binary file