Downloads · 30 days
16
53% of all-time downloads
np-cr/Cosmos3-Nano-Policy-DROID-FP8
Cosmos3-Nano-Policy-DROID-FP8 is a robotics model from np-cr. Use it for the robotics task on the model card, and read the license before you ship it in a product. It is set up for cosmos. The card lists the license as other.
FP8 checkpoint of nvidia/Cosmos3-Nano-Policy-DROID (revision 805c0d6d46196ecdc789213a6de72303c383895b) in the layout NVIDIA publishes for nvidia/Cosmos3-Nano@fp8. NVIDIA publishes no FP8 build of the policy model. Thi…
Downloads · 30 days
16
53% of all-time downloads
All-time downloads
30
Public
Parameters
15.7B
19 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors19 GB · 100%
How the weights are stored.
F8_E4M313.9B · 88%
From the Hugging Face model README
FP8 checkpoint of nvidia/Cosmos3-Nano-Policy-DROID
(revision 805c0d6d46196ecdc789213a6de72303c383895b) in the layout NVIDIA publishes for
nvidia/Cosmos3-Nano@fp8. NVIDIA publishes no FP8 build
of the policy model. This one was produced with np-quantizer-v2 (Nota) and checked against NVIDIA's own
checkpoint and NVIDIA's own quantization pipeline.
| Quantized | 504 Linear layers: q/k/v/o attention and gate/up/down MLP projections of both towers (understanding and generation) in all 36 decoder layers |
| Weights | FP8 E4M3, one scale per tensor, weight_scale = max(abs(w)) / 448 |
| Activations | FP8 E4M3, one static scale per tensor, input_scale = max(abs(x)) / 448 over 256 transformer calls captured from NVIDIA's policy server on DROID observations |
| Kept in BF16 | proj_in, proj_out, time_embedder, action_proj_in, action_proj_out, lm_head, the vision encoder, embeddings and norms (NVIDIA's ignore list) |
| Format | ModelOpt 0.44 FP8 (quant_method: modelopt, quant_type: FP8_FP8): float8 weight, float32 weight_scale / input_scale, ModelOpt quantizer buffers, modelopt_state.pth for the transformer and the root, and NVIDIA's vLLM-Omni diffusion_step_policy |
| Check | Result |
|---|---|
Files, tensor names, dtypes and shapes vs nvidia/Cosmos3-Nano@fp8 | Identical: 3329 common tensors, 0 dtype or shape differences. NVIDIA-only: its docs, images and .gitattributes, and the base model's audio branch (5 tensors, sound_tokenizer/). Ours-only: 5 np-quantizer-v2 sidecars in transformer/ |
transformer/config.json quantization_config, root hf_quant_config.json | Identical to NVIDIA's |
modelopt_state.pth, transformer and root | Same configurations; 1527/509/504 and 1478/253/252 (quantizer / real-quantizer / q-tensor) common entries, 0 differ. NVIDIA's has 6 quantizers more, for its two audio projections |
np-quantizer-v2's weight path on the base nvidia/Cosmos3-Nano bf16 release | Reproduces all 504 FP8 Linears of nvidia/Cosmos3-Nano@fp8 bit for bit: 13,891,534,848 FP8 codes (0 differ), weight_scale, _amax, _scale |
NVIDIA's pipeline (ModelOpt 0.44, cookbook config, the same 256 calibration calls, mtq.compress + ModelOpt export) on this model | Equal to this checkpoint in all 504 Linears: FP8 codes (0 of 13,891,534,848 differ), weight_scale, input_scale and the three quantizer buffers |
diffusers 0.40 + ModelOpt 0.44 restore (mto.enable_huggingface_checkpointing) | Fails the same way for this checkpoint and for nvidia/Cosmos3-Nano@fp8: diffusers replaces the restored QTensorWrapper weight with a plain FP8 Parameter, and the forward raises. Not a usable path on these versions |
Reports: verification/.
Action chunks (32 steps x 7 joint positions + gripper) of the FP8 model against the BF16 release, on 32 DROID observations at matched inputs and sampling seeds. sigma is the DROID action standard deviation. Intervals resample the observations (10,000 bootstrap resamples); the gripper interval is Wilson's.
| Comparison | Path | N | overall (sigma) [95% CI] | x eager-vs-compile | x seed spread | joint MAE (deg) [95% CI] | worst joint (deg) | bias (sigma) / dims | SNR (dB) | r | gripper agree [95% CI] |
|---|---|---|---|---|---|---|---|---|---|---|---|
| FP8 checkpoint (this repo) vs BF16 original | NVIDIA policy server, FP8 GEMM, same seeds | 32 | 0.127 [0.095, 0.156] | 0.98 | 0.32 | 2.28 [1.74, 2.91] | 3.52 | 0.028 / 1 of 8 | 17.4 | 0.9988 | 98.83% [97.96, 99.33] |
| Fake quant of the same checkpoint vs BF16 original | fakequant_loader, offline replay, same seeds and noise | 32 | 0.097 [0.079, 0.116] | 0.75 | 0.25 | 1.89 [1.56, 2.26] | 2.74 | 0.027 / 1 of 8 | 19.7 | 0.9993 | 99.12% [98.34, 99.54] |
| FP8 build with single rounding vs BF16 original | NVIDIA policy server, FP8 GEMM, same seeds | 32 | 0.121 [0.097, 0.143] | 0.93 | 0.31 | 2.31 [1.85, 2.82] | 3.59 | 0.039 / 2 of 8 | 17.8 | 0.9989 | 98.83% [97.96, 99.33] |
| ModelOpt-rounded vs single-rounded FP8 build | NVIDIA policy server, both FP8 | 32 | 0.123 [0.091, 0.154] | 0.94 | 0.31 | 2.28 [1.80, 2.84] | 3.45 | 0.028 / 1 of 8 | 17.6 | 0.9988 | 99.61% [99.00, 99.85] |
| BF16 eager vs BF16 torch.compile (yardstick) | policy server, same seeds | 16 | 0.130 [0.079, 0.175] | 1.00 | 0.33 | 2.37 [1.67, 3.19] | 3.90 | 0.086 / 2 of 8 | 15.2 | 0.9986 | 100.00% [99.26, 100.00] |
| BF16 seed vs BF16 other seed (yardstick) | policy server, 4 obs x 4 seeds | 24 | 0.392 [0.306, 0.474] | 3.02 | 1.00 | 8.04 [6.47, 9.76] | 12.47 | 0.149 / 3 of 8 | 5.5 | 0.9864 | 100.00% [99.50, 100.00] |
(a_candidate - a_original) / sigma over every step and dimension.torch.compile (NVIDIA's served default), once with another sampling seed.Reading:
이 저장소는 아래 표의 RTN (전달) 행입니다. (전달)이 붙은 세 build가 HF에 올린 저장소입니다.
| 표의 build | 저장소 |
|---|---|
| RTN (전달) | np-cr-test/Cosmos3-Nano-Policy-DROID-FP8 |
| SQ auto-α (전달) | np-cr-test/Cosmos3-Nano-Policy-DROID-FP8-SmoothQuant |
| RTN + 이동평균 observer 0.01 (전달) | np-cr-test/Cosmos3-Nano-Policy-DROID-FP8-RTN-MovingAvgObserver |
| 항목 | 값 |
|---|---|
| 양자화 대상 | transformer의 Linear 504개 (두 tower × 36 layer × q/k/v/o, gate/up/down). 스킵 목록은 위 Scheme 표 |
| scheme | FP8 E4M3 W8A8, weight per-tensor, activation per-tensor static (nvidia/Cosmos3-Nano@fp8과 같음) |
| export | MODELOPT_FP8, NVIDIA diffusers 레이아웃 |
| 알고리즘 데이터 | 관측당 transformer 호출 1개씩, 32개 |
| activation calibration | NVIDIA 정책 서버 호출 256개 (관측 32 × denoising 4 step × CFG 2) |
| 알고리즘 파라미터 | AQ 기본값. 바꾼 값은 build 이름에 적음 (SQ = SmoothQuant) |
| 평가 관측 | DROID 32개. calibration과 같은 관측이라 in-sample |
| 오차 지표 | overall: 정규화 action RMS (DROID action σ 단위). 판정 변화: 32 관측 × 32 step 중 gripper open/closed 판정이 BF16과 다른 step 수 |
| 통계 | 관측 단위 bootstrap 10,000회. RTN과의 차이는 같은 resample로 짝지어 계산 |
| gate | overall ≤ 0.13σ, 판정 변화 ≤ 0.5% (≤ 5/1024) |
| 참고 크기 | BF16 eager vs torch.compile 0.130σ, BF16 시드만 바꿀 때 0.392σ |
| 평가 경로 | 실행 | 기준 | 대상 |
|---|---|---|---|
| fake quant | FP8 코드를 dequantize한 가중치 + 입력 FP8 quantize-dequantize (AQ FAKE_QUANT 평가와 비트 동일) | FP adapter의 BF16 출력 | 22개 전부 |
| 서빙 | NVIDIA cosmos-framework 정책 서버, TorchAO FP8 커널 (2 × RTX 4090, FSDP2 + CFG 병렬) | 같은 서버의 BF16 출력 | 5개 |
전달본 3개와, 전달 후 추가한 NVIDIA 형식 build 8개 중 fake quant 오차가 가장 낮은 SQ auto-α + GPTQ, 판정 변화가 가장 적은 SQ auto-α + AutoRound를 서빙했습니다. 다섯 build 모두 서버가 FP8 가중치 504/504개를 TorchAO로 로드했습니다.
| build | 서빙 σ [95% CI] | 서빙 RTN 대비 [95% CI] | 서빙 판정 변화 | fake quant σ | fake quant 판정 변화 | gate (fake quant / 서빙) |
|---|---|---|---|---|---|---|
| RTN (전달) | 0.127 [0.095, 0.156] | - | 12 | 0.097 | 9 | 초과 / 초과 |
| RTN + 이동평균 observer 0.01 (전달) | 0.099 [0.083, 0.117] | -0.028 [-0.051, -0.004] | 7 | 0.105 | 4 | 통과 / 초과 |
| SQ auto-α + GPTQ | 0.104 [0.082, 0.127] | -0.023 [-0.049, +0.003] | 8 | 0.098 | 8 | 초과 / 초과 |
| SQ auto-α (전달) | 0.106 [0.079, 0.137] | -0.021 [-0.047, +0.005] | 4 | 0.100 | 4 | 통과 / 통과 |
| SQ auto-α + AutoRound | 0.116 [0.084, 0.149] | -0.011 [-0.034, +0.010] | 5 | 0.109 | 2 | 통과 / 통과 |
차이가 어디서 나오는지 관측별로 나눠 봤습니다.
| build | 서빙 RTN 대비 | RTN 대비 차이를 가장 키운 관측 2개 | 그 2개를 뺀 RTN 대비 |
|---|---|---|---|
| RTN + 이동평균 observer 0.01 (전달) | -0.028 | 28, 2 | -0.012 |
| SQ auto-α (전달) | -0.021 | 5, 28 | -0.006 |
| SQ auto-α + GPTQ | -0.023 | 5, 28 | -0.005 |
| SQ auto-α + AutoRound | -0.011 | 28, 8 | -0.000 |
| 순위 | build | σ [95% CI] | RTN 대비 [95% CI] | 판정 변화 /1024 |
|---|---|---|---|---|
| 1 | RTN (전달) | 0.097 [0.079, 0.116] | - | 9 |
| 2 | SQ auto-α + GPTQ | 0.098 [0.078, 0.120] | +0.001 [-0.022, +0.025] | 8 |
| 3 | SQ auto-α (전달) | 0.100 [0.078, 0.122] | +0.002 [-0.023, +0.028] | 4 |
| 4 | SQ auto-α, norm-FC 쌍만 | 0.103 [0.078, 0.131] | +0.006 [-0.021, +0.035] | 8 |
| 5 | SQ α=0.5 | 0.103 [0.075, 0.136] | +0.006 [-0.024, +0.040] | 12 |
| 6 | RTN + 이동평균 observer 0.05 | 0.104 [0.082, 0.127] | +0.007 [-0.014, +0.031] | 9 |
| 7 | RTN + 이동평균 observer 0.01 (전달) | 0.105 [0.080, 0.131] | +0.008 [-0.016, +0.033] | 4 |
| 8 | GPTQ | 0.106 [0.078, 0.133] | +0.009 [-0.020, +0.037] | 7 |
| 9 | SQ α=0.3 | 0.108 [0.084, 0.132] | +0.011 [-0.009, +0.033] | 7 |
| 10 | SQ auto-α + AutoRound | 0.109 [0.082, 0.136] | +0.012 [-0.010, +0.036] | 2 |
| 11 | AWQ + GPTQ | 0.111 [0.085, 0.136] | +0.014 [-0.006, +0.037] | 12 |
| 12 | SQ auto-α + 이동평균 observer 0.01 | 0.119 [0.087, 0.152] | +0.022 [-0.012, +0.057] | 7 |
| 13 | AutoRound | 0.121 [0.083, 0.160] | +0.024 [-0.015, +0.065] | 8 |
| 14 | RTN + RANGE_SHRINK | 0.132 [0.095, 0.166] | +0.035 [+0.001, +0.068] | 21 |
| 15 | AWQ | 0.135 [0.092, 0.175] | +0.038 [-0.003, +0.077] | 9 |
| 16 | RTN + HISTOGRAM observer | 0.212 [0.185, 0.240] | +0.115 [+0.085, +0.143] | 17 |
Scale shape torch.Size([1, 1]) is incompatible with input shape torch.Size([4096, 1])로 실패합니다.RTN 대비 차이는 NVIDIA 형식 RTN(per-tensor)과 비교한 값입니다.
| 순위 | build | σ [95% CI] | RTN 대비 [95% CI] | 판정 변화 /1024 |
|---|---|---|---|---|
| 1 | SQ auto-α + GPTQ | 0.088 [0.066, 0.115] | -0.009 [-0.037, +0.021] | 7 |
| 2 | RTN | 0.090 [0.069, 0.112] | -0.008 [-0.019, +0.003] | 8 |
| 3 | AutoRound | 0.091 [0.073, 0.108] | -0.006 [-0.026, +0.012] | 8 |
| 4 | GPTQ | 0.095 [0.067, 0.128] | -0.002 [-0.032, +0.033] | 4 |
| 5 | AWQ | 0.096 [0.076, 0.114] | -0.002 [-0.014, +0.011] | 5 |
| 6 | SQ auto-α | 0.103 [0.078, 0.128] | +0.006 [-0.014, +0.027] | 17 |
이 계열은 두 가지 이유로 지금 형식으로는 전달할 수 없습니다.
apply_modelopt_fp8_checkpoint_inplace)는 두 scale을 (1, 1)로 읽어 PerTensor()로만 설치합니다.quantization.method=fp8, fp8_granularity=per_row)에만 있습니다. 이 경로는 BF16 가중치를 로드할 때 RTN으로 양자화하므로, AQ 알고리즘 결과를 담을 수 없습니다.| 항목 | 내용 |
|---|---|
| 전달본 | RTN, SQ auto-α, 이동평균 observer 유지. 두 경로 모두 gate를 통과한 전달본은 SQ auto-α뿐이고, RTN은 NVIDIA와 비트 동일한 기준으로 둠 |
| SQ auto-α + AutoRound | 두 경로 모두 gate 통과. 하지만 SQ auto-α보다 오차가 낮지 않아 추가하지 않음. 가중치는 SQ auto-α와 같음(AutoRound는 FP8을 튜닝하지 않음) |
| SQ auto-α + GPTQ | 두 경로 모두 판정 변화 8로 gate 초과 |
| 순위 확정에 필요한 것 | calibration과 lab이 겹치지 않는 관측으로 다시 평가. /workspace/cosmos3-policy-quant/splits/splits.json(내부 서버)의 selection_validation(AUTOLab, IPRL, PennPAL, RPL)을 쓰면 됨. 지금 32개는 전부 calibration lab(TRI, CLVR, IRIS, ILIAD, RAD) 소속 |
cosmos3-algo-sweep(미푸시)에서 했습니다. 커밋은 a3a1b56c4(게이트), ea30283f3(GPTQ per-tensor 검사), 8cdadc414(scale shape)입니다.| 항목 | 위치 (/workspace/cosmos3-policy-quant/) |
|---|---|
| config | fq/configs/algo/*.yaml, fq/configs/algo3/*.yaml |
| 실행 스크립트 | fq/algo_sweep*_run.sh, fq/algo_served4_*_run.sh |
| 순위표 | fq/rank_all.sh → fq/eval/sweep_all.md, fq/rank_served.sh → fq/eval/served_all.md |
| 평가 하네스 | harness/fakequant_loader.py, eval_fakequant.py, server_fidelity.py, stats_table.py, sweep_table.py |
The first row of the table was served by cosmos-framework's RoboLab action policy server (in process, 2 x RTX 4090,
FSDP2 dp_shard_size=2, cfgp_size=2, eager, guardrails off) with checkpoint_path set to this repository and
mixed_precision_first_steps=0, mixed_precision_last_steps=0, mixed_precision_w8a16_cache="none", the
settings that serve nvidia/Cosmos3-Nano@fp8 W8A8 on every step. On torchao 0.16/0.17 the FP8 path raises inside
torch.inference_mode; generation ran under torch.no_grad instead.
fakequant_loader.py builds the transformer with dequantized weights (code * weight_scale) and a static FP8
quantize-dequantize on each quantized Linear's input, computed as np-quantizer-v2's FAKE_QUANT evaluation computes
it. No ModelOpt or FP8 hardware is needed. On a checkpoint whose dequantized weights equal an np-quantizer-v2
FAKE_QUANT export's, it gives bit-identical actions (8,192 of 8,192 elements); the second row of the table used it.
from fakequant_loader import load_fake_quant_transformer
transformer = load_fake_quant_transformer("transformer", device_map={"": "cuda:0"}) # 16B parameters, BF16
Not run here. quantization_config.runtime.diffusion_step_policy is NVIDIA's (first 3 and last 3 denoising steps
with BF16 activations). With the policy's 4 denoising steps that selects every step, so a runtime that follows it
serves FP8 weights with BF16 activations (W8A16), not the W8A8 measured above.
transformer/serving_manifest.json reads supported: false: it is np-quantizer-v2's verdict for its own LM/VLM
vLLM route, not a statement about vLLM-Omni or NVIDIA's server.| Source | nvidia/Cosmos3-Nano-Policy-DROID@805c0d6d46196ecdc789213a6de72303c383895b (BF16) |
| Quantizer | np-quantizer-v2 commit 411651222 (integration branch, not yet merged), MODELOPT_FP8 export in the diffusers layout, RTN weights, MINMAX static activations |
| ModelOpt state files | nvidia-modelopt 0.44.0 |
| Reference for the layout | nvidia/Cosmos3-Nano@fp8 (1af44289002ad8afe2567dd85e34fe5dea21e523) |
The weights are a quantized derivative of nvidia/Cosmos3-Nano-Policy-DROID and are distributed under the same
OpenMDW License 1.1. See NVIDIA's model card for the model's intended use,
limitations and safety information.