Transformer-LT Official FP32 Inference Tensorflow* Model Package

Published: 10/23/2020

Customer Reviews

☆☆☆☆☆ (0)  Rate this solution


Download Command

wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v2_3_0/transformer-lt-official-fp32-inference.tar.gz

Description

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 data_download.py 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.sh Runs online inference (batch_size=1).
fp32_batch_inference.sh Runs batch inference (batch_size=64).

Bare Metal

To run on bare metal, the following prerequisites must be installed in your environment:

Download and untar the model package and then run a quickstart script with enviornment variables that point to your 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>

wget https://storage.googleapis.com/intel-optimized-tensorflow/models/v2_3_0/transformer-lt-official-fp32-inference.tar.gz
tar -xzf transformer-lt-official-fp32-inference.tar.gz
cd transformer-lt-official-fp32-inference

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.


Documentation and Sources

Get Started​
Main GitHub*
Readme
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.


Related Containers and Solutions

Transformer-LT Official FP32 Inference TensorFlow* Container

View All Containers and Solutions 🡢

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.