Fork me on GitHub

Command-line options for marian-conv

Last updated: 22 March 2021

marian-conv

Convert a model in the .npz format and normal memory layout to a mmap-able binary model which could be in normal memory layout or packed memory layout or convert a text lexical shortlist to a binary shortlist with {–shortlist,-s} option

Version: v1.12.0 65bf82f 2023-02-21 09:56:29 -0800

Usage: ./marian-conv [OPTIONS]

Allowed options

-h,--help                             Print this help message and exit
--version                             Print the version number and exit
-f,--from TEXT=model.npz              Input model
-t,--to TEXT=model.bin                Output model
--export-as TEXT=marian-bin           Kind of conversion: marian-bin or 
                                      onnx-{encode,decoder-step,decoder-init,decoder-stop}
-g,--gemm-type TEXT=float32           GEMM Type to be used: float32, packed16, packed8avx2, 
                                      packed8avx512, intgemm8, intgemm8ssse3, intgemm8avx2, 
                                      intgemm8avx512, intgemm16, intgemm16sse2, intgemm16avx2, 
                                      intgemm16avx512
--add-lsh VECTOR ...                  Encode output matrix and optional rotation matrix into model 
                                      file. arg1: number of bits in LSH encoding, arg2: name of 
                                      output weights matrix
-V,--vocabs VECTOR ...                Vocabulary file, required for ONNX export
-s,--shortlist VECTOR ...             Shortlist conversion: filePath firstNum bestNum threshold
-d,--dump-shortlist TEXT=lex.bin      Binary shortlist dump path

Examples

./marian-conv -f model.npz -t model.bin --gemm-type packed16