ModernBERT model (#2713)

* layer_norm_no_bias

* Modernbert model.

* Format + cleanup error.

---------

Co-authored-by: laurent <laurent.mazare@gmail.com>
This commit is contained in:
Jani Monoses
2025-01-13 09:39:27 +02:00
committed by GitHub
parent 2344c4e4b8
commit 461e8c1685
6 changed files with 612 additions and 1 deletions

View File

@ -0,0 +1,12 @@
# candle-modernbert
ModernBERT is a bidirectional encoder-only language model. In this example it is used for the fill-mask task:
## Usage
```bash
cargo run --example modernbert --release -- --model modern-bert-large --prompt 'The capital of France is [MASK].'
```
```markdown
Sentence: 1 : The capital of France is Paris.
```