Skip to content

Commit

Permalink
[Deberta/Deberta-v2] Refactor code base to support compile, export,…
Browse files Browse the repository at this point in the history
… and fix LLM (huggingface#22105)

* some modification for roadmap

* revert some changes

* yups

* weird

* make it work

* sttling

* fix-copies

* fixup

* renaming

* more fix-copies

* move stuff around

* remove torch script warnings

* ignore copies

* revert bad changes

* woops

* just styling

* nit

* revert

* style fixup

* nits configuration style

* fixup

* nits

* will this fix the tf pt issue?

* style

* ???????

* update

* eval?

* update error message

* updates

* style

* grumble grumble

* update

* style

* nit

* skip torch fx tests that were failing

* style

* skip the failing tests

* skip another test and make style
  • Loading branch information
ArthurZucker authored and BernardZach committed Dec 5, 2024
1 parent 23ce801 commit 5a58f1a
Show file tree
Hide file tree
Showing 10 changed files with 1,009 additions and 1,191 deletions.
5 changes: 5 additions & 0 deletions src/transformers/models/deberta/configuration_deberta.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class DebertaConfig(PretrainedConfig):
`["p2c", "c2p"]`.
layer_norm_eps (`float`, *optional*, defaults to 1e-12):
The epsilon used by the layer normalization layers.
legacy (`bool`, *optional*, defaults to `True`):
Whether or not the model should use the legacy `LegacyDebertaOnlyMLMHead`, which does not work properly
for mask infilling tasks.
Example:
Expand Down Expand Up @@ -121,6 +124,7 @@ def __init__(
pos_att_type=None,
pooler_dropout=0,
pooler_hidden_act="gelu",
legacy=True,
**kwargs,
):
super().__init__(**kwargs)
Expand Down Expand Up @@ -151,6 +155,7 @@ def __init__(
self.pooler_hidden_size = kwargs.get("pooler_hidden_size", hidden_size)
self.pooler_dropout = pooler_dropout
self.pooler_hidden_act = pooler_hidden_act
self.legacy = legacy


# Copied from transformers.models.deberta_v2.configuration_deberta_v2.DebertaV2OnnxConfig
Expand Down
Loading

0 comments on commit 5a58f1a

Please sign in to comment.