Discrete transformers