huggingface / huggingface/candle
Masked fill: slow operations compared to tch for small models
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 1.8k
- Avg merge
- 16h 42m
- Merged PRs (30d)
- 25
Description
This is a follow up to: https://github.com/huggingface/candle/issues/2583
In our use case, the masking operations are quite a bit slower in candle vs tch: ~150 μs vs ~40 μs using a batch size of 200.
I’ve created a minrep repo demonstrating the same for various batch sizes, please see: https://github.com/JHucker/candle_mask_minrep
To make sure I was using candle masked-ops correctly, I followed the same mask creation and application from this [example](https://github.com/huggingface/candle/blob/e2b6b367fa852ed30ac532f8d77cd8479c7ed092/candle-transformers/src/models/mpt.rs#L278).
Thanks in advance, appreciate any help or feedback with regards to this.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.