compressed-tensors 0.11.1a20250929__tar.gz → 0.12.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/actions/test/action.yml +3 -4
  2. compressed_tensors-0.12.1/.github/workflows/post-release-nightly-build.yml +15 -0
  3. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/test-check.yaml +9 -4
  4. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/test.yml +7 -8
  5. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/trigger-all.yml +18 -4
  6. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/PKG-INFO +1 -1
  7. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/model_compressors/model_compressor.py +49 -0
  8. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/factory/hadamard.py +1 -1
  9. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/factory/matrix_multiply.py +1 -1
  10. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/transform_scheme.py +7 -18
  11. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/version.py +2 -2
  12. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors.egg-info/PKG-INFO +1 -1
  13. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors.egg-info/SOURCES.txt +1 -0
  14. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/model_compressors/test_model_compressor.py +20 -0
  15. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/factory/test_correctness.py +2 -2
  16. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/test_transform_scheme.py +0 -25
  17. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_utils/test_helpers.py +6 -7
  18. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/.gitkeep +0 -0
  19. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/scripts/step-status +0 -0
  20. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/build-test.yml +0 -0
  21. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/build.yml +0 -0
  22. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/quality-check.yaml +0 -0
  23. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/report.yml +0 -0
  24. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.github/workflows/upload.yml +0 -0
  25. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/.gitignore +0 -0
  26. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/LICENSE +0 -0
  27. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/Makefile +0 -0
  28. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/README.md +0 -0
  29. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/bit_packing/ex_quantize_and_pack.py +0 -0
  30. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/bit_packing/int4_config.json +0 -0
  31. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/bitmask_compression.ipynb +0 -0
  32. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/llama_1.1b/ex_config_quantization.py +0 -0
  33. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/llama_1.1b/ex_llmcompressor_quantization.py +0 -0
  34. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/llama_1.1b/example_quant_config.json +0 -0
  35. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/llama_1.1b/example_quant_recipe.yaml +0 -0
  36. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/examples/quantize_and_pack_int4.ipynb +0 -0
  37. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/pyproject.toml +0 -0
  38. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/setup.cfg +0 -0
  39. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/setup.py +0 -0
  40. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/__init__.py +0 -0
  41. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/README.md +0 -0
  42. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/__init__.py +0 -0
  43. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/base.py +0 -0
  44. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/__init__.py +0 -0
  45. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/base.py +0 -0
  46. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/helpers.py +0 -0
  47. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/model_compressors/__init__.py +0 -0
  48. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/quantized_compressors/__init__.py +0 -0
  49. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/quantized_compressors/base.py +0 -0
  50. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/quantized_compressors/naive_quantized.py +0 -0
  51. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/quantized_compressors/nvfp4_quantized.py +0 -0
  52. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/quantized_compressors/pack_quantized.py +0 -0
  53. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_compressors/__init__.py +0 -0
  54. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_compressors/base.py +0 -0
  55. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_compressors/dense.py +0 -0
  56. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_compressors/sparse_24_bitmask.py +0 -0
  57. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_compressors/sparse_bitmask.py +0 -0
  58. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_quantized_compressors/__init__.py +0 -0
  59. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/compressors/sparse_quantized_compressors/marlin_24.py +0 -0
  60. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/config/__init__.py +0 -0
  61. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/config/base.py +0 -0
  62. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/config/dense.py +0 -0
  63. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/config/format.py +0 -0
  64. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/config/sparse_24_bitmask.py +0 -0
  65. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/config/sparse_bitmask.py +0 -0
  66. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/linear/__init__.py +0 -0
  67. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/linear/compressed_linear.py +0 -0
  68. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/logger.py +0 -0
  69. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/__init__.py +0 -0
  70. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/lifecycle/__init__.py +0 -0
  71. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/lifecycle/apply.py +0 -0
  72. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/lifecycle/compressed.py +0 -0
  73. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/lifecycle/forward.py +0 -0
  74. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/lifecycle/helpers.py +0 -0
  75. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/lifecycle/initialize.py +0 -0
  76. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/quant_args.py +0 -0
  77. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/quant_config.py +0 -0
  78. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/quant_metadata.py +0 -0
  79. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/quant_scheme.py +0 -0
  80. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/utils/__init__.py +0 -0
  81. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/quantization/utils/helpers.py +0 -0
  82. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/registry/__init__.py +0 -0
  83. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/registry/registry.py +0 -0
  84. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/__init__.py +0 -0
  85. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/apply.py +0 -0
  86. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/factory/__init__.py +0 -0
  87. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/factory/base.py +0 -0
  88. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/factory/random_hadamard.py +0 -0
  89. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/transform_args.py +0 -0
  90. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/transform_config.py +0 -0
  91. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/utils/__init__.py +0 -0
  92. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/utils/hadamard.py +0 -0
  93. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/utils/hadamards.safetensors +0 -0
  94. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/transform/utils/matrix.py +0 -0
  95. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/__init__.py +0 -0
  96. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/helpers.py +0 -0
  97. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/internal.py +0 -0
  98. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/match.py +0 -0
  99. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/offload.py +0 -0
  100. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/permutations_24.py +0 -0
  101. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/permute.py +0 -0
  102. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/safetensors_load.py +0 -0
  103. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/semi_structured_conversions.py +0 -0
  104. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors/utils/type.py +0 -0
  105. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors.egg-info/dependency_links.txt +0 -0
  106. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors.egg-info/requires.txt +0 -0
  107. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/src/compressed_tensors.egg-info/top_level.txt +0 -0
  108. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/__init__.py +0 -0
  109. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/conftest.py +0 -0
  110. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/__init__.py +0 -0
  111. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/model_compressors/__init__.py +0 -0
  112. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/quantized_compressors/__init__.py +0 -0
  113. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/quantized_compressors/test_fp8_quant.py +0 -0
  114. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/quantized_compressors/test_int_quant.py +0 -0
  115. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/quantized_compressors/test_nvfp4_quant.py +0 -0
  116. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/quantized_compressors/test_pack_quant.py +0 -0
  117. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/sparse_compressors/__init__.py +0 -0
  118. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/sparse_compressors/test_bitmask.py +0 -0
  119. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/sparse_compressors/test_sparse_24_bitmask.py +0 -0
  120. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/sparse_quantized_compressors/__init__.py +0 -0
  121. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_compressors/sparse_quantized_compressors/test_marlin_24.py +0 -0
  122. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_configs/__init__.py +0 -0
  123. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_configs/test_base.py +0 -0
  124. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_configs/test_infer_quant.py +0 -0
  125. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_examples/test_bitmask_compression_ipynb.py +0 -0
  126. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_linear/__init__.py +0 -0
  127. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_linear/test_compressed_linear.py +0 -0
  128. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/__init__.py +0 -0
  129. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/__init__.py +0 -0
  130. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/conftest.py +0 -0
  131. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_apply.py +0 -0
  132. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_dynamic_lifecycle.py +0 -0
  133. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_enabled.py +0 -0
  134. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_forward.py +0 -0
  135. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_helpers.py +0 -0
  136. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_initialize.py +0 -0
  137. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/lifecycle/test_lifecycle.py +0 -0
  138. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_configs/__init__.py +0 -0
  139. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_configs/test_bit_depths.py +0 -0
  140. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_configs/test_strategies.py +0 -0
  141. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_quant_args.py +0 -0
  142. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_quant_config.py +0 -0
  143. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_quant_scheme.py +0 -0
  144. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_quantization/test_utils/test_helpers.py +0 -0
  145. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_registry.py +0 -0
  146. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/conftest.py +0 -0
  147. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/factory/test_memory.py +0 -0
  148. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/factory/test_serialization.py +0 -0
  149. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/test_transform_args.py +0 -0
  150. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/test_transform_config.py +0 -0
  151. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_transform/utils/test_hadamard.py +0 -0
  152. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_utils/__init__.py +0 -0
  153. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_utils/test_match.py +0 -0
  154. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_utils/test_offload.py +0 -0
  155. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_utils/test_safetensors_load.py +0 -0
  156. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/test_utils/test_type.py +0 -0
  157. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/tests/testing_utils.py +0 -0
  158. {compressed_tensors-0.11.1a20250929 → compressed_tensors-0.12.1}/utils/copyright.py +0 -0
