Skip to content

Question about strides managing. #385

Answered by rasbt
m7mdhka asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there,
that's a good question, and it actually a bit of a tricky topic. But even with the stride > 1 the LLM sees every word in the text. It's just that it doesn't see each word multiple times.

E.g., consider the following example:

Input Sentence:
"Hello world, this is an example of a batch input sequence."

with stride=6

Batch Inputs:

tensor([
  ["Hello", "world,", "this", "is", "an", "example"],
  ["of", "a", "batch", "input", "sequence."]
])

Batch Targets (inputs shifted by +1):

tensor([
  ["world,", "this", "is", "an", "example", "of"],
  ["a", "batch", "input", "sequence."]
])

with stride =1

Batch Inputs:

tensor([
  ["Hello", "world,", "this", "is", "an", "example"],
  ["world,",…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@m7mdhka
Comment options

@rasbt
Comment options

@m7mdhka
Comment options

Answer selected by rasbt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants