spaCy/website/models/index.jade

99 lines
4.0 KiB
Plaintext

//- 💫 DOCS > MODELS
include ../_includes/_mixins
+section("quickstart")
p
| spaCy v2.0 features new neural models for #[strong tagging],
| #[strong parsing] and #[strong entity recognition]. The models have
| been designed and implemented from scratch specifically for spaCy, to
| give you an unmatched balance of speed, size and accuracy. A novel
| bloom embedding strategy with subword features is used to support
| huge vocabularies in tiny tables. Convolutional layers with residual
| connections, layer normalization and maxout non-linearity are used,
| giving much better efficiency than the standard BiLSTM solution. For
| more details, see the notes on the
| #[+a("/api/#nn-models") model architecture].
p
| The parser and NER use an imitation learning objective to
| deliver #[strong accuracy in-line with the latest research systems],
| even when evaluated from raw text. With these innovations, spaCy
| v2.0's models are #[strong 10× smaller],
| #[strong 20% more accurate], and #[strong just as fast] as the
| previous generation.
include ../usage/_models/_quickstart
+section("install")
+h(2, "install") Installation & Usage
include ../usage/_models/_install-basics
+infobox
| For more details on how to use models with spaCy, see the
| #[+a("/usage/models") usage guide on models].
+section("conventions")
+h(2, "model-naming") Model naming conventions
p
| In general, spaCy expects all model packages to follow the naming
| convention of #[code [lang]_[name]]. For spaCy's models, we also
| chose to divide the name into three components:
+table
+row
+cell #[+label Type]
+cell
| Model capabilities (e.g. #[code core] for general-purpose
| model with vocabulary, syntax, entities and word vectors, or
| #[code depent] for only vocab, syntax and entities).
+row
+cell #[+label Genre]
+cell
| Type of text the model is trained on, e.g. #[code web] or
| #[code news].
+row
+cell #[+label Size]
+cell Model size indicator, #[code sm], #[code md] or #[code lg].
p
| For example, #[code en_core_web_sm] is a small English model trained
| on written web text (blogs, news, comments), that includes
| vocabulary, vectors, syntax and entities.
+h(3, "model-versioning") Model versioning
p
| Additionally, the model versioning reflects both the compatibility
| with spaCy, as well as the major and minor model version. A model
| version #[code a.b.c] translates to:
+table
+row
+cell #[code a]
+cell
| #[strong spaCy major version]. For example, #[code 2] for
| spaCy v2.x.
+row
+cell #[code b]
+cell
| #[strong Model major version]. Models with a different major
| version can't be loaded by the same code. For example,
| changing the width of the model, adding hidden layers or
| changing the activation changes the model major version.
+row
+cell #[code c]
+cell
| #[strong Model minor version]. Same model structure, but
| different parameter values, e.g. from being trained on
| different data, for different numbers of iterations, etc.
p
| For a detailed compatibility overview, see the
| #[+a(gh("spacy-models", "compatibility.json")) #[code compatibility.json]]
| in the models repository. This is also the source of spaCy's internal
| compatibility check, performed when you run the
| #[+api("cli#download") #[code download]] command.