Skip to content

Commit

Permalink
Remove pooler from BERT for Masked LM architecture (guillaume-be#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-be committed Apr 10, 2023
1 parent 46fbf62 commit 2e5f4a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ All notable changes to this project will be documented in this file. The format

## Fixed
- MIN/MAX computation for float-like (was set to infinity instead of min/max)
- Remove the (unused) pooler from the set of weights for BERT Masked LM architecture

## [0.20.0] - 2023-01-21
## Added
Expand Down
2 changes: 1 addition & 1 deletion src/bert/bert_model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ impl BertForMaskedLM {
{
let p = p.borrow();

let bert = BertModel::new(p / "bert", config);
let bert = BertModel::new_with_optional_pooler(p / "bert", config, false);
let cls = BertLMPredictionHead::new(p / "cls", config);

BertForMaskedLM { bert, cls }
Expand Down

0 comments on commit 2e5f4a9

Please sign in to comment.