Skip to content

Update from code changes: document StreamingDataset sequence packing - #335

Open
mintlify[bot] wants to merge 1 commit into
mainfrom
mintlify/b9d1132e
Open

Update from code changes: document StreamingDataset sequence packing#335
mintlify[bot] wants to merge 1 commit into
mainfrom
mintlify/b9d1132e

Conversation

@mintlify

@mintlify mintlify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents the new sequence-packing mode in StreamingDataset, which concatenates tokenized documents into fixed-length blocks for language model pre-training. Covers the required pack_sequences, eos_id, pad_id, and blocks_per_epoch parameters, the shape and meaning of input_ids and doc_ids, the padding-mask caveat, and how packing state carries through checkpoints. Adds a short code example alongside the existing streaming data loader guide. Triggered by lancedb/lancedb#3920.

Changes

  • Added a "Sequence packing for language model pre-training" section to docs/training/index.mdx, placed before checkpointing so packing state is a natural lead-in to state_dict()/load_state_dict().
  • Documented the required-together parameters (pack_sequences, eos_id, pad_id, blocks_per_epoch) plus the "auto" budget mode.
  • Called out that doc_ids is not a padding mask; padding must be masked via input_ids == pad_id.
  • Noted that packing is incompatible with transform.

@mintlify

mintlify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lancedb-bcbb4faf 🟢 Ready View Preview Aug 24, 2026, 7:59 AM

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.

0 participants