Instructions to use Arsh9210/Nemotron-Labs-Audex-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Arsh9210/Nemotron-Labs-Audex-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Arsh9210/Nemotron-Labs-Audex-2B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Arsh9210/Nemotron-Labs-Audex-2B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Arsh9210/Nemotron-Labs-Audex-2B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Arsh9210/Nemotron-Labs-Audex-2B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arsh9210/Nemotron-Labs-Audex-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Arsh9210/Nemotron-Labs-Audex-2B
- SGLang
How to use Arsh9210/Nemotron-Labs-Audex-2B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Arsh9210/Nemotron-Labs-Audex-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arsh9210/Nemotron-Labs-Audex-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Arsh9210/Nemotron-Labs-Audex-2B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Arsh9210/Nemotron-Labs-Audex-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Arsh9210/Nemotron-Labs-Audex-2B with Docker Model Runner:
docker model run hf.co/Arsh9210/Nemotron-Labs-Audex-2B
Audex Enhancement VAE
This directory contains the Audex enhancement VAE used to convert XCodec1-decoded 16 kHz mono WAV audio into enhanced 48 kHz mono WAV audio.
The enhancement model is a postprocessor for Audex text-to-audio generation:
Audex generation -> XCodec1 decode -> 16 kHz WAV -> Enhancement VAE -> 48 kHz WAV
The model is intended for XCodec1-decoded Audex audio as inputs. It is not a general purpose enhancer for arbitrary audio.
Requirements
torch, numpy, scipy
Command Line Usage
For a folder of outputs:
python enhancement_VAE/enhance_audio_48k.py \
--input tta_outputs \
--output-dir tta_outputs_enhanced_48k
For a single WAV file:
python enhancement_VAE/enhance_audio_48k.py \
--input tta_outputs/example.wav \
--output-dir tta_outputs_enhanced_48k
Outputs are written as:
<input_stem>_enhanced_48k.wav
Supported options:
--device: inference device. Defaults tocudawhen available, otherwisecpu.--seed: torch seed for stochastic VAE sampling. Defaults to0.--deterministic: use the posterior mean instead of VAE sampling.
Python API
from pathlib import Path
import torch
from enhancement_VAE.enhancement_vae import enhance_file, load_model
root = Path("enhancement_VAE")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = load_model(
checkpoint_path=root / "XCodec_RVQ4_mono_causal_fp32.safetensors",
config_path=root / "config.json",
device=device,
)
enhance_file(
model=model,
input_path=Path("input_16k.wav"),
output_path=Path("input_16k_enhanced_48k.wav"),
deterministic=False,
)
Input and Output
Input:
- XCodec1-decoded Mono 16 kHz WAV file
Output:
- Mono 48 kHz audio WAV file
If a directory is passed to --input, all .wav files directly inside that
directory are processed. Directory traversal is not recursive.