9 releases (4 breaking)

new 0.15.1 Jan 6, 2025
0.15.0 Dec 28, 2024
0.14.1 Nov 16, 2024
0.14.0 Oct 27, 2024
0.11.1 Jul 17, 2024

#678 in Machine learning

Download history 13/week @ 2024-09-11 4/week @ 2024-09-18 15/week @ 2024-09-25 30/week @ 2024-10-02 94/week @ 2024-10-23 21/week @ 2024-10-30 100/week @ 2024-11-13 16/week @ 2024-11-20 1/week @ 2024-11-27 3/week @ 2024-12-04 1/week @ 2024-12-11 108/week @ 2024-12-25

112 downloads per month

MIT/Apache

2MB
49K SLoC

rten-generate is a layer on top of RTen which handles the generation loop for auto-regressive transformer models (aka. "transformer decoders" or "generative AI"). This includes managing the KV cache, sampling and post-processing logits etc.


lib.rs:

Utilities to simplify running auto-regressive RTen models such as transformer decoders.

For working examples, see the examples in the rten-examples crate which import rten_generate.

Dependencies

~1.5–3MB
~60K SLoC