Skip to content

Commit

Permalink
set pose context len so we can pick that up seperately from the usabl…
Browse files Browse the repository at this point in the history
…e training context len
  • Loading branch information
winglian committed Apr 24, 2024
1 parent aacdbc3 commit 8700784
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/axolotl/utils/config/models/input/v0_4_1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ class Config:
# for PoSE context length extension
use_pose: Optional[bool] = None
pose_split_on_token_ids: Optional[List[int]] = None
pose_max_context_len: Optional[int] = None

pretrain_multipack_buffer_size: Optional[int] = 10_000
pretrain_multipack_attn: Optional[bool] = Field(
Expand Down
2 changes: 1 addition & 1 deletion src/axolotl/utils/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def process_datasets_for_packing(cfg, train_dataset, eval_dataset):
if cfg.use_pose:
pose_fn = partial(
add_pose_position_ids,
max_context_len=cfg.sequence_len,
max_context_len=cfg.pose_max_context_len,
split_on_token_ids=cfg.pose_split_on_token_ids,
)
train_dataset = train_dataset.map(
Expand Down

0 comments on commit 8700784

Please sign in to comment.