Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Roblox/cube3d-v0.5
|
| 3 |
+
tags:
|
| 4 |
+
- 3d-generation
|
| 5 |
+
- text-to-3d
|
| 6 |
+
- quantized
|
| 7 |
+
- int4
|
| 8 |
+
- torchao
|
| 9 |
+
- rtn
|
| 10 |
+
license: apache-2.0
|
| 11 |
+
library_name: torchao
|
| 12 |
+
pipeline_tag: text-to-3d
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Cube3D v0.5 — RTN W4A16 INT4 (torchao)
|
| 16 |
+
|
| 17 |
+
Post-training quantized version of [Roblox/cube3d-v0.5](https://huggingface.co/Roblox/cube3d-v0.5), a text-to-3D mesh generative model.
|
| 18 |
+
Quantization method: **RTN W4A16**, group_size=128, via [torchao](https://github.com/pytorch/ao) `int4_weight_only`.
|
| 19 |
+
|
| 20 |
+
## What's in this repo
|
| 21 |
+
|
| 22 |
+
| File | Size | Description |
|
| 23 |
+
|------|------|-------------|
|
| 24 |
+
| `shape_gpt_rtn_int4_g128.pt` | 1.26 GB | INT4 quantized GPT weights (torchao pickle) |
|
| 25 |
+
| `shape_tokenizer.safetensors` | ~1.10 GB | VQ-VAE decoder — BF16, unchanged from base model |
|
| 26 |
+
| `open_model_v0.5.yaml` | tiny | Model architecture config |
|
| 27 |
+
| `quant_config.json` | tiny | Quantization metadata |
|
| 28 |
+
|
| 29 |
+
The BF16 GPT weights (`shape_gpt.safetensors`) are **not** included here — they live in the parent repo and are only needed to reconstruct the model skeleton for loading.
|
| 30 |
+
|
| 31 |
+
## Benchmark (NVIDIA A100-SXM4-40GB, 15-categories)
|
| 32 |
+
|
| 33 |
+
| Config | Mean latency | Peak VRAM | Setup time |
|
| 34 |
+
|--------|-------------|-----------|------------|
|
| 35 |
+
| BF16 + Engine (baseline) | 90.9 s | 21.7 GB | 19.4 s |
|
| 36 |
+
| BF16 + EngineFast | 15.0 s | 25.4 GB | 206.9 s |
|
| 37 |
+
| **INT4 + EngineFast** | **14.2 s (84%↓)** | **14.3 GB (44%↓)** | **25.1 s (88%↓)** |
|
| 38 |
+
|
| 39 |
+
INT4 EngineFast vs BF16 Engine: **84% faster inference**, **44% less peak VRAM**, **88% faster loading**.
|
| 40 |
+
|
| 41 |
+
## Shape quality (Chamfer Distance, 15 categories, 170 prompts)
|
| 42 |
+
|
| 43 |
+
Median CD: 67.9 × 10⁻³
|
| 44 |
+
|
| 45 |
+
Best categories: `vehicle_land` (41.4), `geometric_primitive` (46.5), `animal_wild` (53.8).
|
| 46 |
+
Hardest categories: `symmetry_topology` (205.8), `abstract_mathematical` (167.9) — high variance: INT4 rounding hurts topologically complex shapes.
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
| Category | Mean | Std | n |
|
| 50 |
+
|---|---:|---:|---:|
|
| 51 |
+
**Easy** (CD × 10⁻³ < 75)
|
| 52 |
+
| vehicle_land | 41.4 | 21.1 | 10 |
|
| 53 |
+
| geometric_primitive | 46.5 | 25.8 | 10 |
|
| 54 |
+
| animal_wild | 53.8 | 21.2 | 10 |
|
| 55 |
+
| animal_domestic | 56.5 | 21.2 | 10 |
|
| 56 |
+
| tool_hardware | 66.7 | 44.7 | 10 |
|
| 57 |
+
| furniture | 70.4 | 34.2 | 10 |
|
| 58 |
+
| musical_instrument | 72.5 | 45.7 | 10 |
|
| 59 |
+
**Medium** (CD × 10⁻³ 75–100)
|
| 60 |
+
| vehicle_air_water | 75.3 | 36.1 | 10 |
|
| 61 |
+
| fine_detail | 79.2 | 54.8 | 10 |
|
| 62 |
+
| visualization_stylized | 85.0 | 46.8 | 30 |
|
| 63 |
+
| electronics | 92.2 | 50.1 | 10 |
|
| 64 |
+
| architecture | 92.8 | 50.0 | 10 |
|
| 65 |
+
| nature_plant | 98.2 | 44.0 | 10 |
|
| 66 |
+
**Complex** (CD × 10⁻³ > 100)
|
| 67 |
+
| abstract_mathematical | 167.9 | 165.1 | 10 |
|
| 68 |
+
| symmetry_topology | 205.8 | 242.7 | 10 |
|
| 69 |
+
|
| 70 |
+
## Requirements
|
| 71 |
+
|
| 72 |
+
```
|
| 73 |
+
torch==2.10.0+cu128
|
| 74 |
+
torchvision==0.25.0+cu128
|
| 75 |
+
torchaudio==2.10.0
|
| 76 |
+
torchao==0.10.0
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
The `.pt` file is a torchao pickle — loading requires `torchao` to be installed. This is not optional.
|
| 80 |
+
|
| 81 |
+
## Usage
|
| 82 |
+
Please see the Google Colab tutorial.
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
## Quantization details
|
| 86 |
+
|
| 87 |
+
- **Method**: Round-to-nearest (RTN)
|
| 88 |
+
- **Precision**: W4A16 - weights INT4, activations BF16
|
| 89 |
+
- **Quantized INT4 layers**: 279 / 282
|
| 90 |
+
- **Skipped layers**: `shape_proj` (in_features=16, < group size), `lm_head` (out=4099, output head), `bbox_proj`
|
| 91 |
+
- **Torchao Quantization Group size**: 128
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
## Citation
|
| 95 |
+
```bibtex
|
| 96 |
+
@article{roblox2025cube,
|
| 97 |
+
title={Cube: A Roblox View of 3D Intelligence},
|
| 98 |
+
author={Roblox},
|
| 99 |
+
journal={arXiv preprint arXiv:2503.15475},
|
| 100 |
+
year={2025}
|
| 101 |
+
}
|
| 102 |
+
```
|