"vscode:/vscode.git/clone" did not exist on "df848acc5d0ff267c6c9d1c3cfee0536871600d3"
Unverified Commit adbf3a40 authored by Shijie Wu's avatar Shijie Wu Committed by GitHub
Browse files

Remove dropout in embedding layer of OPT (#18845)

parent 36702600
...@@ -484,8 +484,6 @@ class FlaxOPTDecoder(nn.Module): ...@@ -484,8 +484,6 @@ class FlaxOPTDecoder(nn.Module):
hidden_states = inputs_embeds + positions hidden_states = inputs_embeds + positions
hidden_states = self.dropout_layer(hidden_states, deterministic=deterministic)
hidden_state, all_hidden_states, attentions = self.layers( hidden_state, all_hidden_states, attentions = self.layers(
hidden_states, hidden_states,
attention_mask, attention_mask,
......
...@@ -637,7 +637,6 @@ class OPTDecoder(OPTPreTrainedModel): ...@@ -637,7 +637,6 @@ class OPTDecoder(OPTPreTrainedModel):
inputs_embeds = self.project_in(inputs_embeds) inputs_embeds = self.project_in(inputs_embeds)
hidden_states = inputs_embeds + pos_embeds hidden_states = inputs_embeds + pos_embeds
hidden_states = nn.functional.dropout(hidden_states, p=self.dropout, training=self.training)
# decoder layers # decoder layers
all_hidden_states = () if output_hidden_states else None all_hidden_states = () if output_hidden_states else None
......
...@@ -652,7 +652,6 @@ class TFOPTDecoder(tf.keras.layers.Layer): ...@@ -652,7 +652,6 @@ class TFOPTDecoder(tf.keras.layers.Layer):
inputs_embeds = self.project_in(inputs_embeds) inputs_embeds = self.project_in(inputs_embeds)
hidden_states = inputs_embeds + pos_embeds hidden_states = inputs_embeds + pos_embeds
hidden_states = self.dropout(hidden_states, training=training)
# decoder layers # decoder layers
all_hidden_states = () if output_hidden_states else None all_hidden_states = () if output_hidden_states else None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment