diff --git a/scripts/compare_encoder.py b/scripts/compare_encoder.py index a8e0475..68795ea 100644 --- a/scripts/compare_encoder.py +++ b/scripts/compare_encoder.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["torch", "numpy", "safetensors"] +# /// """Compare C++ encoder intermediate outputs with PyTorch reference. Uses same weights from safetensors to build PyTorch reference. """ diff --git a/scripts/compare_features.py b/scripts/compare_features.py index c9e7b4d..40fd413 100644 --- a/scripts/compare_features.py +++ b/scripts/compare_features.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["torch", "torchaudio", "numpy"] +# /// """Compare C++ and Python mel features with NeMo-compatible preprocessing.""" import torch import torchaudio diff --git a/scripts/convert_nemo.py b/scripts/convert_nemo.py index c6fe520..c6a83cf 100644 --- a/scripts/convert_nemo.py +++ b/scripts/convert_nemo.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["torch", "safetensors", "packaging", "numpy"] +# /// """Convert NeMo Parakeet checkpoints to safetensors for axiom. Supported models: diff --git a/scripts/debug_encoder.py b/scripts/debug_encoder.py index 389e38a..584c787 100644 --- a/scripts/debug_encoder.py +++ b/scripts/debug_encoder.py @@ -1,3 +1,8 @@ +#!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["torch", "torchaudio", "numpy", "safetensors"] +# /// """Compare C++ encoder output with PyTorch reference, layer by layer. Uses safetensors weights directly with PyTorch, no NeMo dependency. """ diff --git a/scripts/extract_vocab.py b/scripts/extract_vocab.py index adabf5e..fcfea35 100644 --- a/scripts/extract_vocab.py +++ b/scripts/extract_vocab.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = [] +# /// """Extract SentencePiece vocabulary from a NeMo archive. Usage: diff --git a/scripts/nemo_inference.py b/scripts/nemo_inference.py index 68fc1f7..d5ad2c4 100644 --- a/scripts/nemo_inference.py +++ b/scripts/nemo_inference.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["torch", "numpy", "safetensors", "packaging"] +# /// """Run NeMo inference for reference comparison.""" import torch import numpy as np diff --git a/scripts/pytorch_benchmark.py b/scripts/pytorch_benchmark.py index 3257739..f4c0040 100644 --- a/scripts/pytorch_benchmark.py +++ b/scripts/pytorch_benchmark.py @@ -1,4 +1,8 @@ #!/usr/bin/env python3 +# /// script +# requires-python = ">=3.10" +# dependencies = ["torch", "pyyaml", "nemo_toolkit[asr]"] +# /// """Benchmark PyTorch/NeMo inference for comparison with parakeet.cpp.""" import os import sys