--- license: apache-2.0 library_name: diffusers pipeline_tag: text-to-video base_model: robbyant/lingbot-video-dense-1.3b tags: - lingbot-video - sdnq - uint4 - text-to-video --- # LingBot Video Dense 1.3B SDNQ UINT4 Static This is a complete, loadable derivative of [robbyant/lingbot-video-dense-1.3b](https://huggingface.co/robbyant/lingbot-video-dense-1.3b) with the diffusion transformer stored using static SDNQ UINT4 weights. It is tied to source model revision `f9789a7d9b4772a47aba62d4eb5282ddefd1da21`, LingBot Video code `a2bb04b78edd848500dc27a26e035a95442ae186`, and SDNQ `d841c383ff7be38728d4df829e17af4f15d4fd66` (`v0.2.1-17-gd841c38`). Text encoder, tokenizer/processor, scheduler, and VAE remain at their upstream precision. Convolutions and embeddings are not quantized. The recipe is `uint4-static-transformer-only-with-3d-expert-adapter`: `weights_dtype=uint4`, auto group size (`group_size=0`), no dynamic quantization, SVD, Hadamard transform, convolution quantization, or embedding quantization. ## Coverage Coverage is calculated from the original parameter inventory, not from model-file sizes. | Component | Total logical params | Quantized params | Original parameter bytes covered | Packed storage | Packed grouped experts | | --- | ---: | ---: | ---: | ---: | --- | | `transformer` | 1,357,171,264 | 97.1278% | 94.4287% | 0.69 GiB | n/a | This Dense checkpoint has no grouped-expert tensors. Exact module-level coverage and unquantized tensors are in [`quantization_manifest.json`](quantization_manifest.json) and [`benchmark/coverage`](benchmark/coverage/). ## Reproducible base benchmark All five pairs use identical prompts, negative prompt, seeds 4201-4205, scheduler inputs, 832x480 dimensions, 73 frames, 24 fps, 40 steps, guidance 3.0, shift 3.0, `batch_cfg=False`, and `null_cond_clone_zero=False`. Resources were sampled every 250 ms from `/proc`, `psutil`, and `nvidia-smi`. | Variant | Load (s) | Cold generation (s) | Hot mean (s) | Peak VRAM (MiB) | Peak Torch allocated (MiB) | Process RSS (GiB) | System RAM used (GiB) | | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | | Original BF16 | 40.39 | 59.35 | 58.64 | 27122 | 20698 | 2.80 | 85.31 | | SDNQ UINT4 | 36.70 | 59.92 | 59.22 | 24674 | 18888 | 2.83 | 135.90 | Observed base peak-VRAM reduction: **9.03%**. Timing and memory are measurements on the environment recorded in [`benchmark/environment`](benchmark/environment/), not universal performance claims. Frame-aligned aggregate quality across the five pairs: MAE `0.082366`, RMSE `0.131955`, PSNR `18.048 dB`, SSIM `0.618208`, LPIPS-Alex `0.390647`. ![Original versus SDNQ comparison](assets/comparison/base/original_vs_sdnq_overview.webp) The complete contact sheets and side-by-side MP4s are under [`assets/comparison/base`](assets/comparison/base/). Quantized sample MP4s are under [`samples/base`](samples/base/). Raw per-prompt CSV/JSONL, resource samples, commands, ffprobe records, output sizes, and SHA-256 values are under [`benchmark`](benchmark/). ## Installation and load Use the exact pinned dependencies shipped with the repository: ```bash git clone https://huggingface.co/WaveCut/LingBot-Video-Dense-1.3B-SDNQ-uint4-static cd LingBot-Video-Dense-1.3B-SDNQ-uint4-static python -m pip install -r runtime-requirements.txt ``` The repository includes the runtime adapter; no unmerged LingBot branch or local hidden file is needed: ```python import sys from huggingface_hub import snapshot_download root = snapshot_download("WaveCut/LingBot-Video-Dense-1.3B-SDNQ-uint4-static") sys.path.insert(0, root) from lingbot_sdnq_runtime import load_pipeline pipe = load_pipeline(root, device="cuda") # For the MoE refiner: load_pipeline(root, transformer_subfolder="refiner", device="cuda") ``` See [`prompts.json`](prompts.json) for the exact A/B inputs and [`benchmark/summary.json`](benchmark/summary.json) for portable metrics. Recorded consumer/offload smoke artifacts: `benchmark/smokes/dense-sdnq-model.json`, `benchmark/smokes/dense-sdnq-model.mp4`, `benchmark/smokes/dense-sdnq-sequential.json`, `benchmark/smokes/dense-sdnq-sequential.mp4`, `benchmark/smokes/dense-sdnq-standard.json`, `benchmark/smokes/dense-sdnq-standard.mp4`. ## Runtime behavior and limitations - Generic SDNQ Linear layers use eager BF16 dequantization followed by `F.linear` in the tested Torch 2.8/CUDA 12.8 environment because the current SDNQ Triton quantized-matmul path is incompatible there. - Packed MoE experts are dequantized for each expert call and executed by the pinned SGLang Triton fused-MoE path. The adapter does not keep a persistent BF16 expert-weight cache. - Static UINT4 materially changes generated pixels. Inspect the published matrices and per-prompt metrics before choosing this derivative for quality-sensitive work. - Peak residency and speed depend strongly on resolution, frame count, attention backend, offload mode, and GPU. The numbers above describe the exact recorded B200 run only. - The Apache-2.0 upstream license is retained. Users remain responsible for evaluating generated content for their application. ## Evidence map - [`quantization_manifest.json`](quantization_manifest.json): recipe, revisions, per-component and expert coverage. - [`prompts.json`](prompts.json): exact structured prompts, negative prompt, seeds, and generation settings. - [`benchmark/summary.json`](benchmark/summary.json): portable aggregate benchmark record. - [`benchmark/base`](benchmark/base/): unmodified original and SDNQ raw metrics and resource samples. - [`benchmark/comparison`](benchmark/comparison/): frame-aligned MAE/RMSE/PSNR/SSIM/LPIPS records. - [`SHA256SUMS`](SHA256SUMS): hashes for all published files, including model shards.