Text Generation
Transformers
Safetensors
English
nemotron_labs_audex
nvidia
nemotron-labs-audex
reasoning
general-purpose
SFT
audio-language-modeling
audio-understanding
text-to-speech
text-to-audio
speech-recognition
speech-translation
Instructions to use nvidia/Nemotron-Labs-Audex-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nvidia/Nemotron-Labs-Audex-2B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nvidia/Nemotron-Labs-Audex-2B")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("nvidia/Nemotron-Labs-Audex-2B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nvidia/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 "nvidia/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": "nvidia/Nemotron-Labs-Audex-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nvidia/Nemotron-Labs-Audex-2B
- SGLang
How to use nvidia/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 "nvidia/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": "nvidia/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 "nvidia/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": "nvidia/Nemotron-Labs-Audex-2B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nvidia/Nemotron-Labs-Audex-2B with Docker Model Runner:
docker model run hf.co/nvidia/Nemotron-Labs-Audex-2B
| # # MMAU-mini (topp=0.9, temp=0.7) | |
| # DELTA=125 | |
| # TOP_K=0 | |
| # TOP_P=0.9 | |
| # TEMPERATURE=0.7 | |
| # INPUT_JSON=/path/to/MMAU-test/mini-vila_original.json | |
| # DATASET_NAME=MMAU_mini | |
| # INPUT_JSON is a json file of the following format | |
| # [ | |
| # { | |
| # "id": 0, | |
| # "sound": "path/to/mmau-test-mini-audios/3fe64f3d-282c-4bc8-a753-68f8f6c35652.wav", | |
| # "conversations": [ | |
| # {"from": "human", "value": "<sound>\nHow many times does the word 'otter' appear in the sentence? Choose the correct option from the following options:\n(A) one\n(B) zero\n(C) one\n(D) three."}, | |
| # {"from": "gpt", "value": "N/A"} | |
| # ] | |
| # }, | |
| # ... | |
| # ] | |
| # LS Clean (greedy sampling) | |
| DELTA=4 | |
| TOP_K=0 | |
| TOP_P=1.0 | |
| TEMPERATURE=1.0 | |
| INPUT_JSON=/path/to/input.json | |
| DATASET_NAME=ls_clean | |
| # INPUT_JSON is a json file of the following format | |
| # [ | |
| # { | |
| # "id": "7729-102255-0000", | |
| # "sound": "path/to/test-clean/7729/102255/7729-102255-0000.wav", | |
| # "conversations": [ | |
| # {"from": "human", "value": "Transcribe the speech in the input audio.\n<sound>"}, | |
| # {"from": "gpt", "value": "N/A"} | |
| # ] | |
| # }, | |
| # ... | |
| # ] | |
| for GPU in {0..0} | |
| do | |
| START_IDX=$((GPU*DELTA)) | |
| END_IDX=$((START_IDX+DELTA)) | |
| OUTPUT_JSONL=./outputs/${DATASET_NAME}_topk${TOP_K}_topp${TOP_P}_temp${TEMPERATURE}_${START_IDX}_to_${END_IDX}.jsonl \ | |
| CUDA_VISIBLE_DEVICES=$GPU python3 inference_scripts_hf/inference_hf.py \ | |
| --hf-model-path checkpoint_folder_full/ \ | |
| --input-json $INPUT_JSON \ | |
| --output-jsonl $OUTPUT_JSONL \ | |
| --start-idx $START_IDX \ | |
| --end-idx $END_IDX \ | |
| --max-new-tokens 8192 \ | |
| --temperature $TEMPERATURE \ | |
| --top-p $TOP_P \ | |
| --top-k $TOP_K & | |
| done | |
| wait | |