OpenNMT-py

Getting Started

  • Overview
  • Quickstart
  • Versions
  • Contributors
  • References

Frequently Asked Questions

  • How do I use my v2 models in v3 ?
  • How do I train the Transformer model?
  • Performance tips
  • Position encoding: Absolute vs Relative vs Rotary Embeddings vs Alibi
  • Do you support multi-gpu?
  • How do I use Pretrained embeddings (e.g. GloVe)?
  • How can I ensemble Models at inference?
  • How can I weight different corpora at training?
  • What special tokens does OpenNMT-py use?
  • How can I apply on-the-fly tokenization and subword regularization when training?
  • What are the readily available on-the-fly data transforms?
  • How can I create custom on-the-fly data transforms?
  • How to use LoRa and 8bit loading to finetune a big model ?
  • How to use gradient checkpointing when dealing with a big model ?
  • Can I get word alignments while translating?
  • How can I update a checkpoint’s vocabulary?
  • How can I use source word features?
  • How can I set up a translation server ?

Examples

  • Translation WMT17 en-de
  • Language Model Wiki-103
  • Summarization CNN/DM
  • Gated Graph Neural Networks
  • Supervised Finetuning of llama 7B to replicate Vicuna

Scripts

  • Build Vocab
  • Train
  • Translate
  • Server

API

  • Framework
  • Modules
  • Translation
  • Server
  • Data Loaders

Legacy

  • FAQ (Legacy version)
  • Image to Text
  • Speech to Text
  • Video to Text
OpenNMT-py
  • Docs »
  • Overview: module code

All modules for which code is available

  • onmt.decoders.cnn_decoder
  • onmt.decoders.decoder
  • onmt.decoders.transformer
  • onmt.encoders.cnn_encoder
  • onmt.encoders.encoder
  • onmt.encoders.ggnn_encoder
  • onmt.encoders.mean_encoder
  • onmt.encoders.rnn_encoder
  • onmt.encoders.transformer
  • onmt.inputters.dynamic_iterator
  • onmt.inputters.text_corpus
  • onmt.models.model
  • onmt.modules.average_attn
  • onmt.modules.conv_multi_step_attention
  • onmt.modules.copy_generator
  • onmt.modules.embeddings
  • onmt.modules.global_attention
  • onmt.modules.multi_headed_attn
  • onmt.modules.position_ffn
  • onmt.modules.structured_attention
  • onmt.trainer
  • onmt.translate.beam_search
  • onmt.translate.decode_strategy
  • onmt.translate.greedy_search
  • onmt.translate.penalties
  • onmt.translate.translation
  • onmt.translate.translation_server
  • onmt.translate.translator
  • onmt.utils.loss
  • onmt.utils.optimizers
  • onmt.utils.statistics

© Copyright 2017-2023, OpenNMT

Built with Sphinx using a theme provided by Read the Docs.