@@ -9,8 +9,7 @@ inputs:
9
9
  required: true
10
10
  code_coverage:
11
11
  description: whether to collect code coverage metrics during test run
12
- type: boolean
13
- default: false
12
+ default: 'false'
14
13
  outputs:
15
14
  status:
16
15
  description: "final status from test"
@@ -51,7 +50,7 @@ runs:
51
50
 
52
51
  if [[ "${ENABLE_COVERAGE}" == "true" ]]; then
53
52
  echo "::group::Installing code coverage requirements via pip"
54
- pip install bashlex https://github.com/neuralmagic/pytest-nm-releng/archive/v0.4.0.tar.gz
53
+ pip install https://github.com/neuralmagic/pytest-nm-releng/archive/v0.4.0.tar.gz
55
54
  pip install coverage pytest-cov
56
55
 
57
56
  # Adding Code coverage to the tests
@@ -76,7 +75,7 @@ runs:
76
75
  fi
77
76
  echo "::endgroup::"
78
77
  fi
79
-
78
+
80
79
  deactivate
81
80
  exit ${SUCCESS}
82
81
  shell: bash
@@ -0,0 +1,15 @@
1
+ name: Post-release nightly build & release
2
+
3
+ on:
4
+ release:
5
+ types: [released]
6
+
7
+ jobs:
8
+ BUILD-TEST-NIGHTLY:
9
+ name: Post-release nightly build & release
10
+ uses: ./.github/workflows/trigger-all.yml
11
+ with:
12
+ wf_category: NIGHTLY
13
+ push_to_pypi: true
14
+ gitref: main
15
+ secrets: inherit
@@ -12,7 +12,10 @@ on:
12
12
 
