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

☝️ Update Jetstream Pytorch revision #91

Merged
merged 5 commits into from
Sep 12, 2024
Merged

Conversation

tengomucho
Copy link
Collaborator

What does this PR do?

This is a refactoring PR. It updates the Jetstream/Pytorch version to a newer revision, that allows to pass the sampler function as parameter to the prefill and generate functions, as we requested. This simplifies our code, making the HfEngine usage redundant, so we can drop it.

Now that decode takes a specialized method this is not necessary
anymore.
Now that sampling can be passed as parameter to prefill and generate,
the custom engine is not required anymore.
@tengomucho tengomucho changed the title Update jetstream pt ☝️ Update Jetstream Pytorch revision Sep 10, 2024
Comment on lines 486 to 487
active_slots = [slot for slot in self.slots if slot.state == slot.State.READY]
for slot in active_slots:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can avoid the double iteration by filtering on the fly through the main iteration?

Suggested change
active_slots = [slot for slot in self.slots if slot.state == slot.State.READY]
for slot in active_slots:
for slot in filter(lambda slot: slot.state == slot.State.READY, slots):

@tengomucho tengomucho merged commit 03b6573 into main Sep 12, 2024
2 checks passed
@tengomucho tengomucho deleted the update-jetstream-pt branch September 12, 2024 15:22
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.

2 participants