Rust bindings for OpenNMT/CTranslate2
MIT License
Bot releases are hidden (Show)
Detect CUDA root directory automatically #55
Published by jkawamoto 5 months ago
auto::Tokenizer
Published by jkawamoto 5 months ago
Inspired by Hugging Face's Transformers' Auto Classes
, this feature simplifies the tokenizer selection process by automatically choosing the correct tokenizer for a given model.
Added a callback-based streaming API.
The following example demonstrates how to translate source
and print results step-by-step:
let _ = translator.translate_batch(
&vec![source],
&TranslationOptions {
// beam_size must be 1 to use the stream API.
beam_size: 1,
..Default::default()
},
// Each time a new token is generated, the following callback closure is called.
// In this example, it writes to the standard output sequentially.
Some(&mut |r: GenerationStepResult| -> Result<()> {
write!(out, "{}", r.text)?;
out.flush()?;
Ok(())
}),
)?;
See the whole example code for more information.
Published by jkawamoto 6 months ago
Add config functions #47
Published by jkawamoto 6 months ago
Add Sent+Sync to Translator and Generator #45
Allow multiple backends #46
Published by jkawamoto 6 months ago
Translator and Generator support callback #44
Published by jkawamoto 6 months ago
Add support for Sentencepiece tokenizer #41
Published by jkawamoto 6 months ago
Add support for CUDA and cuDNN #37
Published by jkawamoto 6 months ago
Upgrade CTranslate2 to v4.2.1 #36
Published by jkawamoto 6 months ago
Windows support #35
Published by jkawamoto 6 months ago
Add support for Ruy #32
Published by jkawamoto about 1 year ago
Published by jkawamoto over 1 year ago
Published by jkawamoto over 1 year ago
Published by jkawamoto over 1 year ago