Skip to content

Instantly share code, notes, and snippets.

View nialloriordan's full-sized avatar
🏠
Working from home

Niall O'Riordan nialloriordan

🏠
Working from home
View GitHub Profile
@nialloriordan
nialloriordan / zero_shot_classification_multi_gpus.py
Last active January 10, 2021 12:56
This module is used for running zero shot classification with multiple GPUs
"""This module is used for running zero shot classification with multiple GPUs"""
import pandas as pd
import numpy as np
from transformers import pipeline
from transformers import AutoModelForSequenceClassification, AutoTokenizer
from transformers import set_seed
from tqdm.notebook import tqdm
import time
import math
from multiprocessing import Pool, current_process, Queue
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.