I have about 15 million pairs that consist of a single int, paired with a batch of (2 to 100) other ints.
If it makes a difference, the ints themselve range from 0 to 1
Use numpy. It us the most efficient and you can use it easily with a machine learning model.