Transformer Model error fix