Crates.io | spoilers |
lib.rs | spoilers |
version | 0.1.1 |
source | src |
created_at | 2024-02-12 05:29:23.664939 |
updated_at | 2024-02-13 00:36:20.342133 |
description | High-level Rust bindings for CTranslate2 |
homepage | |
repository | https://github.com/Sicheng-Pan/spoilers |
max_upload_size | |
id | 1136473 |
size | 198,463 |
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.
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.
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.