OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Mlm Scoring

Mlm Scoring is an open-source Python library and command-line toolkit for scoring sentences with masked or autoregressive language models, then using those scores to rerank candidate lists.

Independent OpenViST project profile, based on linked sources.

Mlm Scoring — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use it when an NLP workflow needs model-based sentence scores or an additional language-model signal for reranking existing candidates.

Who it is for

  • NLP developers working with language-model sentence scores.
  • Speech-recognition and machine-translation practitioners who need to rescore ranked hypotheses.
  • Researchers ranking linguistic minimal pairs for acceptability experiments.

Documented uses

  • Calculate pseudo-log-likelihood scores for sentences with masked language models.
  • Calculate log-probability scores with supported autoregressive language models.
  • Add scores to hypothesis data and combine them with existing scores to rescore n-best lists.
Before you choose

Requirements & limits

The public GitHub repository identifies the project as Apache-2.0 licensed. The documented installation requires Python 3.6 or later, PyTorch and MXNet.

  • Masked models use pseudo-log-likelihood scores; autoregressive models use log probabilities.
  • The CLI provides separate score-generation and n-best rescoring stages.
  • The documented stack requires both MXNet and PyTorch, with GluonNLP and Transformers used for model access.
  • The README labels its PyTorch masked-language-model interface experimental.

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

Install mlm-scoring for Python use

Install the library and its documented MXNet and PyTorch dependencies.

Before you start

  • Python 3.6 or later
  • A cloned copy of the mlm-scoring repository
  • A compatible MXNet package choice for the available hardware

Steps

  1. Clone the mlm-scoring repository.

  2. From the repository, run the command below.

    Documented command
    pip install -e .
  3. Install PyTorch and MXNet with the command below, replacing the MXNet package with the appropriate CUDA version, or use mxnet-mkl for CPU-only use.

    Documented command
    pip install torch mxnet-cu102mkl

Expected outcome

The package is installed in editable mode with the documented framework dependencies, ready for the library-import stage described in the README.

Guide limitations

  • The README says both MXNet and PyTorch are required because models are provided through GluonNLP and Transformers.
  • The PyTorch scorer interface is described as experimental; the README says the MXNet and PyTorch interfaces are expected to be unified later.
Source-based practical guide

Score LibriSpeech hypotheses and rescore an n-best list

Add BERT scores to the documented LibriSpeech hypotheses and interpolate them with the original acoustic scores.

Before you start

  • An installed mlm-scoring environment and a supported BERT model
  • The input file examples/asr-librispeech-espnet/data/dev-other.am.json
  • The documented example paths and shell loop

Steps

  1. Run the README's mlm score example with --mode hyp, model bert-base-en-uncased, --max-utts 3, and --gpus 0 on examples/asr-librispeech-espnet/data/dev-other.am.json, redirecting output to examples/demo/dev-other-3.lm.json.

  2. Run the README's mlm rescore loop with weights 0 and 0.5, using the acoustic input and generated language-model scores as the two inputs.

  3. Inspect the resulting files examples/demo/dev-other-3.lambda-0.json and examples/demo/dev-other-3.lambda-0.5.json.

Expected outcome

The documented workflow produces scored hypotheses and rescored outputs for the two LM weights. The README reports original WER of 12.2% and rescored WER of 8.5% for its example.

Guide limitations

  • The documented scoring example uses GPU 0 and scores only three utterances.
  • The README directs users to mlm score --help and mlm rescore --help for model and option details.
  • The reported WER figures are specific to the README example and are not a guarantee for other inputs or environments.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
15 October 2026
Original website title
awslabs/mlm-scoring · Official homepage title · retained in its source language