Converting my comment into an answer:
TheLet $k$th term of$G = G_1 \ge G_2 \ge \cdots$ be the lower central series modulo the. Then $(k+1)$th term$G_k/G_{k+1}$ is generatedspanned by the left-normed commutators $[x_1, \dotsc, x_k]$ with $x_1, \dotsc, x_k \in \{g_1, \dotsc, g_m\}$, of which there are at most $m^{k-1}(m-1)$ nontrivial 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.$$
This bound is not sharp. For the free Lie algebra, $G_k/G_{k+1}$ has a basis given by the basic commutators, and the number of these is given by Witt's formula: $$\dim G_k/G_{k+1} = \frac1k \sum_{d \mid k} \mu(d) m^{k/d}.$$