Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small OPT Doc-string Edits #716

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions keras_nlp/models/opt/opt_backbone.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def opt_kernel_initializer(stddev=0.02):

@keras.utils.register_keras_serializable(package="keras_nlp")
class OPTBackbone(Backbone):
"""OPT encoder-decoder network.
"""OPT decoder network.

This class implements a Transformer-based decoder model as described in
["OPT: Open Pre-trained Transformer Language Models"](https://arxiv.org/abs/2205.01068).
Expand All @@ -45,15 +45,14 @@ class OPTBackbone(Backbone):

Args:
vocabulary_size: int. The size of the token vocabulary.
num_layers: int. The number of transformer encoder layers and
transformer decoder layers.
num_layers: int. The number of transformer decoder layers.
num_heads: int. The number of attention heads for each transformer.
The hidden size must be divisible by the number of attention heads.
hidden_dim: int. The hidden size of the transformer decoder layers.
intermediate_dim: int. The output dimension of the first Dense layer in
a two-layer feedforward network for each transformer decoder layer.
dropout: float. Dropout probability for the Transformer encoder.
max_sequence_length: int. The maximum sequence length that this encoder
dropout: float. Dropout probability for the Transformer decoder.
max_sequence_length: int. The maximum sequence length that this decoder
can consume. If None, `max_sequence_length` uses the value from
sequence length. This determines the variable shape for positional
embeddings.
Expand Down