  Let $K\left\langle X \right\rangle$ denote the free associative algebra
generated by a set $X = \{x_1, \dots, x_n\}$ over a field $K$ of characteristic
$0$. Let $I_p$, for $p \geq 2$, denote the two-sided ideal in $K\left\langle X
\right\rangle$ generated by all commutators of the form $[u_1, \dots, u_p]$,
where $u_1, \dots, u_p \in K\left\langle X \right\rangle$. We discuss the
$\mathrm{GL}(n, K)$-module structure of the quotient $K\left\langle X
\right\rangle / I_{p+1}$ for all $p \geq 1$ under the standard diagonal action.
We give a bound on the values of partitions $\lambda$ such that the irreducible
$\mathrm{GL}(n, K)$-module $V_{\lambda}$ appears in the decomposition of
$K\left\langle X \right\rangle / I_{p+1}$ as a $\mathrm{GL}(n, K)$-module. As
an application, we take $K = \mathbb{C}$ and we consider the algebra of
invariants $(\mathbb{C}\left\langle X \right\rangle / I_{p+1})^G$ for $G =
\mathrm{SL}(n, \mathbb{C})$, $\mathrm{O}(n, \mathbb{C})$, $\mathrm{SO}(n,
\mathbb{C})$, or $\mathrm{Sp}(2s, \mathbb{C})$ (for $n=2s$). By a theorem of
Domokos and Drensky, $(\mathbb{C}\left\langle X \right\rangle / I_{p+1})^G$ is
finitely generated. We give an upper bound on the degree of generators of
$(\mathbb{C}\left\langle X \right\rangle / I_{p+1})^G$ in a minimal generating
set. In a similar way, we consider also the algebra of invariants
$(\mathbb{C}\left\langle X \right\rangle / I_{p+1})^{G}$, where
$G=\mathrm{UT}(n, \mathbb{C})$, and give an upper bound on the degree of
generators in a minimal generating set. These results provide useful
information about the invariants in $\mathbb{C}\left\langle X \right\rangle^G$
from the point of view of Classical Invariant Theory. In particular, for all
$G$ as above we give a criterion when a $G$-invariant of
$\mathbb{C}\left\langle X \right\rangle$ belongs to $I_p$.
