mirror of
https://github.com/facebookresearch/fairseq.git
synced 2024-09-11 17:25:31 +03:00
Summary: - fairseq can now be installed via pip: `pip install fairseq` - command-line tools are globally accessible: `fairseq-preprocess`, `fairseq-train`, `fairseq-generate`, etc. Pull Request resolved: https://github.com/pytorch/fairseq/pull/495 Differential Revision: D14017761 Pulled By: myleott fbshipit-source-id: 10c9f6634a3056074eac2f33324b4f1f404d4235
86 lines
1.8 KiB
ReStructuredText
86 lines
1.8 KiB
ReStructuredText
.. _Command-line Tools:
|
|
|
|
Command-line Tools
|
|
==================
|
|
|
|
Fairseq provides several command-line tools for training and evaluating models:
|
|
|
|
- :ref:`fairseq-preprocess`: Data pre-processing: build vocabularies and binarize training data
|
|
- :ref:`fairseq-train`: Train a new model on one or multiple GPUs
|
|
- :ref:`fairseq-generate`: Translate pre-processed data with a trained model
|
|
- :ref:`fairseq-interactive`: Translate raw text with a trained model
|
|
- :ref:`fairseq-score`: BLEU scoring of generated translations against reference translations
|
|
- :ref:`fairseq-eval-lm`: Language model evaluation
|
|
|
|
|
|
.. _fairseq-preprocess:
|
|
|
|
fairseq-preprocess
|
|
~~~~~~~~~~~~~~~~~~
|
|
.. automodule:: preprocess
|
|
|
|
.. argparse::
|
|
:module: fairseq.options
|
|
:func: get_preprocessing_parser
|
|
:prog: fairseq-preprocess
|
|
|
|
|
|
.. _fairseq-train:
|
|
|
|
fairseq-train
|
|
~~~~~~~~~~~~~
|
|
.. automodule:: train
|
|
|
|
.. argparse::
|
|
:module: fairseq.options
|
|
:func: get_training_parser
|
|
:prog: fairseq-train
|
|
|
|
|
|
.. _fairseq-generate:
|
|
|
|
fairseq-generate
|
|
~~~~~~~~~~~~~~~~
|
|
.. automodule:: generate
|
|
|
|
.. argparse::
|
|
:module: fairseq.options
|
|
:func: get_generation_parser
|
|
:prog: fairseq-generate
|
|
|
|
|
|
.. _fairseq-interactive:
|
|
|
|
fairseq-interactive
|
|
~~~~~~~~~~~~~~~~~~~
|
|
.. automodule:: interactive
|
|
|
|
.. argparse::
|
|
:module: fairseq.options
|
|
:func: get_interactive_generation_parser
|
|
:prog: fairseq-interactive
|
|
|
|
|
|
.. _fairseq-score:
|
|
|
|
fairseq-score
|
|
~~~~~~~~~~~~~
|
|
.. automodule:: score
|
|
|
|
.. argparse::
|
|
:module: fairseq_cli.score
|
|
:func: get_parser
|
|
:prog: fairseq-score
|
|
|
|
|
|
.. _fairseq-eval-lm:
|
|
|
|
fairseq-eval-lm
|
|
~~~~~~~~~~~~~~~
|
|
.. automodule:: eval_lm
|
|
|
|
.. argparse::
|
|
:module: fairseq.options
|
|
:func: get_eval_lm_parser
|
|
:prog: fairseq-eval-lm
|