13
13
  jobs:
14
14
  python-tests:
15
- runs-on: ubuntu-24.04
15
+ runs-on: k8s-util
16
+ env:
17
+ HF_HOME: /model-cache
18
+ HF_TOKEN: ${{ secrets.NM_HF_TOKEN_READ_ONLY }}
16
19
  steps:
17
20
  - uses: actions/setup-python@v5
18
21
  with:
@@ -21,11 +24,13 @@ jobs:
21
24
  with:
22
25
  fetch-depth: 0
23
26
  fetch-tags: true
27
+ - name: Install system dependencies
28
+ run: |-
29
+ sudo apt-get update
30
+ sudo apt-get install -y --no-install-recommends g++ gcc make
24
31
  - name: Set Env
25
- run: |
26
- pip3 install --upgrade pip && pip3 install --upgrade setuptools
32
+ run: pip3 install --upgrade pip setuptools
27
33
  - name: "⚙️ Install dependencies"
28
34
  run: pip3 install .[dev,accelerate]
29
35
  - name: "🔬 Running tests"
30
36
  run: make test
31
-
@@ -71,6 +71,9 @@ jobs:
71
71
  contents: 'read'
72
72
  id-token: 'write'
73
73
  pages: 'write'
74
+ env:
75
+ HF_HOME: /model-cache
76
+ HF_TOKEN: ${{ secrets.NM_HF_TOKEN_READ_ONLY }}
74
77
  environment:
75
78
  name: github-pages
76
79
  url: ${{ steps.coverage.outputs.page_url }}
@@ -90,13 +93,9 @@ jobs:
90
93
  python-version: ${{ inputs.python }}
91
94
 
92
95
  - name: install system dependencies
93
- run: |
94
- if command -v g++ >/dev/null 2>&1; then
95
- echo "found g++ compiler"
96
- else
97
- echo "installing g++ etc compilers..."
98
- sudo apt update && sudo apt install -y g++ gcc
99
- fi
96
+ run: |-
97
+ sudo apt-get update
98
+ sudo apt-get install -y --no-install-recommends g++ gcc make
100
99
  shell: bash
101
100
 
102
101
  - name: checkout code
@@ -172,7 +171,7 @@ jobs:
172
171
  uses: actions/upload-artifact@v4
173
172
  if: success() || failure()
174
173
  with:
175
- name: report-${{ inputs.test_label }}.xml
174
+ name: report-${{ inputs.python }}-${{ inputs.test_label }}.xml
176
175
  path: test-results/report.xml
177
176
  retention-days: 5
178
177
 
@@ -5,6 +5,21 @@ on:
5
5
  # * is a special character in YAML so you have to quote this string
6
6
  - cron: '30 0 * * *' # nightly run
7
7
 
8
+ workflow_call:
9
+ inputs:
10
+ wf_category:
11
+ description: "workflow category, must be 'NIGHTLY' or 'RELEASE' (default: NIGHTLY)"
12
+ type: string
13
+ default: NIGHTLY
14
+ push_to_pypi:
15
+ description: "when set and tests pass, then '.whl' & '.tar.gz' will be pushed to public pypi"
16
+ type: boolean
17
+ default: false
18
+ gitref:
19
+ description: "git commit hash or tag name"
20
+ type: string
21
+ default: 'main'
22
+
8
23
  workflow_dispatch:
