| 1 |
--- |
| 2 |
id: options |
| 3 |
title: List of options |
| 4 |
--- |
| 5 |
|
| 6 |
Invoke a command without arguments to list available arguments and their default values: |
| 7 |
|
| 8 |
```bash |
| 9 |
$ ./fasttext supervised |
| 10 |
Empty input or output path. |
| 11 |
|
| 12 |
The following arguments are mandatory: |
| 13 |
-input training file path |
| 14 |
-output output file path |
| 15 |
|
| 16 |
The following arguments are optional: |
| 17 |
-verbose verbosity level [2] |
| 18 |
|
| 19 |
The following arguments for the dictionary are optional: |
| 20 |
-minCount minimal number of word occurrences [1] |
| 21 |
-minCountLabel minimal number of label occurrences [0] |
| 22 |
-wordNgrams max length of word ngram [1] |
| 23 |
-bucket number of buckets [2000000] |
| 24 |
-minn min length of char ngram [0] |
| 25 |
-maxn max length of char ngram [0] |
| 26 |
-t sampling threshold [0.0001] |
| 27 |
-label labels prefix [__label__] |
| 28 |
|
| 29 |
The following arguments for training are optional: |
| 30 |
-lr learning rate [0.1] |
| 31 |
-lrUpdateRate change the rate of updates for the learning rate [100] |
| 32 |
-dim size of word vectors [100] |
| 33 |
-ws size of the context window [5] |
| 34 |
-epoch number of epochs [5] |
| 35 |
-neg number of negatives sampled [5] |
| 36 |
-loss loss function {ns, hs, softmax} [softmax] |
| 37 |
-thread number of threads [12] |
| 38 |
-pretrainedVectors pretrained word vectors for supervised learning [] |
| 39 |
-saveOutput whether output params should be saved [0] |
| 40 |
|
| 41 |
The following arguments for quantization are optional: |
| 42 |
-cutoff number of words and ngrams to retain [0] |
| 43 |
-retrain finetune embeddings if a cutoff is applied [0] |
| 44 |
-qnorm quantizing the norm separately [0] |
| 45 |
-qout quantizing the classifier [0] |
| 46 |
-dsub size of each sub-vector [2] |
| 47 |
``` |
| 48 |
|
| 49 |
Defaults may vary by mode. (Word-representation modes `skipgram` and `cbow` use a default `-minCount` of 5.) |
| 50 |
|
| 51 |
|
| 52 |
Hyperparameter optimization (autotune) is activated when you provide a validation file with `-autotune-validation` argument. |
| 53 |
```text |
| 54 |
The following arguments are for autotune: |
| 55 |
-autotune-validation validation file to be used for evaluation |
| 56 |
-autotune-metric metric objective {f1, f1:labelname} [f1] |
| 57 |
-autotune-predictions number of predictions used for evaluation [1] |
| 58 |
-autotune-duration maximum duration in seconds [300] |
| 59 |
-autotune-modelsize constraint model file size [] (empty = do not quantize) |
| 60 |
``` |