2 releases

0.1.1 Feb 13, 2024
0.1.0 Feb 12, 2024

#1139 in Text processing

GPL-2.0-or-later

56KB
627 lines

Spoilers

What is this

Spoilers is a high-level Rust binding to CTranslate2, a fast inference engine for transformer models. It also contains a barebone GUI based on the binding, which can translate texts offline using compatible models and tokenizer configurations.

Note that this project is not yet stable, and it is likely that things will change.

Dependencies

Spoilers requires CTranslate2 at runtime, and it should be compiled against the corresponding header files in your system. The GUI may need a few more packages based on your platform, and the Sarasa Gothic font is packaged into the GUI for CJK font support.

Take a look at flake.nix in the repository for more details.

Model data and adapters

Spoilers should be able to run CTranslate2 compatible models, given the appropriate model weights.

Take a look at CTranslate2 documentation for how to convert models into compatible formats.

For the GUI, we the adapter to tokenize raw inputs for the model and parse output tokens from the model. For example, compatible NLLB-200 models can be used together with tokenizers.

Dependencies

~16–59MB
~1M SLoC