In quantum cryptography, device-independent (DI) protocols can be certified secure without requiring assumptions about the inner workings of the devices used to perform the protocol. In order to display nonlocality, which is an essential feature in DI protocols, the device must consist of at least two separate components sharing entanglement. This raises a fundamental question: how much entanglement is needed to run such DI protocols? We present a two-device protocol for DI random number generation (DIRNG) which produces approximatelynbits of randomness starting fromnpairs of arbitrarily weakly entangled qubits. We also consider a variant of the protocol wheremsinglet states are diluted intonpartially entangled states before performing the first protocol, and show that the numbermof singlet states need only scale sublinearly with the numbernof random bits produced. Operationally, this leads to a DIRNG protocol between distant laboratories that requires only a sublinear amount of quantum communication to prepare the devices.