Skip to content

Commit

Permalink
Unify BERT model API in one class (#387)
Browse files Browse the repository at this point in the history
* Initial commit

* Fix model loading from config

* Fix vocab size typo and tests

* Add TODOs

* Fix docstrings and format

* Fix comments

* Address comments

* Use kwargs

* Attach presets to class with write protection

* Change preset accessor to `deepcopy`

* Remove redundant test

* Use `Bert.presets` to reference presets

* Remove more references to `backbone_presets`
  • Loading branch information
jbischof authored Oct 14, 2022
1 parent b197f85 commit fa65faa
Show file tree
Hide file tree
Showing 8 changed files with 249 additions and 363 deletions.
7 changes: 1 addition & 6 deletions keras_nlp/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from keras_nlp.models.bert.bert_models import BertBase
from keras_nlp.models.bert.bert_models import BertCustom
from keras_nlp.models.bert.bert_models import BertLarge
from keras_nlp.models.bert.bert_models import BertMedium
from keras_nlp.models.bert.bert_models import BertSmall
from keras_nlp.models.bert.bert_models import BertTiny
from keras_nlp.models.bert.bert_models import Bert
from keras_nlp.models.bert.bert_preprocessing import BertPreprocessor
from keras_nlp.models.bert.bert_tasks import BertClassifier
from keras_nlp.models.distilbert.distilbert_models import DistilBertBase
Expand Down
Loading

0 comments on commit fa65faa

Please sign in to comment.