Skip to content

Commit

Permalink
flax model
Browse files Browse the repository at this point in the history
  • Loading branch information
patil-suraj committed Dec 28, 2021
1 parent dc90de9 commit 52fb413
Show file tree
Hide file tree
Showing 4 changed files with 399 additions and 1,231 deletions.
3 changes: 2 additions & 1 deletion src/transformers/__init__.py
Expand Up @@ -2110,6 +2110,7 @@
[
"FlaxXGLMModel",
"FlaxXGLMPreTrainedModel",
"FlaxXGLMForCausalLM",
]
)
else:
Expand Down Expand Up @@ -3847,7 +3848,7 @@
FlaxWav2Vec2Model,
FlaxWav2Vec2PreTrainedModel,
)
from .models.xglm import FlaxXGLMModel, FlaxXGLMPreTrainedModel
from .models.xglm import FlaxXGLMForCausalLM, FlaxXGLMModel, FlaxXGLMPreTrainedModel
else:
# Import the same objects as dummies to get them in the namespace.
# They will raise an import error if the user tries to instantiate / use them.
Expand Down
3 changes: 2 additions & 1 deletion src/transformers/models/xglm/__init__.py
Expand Up @@ -42,6 +42,7 @@
_import_structure["modeling_flax_xglm"] = [
"FlaxXGLMModel",
"FlaxXGLMPreTrainedModel",
"FlaxXGLMForCausalLM",
]


Expand All @@ -56,7 +57,7 @@
from .modeling_xglm import XGLM_PRETRAINED_MODEL_ARCHIVE_LIST, XGLMForCausalLM, XGLMModel, XGLMPreTrainedModel

if is_flax_available():
from .modeling_xglm import FlaxXGLMModel, FlaxXGLMPreTrainedModel
from .modeling_xglm import FlaxXGLMForCausalLM, FlaxXGLMModel, FlaxXGLMPreTrainedModel


else:
Expand Down

0 comments on commit 52fb413

Please sign in to comment.