9
24
  inputs:
10
25
  wf_category:
@@ -19,7 +34,7 @@ on:
19
34
  type: boolean
20
35
  default: false
21
36
  gitref:
22
- description: "git commit hash or tag name"
37
+ description: "git commit hash or tag name"
23
38
  type: string
24
39
  default: 'main'
25
40
 
@@ -32,9 +47,8 @@ jobs:
32
47
  wf_category: ${{ inputs.wf_category || 'NIGHTLY' }}
33
48
  gitref: ${{ inputs.gitref || 'main' }}
34
49
  push_to_pypi: ${{ (github.event.schedule == '30 0 * * *') || inputs.push_to_pypi || false }}
35
- test_configs: '[{"python":"3.11.4","label":"ubuntu-24.04","timeout":"40","code_coverage":true},
36
- {"python":"3.10.12","label":"ubuntu-22.04","timeout":"40"},
50
+ test_configs: '[{"python":"3.11.4","label":"k8s-util","timeout":"40","code_coverage":true},
51
+ {"python":"3.10.12","label":"k8s-util","timeout":"40"},
37
52
  {"python":"3.9.17","label":"k8s-h100-solo","timeout":"40"},
38
53
  {"python":"3.12.6","label":"k8s-a100-duo","timeout":"40"}]'
39
-
40
54
  secrets: inherit
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compressed-tensors
3
- Version: 0.11.1a20250929
3
+ Version: 0.12.1
4
4
  Summary: Library for utilization of compressed safetensors of neural network models
5
5
  Home-page: https://github.com/neuralmagic/compressed-tensors
6
6
  Author: Neuralmagic, Inc.
@@ -344,6 +344,55 @@ class ModelCompressor:
344
344
  format, config=quantization_config
345
345
  )
346
346
 
347
+ def get_missing_module_keys(self, model: Module) -> List[str]:
348
+ """
349
+ Identifies the expected missing weight keys in the compressed state_dict.
350
+
351
+ When a model undergoes sparsity or quantization compression, certain
352
+ weight tensors may be absent from the checkpoint by virtue of compression.
353
+ This function determines which weight keys are missing based on the
354
+ applied compression techniques.
355
+
356
+ :param model: The PyTorch model to check for missing keys.
357
+ :return: A list of missing keys expected in the compressed state_dict.
358
+ """
359
+ missing_keys = set()
360
+
361
+ # Determine missing keys due to sparsity compression
362
+ if (
363
+ self.sparsity_compressor
364
+ and self.sparsity_config.format != CompressionFormat.dense.value
365
+ ):
366
+ sparse_targets = match_named_modules(
367
+ model=model,
368
+ targets=self.sparsity_config.targets,
369
+ ignore=self.sparsity_config.ignore,
370
+ )
371
+
372
+ missing_keys.update(
373
+ merge_names(target_name, "weight")
374
+ for target_name, _module in sparse_targets
375
+ )
376
+
377
+ # Determine missing keys due to pack quantization
378
+ if (
379
+ self.quantization_compressor
380
+ and self.quantization_config.format
381
+ == CompressionFormat.pack_quantized.value
382
+ ):
383
+ for scheme in self.quantization_config.config_groups.values():
384
+ quant_targets = match_named_modules(
385
+ model=model,
386
+ targets=scheme.targets,
387
+ ignore=self.quantization_config.ignore,
388
+ )
389
+ missing_keys.update(
390
+ merge_names(target_name, "weight")
391
+ for target_name, _module in quant_targets
392
+ )
393
+
394
+ return list(missing_keys)
395
+
347
396
  def get_unexpected_file_keys(self, model: Module) -> List[str]:
348
397
  """
349
398
  Identifies extra keys introduced by the compression process in the
@@ -52,7 +52,7 @@ class HadamardFactory(TransformFactory):
52
52
  :param args: defines how the transform will be applied to the module
53
53
  """
54
54
  assert hasattr(module, "weight")
55
- size = get_transform_size(module, args.location, self.scheme.block_size)
55
+ size = get_transform_size(module, args.location, self.scheme.head_dim)
56
56
  exec_device = get_execution_device(module)
