Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sampler: pad dry sequence breakers tensor #875

Merged
merged 1 commit into from
Dec 8, 2024
Merged

Conversation

AlpinDale
Copy link
Member

A potential fix for:

  File "/home/ubuntu/aphrodite-engine/aphrodite/modeling/layers/sampler.py", line 148, in forward
    self._init_sampling_tensors(logits, sampling_metadata)
  File "/home/ubuntu/aphrodite-engine/aphrodite/modeling/layers/sampler.py", line 112, in _init_sampling_tensors
    ) = SamplingTensors.from_sampling_metadata(
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/aphrodite-engine/aphrodite/modeling/sampling_metadata.py", line 600, in from_sampling_metadata
    sampling_tensors = SamplingTensors.from_lists(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ubuntu/aphrodite-engine/aphrodite/modeling/sampling_metadata.py", line 793, in from_lists
    dry_sequence_breakers_t = torch.tensor(
                              ^^^^^^^^^^^^^
ValueError: expected sequence of length 4 at dim 1 (got 5)

@AlpinDale
Copy link
Member Author

Seems to hold up in production.

@AlpinDale AlpinDale merged commit f0cc35b into main Dec 8, 2024
5 checks passed
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