OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Bert Of Theseus

Bert Of Theseus is an open-source Python and PyTorch implementation for compressing BERT by progressively replacing its components with smaller successor components. It includes GLUE training and evaluation scripts and a pretrained six-layer MNLI model that can be loaded with Hugging Face Transformers.

Independent OpenViST project profile, based on linked sources.

Bert Of Theseus — 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 have a fine-tuned predecessor model and GLUE data for a compression experiment, or when you want to load the provided six-layer MNLI model for sentence-classification work.

Who it is for

  • Researchers exploring BERT compression and progressive module replacement.
  • Developers evaluating compressed language models on GLUE tasks.
  • Sentence-classification practitioners looking to start from the provided six-layer MNLI model.

Documented uses

  • Compress a fine-tuned BERT predecessor through progressive module replacement.
  • Train and evaluate a compressed model on GLUE tasks.
  • Load the pretrained MNLI model for sentence-classification experiments.
  • Make predictions on GLUE tasks and prepare leaderboard submissions.
Before you choose

Requirements & limits

The repository is public and licensed under Apache-2.0.

  • Using the implementation requires cloning and installing Hugging Face Transformers.
  • The compression workflow expects a fine-tuned predecessor model saved locally and GLUE task data.
  • The README says GLUE is the available task set and invites contributions for additional tasks.
  • The pretrained model is six layers and is described as transferable to other sentence-classification tasks.

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

Load the pretrained MNLI model

Load the provided six-layer MNLI model with Hugging Face Transformers for sentence-classification use.

Before you start

  • Hugging Face Transformers
  • Python

Steps

  1. Import AutoTokenizer and AutoModel from transformers.

  2. Load the tokenizer from canwenxu/BERT-of-Theseus-MNLI.

  3. Load the model from canwenxu/BERT-of-Theseus-MNLI.

Expected outcome

A tokenizer and model object for the pretrained six-layer MNLI model are loaded.

Guide limitations

  • The README describes transfer to other sentence-classification tasks but does not provide a complete task-specific inference example.
Source-based practical guide

Prepare a BERT compression run on a GLUE task

Set up the documented GLUE-based workflow for compressing a fine-tuned predecessor model.

Before you start

  • Python
  • A cloned and installed Hugging Face Transformers repository
  • A fine-tuned predecessor model saved to a directory
  • GLUE data for the selected task

Steps

  1. Fine-tune a predecessor model using the Hugging Face GLUE instructions and save it to a directory.

  2. Set GLUE_DIR to the GLUE data location and TASK_NAME to the selected task, as in the MRPC example.

  3. Run run_glue.py with the saved predecessor, task data, training and evaluation options, and either a replacement scheduler or a constant replacing rate.

Expected outcome

The documented command configures a GLUE training and evaluation run that applies progressive module replacement and writes the successor model to the specified output directory.

Guide limitations

  • The README provides example arguments and refers readers to the source code for detailed argument descriptions.
  • The repository states that GLUE is the available task set.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
17 October 2026
Original website title
JetRunner/BERT-of-Theseus · Official homepage title · retained in its source language