Skip to content

Commit

Permalink
Add parameter metadata for global_max_sequence_length (#3497)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavgarg1 authored Aug 3, 2023
1 parent 1152133 commit c881920
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ludwig/schema/metadata/configs/preprocessing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,10 @@ cache_encoder_embeddings:
it's not always the case that you would always want to enable it when possible.
expected_impact: 1
ui_display_name: Cache Encoder Embeddings
global_max_sequence_length:
expected_impact: 2
ui_display_name: Global Max Sequence Length
description_implications:
Specifically for LLMs. This is the maximum number of tokens going into the model's forward pass during training. Sequences will be truncated to this length after merging the tokens from the input with tokens from the target. If not set, the total length of the merged input and target token sequences will be used.
example_value:
- 512
1 change: 1 addition & 0 deletions ludwig/schema/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class PreprocessingConfig(schema_utils.BaseMarshmallowConfig):
description="Specifically for LLMs. This is the maximum length of the input sequence going into the model's "
"forward pass during training. Sequences will be truncated to this length after merging inputs and targets. "
"If not set, the total length of the merged input and target token sequences will be used.",
parameter_metadata=PREPROCESSING_METADATA["global_max_sequence_length"],
)


Expand Down

0 comments on commit c881920

Please sign in to comment.