Thinc

Latest version: v9.1.1

Safety actively analyzes 693883 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 13 of 14

6.7.0

Not secure
✨ Major features and improvements

* Add `Model.to_bytes()` and `Model.from_bytes()` methods, to support serialization that's compatible between Python versions.
* Remove code depending on [Chainer](http://chainer.org), and instead depend explicitly on the new `cupy` subpackage, for simpler GPU installation.
* Improve accuracy for HashEmbed table, by using 4 conditionally independent keys.
* Support padding in `flatten` and `with_flatten ops`.
* Use the same hash function on both CPU and GPU, for model compatibility.

🔴 Bug fixes

* `HashEmbed` now returns correct results for arrays of length not divisible by 16.
* Provide `.cu` source files in the source distribution.
* Remove unnecessary allocations from the CPU maxout op.
* Fix issue 27: Remove Python2-specific code from `setup.py`.

6.6.0

Not secure
✨ Major features and improvements

* Add GPU kernels for max and mean pool using variable-length sequences.
* `thinc.api.FeatureExtractor`, for getting features from spaCy `Doc` objects.

🔴 Bug fixes

* Improve multi-device handling
* `thinc.api.add` now accepts a variable number of layers.
* Improve `Residual` class.

⚠️ Backwards incompatibilities

* Some of the [example code](examples) may be out of date.

📖 Documentation and examples

* Add [reader for WikiNER corpora](thinc/extra/datasets.py).
* Add example for [Twitter NER](examples/cnn_twitter_ner.py).
* Add [Siamese network](examples/text-pair/glove_mwe_multipool_siamese.py) example.

6.5.1

✨ Major features and improvements

* Add hash kernel linear class.

🔴 Bug fixes

* Fix issue 22: Remove `random_bytes` method from `Ops`.
* Fix `termcolor` dependency.

📖 Documentation and examples

* Add IMDB to datasets.
* Add [linear BOW example](examples/linear_bow.py), using hash kernel.


👥 Contributors

Thanks to rolando and ogrisel for the pull requests!

6.5.0

Not secure
✨ Major features and improvements

* Improve GPU support.
* Add classes for siamese neural network architectures for supervised similarity.
* Add `HashEmbed` class, an embedding layer which uses the [hashing trick](https://en.wikipedia.org/wiki/Feature_hashing) to support a larger vocabulary in a shorter table.
* Add support for distinct feature columns in the `Embed` class.

🔴 Bug fixes

* Fix model averaging for linear model.
* Fix `resume_training()` method for linear model.
* Fix L1 penalty for linear model.

📖 Documentation and examples

* Add [supervised similarity example](examples/text-pair) for Quora, StackExchange and SNLI data.

6.3.0

Not secure
✨ Major features and improvements
- **NEW:** Add `thinc.check` module to specify argument constraints for functions and methods.
- **NEW:** Add `thinc.exceptions` module with custom exception messaging.
- Add [LSUV initialisation](https://arxiv.org/abs/1511.06422).
- Add averaged parameters, for reduced hyper-parameter sensitivity.
- Improve efficiency of maxout, window extraction and dropout.

📋 Tests
- Reorganise and improve [tests](https://github.com/explosion/thinc/tree/master/thinc/tests).
- Reach 100% coverage over the entire package.

6.2.0

Not secure
✨ Major features and improvements
- **NEW:** `Model` now has `define_operators()` classmethod to overload operators for a given block.
- Add `chain()`, `clone()` and `concatenate()` functions for use with overloaded operators.
- Add `describe` module which provides class decorators for defining new layers.
- Allow layers to calculate input and output sizes based on training data.

Together, these features allow very concise model definitions:

python
with Model.define_operators({'**': clone, '>>': chain}):
model = BatchNorm(ReLu(width)) ** depth >> Softmax()


⚠️ Backwards incompatibilities
- Major revisions to previously undocumented neural network APIs (see above).

📋 Tests
- Reorganise and improve [tests](https://github.com/explosion/thinc/tree/master/thinc/tests) for neural network functions.
- Reach 100% coverage over the current neural network classes.

Page 13 of 14

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.