code: def parseq(pretrained: bool = False, **kwargs: Any) -> PARSeq:
      """PARSeq architecture from
      `"Scene Text Recognition with Permuted Autoregressive Sequence Models" <https://arxiv.org/pdf/2207.06966>`_.
  
      >>> import torch
      >>> from doctr.models import parseq
      >>> model = parseq(pretrained=False)
      >>> input_tensor = torch.rand((1, 3, 32, 128))
      >>> out = model(input_tensor)
  
      Args:
      ----
          pretrained (bool): If True, returns a model pre-trained on our text recognition dataset
          **kwargs: keyword arguments of the PARSeq architecture
  
      Returns:
      -------
          text recognition architecture
      """
      return _parseq(
          "parseq",
          pretrained,
          vit_s,
          "1",
          embedding_units=384,
          patch_size=(4, 8),
          ignore_keys=[
              "embed.embedding.weight",
              "head.weight",
              "head.bias",
          ],
          **kwargs,
      )
  
imports: import math
  from copy import deepcopy
  from itertools import permutations
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  from torch import nn
  from torch.nn import functional
  from torchvision.models._utils import IntermediateLayerGetter
  from doctr.datasets import VOCABS
  from doctr.models.modules.transformer import MultiHeadAttention, PositionwiseFeedForward
  from ...classification import vit_s
  from ...utils.pytorch import _bf16_to_float32, load_pretrained_params
  from .base import _PARSeq, _PARSeqPostProcessor
label_desc: Use image node_id 2 for calling a global function with example usage: parseq(pretrained) and returns: _parseq