huggingface / candle

Minimalist ML framework for Rust
Apache License 2.0
15.61k stars 924 forks source link

Example of summarization #543

Open anagrius opened 1 year ago

anagrius commented 1 year ago

Using Candle for summarizing a text could make a good example. Is the something you could consider adding?

LaurentMazare commented 1 year ago

That could indeed be interesting to have, though we will have to prioritize this a bit. Do you have some good resources for what it should look like, like some Python tutorial/model that we should adapt or something like this?

anagrius commented 1 year ago

Thanks for the reply! I understand completely. I was just thinking some text-to-text examples would be good to show off.

One option would be to use BART and similarly to rust_bert:

https://github.com/guillaume-be/rust-bert/blob/main/examples/summarization_bart.rs

There are similar examples for T5 and a few others for summarization.