compressed-tensors 0.10.3a20250620__tar.gz → 0.10.3a20250703__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 (145) hide show
  1. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/actions/test/action.yml +17 -0
  2. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/test.yml +29 -17
  3. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/trigger-all.yml +2 -2
  4. {compressed_tensors-0.10.3a20250620/src/compressed_tensors.egg-info → compressed_tensors-0.10.3a20250703}/PKG-INFO +1 -1
  5. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/version.py +1 -1
  6. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703/src/compressed_tensors.egg-info}/PKG-INFO +1 -1
  7. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors.egg-info/SOURCES.txt +1 -0
  8. compressed_tensors-0.10.3a20250703/tests/test_transform/conftest.py +54 -0
  9. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_transform/factory/test_correctness.py +30 -49
  10. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_transform/factory/test_memory.py +30 -43
  11. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/.gitkeep +0 -0
  12. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/scripts/step-status +0 -0
  13. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/build-test.yml +0 -0
  14. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/build.yml +0 -0
  15. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/report.yml +0 -0
  16. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/test-check.yaml +0 -0
  17. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.github/workflows/upload.yml +0 -0
  18. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/.gitignore +0 -0
  19. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/LICENSE +0 -0
  20. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/Makefile +0 -0
  21. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/README.md +0 -0
  22. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/bit_packing/ex_quantize_and_pack.py +0 -0
  23. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/bit_packing/int4_config.json +0 -0
  24. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/bitmask_compression.ipynb +0 -0
  25. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/llama_1.1b/ex_config_quantization.py +0 -0
  26. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/llama_1.1b/ex_llmcompressor_quantization.py +0 -0
  27. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/llama_1.1b/example_quant_config.json +0 -0
  28. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/llama_1.1b/example_quant_recipe.yaml +0 -0
  29. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/examples/quantize_and_pack_int4.ipynb +0 -0
  30. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/pyproject.toml +0 -0
  31. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/setup.cfg +0 -0
  32. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/setup.py +0 -0
  33. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/__init__.py +0 -0
  34. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/README.md +0 -0
  35. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/__init__.py +0 -0
  36. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/base.py +0 -0
  37. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/__init__.py +0 -0
  38. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/base.py +0 -0
  39. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/helpers.py +0 -0
  40. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/model_compressors/__init__.py +0 -0
  41. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/model_compressors/model_compressor.py +0 -0
  42. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/quantized_compressors/__init__.py +0 -0
  43. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/quantized_compressors/base.py +0 -0
  44. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/quantized_compressors/naive_quantized.py +0 -0
  45. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/quantized_compressors/nvfp4_quantized.py +0 -0
  46. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/quantized_compressors/pack_quantized.py +0 -0
  47. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_compressors/__init__.py +0 -0
  48. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_compressors/base.py +0 -0
  49. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_compressors/dense.py +0 -0
  50. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_compressors/sparse_24_bitmask.py +0 -0
  51. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_compressors/sparse_bitmask.py +0 -0
  52. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_quantized_compressors/__init__.py +0 -0
  53. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/compressors/sparse_quantized_compressors/marlin_24.py +0 -0
  54. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/config/__init__.py +0 -0
  55. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/config/base.py +0 -0
  56. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/config/dense.py +0 -0
  57. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/config/sparse_24_bitmask.py +0 -0
  58. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/config/sparse_bitmask.py +0 -0
  59. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/linear/__init__.py +0 -0
  60. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/linear/compressed_linear.py +0 -0
  61. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/__init__.py +0 -0
  62. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/lifecycle/__init__.py +0 -0
  63. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/lifecycle/apply.py +0 -0
  64. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/lifecycle/compressed.py +0 -0
  65. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/lifecycle/forward.py +0 -0
  66. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/lifecycle/helpers.py +0 -0
  67. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/lifecycle/initialize.py +0 -0
  68. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/quant_args.py +0 -0
  69. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/quant_config.py +0 -0
  70. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/quant_scheme.py +0 -0
  71. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/utils/__init__.py +0 -0
  72. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/quantization/utils/helpers.py +0 -0
  73. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/registry/__init__.py +0 -0
  74. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/registry/registry.py +0 -0
  75. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/__init__.py +0 -0
  76. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/factory/__init__.py +0 -0
  77. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/factory/base.py +0 -0
  78. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/factory/hadamard.py +0 -0
  79. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/factory/matrix_multiply.py +0 -0
  80. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/factory/random_hadamard.py +0 -0
  81. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/transform_args.py +0 -0
  82. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/transform_config.py +0 -0
  83. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/transform_scheme.py +0 -0
  84. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/utils/__init__.py +0 -0
  85. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/utils/hadamard.py +0 -0
  86. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/utils/hadamards.safetensors +0 -0
  87. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/transform/utils/utils.py +0 -0
  88. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/__init__.py +0 -0
  89. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/helpers.py +0 -0
  90. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/offload.py +0 -0
  91. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/permutations_24.py +0 -0
  92. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/permute.py +0 -0
  93. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/safetensors_load.py +0 -0
  94. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors/utils/semi_structured_conversions.py +0 -0
  95. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors.egg-info/dependency_links.txt +0 -0
  96. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors.egg-info/requires.txt +0 -0
  97. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/src/compressed_tensors.egg-info/top_level.txt +0 -0
  98. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/__init__.py +0 -0
  99. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/conftest.py +0 -0
  100. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/__init__.py +0 -0
  101. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/model_compressors/__init__.py +0 -0
  102. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/model_compressors/test_model_compressor.py +0 -0
  103. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/quantized_compressors/__init__.py +0 -0
  104. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/quantized_compressors/test_fp8_quant.py +0 -0
  105. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/quantized_compressors/test_int_quant.py +0 -0
  106. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/quantized_compressors/test_nvfp4_quant.py +0 -0
  107. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/quantized_compressors/test_pack_quant.py +0 -0
  108. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/sparse_compressors/__init__.py +0 -0
  109. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/sparse_compressors/test_bitmask.py +0 -0
  110. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/sparse_compressors/test_sparse_24_bitmask.py +0 -0
  111. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/sparse_quantized_compressors/__init__.py +0 -0
  112. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_compressors/sparse_quantized_compressors/test_marlin_24.py +0 -0
  113. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_configs/__init__.py +0 -0
  114. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_configs/test_base.py +0 -0
  115. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_examples/test_bitmask_compression_ipynb.py +0 -0
  116. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_linear/__init__.py +0 -0
  117. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_linear/test_compressed_linear.py +0 -0
  118. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/__init__.py +0 -0
  119. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/__init__.py +0 -0
  120. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/conftest.py +0 -0
  121. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_apply.py +0 -0
  122. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_dynamic_lifecycle.py +0 -0
  123. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_enabled.py +0 -0
  124. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_forward.py +0 -0
  125. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_helpers.py +0 -0
  126. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_initialize.py +0 -0
  127. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/lifecycle/test_lifecycle.py +0 -0
  128. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_configs/__init__.py +0 -0
  129. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_configs/test_bit_depths.py +0 -0
  130. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_configs/test_strategies.py +0 -0
  131. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_quant_args.py +0 -0
  132. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_quant_config.py +0 -0
  133. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_quant_scheme.py +0 -0
  134. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_quantization/test_utils/test_helpers.py +0 -0
  135. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_registry.py +0 -0
  136. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_transform/test_transform_args.py +0 -0
  137. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_transform/test_transform_config.py +0 -0
  138. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_transform/test_transform_scheme.py +0 -0
  139. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_transform/utils/test_hadamard.py +0 -0
  140. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_utils/__init__.py +0 -0
  141. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_utils/test_helpers.py +0 -0
  142. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_utils/test_offload.py +0 -0
  143. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/test_utils/test_safetensors_load.py +0 -0
  144. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/tests/testing_utils.py +0 -0
  145. {compressed_tensors-0.10.3a20250620 → compressed_tensors-0.10.3a20250703}/utils/copyright.py +0 -0
