L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

xlnet

xlnet

Operate the legacy TensorFlow 1.x XLNet repository for model APIs, classification, SQuAD, RACE, and pretraining workflows.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: xlnet description: "Operate the legacy TensorFlow 1.x XLNet repository for model APIs, classification, SQuAD, RACE, and pretraining workflows." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

XLNet repo skill

Use this skill when a Researcher task involves the original zihangdai/xlnet TensorFlow 1.x repository: released XLNet checkpoints, xlnet_config.json, spiece.model, source-script fine-tuning, SQuAD/RACE workflows, pretraining data, or direct XLNet graph APIs.

Before you act

  1. Confirm the caller wants the original TensorFlow 1.x XLNet code, not modern Hugging Face transformers.XLNet* APIs.
  2. Collect the model bundle paths: xlnet_config.json, spiece.model, and, for training, the TensorFlow checkpoint prefix.
  3. Identify the workflow family and route to the focused sub-skill below.
  4. Run scripts/check_xlnet_environment.py --help when you need a safe import/config diagnostic. It does not download data, open checkpoints, or launch training.
  5. Read references/model-overview.md for released model artifacts, memory anchors, and hardware expectations.
  6. Read references/troubleshooting.md for cross-cutting TensorFlow 1.x, protobuf, Abseil flag, checkpoint, and backend failures.
  7. Read references/repo-provenance.md before deciding whether this skill is stale for a checkout.

Runtime prerequisites

  • Legacy TensorFlow 1.x runtime. TensorFlow 2.x lacks several tf.contrib APIs used by the repository.
  • sentencepiece, numpy, and task-specific metric packages such as scipy/scikit-learn for RACE metrics.
  • An XLNet source checkout or runtime where source modules such as xlnet, modeling, run_classifier, run_squad, and run_race are importable.
  • Released or fine-tuned model artifacts supplied by the user; this skill does not bundle checkpoints, tokenizer models, or datasets.
  • GPU/TPU hardware only when the selected workflow requires actual training or large evaluation. Many checks and command builders are CPU-safe.

Minimal diagnostic from a runtime where XLNet source is importable:

python scripts/check_xlnet_environment.py --repo-root /path/to/xlnet --config /path/to/xlnet_config.json

If no checkout path is needed because the modules are already importable, omit --repo-root.

Route map

User taskRead nextWhy
Use XLNetConfig, RunConfig, XLNetModel, tokenizer helpers, losses, checkpoint loading, or custom TensorFlow graph code.sub-skills/model-api/SKILL.mdCovers verified signatures, tensor shapes, config validation, and runtime helpers.
Fine-tune/evaluate/predict GLUE MNLI, STS-B, IMDB, Yelp-5, or processor-backed classification/regression through run_classifier.py.sub-skills/classification/SKILL.mdCovers task names, data layouts, train/eval/predict flags, and command generation.
Preprocess or fine-tune SQuAD 1.1/2.0, generate predictions, decode n-best answers, or handle no-answer thresholds.sub-skills/squad-qa/SKILL.mdCovers SQuAD JSON, feature caches, GPU/TPU recipes, prediction outputs, and threshold metrics.
Run RACE multiple-choice reading-comprehension training/evaluation or adapt TPU RACE recipes.sub-skills/race-reading-comprehension/SKILL.mdCovers RACE directory layout, high/middle filtering, four-candidate batching, and TPU command templates.
Prepare raw text or token-id corpora for pretraining, generate TFRecords, or build train_gpu.py/train.py pretraining commands.sub-skills/data-pretraining/SKILL.mdCovers corpus format, SentencePiece assumptions, record_info files, and pretraining command builders.

Operating guardrails

  • Do not import several task scripts in the same long-lived Python process; their Abseil flags collide. Inspect one CLI module per process.
  • Keep data_dir, output_dir, model_dir, predict_dir, and init_checkpoint conceptually separate.
  • Treat output_dir as a cache. Use a new cache or overwrite flag when sequence length, task data, tokenizer, or split changes.
  • For multi-GPU task fine-tuning, num_core_per_host means number of GPUs and train_batch_size is per GPU.
  • Prefer command-builder scripts in the sub-skills when assembling long commands. They print commands only and avoid accidental training, downloads, or GCS writes.
  • Do not treat README result numbers as proof for a new run. They are context anchors; real results require matching data, checkpoints, hardware, and training time.

Bundled root files

Skills enregistrées