57
57
  device = get_offloaded_device(module)
58
58
  precision = self.scheme.precision if args.is_online() else torch.float64
@@ -51,7 +51,7 @@ class RandomMatrixFactory(TransformFactory):
51
51
  :param args: defines how the transform will be applied to the module
52
52
  """
53
53
  assert hasattr(module, "weight")
54
- size = get_transform_size(module, args.location, self.scheme.block_size)
54
+ size = get_transform_size(module, args.location, self.scheme.head_dim)
55
55
  device = get_offloaded_device(module)
56
56
  precision = self.scheme.precision if args.is_online() else torch.float64
57
57
 
@@ -17,7 +17,7 @@ from typing import List, Optional
17
17
  import torch
18
18
  from compressed_tensors.transform import TransformArgs
19
19
  from compressed_tensors.utils import TorchDtype
20
- from pydantic import BaseModel, ConfigDict, Field, model_validator
20
+ from pydantic import BaseModel, ConfigDict, Field
21
21
 
22
22
 
23
23
  __all__ = ["TransformScheme"]
@@ -36,8 +36,11 @@ class TransformScheme(BaseModel):
36
36
  :param randomize: True if uniquely randomized transform weights should be used,
37
37
  otherwise use identical transform weights where applicable
38
38
  :param requires_grad: True if weights include gradients for training
39
- :param block_size: If set, the transform matrix will be block diagonal, with each
40
- block being a square matrix of this size.
39
+ :param head_dim: If set, the transform matrix will be block diagonal with each
40
+ block being a square matrix of this size. The name head_dim was chosen because
41
+ some rotations need to be block-diagonal with block size equal to the head_dim,
42
+ but research has shown value in applying some rotations with smaller block size,
43
+ irrespective of head_dim.
41
44
  :param precision: Precision at which this transform should be applied during online
42
45
  rotations. Fused (offline) rotations are always performed in float64
43
46
  """
@@ -46,21 +49,7 @@ class TransformScheme(BaseModel):
46
49
  apply: List[TransformArgs] = Field(default_factory=list)
47
50
  randomize: bool = Field(default=False)
48
51
  requires_grad: bool = Field(default=False)
49
- block_size: Optional[int] = Field(default=None)
50
- head_dim: Optional[int] = Field(
51
- default=None, deprecated="head_dim is deprecated, use block_size instead"
52
- )
52
+ head_dim: Optional[int] = Field(default=None)
53
53
  precision: TorchDtype = Field(default=torch.float32)
54
54
 
