  Generative models for networks with communities have been studied extensively
for being a fertile ground to establish information-theoretic and computational
thresholds. In this paper we propose a new toy model for planted generative
models called planted Random Energy Model (REM), inspired by Derrida's REM. For
this model we provide the asymptotic behaviour of the probability of error for
the maximum likelihood estimator and hence the exact recovery threshold. As an
application, we further consider the 2 non-equally sized community Weighted
Stochastic Block Model (2-WSBM) on $h$-uniform hypergraphs, that is equivalent
to the P-REM on both sides of the spectrum, for high and low edge cardinality
$h$. We provide upper and lower bounds for the exact recoverability for any
$h$, mapping these problems to the aforementioned P-REM. To the best of our
knowledge these are the first consistency results for the 2-WSBM on graphs and
on hypergraphs with non-equally sized community.
