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

Multi GPU predict #86

Open
Thiago-Reis-Porto opened this issue Jun 21, 2023 · 0 comments
Open

Multi GPU predict #86

Thiago-Reis-Porto opened this issue Jun 21, 2023 · 0 comments

Comments

@Thiago-Reis-Porto
Copy link

Hi,
I'm currently working on using predictions to filter a large amount of data. I've been using the filter method from the HF dataset, but it's taking too long given the size of the dataset. I'm considering running the model on multiple GPUs to speed up the process.

Any suggestions on how to do this? What would be the easiest and most straightforward way to run the model on multiple GPUs?

I'm using something like this:

def tox_filter_list(x):
    detox_r = model_tox.predict(x['text'])
    result = [max(col) < 0.2 for col in zip(*detox_r.values())]
    return result

df.filter(tox_filter_list, batched=True, batch_size=300)
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

No branches or pull requests

1 participant