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

Add seed with random.randint to ensure cache is not used #571

Merged
merged 1 commit into from
Apr 24, 2024

Conversation

alvarobartt
Copy link
Member

Description

This PR sets the seed arg in text_generation to random.randint to ensure that a random seed is used every time, so as to be safer when num_generations > 1, since otherwise the cache will be used and no new generations will be generated.

For the moment the cache cannot be controlled via the huggingface_hub.InferenceClient, so this is a temporary workaround for it.

For the moment the `cache` cannot be controlled via the `huggingface_hub.InferenceClient`
@gabrielmbmb gabrielmbmb merged commit 712d32c into main Apr 24, 2024
2 of 4 checks passed
@gabrielmbmb gabrielmbmb deleted the inference-endpoints-disable-cache branch April 24, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants