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
| title: GravityLLM Studio | |
| emoji: π | |
| colorFrom: blue | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 6.8.0 | |
| python_version: "3.10" | |
| app_file: app.py | |
| fullWidth: true | |
| header: default | |
| suggested_hardware: cpu-basic | |
| short_description: Spatial9 immersive scene generation with branded GravityLLM UI, schema validation, and spatial preview. | |
| tags: | |
| - gravityllm | |
| - spatial-audio | |
| - immersive-audio | |
| - spatial9 | |
| - iamf | |
| - gradio | |
| - json | |
| - demo | |
| - music-tech | |
|  | |
| # GravityLLM Studio | |
| A branded Hugging Face Space for **constraint-conditioned immersive scene generation**. | |
| This Space accepts a **music-constraint payload** and returns a **Spatial9Scene JSON** scene. It includes: | |
| - a polished GravityLLM studio UI | |
| - your Spatial9 logo in the hero section | |
| - remote inference through Hugging Face `InferenceClient` | |
| - optional JSON-schema grammar constraints | |
| - built-in validation against `schemas/scene.schema.json` | |
| - a live top-down spatial preview | |
| - a deterministic fallback rules engine so the demo still works before the trained model is online | |
| ## How to connect your model | |
| Set the following Space secrets or variables: | |
| - `GRAVITYLLM_MODEL_ID` β your model repo id, for example `your-org/GravityLLM-AutoPosition` | |
| - `HF_TOKEN` β only required if the model is gated or private | |
| - `GRAVITYLLM_BACKEND` β optional default: `hybrid`, `remote-model`, or `rules-engine demo` | |
| ## Files | |
| - `app.py` β the Gradio app | |
| - `schemas/scene.schema.json` β the contract used for validation and optional grammar guidance | |
| - `examples/` β ready-to-run sample payloads | |
| - `assets/` β logo and banner assets | |
| - `utils/scene_tools.py` β validation, heuristics, JSON extraction, plotting | |
| ## Recommended workflow | |
| 1. Upload your GravityLLM **Model repo** | |
| 2. Train and push the final weights | |
| 3. Upload this **Space repo** | |
| 4. Set `GRAVITYLLM_MODEL_ID` | |
| 5. Launch the Space | |
| ## Notes | |
| This Space is designed to be usable in two states: | |
| - **before model launch** β rules-engine fallback | |
| - **after model launch** β remote GravityLLM inference | |