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.
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.
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
Clone the mlm-scoring repository.
From the repository, run the command below.
pip install -e .Install PyTorch and MXNet with the command below, replacing the MXNet package with the appropriate CUDA version, or use
mxnet-mklfor CPU-only use.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.
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
Run the README's
mlm scoreexample with--mode hyp, modelbert-base-en-uncased,--max-utts 3, and--gpus 0onexamples/asr-librispeech-espnet/data/dev-other.am.json, redirecting output toexamples/demo/dev-other-3.lm.json.Run the README's
mlm rescoreloop with weights0and0.5, using the acoustic input and generated language-model scores as the two inputs.Inspect the resulting files
examples/demo/dev-other-3.lambda-0.jsonandexamples/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 --helpandmlm rescore --helpfor model and option details. - The reported WER figures are specific to the README example and are not a guarantee for other inputs or environments.
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

