OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

XLNet Extension

XLNet Extension is a Python project that adds TensorFlow workflows for applying XLNet to natural-language tasks, including named-entity recognition, natural-language understanding and machine reading comprehension.

Independent OpenViST project profile, based on linked sources.

XLNet Extension — OpenViST project profile in AI Models.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you need a code-based starting point for XLNet NLP experiments and can work with the repository's specified TensorFlow 1.x environment and model files.

Who it is for

  • Developers and researchers building or studying XLNet-based NLP experiments.
  • Practitioners working with NER, intent and slot tagging, or reading-comprehension datasets.

Documented uses

  • Preprocess CoNLL2003 data for a named-entity-recognition experiment.
  • Run an example NER workflow with training, evaluation, prediction and model export.
  • Explore XLNet workflows for NLU and question answering using datasets such as ATIS and SQuAD.
Before you choose

Requirements & limits

The repository is public and specifies the Apache-2.0 license.

  • The README specifies Python 3.6.7, TensorFlow 1.13.1, NumPy 1.13.3 and SentencePiece 0.1.82.
  • The NER example expects XLNet configuration, checkpoint and SentencePiece files at user-supplied paths.
  • The example references a CUDA device and includes TensorBoard visualization and TensorFlow Serving setup commands.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Prepare CoNLL2003 data for the NER workflow

Convert a raw CoNLL2003 input file to the JSON path used by the documented NER experiment.

Before you start

  • A Python environment matching the README settings: Python 3.6.7, TensorFlow 1.13.1, NumPy 1.13.3 and SentencePiece 0.1.82.
  • A CoNLL2003 raw input file and the project repository.

Steps

  1. Run the documented preprocessor, the command below, with --data_format json.

    Documented command
    python prepro/prepro_conll.py
  2. Set --input_file to the raw data file and --output_file to the intended CoNLL2003 JSON output path.

Expected outcome

The documented preprocessing command writes a JSON file at the selected output path for the NER workflow.

Guide limitations

  • The README provides a command template with placeholder filenames; it does not specify where to obtain model checkpoints or provide a complete data-installation procedure.
Source-based practical guide

Run the documented CoNLL2003 NER experiment

Use the repository's example command to train, evaluate, predict and export an NER model.

Before you start

  • The project environment: Python 3.6.7, TensorFlow 1.13.1, NumPy 1.13.3 and SentencePiece 0.1.82.
  • CoNLL2003 data in the configured data directory and XLNet SentencePiece, configuration and checkpoint files at the paths supplied to the command.
  • A CUDA device, as referenced by the command's CUDA_VISIBLE_DEVICES=0 setting.

Steps

  1. Run run_ner.py with --task_name=conll2003 and the documented model-file and directory arguments.

  2. Set the experiment options, including sequence length, batch size, learning rate and training steps, to the values in the README example.

  3. Keep --do_train=true, --do_eval=true, --do_predict=true and --do_export=true to request the four documented stages.

  4. Use the README's TensorBoard command, tensorboard --logdir=output/ner/conll2003, to view the experiment summary.

Expected outcome

The example is configured to train, evaluate, predict and export a CoNLL2003 NER model, with summaries directed to the stated output location.

Guide limitations

  • The README uses placeholder prediction and export paths and does not document how to acquire the model files.
  • The command is an example configuration; its results may depend on the data, model files and runtime environment.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
stevezheng23/xlnet_extension_tf · Official homepage title · retained in its source language