Releases: nlpodyssey/spago
Releases · nlpodyssey/spago
v0.4.0
Added
- Various new test cases (improving the coverage).
nlp.embeddings.syncmap
package.ml.nn.recurrent.srnn.BiModel
which implements a bidirectional variant of the Shuffling Recurrent Neural Networks (SRNN).- Configurable timeout and request limit to all HTTP and gRPC servers (see also commands help).
Changed
- All CLI commands implementation has been refactored, so that the
docker-entrypoint
can reuse all othercli.App
objects, instead of just running separate executables. By extension, now the Dockerfile builds a single executable file, and the final image is way smaller. - All dependencies have been upgraded to the latest version.
- Simplify custom error definitions using
fmt.Errorf
instead of functions fromgithub.com/pkg/errors
. - Custom binary data serialization of matrices and models is now achieved with Go's
encoding.gob
. Many specific functions and methods are now replaced by fewer and simpler encoding/decoding methods compatible withgob
. A list of important related changes follows.utils.kvdb.KeyValueDB
is no longer an interface, but a struct which directly implements the former "badger backend".utils.SerializeToFile
andutils.DeserializeFromFile
now handle genericinterface{}
objects, instead of values implementingSerializer
andDeserializer
.mat32
andmat64
custom serialization functions (e.g.MarshalBinarySlice
,MarshalBinaryTo
, ...) are replaced by implementations ofBinaryMarshaler
andBinaryUnmarshaler
interfaces onDense
andSparse
matrix types.PositionalEncoder.Cache
andAxialPositionalEncoder.Cache
fields (fromml.encoding.pe
package) are now public.- All types implementing
nn.Model
interface are registered for gob serialization (in init functions). embeddings.Model.UsedEmbeddings
type is nownlp.embeddings.syncmap.Map
.- As a consequence, you will have to re-serialize all your models.
- Flair converter now sets the vocabulary directly in the model, instead of creating a separate file.
sequencelabeler.Model.LoadParams
has been renamed toLoad
.
Removed
- In relation to the aforementioned gob serialization changes:
nn.ParamSerializer
and related functionsnn.ParamsSerializer
and related functionsutils.Serializer
andutils.Deserializer
interfacesutils.ReadFull
function
sequencelabeler.Model.LoadVocabulary
Fixed
docker-entrypoint
sub-commandhugging-face-importer
has been renamed tohuggingface-importer
, just like the main command itself.docker-entrypoint
sub-command can be correctly specified without leading./
or/
when run from a Docker container.- BREAKING: mat32.Matrix serialization has been fixed, now serializing single values to chunks of 4 bytes (instead of 8, like float64). Serialized 32-bit models will now be half the size! Unfortunately you will have to re-serialize your models (sorry!).
v0.3.0
Added
- Static analysis job (
golint
andgocyclo
) toGo
GitHub workflow. - You can set a limit for concurrent heavyweight Graph computations (e.g. forward and backward steps) - see
ml.ag.ConcurrentComputations()
(GraphOption
) andml.ag.Graph.ConcurrentComputations()
. If no option is specified, by default the limit is set toruntime.NumCPU()
. - You can set a limit for concurrent heavyweight computations of
ml.optimizers.gd.GradientDescent
(e.g. params update step). - New package
utils.processingqueue
. mat32
package, which operates onfloat32
data type.- It's possible to switch between
float32
andfloat64
as default floating-point data type, using the scriptchange-float-type.sh
Go
GitHub workflow has been adapted to run tests using bothfloat32
andfloat64
as main floating-point data type.- This CHANGELOG file.
- Pull and convert Hugging Face models automatically if not found locally when starting BERT or BART server.
- Move content from GitHub Wiki to README in related package folders.
Changed
ml.ag.ConcurrentComputations
(GraphOption
) expects the maximum number of concurrent computations handled by heavyweight Graph operations (e.g. forward and backward steps).ml.nn.linear.Model
andml.nn.convolution.Model
read the concurrent computations limit set on the model's Graph, thusSetConcurrentComputations()
methods have been removed.mat
has been renamed tomat64
and some functions have been renamed.- The whole project now works with
float32
floating-point data type by default, by using the packagemat32
. - When imported, the new package
mat32
is always aliased asmat
. Then, explicit usages offloat64
type have been replaced withmat.Float
. Moreover, bitsize-specific functions have been made more generic (i.e. operating withmat.Float
type) or split into separate implementation, inmat32
andmat64
. In this way, switching the whole project betweenfloat32
andfloat64
is just a matter of changing all imports, frommat32
tomat64
, or vice-versa (see also the new filechange-float-type.sh
). - Update internal links to pre-trained NER models to float32 versions.
nlp.sequencelabeler.Convert()
now loads and converts original Flair models, instead of pre-processed dumps.- Change command line arguments to make them more consistent; please refer to the help messages of each command.
- Update Dockerfile using a new base building image and adding bart server.
Fixed
- Added dedicated package names to different protocol buffers definition files to avoid name conflicts.
v0.2.0
Notable changes:
- Added support for BART model (tested on Natural Language Inference task);
- Added BART API to perform Zero-Shot Text Classification;
- Significant reduction of boilerplate code through the unification of
nn.Model
andnn.Processor
interfaces:- there is now a single
nn.Model
interface that can be reified to become a neural processor. Seenn.Reify()
; - there was no compelling reason to have a
Forward
method in thenn.Model
interface so it has been removed, gracefully increasing flexibility in the implementation of a model.
- there is now a single
First tagged release
v0.1.0 Update go.yml