Converting my comment into an answer:
The $k$th term of the lower central series modulo the $(k+1)$th term is generated by the left-normed commutators $[x_1, \dots, x_k]$ with $x_1, \dots, x_k \in \{g_1, \dots, g_m\}$, of which there are at most $m^{k-1}(m-1)$ for $k > 1$ (since $x_1 \ne x_2$). Therefore $$\dim G \le m + \sum_{k=2}^C m^{k-1}(m-1) = m^C.$$