--- license: cc-by-nc-4.0 base_model: - facebook/nllb-200-1.3B tags: - translation - dotnet --- # NLLB Model 1.3B for Lopatnov.Translate This repository contains an ONNX-converted version of the NLLB model, optimized for the [Lopatnov.Translate](https://github.com/lopatnov/translate) service. These files are converted from the original weights in the [facebook/nllb-200-1.3B](https://huggingface.co/facebook/nllb-200-1.3B) repository. ## Conversion recipe ```bash conda create -n model_export python=3.10 -y conda activate model_export pip install "optimum[onnxruntime,export,openvino]" transformers sentencepiece optimum-cli export onnx --model facebook/nllb-200-1.3B --task seq2seq-lm --dtype fp32 --opset 18 ./model/nllb-200-1.3B-onnx ``` ## Configuration To configure model for the service, please modify `appsettings.json`: ### Example configuration: ```json { "Models": { "nllb-200-1.3B": { "Type": "NLLB", "Path": "../../models/translate/nllb-200-1.3B", "EncoderFile": "encoder_model.onnx", "DecoderFile": "decoder_model.onnx", "TokenizerFile": "sentencepiece.bpe.model", "TokenizerConfigFile": "tokenizer.json", "MaxTokens": 512, "BeamSize": 1 } }, // These configurations are optional "Translation": { "AllowedModels": [ "nllb-200-1.3B" ], // Whitelist allowed models if needed "DefaultModel": "nllb-200-1.3B", // Set this model as the default "WarmUp": [ "nllb-200-1.3B" ] // Load the model into memory on startup } } ``` *Note: Make sure the `Path` correctly points to the location of your downloaded `.onnx` files relative to application.* ## Documentation For advanced configuration options, visit the [Official Documentation](https://github.com/lopatnov/translate/blob/main/docs/models.md#nllb-200-13b).