lm.lua

lm.lua options:

  • -h [] (default: false)
    This help.
  • -md [] (default: false)
    Dump help in Markdown format.
  • -config (default: '')
    Load options from this file.
  • -save_config (default: '')
    Save options to this file.

Data options

  • (accepted: score, sample)
    'score' apply lm to input text, 'sample' samples output based on input text.
  • -src (required)
    Source sequences to sample/score.
  • -output (default: output.txt)
    Output file depend on .

LM options

  • -model (required)
    Path to the serialized model file.
  • -batch_size (default: 30)
    Batch size.
  • -max_length (default: 100)
    Maximal length of sentences in sample mode.
  • -temperature (default: 1)
    For sample mode, higher temperatures cause the model to take more chances and increase diversity of results, but at a cost of more mistakes.

Cuda options

  • -gpuid (default: 0)
    List of GPU identifiers (1-indexed). CPU is used when set to 0.
  • -fallback_to_cpu [] (default: false)
    If GPU can't be used, rollback on the CPU.
  • -fp16 [] (default: false)
    Use half-precision float on GPU.
  • -no_nccl [] (default: false)
    Disable usage of nccl in parallel mode.
  • Logger options

    • -log_file (default: '')
      Output logs to a file under this path instead of stdout - if file name ending with json, output structure json.
    • -disable_logs [] (default: false)
      If set, output nothing.
    • -log_level (accepted: DEBUG, INFO, WARNING, ERROR, NOERROR; default: INFO)
      Output logs at this level and above.

    Other options

    • -time [] (default: false)
      Measure average translation time.