
Product
Introducing Reachability for PHP
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.
torch-edit-distance
Advanced tools
Useful functions for E2E Speech Recognition training with PyTorch and CUDA.
Here is a simple use case with Reinforcement Learning and RNN-T loss:
blank = torch.tensor([0], dtype=torch.int).cuda()
space = torch.tensor([1], dtype=torch.int).cuda()
xs = model.greedy_decode(xs, sampled=True)
torch_edit_distance.remove_blank(xs, xn, blank)
rewards = 1 - torch_edit_distance.compute_wer(xs, ys, xn, yn, blank, space)
nll = rnnt_loss(zs, ys, xn, yn)
loss = nll * rewards
Levenshtein edit-distance with detailed statistics for ins/del/sub operations.
Merge repeated tokens, useful for CTC-based model.
Remove unnecessary blank tokens, useful for CTC, RNN-T, RNA models.
Remove leading, trailing and repeated middle separators.
There is no compiled version of the package. The following setup instructions compile the package from the source code locally.
pip install torch_edit_distance
git clone https://github.com/1ytic/pytorch-edit-distance
cd pytorch-edit-distance
python setup.py install
python -m torch_edit_distance.test
FAQs
PyTorch edit-distance functions
We found that torch-edit-distance demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Reachability analysis for PHP is now available in experimental, helping teams identify which vulnerabilities are actually exploitable.

Product
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.