@@ -22,6 +22,23 @@ runs:
22
22
  name: compressed
23
23
  extra: "[dev,accelerate]"
24
24
 
25
+ - name: clean up
26
+ run: |
27
+ echo "cleaning up disk space..."
28
+ find . -type f -name '*.whl' -exec rm -rf {} \;
29
+ python -m pip cache purge
30
+ sudo rm -rf /usr/local/.ghcup
31
+ sudo rm -rf /opt/hostedtoolcache/CodeQL
32
+ sudo rm -rf /usr/local/lib/android/sdk/ndk
33
+ sudo rm -rf /usr/share/dotnet
34
+ sudo rm -rf /opt/ghc
35
+ sudo rm -rf /usr/local/share/boost
36
+ if [[ "$(cat /etc/issue)" =~ Ubuntu ]]; then
37
+ sudo apt-get clean
38
+ fi
39
+ df -h
40
+ shell: bash
41
+
25
42
  - name: test
26
43
  id: test
27
44
  run: |
@@ -22,7 +22,9 @@ on:
22
22
  whl:
23
23
  description: "whl to test (variable appears late binding so unusable outside 'download artifact')"
24
24
  type: string
25
- required: true
25
+ run_id:
26
+ description: run id of the BUILD job that generated the assets
27
+ type: string
26
28
 
