Skip to content

Conversation

mohbasit
Copy link

Problem: Error in saving checkpoint of model as an inner function is used in creating block mask.
While executing the code with checkpoint saving turned on, the dataloader state can't be saved as the llama function create_block_mask_from_seqlens contains a local function which python cannot pickle.

AttributeError: Can't get local object 'create_block_mask_from_seqlens..document_causal_mask'

Solution: Simulate the document_causal_mask functionality using a partial function so that it is not treated as a local function anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant