Text Generation
Transformers
PEFT
English
gravityllm
spatial-audio
immersive-audio
spatial9
iamf
instruction-tuning
json
lora
qlora
Instructions to use Spatial9/GravityLLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Spatial9/GravityLLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Spatial9/GravityLLM")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Spatial9/GravityLLM", dtype="auto") - PEFT
How to use Spatial9/GravityLLM with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Spatial9/GravityLLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Spatial9/GravityLLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Spatial9/GravityLLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Spatial9/GravityLLM
- SGLang
How to use Spatial9/GravityLLM 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 "Spatial9/GravityLLM" \ --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": "Spatial9/GravityLLM", "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 "Spatial9/GravityLLM" \ --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": "Spatial9/GravityLLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Spatial9/GravityLLM with Docker Model Runner:
docker model run hf.co/Spatial9/GravityLLM
| { | |
| "version": "1.0", | |
| "bed": { | |
| "layout": "iamf", | |
| "loudness_target_lufs": -14.0, | |
| "room_preset": "club_medium" | |
| }, | |
| "objects": [ | |
| { | |
| "id": "v1", | |
| "class": "lead_vocal", | |
| "az_deg": 0, | |
| "el_deg": 10, | |
| "dist_m": 1.6, | |
| "width": 0.15, | |
| "gain_db": 0.0, | |
| "reverb_send": 0.18, | |
| "early_reflections": 0.22, | |
| "motion": [ | |
| { | |
| "t": 0.0, | |
| "az_deg": 0, | |
| "el_deg": 10, | |
| "dist_m": 1.6 | |
| }, | |
| { | |
| "t": 1.0, | |
| "az_deg": 0, | |
| "el_deg": 10, | |
| "dist_m": 1.6 | |
| } | |
| ] | |
| }, | |
| { | |
| "id": "k1", | |
| "class": "kick", | |
| "az_deg": 0, | |
| "el_deg": 0, | |
| "dist_m": 2.2, | |
| "width": 0.0, | |
| "gain_db": 0.0, | |
| "reverb_send": 0.02, | |
| "early_reflections": 0.05, | |
| "motion": [ | |
| { | |
| "t": 0.0, | |
| "az_deg": 0, | |
| "el_deg": 0, | |
| "dist_m": 2.2 | |
| }, | |
| { | |
| "t": 1.0, | |
| "az_deg": 0, | |
| "el_deg": 0, | |
| "dist_m": 2.2 | |
| } | |
| ] | |
| }, | |
| { | |
| "id": "b1", | |
| "class": "bass", | |
| "az_deg": 0, | |
| "el_deg": -5, | |
| "dist_m": 2.6, | |
| "width": 0.05, | |
| "gain_db": -0.5, | |
| "reverb_send": 0.03, | |
| "early_reflections": 0.06, | |
| "motion": [ | |
| { | |
| "t": 0.0, | |
| "az_deg": 0, | |
| "el_deg": -5, | |
| "dist_m": 2.6 | |
| }, | |
| { | |
| "t": 1.0, | |
| "az_deg": 0, | |
| "el_deg": -5, | |
| "dist_m": 2.6 | |
| } | |
| ] | |
| }, | |
| { | |
| "id": "s1", | |
| "class": "synth_lead", | |
| "az_deg": 25, | |
| "el_deg": 15, | |
| "dist_m": 2.0, | |
| "width": 0.35, | |
| "gain_db": -1.0, | |
| "reverb_send": 0.12, | |
| "early_reflections": 0.1, | |
| "motion": [ | |
| { | |
| "t": 0.0, | |
| "az_deg": 20, | |
| "el_deg": 15, | |
| "dist_m": 2.0 | |
| }, | |
| { | |
| "t": 1.0, | |
| "az_deg": 30, | |
| "el_deg": 15, | |
| "dist_m": 2.0 | |
| } | |
| ] | |
| }, | |
| { | |
| "id": "p1", | |
| "class": "pad", | |
| "az_deg": -70, | |
| "el_deg": 20, | |
| "dist_m": 4.0, | |
| "width": 0.85, | |
| "gain_db": -3.0, | |
| "reverb_send": 0.28, | |
| "early_reflections": 0.12, | |
| "motion": [ | |
| { | |
| "t": 0.0, | |
| "az_deg": -70, | |
| "el_deg": 20, | |
| "dist_m": 4.0 | |
| }, | |
| { | |
| "t": 1.0, | |
| "az_deg": -70, | |
| "el_deg": 20, | |
| "dist_m": 4.0 | |
| } | |
| ] | |
| }, | |
| { | |
| "id": "fx1", | |
| "class": "fx", | |
| "az_deg": 110, | |
| "el_deg": 30, | |
| "dist_m": 6.0, | |
| "width": 0.65, | |
| "gain_db": -6.0, | |
| "reverb_send": 0.4, | |
| "early_reflections": 0.08, | |
| "motion": [ | |
| { | |
| "t": 0.0, | |
| "az_deg": 100, | |
| "el_deg": 30, | |
| "dist_m": 6.0 | |
| }, | |
| { | |
| "t": 1.0, | |
| "az_deg": 130, | |
| "el_deg": 30, | |
| "dist_m": 6.0 | |
| } | |
| ] | |
| } | |
| ], | |
| "constraints_applied": [ | |
| "anchor:lead_vocal@0/10/1.6", | |
| "mono_low_end<120Hz", | |
| "pad_width>=0.75", | |
| "avoid_masking_lead_1500-4500Hz" | |
| ] | |
| } |