Skip To Content

Use the model

You can use the HF Text Translation model in the Transform Text Using Deep Learning tool available in the GeoAI toolbox in ArcGIS Pro.

Use the Text Translation model

Complete the following steps to use the model for text translation:

  1. Download the HF Text Translation pretrained model from ArcGIS Living Atlas of the World.
  2. Browse to Tools on the Analysis tab.
    Tools on the Analysis tab
  3. Click the Toolboxes tab in the Geoprocessing pane, select GeoAI Tools, and browse to the Transform Text Using Deep Learning tool under Text Analysis.
    Transform Text Using Deep Learning tool
  4. Set the variables on the Parameters tab as follows:
    1. Set Input Table to the input point, line, or polygon feature class, or table containing the text to be translated.
    2. Set Text Field to the text field within the input feature class or table that contains the text to be translated.
    3. For Input Model Definition File, select the model .dlpk file.
    4. Set Result Field to the name of the field that will contain the translated text in the output feature class or table.

      The default field name is Result.

    5. For Arguments, change the values of the arguments if required.
      • huggingface_id—The model ID of a pretrained text translation model hosted on huggingface.co.

        Text Translation models can be filtered by selecting the Translation tag under the Tasks section within the Natural Language Processing category on the Hugging Face model hub, as shown below:

        Text Summarization on the model hub

        The model ID follows the format {username}/{repository}, as displayed at the top of the model's page:

        Model ID

        Only those models that have config.json are supported. This file can be verified under the Files and versions tab of the model page, as shown below:

        config.json and preprocessor_config.json on the Files and versions tab
      • source_lang—Language code of the input text.
      • target_lang—Language code of the translated text.
      • min_length—The minimum number of characters in the translated output. The default value is 10.
      • max_length—The maximum number of characters allowed in the translated output. The default value is 512.
      • num_beams—Number of beams used in beam search (the default is 4). Higher values may improve quality but increase inference time.
    6. Set Batch Size to the number of rows to be processed at once.

      Increasing the batch size can improve tool performance; however, as the batch size increases, more memory is used.

      Transform Text Using Deep Learning tool Parameters tab
  5. Set the variables on the Environments tab as follows:
    1. For Processor Type, select CPU or GPU.

      It is recommended that you select GPU, if available, and set GPU ID to specify the GPU to be used.

      Transform Text Using Deep Learning tool Environments tab
  6. Click Run.

    The output column is added to the input table.

    translated results from the model