CoolFace
Modelpublic

manancode/opus-mt-lua-sv-ctranslate2-android

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes14downloads
README.md67 linesDownload Raw Back to root
1---2license: apache-2.03tags:4- translation5- opus-mt6- ctranslate27- quantized8language:9- multilingual10pipeline_tag: translation11---12 13# opus-mt-lua-sv-ctranslate2-android14 15This is a quantized INT8 version of `Helsinki-NLP/opus-mt-lua-sv` converted to CTranslate2 format for efficient inference.16 17## Model Details18 19- **Original Model**: Helsinki-NLP/opus-mt-lua-sv20- **Format**: CTranslate221- **Quantization**: INT822- **Framework**: OPUS-MT23- **Converted by**: Automated conversion pipeline24 25## Files Included26 27- CTranslate2 model files (quantized INT8)28- SentencePiece tokenizer files (`source.spm`, `target.spm`)29- Integration guide for Android deployment30 31## Usage32 33### With CTranslate234 35```python36import ctranslate237import sentencepiece as spm38 39# Load the model40translator = ctranslate2.Translator("path/to/model")41 42# Load tokenizers43sp_source = spm.SentencePieceProcessor(model_file="source.spm")44sp_target = spm.SentencePieceProcessor(model_file="target.spm")45 46# Translate47source_tokens = sp_source.encode("Your text here", out_type=str)48results = translator.translate_batch([source_tokens])49translation = sp_target.decode(results[0].hypotheses[0])50```51 52### Android Integration53 54See the included `INTEGRATION_GUIDE.txt` for Android implementation details.55 56## Performance57 58This INT8 quantized version provides:59- ~75% reduction in model size60- Faster inference speed61- Maintained translation quality62- Mobile-friendly deployment63 64## Original Model65 66Based on the OPUS-MT project: https://github.com/Helsinki-NLP/Opus-MT67