LeanQuant commited on
Commit
a5747bf
·
verified ·
1 Parent(s): 2532805

Add files using upload-large-folder tool

Browse files
README.md ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model:
3
+ - OmniGen2/OmniGen2
4
+ base_model_relation: quantized
5
+ pipeline_tag: any-to-any
6
+ tags:
7
+ - dfloat11
8
+ - df11
9
+ - lossless compression
10
+ - 70% size, 100% accuracy
11
+ ---
12
+
13
+ # DFloat11 Compressed Model: `OmniGen2/OmniGen2` Transformer
14
+
15
+ This is a **DFloat11 losslessly compressed** version of the original `OmniGen2/OmniGen2` model. It reduces model size by **32%** compared to the original BFloat16 model, while maintaining **bit-identical outputs** and supporting **efficient GPU inference**.
16
+
17
+ ### 📊 Performance Comparison
18
+
19
+ | Metric | OmniGen2 (BFloat16) | OmniGen2 (DFloat11) |
20
+ | ----------------------------------------------- | ------------------- | ------------------- |
21
+ | Model Size | 16.23 GB | 11.11 GB |
22
+ | Peak GPU Memory<br>(1024×1024 image generation) | 18.41 GB | 14.36 GB |
23
+ | Generation Time<br>(A100 GPU) | 25 seconds | 27 seconds |
24
+
25
+ ### 🔧 How to Use
26
+
27
+ A complete usage guide is available in our GitHub repository (forked from the official OmniGen2 repository).
28
+
29
+ 👉 [https://github.com/LeanModels/OmniGen2-DFloat11](https://github.com/LeanModels/OmniGen2-DFloat11) 👈
30
+
31
+ ### 🔍 How It Works
32
+
33
+ We apply **Huffman coding** to losslessly compress the exponent bits of BFloat16 model weights, which are highly compressible (their 8 bits carry only ~2.6 bits of actual information). To enable fast inference, we implement a highly efficient CUDA kernel that performs on-the-fly weight decompression directly on the GPU.
34
+
35
+ The result is a model that is **~32% smaller**, delivers **bit-identical outputs**, and achieves performance **comparable to the original** BFloat16 model.
36
+
37
+ Learn more in our [research paper](https://arxiv.org/abs/2504.11651).
38
+
39
+ ### 📄 Learn More
40
+
41
+ * **Paper**: [70% Size, 100% Accuracy: Lossless LLM Compression for Efficient GPU Inference via Dynamic-Length Float](https://arxiv.org/abs/2504.11651)
42
+ * **GitHub**: [https://github.com/LeanModels/DFloat11](https://github.com/LeanModels/DFloat11)
43
+ * **HuggingFace**: [https://huggingface.co/DFloat11](https://huggingface.co/DFloat11)
config.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "dfloat11_config": {
3
+ "bytes_per_thread": 8,
4
+ "pattern_dict": {
5
+ "noise_refiner\\.\\d+": [
6
+ "attn.to_q",
7
+ "attn.to_k",
8
+ "attn.to_v",
9
+ "attn.to_out.0",
10
+ "feed_forward.linear_1",
11
+ "feed_forward.linear_2",
12
+ "feed_forward.linear_3",
13
+ "norm1.linear"
14
+ ],
15
+ "ref_image_refiner\\.\\d+": [
16
+ "attn.to_q",
17
+ "attn.to_k",
18
+ "attn.to_v",
19
+ "attn.to_out.0",
20
+ "feed_forward.linear_1",
21
+ "feed_forward.linear_2",
22
+ "feed_forward.linear_3",
23
+ "norm1.linear"
24
+ ],
25
+ "context_refiner\\.\\d+": [
26
+ "attn.to_q",
27
+ "attn.to_k",
28
+ "attn.to_v",
29
+ "attn.to_out.0",
30
+ "feed_forward.linear_1",
31
+ "feed_forward.linear_2",
32
+ "feed_forward.linear_3"
33
+ ],
34
+ "layers\\.\\d+": [
35
+ "attn.to_q",
36
+ "attn.to_k",
37
+ "attn.to_v",
38
+ "attn.to_out.0",
39
+ "feed_forward.linear_1",
40
+ "feed_forward.linear_2",
41
+ "feed_forward.linear_3",
42
+ "norm1.linear"
43
+ ]
44
+ },
45
+ "threads_per_block": [
46
+ 512
47
+ ],
48
+ "version": "0.2.0"
49
+ },
50
+ "model_type": "qwen2_5_vl"
51
+ }
context_refiner_0.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6dd224665cdc0a3c09711881f117767adfbeb40173b1acc80ed5df64e9d8ab5f
3
+ size 127419527
context_refiner_1.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3e0dc953d4a1a2318a35f7153a5d1f19d4103f2f8f903beddb982fa5f871f221
3
+ size 127447903
diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:831a7da82e68b23a8ee03309eb990666928d06ac69784599a057fe902b546c98
3
+ size 19127376
layers_0.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e36a751c0172e8a235ef245e5762fdb5470a9f05e9e1a9f08c843fb608c8dbe5
3
+ size 142820420
layers_1.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6bf226e341b55cabecdc3e1451dc88a9d49cd24fb4ea8d71d3981c0ca9e942ec
3
+ size 142260578
layers_10.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:25eda293ef4d237f8fac3587bb86f5bfa7948b93dd195a9d1be11c95a29b72eb
3
+ size 142357632
layers_11.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27bc99d50df4e4cf9999ba0aa2ba1212651c2c6269ac106215d49e9ea7e5fe26
3
+ size 142242516
layers_12.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6a20de82fd25bebdb0471bf6aab41aed02fc616491ef0ca6dcff97445911346f
3
+ size 142304726
layers_13.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:469b0aef2b99a5b6c4a4b5199d3947d5ce9844a2823a3c4774c60d15af5dab5a
3
+ size 142261740
layers_14.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a570b1c3c750b1eb0d0d0cd904b037b42b5802824ac723a62da67faffc3283df
3
+ size 142337809
layers_15.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ebefbd0292efbc05e00c949e2cca4b895611bf44eb3c919c72a217bbd91c933
3
+ size 142348063
layers_16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4cf29d32bd75fb7e545d81f0b98ec8e8a3f4b4206c7243644da95020a069eca
3
+ size 142387962
layers_17.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6e0e85d3195b4e681cd822001d5106ce4e7684e54bf0c86d96526a787fe7585
3
+ size 142405964
layers_18.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:faeaf2e03e5b0f49e96436776174dd868e44a22fddc0c3b5c16e3b6e6f28fd7e
3
+ size 142459064
layers_19.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29cd715f9a3e887a2cf309017889d9ce7ee4e2209aa76fd0ff373f7d7e6cfbf3
3
+ size 142437785
layers_2.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b4d38c0f44d066d72e9ab8aa992776c051b0264eeddfb1386213add0807b762f
3
+ size 142128788
layers_20.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0db56a0614bcddfdc7e8d4a5cd13ac27514d6dce25633bcc5414ecb1d6e55ca1
3
+ size 142549085
layers_21.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f45e752a0b6ccf394617e9758b66322eef395fc722aa1fa6f93485ae384eb631
3
+ size 142561574
layers_22.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:567b3518e38e091a004b11ab5f865fc73976c156bf4f9d8a9330903fafca0ad3
3
+ size 142633393
layers_23.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76d3c571ad5e842578d931c80faa9254884094f9b02a5c7abbf26f8c1516ba2f
3
+ size 142697478
layers_24.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4faac652df2771945849893f41e77f5fbe3d9cf88a79d23ed9be9f8736d0b7f5
3
+ size 142742762
layers_25.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e4dd9d11da9454affbcf284ffc1126426780eb73bc1bcdf7be7c5e0109112cc
3
+ size 142825095
layers_26.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:808a5f420443e18a3acbbb1640f5e241ce8eacbb9a81cb557d54310ecc82462e
3
+ size 142966045
layers_27.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de36af27aa3d315d2ed364d7e209d26c3f82aa9f26da9a3a174c51baba0bfb65
3
+ size 143206962
layers_28.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fd213476230ccb02ff9e12b41554df7fb6473bba9eec6002a11b84776027349d
3
+ size 143364582
layers_29.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d812fc9b35b3e650572baaa49abb45757b51e8385897c7a521f488fc8c2fdd1
3
+ size 142953296
layers_3.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:22a6f396d83893a1aedbca8b4d2a7cbac241e42813603b2db119ead2ddf7da8e
3
+ size 142111594
layers_30.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:250b4a7001f7fbb9de722874686b92293eee6d2360de7e3c0702ff51ae123d35
3
+ size 142830751
layers_31.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5fed993d72d35719a0fd3d1df43925a299ca9c0dcd67d2d901650bd00a98de5
3
+ size 143581795
layers_4.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1a5770a296dec5e2cdfbcdc4391a81378ef9ac4be79f67f00e7aade0f354e103
3
+ size 142117666
layers_5.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fcd6b32b5db61aa5883ed844cdad5dab3f0e5ef0a0532b664e7bcdbeb2921e5b
3
+ size 142167790
layers_6.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fe6a918f75222c9c5d751003cd0e2744f0be8bf5f0febac8cc0d3b288201a07
3
+ size 142225928
layers_7.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2136806d1a0b366623e884d0cd360d8eff9a9153ca7feb7ade57ca0f1e65556e
3
+ size 141974416
layers_8.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c0297c58e8948d534e0c8604018dcf45ad2f0f1ecd9367e1cb501bce7719ee8
3
+ size 142314448
layers_9.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8db696d798567d6a9a3ba223fc00ba9ab66f077eef881372aef819d58f356204
3
+ size 142356055
noise_refiner_0.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f7ed2d5518567de8b5949f7c11d025dd3fefcdba57675880e02b62ebcedb01f
3
+ size 142931134
noise_refiner_1.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2ed67969b91b6b5b0e32b47694396dbc81bbb1de471e243d2265026b130bb822
3
+ size 142687584
ref_image_refiner_0.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3469815dd57c338bd24b62bb18ac509293d763c2f6ee2a67a6a9fd6992d05930
3
+ size 142876011
ref_image_refiner_1.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fad91b438366dca5283d5e09d43d9eed0f421f2075773b22e4f8829b893e42d8
3
+ size 142536784