We present the study of the dependence of galaxy clustering on luminosity and stellar mass in the redshift range 2 < z < 3.5 using 3236 galaxies with robust spectroscopic redshifts from the VIMOS Ultra Deep Survey (VUDS), covering a total area of 0.92 deg 2 . We measure the two-point real-space correlation function w p (r p ) for four volume-limited sub-samples selected by stellar mass and four volume-limited sub-samples selected by M UV absolute magnitude. We find that the scale dependent clustering amplitude r 0 significantly increases with increasing luminosity and stellar mass. For the least luminous galaxies (M UV < −19.0) we measure a correlation length r 0 = 2.87 ± 0.22 h −1 Mpc and slope γ = 1.59 ± 0.07, while for the most luminous (M UV < −20.2) r 0 = 5.35 ± 0.50 h −1 Mpc and γ = 1.92 ± 0.25. This corresponds to a strong relative bias between these two sub-samples of ∆b/b * = 0.43. Fitting a 5-parameter HOD model we find that the most luminous (M UV < −20.2) and massive (M > 10 10 h −1 M ) galaxies occupy the most massive dark matter haloes with M h = 10 12.30 h −1 M . Similar to the trends observed at lower redshift, the minimum halo mass M min depends on the luminosity and stellar mass of galaxies and grows from M min = 10 9.73 h −1 M to M min = 10 11.58 h −1 M from the faintest to the brightest among our galaxy sample, respectively. We find the difference between these halo masses to be much more pronounced than is observed for local galaxies of similar properties. Moreover, at z ∼ 3, we observe that the masses at which a halo hosts, on average, one satellite and one central galaxy is M 1 ≈ 4M min over all luminosity ranges, significantly lower than observed at z ∼ 0 indicating that the halo satellite occupation increases with redshift. The luminosity and stellar mass dependence is also reflected in the measurements of the large scale galaxy bias, which we model as b g,HOD (> L) = 1.92 + 25.36(L/L * ) 7.01 . We conclude our study with measurements of the stellar-to-halo mass ratio (SHMR). We observe a significant model-observation discrepancy for low-mass galaxies, suggesting a higher than expected star formation efficiency of these galaxies.