27
29
  # makes workflow manually callable
28
30
  workflow_dispatch:
@@ -44,9 +46,11 @@ on:
44
46
  type: string
45
47
  required: true
46
48
  whl:
47
- description: "whl to test (variable appears late binding so unusable outside 'download artifact')"
49
+ description: "whl to test (provide either whl or run_id)"
50
+ type: string
51
+ run_id:
52
+ description: run id of the BUILD job that generated the assets
48
53
  type: string
49
- required: true
50
54
 
51
55
  jobs:
52
56
 
@@ -87,11 +91,33 @@ jobs:
87
91
 
88
92
  - name: download whl
89
93
  id: download
94
+ if: ${{ inputs.whl != '' }}
90
95
  uses: actions/download-artifact@v4
91
96
  with:
92
97
  name: ${{ inputs.whl }}
93
98
  path: ${{ inputs.whl }}
94
99
 
100
+ # GCP
101
+ - name: 'Authenticate to Google Cloud'
102
+ id: auth
103
+ uses: google-github-actions/auth@v2.1.3
104
+ with:
105
+ project_id: ${{ secrets.GCP_PROJECT }}
106
+ workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
107
+ service_account: ${{ secrets.GCP_GHA_SA }}
108
+
109
+ - name: 'Set up Cloud SDK'
110
+ uses: 'google-github-actions/setup-gcloud@v2'
111
+ with:
112
+ version: '>= 473.0.0'
113
+
114
+ - name: download assets
115
+ if: ${{ inputs.run_id != '' }}
116
+ uses: neuralmagic/nm-actions/actions/gcp-download-assets@v1.1.0
117
+ with:
118
+ bucket_source: ${{ secrets.GCP_BUILD_ML_ASSETS2 }}
119
+ run_id: ${{ inputs.run_id }}
120
+
95
121
  - name: run tests
96
122
  id: test
97
123
  uses: ./.github/actions/test/
@@ -109,20 +135,6 @@ jobs:
109
135
  whl: ${{ inputs.whl }}
110
136
  test_status: ${{ steps.test.outputs.status }}
111
137
 
112
- # GCP
113
- - name: 'Authenticate to Google Cloud'
114
- id: auth
115
- uses: google-github-actions/auth@v2.1.3
116
- with:
117
- project_id: ${{ secrets.GCP_PROJECT }}
118
- workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
119
- service_account: ${{ secrets.GCP_GHA_SA }}
120
-
121
- - name: 'Set up Cloud SDK'
122
- uses: 'google-github-actions/setup-gcloud@v2'
123
- with:
124
- version: '>= 473.0.0'
125
-
126
138
  - name: copy results to GCP
127
139
  run: |
128
140
  gcloud storage cp test-results/report.xml ${{ secrets.GCP_BUILD_ML_ASSETS2 }}/${{ github.run_id }}/test-results/report-${{ inputs.test_label }}.xml
@@ -32,8 +32,8 @@ jobs:
32
32
  wf_category: ${{ inputs.wf_category || 'NIGHTLY' }}
33
33
  gitref: ${{ inputs.gitref || 'main' }}
34
34
  push_to_pypi: ${{ (github.event.schedule == '30 0 * * *') || inputs.push_to_pypi || false }}
