OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Models

Sentence Vae

Sentence Vae is a Python and PyTorch implementation of a sentence variational autoencoder, with command-line scripts to train on Penn Treebank text and use a trained checkpoint for sentence sampling or interpolation.

Independent OpenViST project profile, based on linked sources.

Sentence Vae — Experimenting with RNN- or GRU-based sentence generation
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when you want a code-level example of training and exploring a sentence variational autoencoder from the command line, rather than a hosted generation interface.

Who it is for

  • Researchers and students exploring sentence generation with variational autoencoders.
  • Developers adapting a documented text-model training and inference workflow.

Documented uses

  • Train a sentence-generation model using Penn Treebank training and validation files.
  • Generate sentence samples from a trained model.
  • Interpolate between sentence representations to examine changes in generated text.
Before you choose

Requirements & limits

  • Training requires Penn Treebank data files, including ptb.train.txt and ptb.valid.txt.
  • The documented inference workflow takes a trained checkpoint and a requested sample count.
  • The README identifies RNN and GRU support and states that LSTM is not supported.

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

Train on Penn Treebank data

Prepare the documented data inputs and start model training.

Before you start

  • Python 3 command-line environment
  • Penn Treebank data with at least ptb.train.txt and ptb.valid.txt in the selected data directory
  • The Sentence Vae repository

Steps

  1. Download the Penn Treebank data, or use the repository's dowloaddata.sh script.

  2. Place the required training and validation files in the data directory.

  3. Run python3 train.py; use --data_dir to specify the data directory when needed.

Expected outcome

The training script runs with the prepared corpus and saves checkpoints to its configured model-save directory.

Guide limitations

  • The README does not specify a checkpoint path that is guaranteed to match every configuration.
  • The implementation supports RNN and GRU, but not LSTM.
Source-based practical guide

Generate samples or interpolate with a checkpoint

Use a trained checkpoint for sentence sampling or interpolation.

Before you start

  • A checkpoint from model training
  • Python 3 command-line environment
  • The repository's inference.py script

Steps

  1. Set the checkpoint path and requested sample count.

  2. Run python3 inference.py -c $CHECKPOINT -n $NUM_SAMPLES.

Expected outcome

The repository's inference script is used to obtain sentence samples and interpolations.

Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
8 November 2026
Original website title
timbmg/Sentence-VAE · Official homepage title · retained in its source language