Transformer-LT Official FP32 Inference Tensorflow* Container

ID 679291
Updated 6/15/2022
Version Latest



Pull Command

docker pull intel/language-translation:tf-latest-transformer-lt-official-fp32-inference


This document has instructions to run a Transformer Language Translation FP32 inference using Intel® Optimization for TensorFlow*. The original code for the Transformer LT Official model came from the TensorFlow Model Garden repository.

Download and preprocess the English-German dataset using the script from the TensorFlow Model Garden repo. The Transformer model README has a section with instructions for using the script.

Once the script completes, you should have a dataset directory with the following files: newstest2014.denewstest2014.en, and a vocab text file. For simplicity, rename the vocab file to vocab.txt. The path to the directory with these files should be set as the DATASET_DIR environment variable when using the quickstart scripts.

Quick Start Scripts

Script name Description
fp32_online_inference Runs online inference (batch_size=1).
fp32_batch_inference Runs batch inference (batch_size=64).


The model container used in the example below includes the scripts, libraries, and pretrained model needed to run Transformer LT Official FP32 inference. To run one of the model quickstart scripts using this container, you'll need to provide volume mounts for the dataset and an output directory.

DATASET_DIR=<path to the test dataset directory>
OUTPUT_DIR=<directory where the log and translation file will be written>

docker run \
  --env http_proxy=${http_proxy} \
  --env https_proxy=${https_proxy} \
  --volume ${DATASET_DIR}:${DATASET_DIR} \
  --volume ${OUTPUT_DIR}:${OUTPUT_DIR} \
  --privileged --init -t \
  intel/language-translation:tf-latest-transformer-lt-official-fp32-inference \
  /bin/bash quickstart/<script name>.sh

If you have your own pretrained model, you can specify the path to the frozen graph .pb file using the FROZEN_GRAPH environment variable and mount the frozen graph's directory as a volume in the container.

Documentation and Sources

Get Started​
Docker* Repository
Main GitHub*
Release Notes
Get Started Guide

Code Sources
Report Issue

License Agreement

LEGAL NOTICE: By accessing, downloading or using this software and any required dependent software (the “Software Package”), you agree to the terms and conditions of the software license agreements for the Software Package, which may also include notices, disclaimers, or license terms for third party software included with the Software Package. Please refer to the license file for additional details.

View All Containers and Solutions 🡢