35
- test_configs: '[{"python":"3.11.4","label":"ubuntu-22.04","timeout":"40"},
36
- {"python":"3.10.12","label":"ubuntu-24.04","timeout":"40"},
35
+ test_configs: '[{"python":"3.11.4","label":"ubuntu-24.04","timeout":"40"},
36
+ {"python":"3.10.12","label":"ubuntu-22.04","timeout":"40"},
37
37
  {"python":"3.9.17","label":"k8s-h100-solo","timeout":"40"},
38
38
  {"python":"3.12.6","label":"k8s-a100-duo","timeout":"40"}]'
39
39
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compressed-tensors
3
- Version: 0.10.3a20250620
3
+ Version: 0.10.3a20250703
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.
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '0.10.3.a20250620'
20
+ __version__ = version = '0.10.3.a20250703'
21
21
  __version_tuple__ = version_tuple = (0, 10, 3)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compressed-tensors
3
- Version: 0.10.3a20250620
3
+ Version: 0.10.3a20250703
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.
@@ -130,6 +130,7 @@ tests/test_quantization/test_configs/__init__.py
130
130
  tests/test_quantization/test_configs/test_bit_depths.py
131
131
  tests/test_quantization/test_configs/test_strategies.py
132
132
  tests/test_quantization/test_utils/test_helpers.py
133
+ tests/test_transform/conftest.py
133
134
  tests/test_transform/test_transform_args.py
134
135
  tests/test_transform/test_transform_config.py
135
136
  tests/test_transform/test_transform_scheme.py
@@ -0,0 +1,54 @@
1
+ # Copyright (c) 2021 - present / Neuralmagic, Inc. All Rights Reserved.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing,
10
+ # software distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ import pytest
16
+ import torch
17
+ from compressed_tensors.transform import TransformArgs
18
+
19
+
20
+ class TransformableModel(torch.nn.Module):
21
+ def __init__(self, *sizes):
22
+ super().__init__()
23
+ self.fcs = torch.nn.ModuleList(
24
+ [
25
+ torch.nn.Linear(sizes[index], sizes[index + 1], bias=False)
26
+ for index in range(0, len(sizes) - 1)
27
+ ]
28
+ )
29
+
30
+ def forward(self, x):
31
+ for layer in self.fcs:
32
+ x = layer(x)
33
+ return x
34
+
35
+
36
+ @pytest.fixture(scope="function")
37
+ def model_apply():
38
+ model = TransformableModel(2, 4, 8, 16, 32, 64)
39
+ apply = [
40
+ # weight output -> input
41
+ TransformArgs(targets="fcs.0", location="weight_output"),
42
+ TransformArgs(targets="fcs.1", location="input", inverse=True),
43
+ # output -> weight input
44
+ TransformArgs(targets="fcs.1", location="output"),
45
+ TransformArgs(targets="fcs.2", location="weight_input", inverse=True),
46
+ # output -> input
47
+ TransformArgs(targets="fcs.2", location="output"),
48
+ TransformArgs(targets="fcs.3", location="input", inverse=True),
49
+ # weight output -> weight input
50
+ TransformArgs(targets="fcs.3", location="weight_output"),
51
+ TransformArgs(targets="fcs.4", location="weight_input", inverse=True),
52
+ ]
53
+
54
+ return model, apply
@@ -16,6 +16,7 @@ import pytest
16
16
  import torch
17
17
  from compressed_tensors.transform import (
18
18
  TransformArgs,
19
+ TransformConfig,
19
20
  TransformFactory,
20
21
  TransformScheme,
21
22
  )
@@ -23,27 +24,18 @@ from compressed_tensors.utils import offloaded_dispatch
23
24
  from tests.testing_utils import requires_accelerate, requires_gpu
24
25
 
25
26
 
26
- class TransformableModel(torch.nn.Module):
27
- def __init__(self, *sizes):
28
- super().__init__()
29
- self.fcs = torch.nn.ModuleList([])
30
- self.fcs.append(torch.nn.Linear(sizes[0], sizes[1], bias=False))
31
- for index in range(1, len(sizes) - 1):
32
- self.fcs.append(torch.nn.Linear(sizes[index], sizes[index + 1], bias=False))
27
+ def scheme_kwargs():
28
+ all_types = TransformFactory.registered_names()
29
+ base = [{"type": type} for type in all_types]
30
+ randomized = [{"type": type, "randomize": True} for type in all_types]
31
+ return base + randomized
33
32
 
