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
| { | |
| "$schema": "http://json-schema.org/draft-07/schema#", | |
| "title": "Spatial9Scene", | |
| "type": "object", | |
| "required": [ | |
| "version", | |
| "bed", | |
| "objects", | |
| "constraints_applied" | |
| ], | |
| "properties": { | |
| "version": { | |
| "type": "string" | |
| }, | |
| "bed": { | |
| "type": "object", | |
| "required": [ | |
| "layout", | |
| "loudness_target_lufs", | |
| "room_preset" | |
| ], | |
| "properties": { | |
| "layout": { | |
| "type": "string", | |
| "enum": [ | |
| "binaural", | |
| "5.1.4", | |
| "7.1.4", | |
| "iamf" | |
| ] | |
| }, | |
| "loudness_target_lufs": { | |
| "type": "number" | |
| }, | |
| "room_preset": { | |
| "type": "string" | |
| } | |
| }, | |
| "additionalProperties": false | |
| }, | |
| "objects": { | |
| "type": "array", | |
| "minItems": 1, | |
| "maxItems": 32, | |
| "items": { | |
| "type": "object", | |
| "required": [ | |
| "id", | |
| "class", | |
| "az_deg", | |
| "el_deg", | |
| "dist_m", | |
| "width", | |
| "gain_db", | |
| "reverb_send", | |
| "early_reflections", | |
| "motion" | |
| ], | |
| "properties": { | |
| "id": { | |
| "type": "string" | |
| }, | |
| "class": { | |
| "type": "string", | |
| "enum": [ | |
| "lead_vocal", | |
| "back_vocal", | |
| "kick", | |
| "snare", | |
| "hihat", | |
| "bass", | |
| "drums_bus", | |
| "pad", | |
| "synth_lead", | |
| "guitar", | |
| "piano", | |
| "strings", | |
| "brass", | |
| "fx", | |
| "dialogue", | |
| "ambience", | |
| "other" | |
| ] | |
| }, | |
| "az_deg": { | |
| "type": "number", | |
| "minimum": -180, | |
| "maximum": 180 | |
| }, | |
| "el_deg": { | |
| "type": "number", | |
| "minimum": -45, | |
| "maximum": 90 | |
| }, | |
| "dist_m": { | |
| "type": "number", | |
| "minimum": 0.5, | |
| "maximum": 15.0 | |
| }, | |
| "width": { | |
| "type": "number", | |
| "minimum": 0.0, | |
| "maximum": 1.0 | |
| }, | |
| "gain_db": { | |
| "type": "number", | |
| "minimum": -60, | |
| "maximum": 12 | |
| }, | |
| "reverb_send": { | |
| "type": "number", | |
| "minimum": 0.0, | |
| "maximum": 1.0 | |
| }, | |
| "early_reflections": { | |
| "type": "number", | |
| "minimum": 0.0, | |
| "maximum": 1.0 | |
| }, | |
| "motion": { | |
| "type": "array", | |
| "maxItems": 64, | |
| "items": { | |
| "type": "object", | |
| "required": [ | |
| "t", | |
| "az_deg", | |
| "el_deg", | |
| "dist_m" | |
| ], | |
| "properties": { | |
| "t": { | |
| "type": "number", | |
| "minimum": 0.0, | |
| "maximum": 1.0 | |
| }, | |
| "az_deg": { | |
| "type": "number", | |
| "minimum": -180, | |
| "maximum": 180 | |
| }, | |
| "el_deg": { | |
| "type": "number", | |
| "minimum": -45, | |
| "maximum": 90 | |
| }, | |
| "dist_m": { | |
| "type": "number", | |
| "minimum": 0.5, | |
| "maximum": 15.0 | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| } | |
| }, | |
| "additionalProperties": false | |
| } | |
| }, | |
| "constraints_applied": { | |
| "type": "array", | |
| "items": { | |
| "type": "string" | |
| }, | |
| "maxItems": 64 | |
| } | |
| }, | |
| "additionalProperties": false | |
| } |