Skip to content

Commit

Permalink
Revert partially Enable/Optimize flan t5 xxl on deepspeed z3 #257 (#320)
Browse files Browse the repository at this point in the history
  • Loading branch information
hsubramony authored Aug 9, 2023
1 parent f54e025 commit af31469
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 250 deletions.
2 changes: 1 addition & 1 deletion examples/summarization/ds_flan_t5_z3_config_bf16.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"zero_optimization": {
"stage": 3,
"overlap_comm": true,
"contiguous_gradients": true,
"contiguous_gradients": false,
"sub_group_size": 1e9,
"reduce_bucket_size": "auto",
"stage3_prefetch_bucket_size": "auto",
Expand Down
16 changes: 0 additions & 16 deletions optimum/habana/transformers/modeling_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@
GaudiLlamaForCausalLM,
GaudiOPTForCausalLM,
GaudiOPTLearnedPositionalEmbedding,
GaudiT5DenseActDense,
GaudiT5DenseGatedActDense,
GaudiT5LayerCrossAttention,
GaudiT5LayerFF,
GaudiT5LayerSelfAttention,
GaudiT5Stack,
_gaudi_esmfold_attention_wrap_up,
gaudi_albert_forward,
gaudi_bloom_attention_forward,
Expand Down Expand Up @@ -65,7 +59,6 @@
gaudi_opt_model_forward,
gaudi_rot_matmul,
gaudi_rot_vec_mul,
gaudi_T5Attention_forward,
gaudi_vit_self_attention_forward,
gaudi_wav2vec2_forward,
)
Expand Down Expand Up @@ -172,12 +165,3 @@ def adapt_transformers_to_gaudi():
transformers.models.llama.modeling_llama.LlamaDecoderLayer.forward = gaudi_llama_decoder_layer_forward
transformers.models.llama.modeling_llama.LlamaAttention.forward = gaudi_llama_attention_forward
transformers.models.llama.modeling_llama.LlamaRMSNorm.forward = gaudi_llama_rmsnorm_forward

# Dropout kernel improvement for Flan-T5
transformers.models.t5.modeling_t5.T5Stack = GaudiT5Stack
transformers.models.t5.modeling_t5.T5DenseGatedActDense = GaudiT5DenseGatedActDense
transformers.models.t5.modeling_t5.T5LayerFF = GaudiT5LayerFF
transformers.models.t5.modeling_t5.T5LayerSelfAttention = GaudiT5LayerSelfAttention
transformers.models.t5.modeling_t5.T5LayerCrossAttention = GaudiT5LayerCrossAttention
transformers.models.t5.modeling_t5.T5DenseActDense = GaudiT5DenseActDense
transformers.models.t5.modeling_t5.T5Attention.forward = gaudi_T5Attention_forward
9 changes: 0 additions & 9 deletions optimum/habana/transformers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,6 @@
gaudi_opt_decoder_layer_forward,
gaudi_opt_model_forward,
)
from .t5 import (
GaudiT5DenseActDense,
GaudiT5DenseGatedActDense,
GaudiT5LayerCrossAttention,
GaudiT5LayerFF,
GaudiT5LayerSelfAttention,
GaudiT5Stack,
gaudi_T5Attention_forward,
)
from .vit import gaudi_vit_self_attention_forward
from .wav2vec2 import (
_gaudi_wav2vec2_compute_mask_indices,
Expand Down
9 changes: 0 additions & 9 deletions optimum/habana/transformers/models/t5/__init__.py

This file was deleted.

215 changes: 0 additions & 215 deletions optimum/habana/transformers/models/t5/modeling_t5.py

This file was deleted.

0 comments on commit af31469

Please sign in to comment.