34
- def forward(self, x):
35
- for layer in self.fcs:
36
- x = layer(x)
37
- return x
38
33
 
39
-
40
- @pytest.mark.parametrize(
41
- "scheme",
42
- [TransformScheme(type=name) for name in TransformFactory.registered_names()],
43
- )
44
- def test_correctness_linear(scheme):
34
+ @pytest.mark.parametrize("scheme_kwargs", scheme_kwargs())
35
+ def test_correctness_linear(scheme_kwargs):
45
36
  size = (4, 8)
46
37
  module = torch.nn.Linear(*size, bias=True)
38
+ scheme = TransformScheme(**scheme_kwargs)
47
39
  factory = TransformFactory.from_scheme(scheme, name="")
48
40
 
49
41
  input_tfm = factory.create_transform(
@@ -67,50 +59,39 @@ def test_correctness_linear(scheme):
67
59
  assert torch.allclose(true_output, output, atol=1e-5, rtol=0.0)
68
60
 
69
61
 
70
- @pytest.mark.parametrize(
71
- "scheme",
72
- [TransformScheme(type=name) for name in TransformFactory.registered_names()],
73
- )
74
- def test_correctness_model(scheme, offload=False):
62
+ @pytest.mark.parametrize("scheme_kwargs", scheme_kwargs())
63
+ def test_correctness_model(scheme_kwargs, model_apply, offload=False):
75
64
  # load model
76
- model = TransformableModel(2, 4, 8, 16, 32, 64)
65
+ model = model_apply[0]
77
66
  if offload:
78
67
  model = offloaded_dispatch(model, torch.device("cuda"))
79
68
 
80
- # create factory
81
- scheme.apply = [
82
- # weight output -> input
83
- TransformArgs(targets="fcs.0", location="weight_output"),
84
- TransformArgs(targets="fcs.1", location="input", inverse=True),
85
- # output -> weight input
86
- TransformArgs(targets="fcs.1", location="output"),
87
- TransformArgs(targets="fcs.2", location="weight_input", inverse=True),
88
- # output -> input
89
- TransformArgs(targets="fcs.2", location="output"),
90
- TransformArgs(targets="fcs.3", location="input", inverse=True),
91
- # weight output -> weight input
92
- TransformArgs(targets="fcs.3", location="weight_output"),
93
- TransformArgs(targets="fcs.4", location="weight_input", inverse=True),
94
- ]
95
- factory = TransformFactory.from_scheme(scheme, name="")
96
-
97
- # create inputs
69
+ # get output
98
70
  input = torch.rand((17, model.fcs[0].in_features))
99
71
  if offload:
100
72
  input = input.to(torch.device("cuda"))
73
+ true_output = model(input)
74
+
75
+ # apply transforms
76
+ config = TransformConfig(
77
+ config_groups={
78
+ "": TransformScheme(
79
+ **scheme_kwargs,
80
+ apply=model_apply[1],
81
+ )
82
+ }
83
+ )
84
+ for name, scheme in config.config_groups.items():
85
+ factory = TransformFactory.from_scheme(scheme, name=name)
86
+ factory.apply_to_model(model)
101
87
 
102
88
  # compare outputs
103
- true_output = model(input)
104
- factory.apply_to_model(model)
105
89
  output = model(input)
106
90
  assert torch.allclose(true_output, output, atol=1e-5, rtol=0.0)
107
91
 
108
92
 
109
93
  @requires_gpu
110
94
  @requires_accelerate()
111
- @pytest.mark.parametrize(
112
- "scheme",
113
- [TransformScheme(type=name) for name in TransformFactory.registered_names()],
114
- )
115
- def test_correctness_model_offload(scheme):
116
- test_correctness_model(scheme, offload=True)
95
+ @pytest.mark.parametrize("scheme_kwargs", scheme_kwargs())
96
+ def test_correctness_model_offload(scheme_kwargs, model_apply):
97
+ test_correctness_model(scheme_kwargs, model_apply, offload=True)
@@ -19,49 +19,44 @@ import torch
19
19
  from compressed_tensors.transform import (
20
20
  TransformArgs,
21
21
  TransformBase,
22
+ TransformConfig,
22
23
  TransformFactory,
23
24
  TransformScheme,
24
25
  )
25
26
  from compressed_tensors.utils import align_modules, offloaded_dispatch
27
+ from tests.test_transform.conftest import TransformableModel
26
28
  from tests.testing_utils import requires_accelerate, requires_gpu
27
29
 
28
30
 
29
- class TransformableModel(torch.nn.Module):
30
- def __init__(self, *sizes):
31
- super().__init__()
32
- self.fcs = torch.nn.ModuleList([])
33
- self.fcs.append(torch.nn.Linear(sizes[0], sizes[1], bias=False))
34
- for index in range(1, len(sizes) - 1):
35
- self.fcs.append(torch.nn.Linear(sizes[index], sizes[index + 1], bias=False))
31
+ def scheme_kwargs():
32
+ all_types = TransformFactory.registered_names()
33
+ base = [{"type": type} for type in all_types]
34
+ randomized = [{"type": type, "randomize": True} for type in all_types]
35
+ return base + randomized
36
36
 
37
- def forward(self, x):
38
- for layer in self.fcs:
39
- x = layer(x)
40
- return x
41
-
42
-
43
- @pytest.mark.parametrize(
44
- "scheme",
45
- [TransformScheme(type=name) for name in TransformFactory.registered_names()],
46
- )
47
- def test_memory_sharing(scheme, offload=False):
48
- # load scheme and factory
49
- scheme = TransformScheme(
50
- type="hadamard",
51
- apply=[
52
- TransformArgs(targets="Linear", location="input"),
53
- TransformArgs(targets="Linear", location="output"),
54
- ],
55
- )
56
- factory = TransformFactory.from_scheme(scheme, name="")
57
37
 
38
+ @pytest.mark.parametrize("scheme_kwargs", scheme_kwargs())
39
+ def test_memory_sharing(scheme_kwargs, offload=False):
58
40
  # load model (maybe with offloading)
59
41
  model = TransformableModel(2, 2, 4, 4, 8, 8)
60
42
  if offload:
61
43
  offloaded_dispatch(model, torch.device("cuda"))
62
44
 
63
45
  # add transforms to model
64
- factory.apply_to_model(model)
46
+ config = TransformConfig(
47
+ config_groups={
48
+ "": TransformScheme(
49
+ **scheme_kwargs,
50
+ apply=[
51
+ TransformArgs(targets="Linear", location="input"),
52
+ TransformArgs(targets="Linear", location="output"),
53
+ ],
54
+ )
55
+ }
56
+ )
57
+ for name, scheme in config.config_groups.items():
58
+ factory = TransformFactory.from_scheme(scheme, name=name)
59
+ factory.apply_to_model(model)
65
60
 
66
61
  # check that memory is shared when onloaded
67
62
  with align_modules(model.modules()):
@@ -93,20 +88,12 @@ def test_memory_sharing(scheme, offload=False):
93
88
 
94
89
  @requires_gpu
95
90
  @requires_accelerate()
96
- @pytest.mark.parametrize(
97
- "scheme",
98
- [TransformScheme(type=name) for name in TransformFactory.registered_names()],
99
- )
100
- def test_memory_sharing_offload(scheme):
101
- test_memory_sharing(scheme, offload=True)
91
+ @pytest.mark.parametrize("scheme_kwargs", scheme_kwargs())
92
+ def test_memory_sharing_offload(scheme_kwargs):
93
+ test_memory_sharing(scheme_kwargs, offload=True)
102
94
 
103
95
 
104
- @pytest.mark.parametrize(
105
- "scheme",
106
- [
107
- TransformScheme(type=name, requires_grad=True)
108
- for name in TransformFactory.registered_names()
109
- ],
110
- )
111
- def test_memory_sharing_training(scheme):
112
- test_memory_sharing(scheme, offload=False)
96
+ @pytest.mark.parametrize("scheme_kwargs", scheme_kwargs())
97
+ def test_memory_sharing_training(scheme_kwargs):
98
+ scheme_kwargs["requires_grad"] = True
99
+ test_memory_sharing(scheme_kwargs, offload=False)