55
- @model_validator(mode="after")
56
- def validate_model_after(model: "TransformScheme") -> "TransformScheme":
57
- """
58
- If head_dim is used instead of block_size, set block_size to head_dim
59
- and remove head_dim
60
- """
61
- if model.block_size is None and model.head_dim is not None:
62
- model.block_size = model.head_dim
63
- model.head_dim = None
64
- return model
65
-
66
55
  model_config = ConfigDict(extra="forbid")
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.11.1.a20250929'
21
- __version_tuple__ = version_tuple = (0, 11, 1)
20
+ __version__ = version = '0.12.1'
21
+ __version_tuple__ = version_tuple = (0, 12, 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compressed-tensors
3
- Version: 0.11.1a20250929
3
+ Version: 0.12.1
4
4
  Summary: Library for utilization of compressed safetensors of neural network models
5
5
  Home-page: https://github.com/neuralmagic/compressed-tensors
6
6
  Author: Neuralmagic, Inc.
@@ -10,6 +10,7 @@ setup.py
10
10
  .github/scripts/step-status
11
11
  .github/workflows/build-test.yml
12
12
  .github/workflows/build.yml
13
+ .github/workflows/post-release-nightly-build.yml
13
14
  .github/workflows/quality-check.yaml
14
15
  .github/workflows/report.yml
15
16
  .github/workflows/test-check.yaml
@@ -450,6 +450,26 @@ def test_multiple_quant_compressors():
450
450
  assert all(format in compressor.quantization_compressor for format in formats)
451
451
 
452
452
 
453
+ @pytest.mark.parametrize(
454
+ "model, sparsity_config, quantization_config, expected",
455
+ [
456
+ (
457
+ TwoLayerModel(),
458
+ get_bitmask_sparsity_config(targets=["re:.*layer1$"]),
459
+ create_quantization_config(bits=8, type="int", strategy="channel"),
460
+ {"layer1.weight"},
461
+ )
462
+ ],
463
+ )
464
+ def test_get_missing_keys(model, sparsity_config, quantization_config, expected):
465
+ model_compressor = ModelCompressor(
466
+ sparsity_config=sparsity_config, quantization_config=quantization_config
467
+ )
468
+
469
+ actual = model_compressor.get_missing_module_keys(model)
470
+ assert len(actual) == len(expected) and all(key in actual for key in expected)
471
+
472
+
453
473
  @pytest.mark.parametrize(
454
474
  "model, sparsity_config, quantization_config, expected",
455
475
  [
@@ -33,7 +33,7 @@ from tests.testing_utils import requires_accelerate, requires_gpu
33
33
  def test_correctness_linear(type, randomize, head_dim, input_batch_size):
34
34
  size = (4, 8)
35
35
  module = torch.nn.Linear(*size, bias=False)
36
- scheme = TransformScheme(type=type, randomize=randomize, block_size=head_dim)
36
+ scheme = TransformScheme(type=type, randomize=randomize, head_dim=head_dim)
37
37
  factory = TransformFactory.from_scheme(scheme, name="")
38
38
 
39
39
  input_tfm = factory.create_transform(
@@ -150,7 +150,7 @@ def test_correctness_attention_heads(type, randomize, head_dim, input_batch_size
150
150
  "": TransformScheme(
151
151
  type=type,
152
152
  randomize=randomize,
153
- block_size=head_dim,
153
+ head_dim=head_dim,
154
154
  apply=[
155
155
  TransformArgs(targets="v_proj", location="weight_output"),
156
156
  TransformArgs(
@@ -72,28 +72,3 @@ def test_multiple_groups():
72
72
  assert not scheme.randomize
73
73
  assert scheme.type == "hadamard"
74
74
  assert len(scheme.apply) == 20
75
-
76
-
77
- def test_transform_scheme_block_size():
78
- """
79
- Ensure json with (deprecated) `head_dim` or `block_size`
80
- both load up correctly and save with `block_size` field
81
- """
82
-
83
- old_scheme = TransformScheme.model_validate_json(
84
- '{"type": "hadamard", "head_dim": 128}'
85
- )
86
- assert old_scheme.block_size == 128
87
- assert old_scheme.model_dump()["block_size"] == 128
88
- old_scheme = TransformScheme(type="hadamard", head_dim=64)
89
- assert old_scheme.block_size == 64
90
- assert old_scheme.model_dump()["block_size"] == 64
91
-
92
- new_scheme = TransformScheme.model_validate_json(
93
- '{"type": "hadamard", "block_size": 128}'
94
- )
95
- assert new_scheme.block_size == 128
96
- assert new_scheme.model_dump()["block_size"] == 128
97
- new_scheme = TransformScheme(type="hadamard", block_size=64)
98
- assert new_scheme.block_size == 64
99
- assert new_scheme.model_dump()["block_size"] == 64
@@ -36,12 +36,11 @@ def tensors():
36
36
 
37
37
 
38
38
  @pytest.fixture
39
- def llama_model(tmp_path):
40
- model_name = "neuralmagic/llama2.c-stories110M-pruned50"
41
- model = AutoModelForCausalLM.from_pretrained(
42
- model_name, torch_dtype="auto", cache_dir=tmp_path
39
+ def llama_model():
40
+ return AutoModelForCausalLM.from_pretrained(
41
+ "RedHatAI/llama2.c-stories110M-pruned50",
42
+ torch_dtype="auto",
43
43
  )
44
- yield model
45
44
 
46
45
 
47
46
  def test_save_compressed_sparse_bitmask(tmp_path, tensors):
@@ -120,9 +119,9 @@ def test_load_compressed_dense(tmp_path, tensors):
120
119
 
121
120
 
122
121
  def test_load_compressed_sharded(tmp_path, llama_model):
123
- sharded_model_path = tmp_path / "shared_model"
122
+ sharded_model_path = tmp_path / "sharded_model"
124
123
  llama_model.save_pretrained(sharded_model_path, max_shard_size="2MB")
125
- # make sure that model is shared on disk
124
+ # make sure that model is sharded on disk
126
125
  assert len(os.listdir(sharded_model_path)) > 1
127
126
  loaded_state_dict = dict(load_compressed(sharded_model_path))
128
127
  for key, value in llama_model.state_dict().items():