BryanW commited on
Commit
20a2dfd
·
verified ·
1 Parent(s): 9c8af91

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/__init__.cpython-312.pyc +0 -0
  2. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/_trace_wrapped_higher_order_op.cpython-312.pyc +0 -0
  3. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/aot_compile.cpython-312.pyc +0 -0
  4. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/aot_compile_types.cpython-312.pyc +0 -0
  5. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/bytecode_analysis.cpython-312.pyc +0 -0
  6. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/bytecode_transformation.cpython-312.pyc +0 -0
  7. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/codegen.cpython-312.pyc +0 -0
  8. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/compiled_autograd.cpython-312.pyc +0 -0
  9. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/comptime.cpython-312.pyc +0 -0
  10. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/create_parameter_op.cpython-312.pyc +0 -0
  11. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/dce_extra_outputs.cpython-312.pyc +0 -0
  12. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/decorators.cpython-312.pyc +0 -0
  13. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/device_interface.cpython-312.pyc +0 -0
  14. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/distributed.cpython-312.pyc +0 -0
  15. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/exc.cpython-312.pyc +0 -0
  16. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/funcname_cache.cpython-312.pyc +0 -0
  17. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/graph_break_hints.cpython-312.pyc +0 -0
  18. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/graph_region_tracker.cpython-312.pyc +0 -0
  19. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/hooks.cpython-312.pyc +0 -0
  20. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/metrics_context.cpython-312.pyc +0 -0
  21. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/mutation_guard.cpython-312.pyc +0 -0
  22. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/pgo.cpython-312.pyc +0 -0
  23. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/precompile_context.cpython-312.pyc +0 -0
  24. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/profiler.cpython-312.pyc +0 -0
  25. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/replay_record.cpython-312.pyc +0 -0
  26. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/resume_execution.cpython-312.pyc +0 -0
  27. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/side_effects.cpython-312.pyc +0 -0
  28. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/source.cpython-312.pyc +0 -0
  29. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/tensor_version_op.cpython-312.pyc +0 -0
  30. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/types.cpython-312.pyc +0 -0
  31. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/common.cpython-312.pyc +0 -0
  32. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/inductor.cpython-312.pyc +0 -0
  33. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/registry.cpython-312.pyc +0 -0
  34. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/tensorrt.cpython-312.pyc +0 -0
  35. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/tvm.cpython-312.pyc +0 -0
  36. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/__init__.cpython-312.pyc +0 -0
  37. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/after_aot.cpython-312.pyc +0 -0
  38. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/after_dynamo.cpython-312.pyc +0 -0
  39. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/aoti.cpython-312.pyc +0 -0
  40. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/__pycache__/__init__.cpython-312.pyc +0 -0
  41. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/__pycache__/__init__.cpython-312.pyc +0 -0
  42. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/__init__.py +41 -0
  43. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/__pycache__/__init__.cpython-312.pyc +0 -0
  44. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/__init__.py +41 -0
  45. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/__pycache__/__init__.cpython-312.pyc +0 -0
  46. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/__pycache__/fused.cpython-312.pyc +0 -0
  47. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/fused.py +289 -0
  48. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/qat/__init__.py +1 -0
  49. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/qat/__pycache__/__init__.cpython-312.pyc +0 -0
  50. Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/qat/modules/__init__.py +32 -0
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (8.52 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/_trace_wrapped_higher_order_op.cpython-312.pyc ADDED
Binary file (14 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/aot_compile.cpython-312.pyc ADDED
Binary file (20 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/aot_compile_types.cpython-312.pyc ADDED
Binary file (3.98 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/bytecode_analysis.cpython-312.pyc ADDED
Binary file (13.8 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/bytecode_transformation.cpython-312.pyc ADDED
Binary file (78.4 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/codegen.cpython-312.pyc ADDED
Binary file (36.1 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/compiled_autograd.cpython-312.pyc ADDED
Binary file (77.4 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/comptime.cpython-312.pyc ADDED
Binary file (24.4 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/create_parameter_op.cpython-312.pyc ADDED
Binary file (4.09 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/dce_extra_outputs.cpython-312.pyc ADDED
Binary file (7.91 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/decorators.cpython-312.pyc ADDED
Binary file (43.6 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/device_interface.cpython-312.pyc ADDED
Binary file (35 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/distributed.cpython-312.pyc ADDED
Binary file (2.21 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/exc.cpython-312.pyc ADDED
Binary file (32.4 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/funcname_cache.cpython-312.pyc ADDED
Binary file (3.44 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/graph_break_hints.cpython-312.pyc ADDED
Binary file (1.58 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/graph_region_tracker.cpython-312.pyc ADDED
Binary file (24.5 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/hooks.cpython-312.pyc ADDED
Binary file (1.49 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/metrics_context.cpython-312.pyc ADDED
Binary file (13.2 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/mutation_guard.cpython-312.pyc ADDED
Binary file (8.48 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/pgo.cpython-312.pyc ADDED
Binary file (40.5 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/precompile_context.cpython-312.pyc ADDED
Binary file (10.3 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/profiler.cpython-312.pyc ADDED
Binary file (9.52 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/replay_record.cpython-312.pyc ADDED
Binary file (7.97 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/resume_execution.cpython-312.pyc ADDED
Binary file (28.2 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/side_effects.cpython-312.pyc ADDED
Binary file (50.7 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/source.cpython-312.pyc ADDED
Binary file (68.5 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/tensor_version_op.cpython-312.pyc ADDED
Binary file (3.89 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/__pycache__/types.cpython-312.pyc ADDED
Binary file (7.05 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/common.cpython-312.pyc ADDED
Binary file (8.32 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/inductor.cpython-312.pyc ADDED
Binary file (1.41 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/registry.cpython-312.pyc ADDED
Binary file (6.76 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/tensorrt.cpython-312.pyc ADDED
Binary file (309 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/backends/__pycache__/tvm.cpython-312.pyc ADDED
Binary file (9.73 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (225 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/after_aot.cpython-312.pyc ADDED
Binary file (51.2 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/after_dynamo.cpython-312.pyc ADDED
Binary file (24.9 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/_dynamo/repro/__pycache__/aoti.cpython-312.pyc ADDED
Binary file (24.8 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (876 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (908 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/__init__.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import types
2
+
3
+ from .modules import * # noqa: F403
4
+ from .modules.fused import _FusedModule # noqa: F403
5
+
6
+
7
+ # # Subpackages
8
+ # from . import qat # noqa: F403
9
+ # from . import quantized # noqa: F403
10
+
11
+ __all__ = [
12
+ "ConvBn1d",
13
+ "ConvBn2d",
14
+ "ConvBn3d",
15
+ "ConvBnReLU1d",
16
+ "ConvBnReLU2d",
17
+ "ConvBnReLU3d",
18
+ "ConvReLU1d",
19
+ "ConvReLU2d",
20
+ "ConvReLU3d",
21
+ "LinearReLU",
22
+ "BNReLU2d",
23
+ "BNReLU3d",
24
+ "LinearBn1d",
25
+ "LinearLeakyReLU",
26
+ "LinearTanh",
27
+ "ConvAdd2d",
28
+ "ConvAddReLU2d",
29
+ ]
30
+
31
+
32
+ # We are exposing all subpackages to the end-user.
33
+ # Because of possible inter-dependency, we want to avoid
34
+ # the cyclic imports, thus implementing lazy version
35
+ # as per https://peps.python.org/pep-0562/
36
+ def __getattr__(name: str) -> types.ModuleType:
37
+ if name in __all__:
38
+ import importlib
39
+
40
+ return importlib.import_module("." + name, __name__)
41
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (1.02 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/__init__.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .fused import ( # noqa: F401
2
+ _FusedModule,
3
+ BNReLU2d,
4
+ BNReLU3d,
5
+ ConvAdd2d,
6
+ ConvAddReLU2d,
7
+ ConvBn1d,
8
+ ConvBn2d,
9
+ ConvBn3d,
10
+ ConvBnReLU1d,
11
+ ConvBnReLU2d,
12
+ ConvBnReLU3d,
13
+ ConvReLU1d,
14
+ ConvReLU2d,
15
+ ConvReLU3d,
16
+ LinearBn1d,
17
+ LinearLeakyReLU,
18
+ LinearReLU,
19
+ LinearTanh,
20
+ )
21
+
22
+
23
+ __all__ = [
24
+ "ConvBn1d",
25
+ "ConvBn2d",
26
+ "ConvBn3d",
27
+ "ConvBnReLU1d",
28
+ "ConvBnReLU2d",
29
+ "ConvBnReLU3d",
30
+ "ConvReLU1d",
31
+ "ConvReLU2d",
32
+ "ConvReLU3d",
33
+ "LinearReLU",
34
+ "BNReLU2d",
35
+ "BNReLU3d",
36
+ "LinearBn1d",
37
+ "LinearLeakyReLU",
38
+ "LinearTanh",
39
+ "ConvAdd2d",
40
+ "ConvAddReLU2d",
41
+ ]
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (773 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/__pycache__/fused.cpython-312.pyc ADDED
Binary file (13.2 kB). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/modules/fused.py ADDED
@@ -0,0 +1,289 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # mypy: allow-untyped-defs
2
+ import torch
3
+ from torch.nn import (
4
+ BatchNorm1d,
5
+ BatchNorm2d,
6
+ BatchNorm3d,
7
+ Conv1d,
8
+ Conv2d,
9
+ Conv3d,
10
+ Linear,
11
+ ReLU,
12
+ )
13
+ from torch.nn.utils.parametrize import type_before_parametrizations
14
+
15
+
16
+ __all__ = [
17
+ "ConvReLU1d",
18
+ "ConvReLU2d",
19
+ "ConvReLU3d",
20
+ "LinearReLU",
21
+ "ConvBn1d",
22
+ "ConvBn2d",
23
+ "ConvBnReLU1d",
24
+ "ConvBnReLU2d",
25
+ "ConvBn3d",
26
+ "ConvBnReLU3d",
27
+ "BNReLU2d",
28
+ "BNReLU3d",
29
+ "LinearBn1d",
30
+ "LinearLeakyReLU",
31
+ "LinearTanh",
32
+ "ConvAdd2d",
33
+ "ConvAddReLU2d",
34
+ ]
35
+
36
+
37
+ # Used for identifying intrinsic modules used in quantization
38
+ class _FusedModule(torch.nn.Sequential):
39
+ pass
40
+
41
+
42
+ class ConvReLU1d(_FusedModule):
43
+ r"""This is a sequential container which calls the Conv1d and ReLU modules.
44
+ During quantization this will be replaced with the corresponding fused module."""
45
+
46
+ def __init__(self, conv, relu):
47
+ assert (
48
+ type_before_parametrizations(conv) == Conv1d
49
+ and type_before_parametrizations(relu) == ReLU
50
+ ), (
51
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
52
+ f"{type_before_parametrizations(relu)}"
53
+ )
54
+ super().__init__(conv, relu)
55
+
56
+
57
+ class ConvReLU2d(_FusedModule):
58
+ r"""This is a sequential container which calls the Conv2d and ReLU modules.
59
+ During quantization this will be replaced with the corresponding fused module."""
60
+
61
+ def __init__(self, conv, relu):
62
+ assert (
63
+ type_before_parametrizations(conv) == Conv2d
64
+ and type_before_parametrizations(relu) == ReLU
65
+ ), (
66
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
67
+ f"{type_before_parametrizations(relu)}"
68
+ )
69
+ super().__init__(conv, relu)
70
+
71
+
72
+ class ConvReLU3d(_FusedModule):
73
+ r"""This is a sequential container which calls the Conv3d and ReLU modules.
74
+ During quantization this will be replaced with the corresponding fused module."""
75
+
76
+ def __init__(self, conv, relu):
77
+ assert (
78
+ type_before_parametrizations(conv) == Conv3d
79
+ and type_before_parametrizations(relu) == ReLU
80
+ ), (
81
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
82
+ f"{type_before_parametrizations(relu)}"
83
+ )
84
+ super().__init__(conv, relu)
85
+
86
+
87
+ class LinearReLU(_FusedModule):
88
+ r"""This is a sequential container which calls the Linear and ReLU modules.
89
+ During quantization this will be replaced with the corresponding fused module."""
90
+
91
+ def __init__(self, linear, relu):
92
+ assert (
93
+ type_before_parametrizations(linear) == Linear
94
+ and type_before_parametrizations(relu) == ReLU
95
+ ), (
96
+ f"Incorrect types for input modules{type_before_parametrizations(linear)}"
97
+ f"{type_before_parametrizations(relu)}"
98
+ )
99
+ super().__init__(linear, relu)
100
+
101
+
102
+ class ConvBn1d(_FusedModule):
103
+ r"""This is a sequential container which calls the Conv 1d and Batch Norm 1d modules.
104
+ During quantization this will be replaced with the corresponding fused module."""
105
+
106
+ def __init__(self, conv, bn):
107
+ assert (
108
+ type_before_parametrizations(conv) == Conv1d
109
+ and type_before_parametrizations(bn) == BatchNorm1d
110
+ ), (
111
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
112
+ f"{type_before_parametrizations(bn)}"
113
+ )
114
+ super().__init__(conv, bn)
115
+
116
+
117
+ class ConvBn2d(_FusedModule):
118
+ r"""This is a sequential container which calls the Conv 2d and Batch Norm 2d modules.
119
+ During quantization this will be replaced with the corresponding fused module."""
120
+
121
+ def __init__(self, conv, bn):
122
+ assert (
123
+ type_before_parametrizations(conv) == Conv2d
124
+ and type_before_parametrizations(bn) == BatchNorm2d
125
+ ), (
126
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
127
+ f"{type_before_parametrizations(bn)}"
128
+ )
129
+ super().__init__(conv, bn)
130
+
131
+
132
+ class ConvBnReLU1d(_FusedModule):
133
+ r"""This is a sequential container which calls the Conv 1d, Batch Norm 1d, and ReLU modules.
134
+ During quantization this will be replaced with the corresponding fused module."""
135
+
136
+ def __init__(self, conv, bn, relu):
137
+ assert (
138
+ type_before_parametrizations(conv) == Conv1d
139
+ and type_before_parametrizations(bn) == BatchNorm1d
140
+ and type_before_parametrizations(relu) == ReLU
141
+ ), (
142
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
143
+ f"{type_before_parametrizations(bn)}"
144
+ f"{type_before_parametrizations(relu)}"
145
+ )
146
+ super().__init__(conv, bn, relu)
147
+
148
+
149
+ class ConvBnReLU2d(_FusedModule):
150
+ r"""This is a sequential container which calls the Conv 2d, Batch Norm 2d, and ReLU modules.
151
+ During quantization this will be replaced with the corresponding fused module."""
152
+
153
+ def __init__(self, conv, bn, relu):
154
+ assert (
155
+ type_before_parametrizations(conv) == Conv2d
156
+ and type_before_parametrizations(bn) == BatchNorm2d
157
+ and type_before_parametrizations(relu) == ReLU
158
+ ), (
159
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
160
+ f"{type_before_parametrizations(bn)}"
161
+ f"{type_before_parametrizations(relu)}"
162
+ )
163
+ super().__init__(conv, bn, relu)
164
+
165
+
166
+ class ConvBn3d(_FusedModule):
167
+ r"""This is a sequential container which calls the Conv 3d and Batch Norm 3d modules.
168
+ During quantization this will be replaced with the corresponding fused module."""
169
+
170
+ def __init__(self, conv, bn):
171
+ assert (
172
+ type_before_parametrizations(conv) == Conv3d
173
+ and type_before_parametrizations(bn) == BatchNorm3d
174
+ ), (
175
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
176
+ f"{type_before_parametrizations(bn)}"
177
+ )
178
+ super().__init__(conv, bn)
179
+
180
+
181
+ class ConvBnReLU3d(_FusedModule):
182
+ r"""This is a sequential container which calls the Conv 3d, Batch Norm 3d, and ReLU modules.
183
+ During quantization this will be replaced with the corresponding fused module."""
184
+
185
+ def __init__(self, conv, bn, relu):
186
+ assert (
187
+ type_before_parametrizations(conv) == Conv3d
188
+ and type_before_parametrizations(bn) == BatchNorm3d
189
+ and type_before_parametrizations(relu) == ReLU
190
+ ), (
191
+ f"Incorrect types for input modules{type_before_parametrizations(conv)}"
192
+ f"{type_before_parametrizations(bn)}"
193
+ f"{type_before_parametrizations(relu)}"
194
+ )
195
+ super().__init__(conv, bn, relu)
196
+
197
+
198
+ class BNReLU2d(_FusedModule):
199
+ r"""This is a sequential container which calls the BatchNorm 2d and ReLU modules.
200
+ During quantization this will be replaced with the corresponding fused module."""
201
+
202
+ def __init__(self, batch_norm, relu):
203
+ assert (
204
+ type_before_parametrizations(batch_norm) == BatchNorm2d
205
+ and type_before_parametrizations(relu) == ReLU
206
+ ), (
207
+ f"Incorrect types for input modules{type_before_parametrizations(batch_norm)}"
208
+ f"{type_before_parametrizations(relu)}"
209
+ )
210
+ super().__init__(batch_norm, relu)
211
+
212
+
213
+ class BNReLU3d(_FusedModule):
214
+ r"""This is a sequential container which calls the BatchNorm 3d and ReLU modules.
215
+ During quantization this will be replaced with the corresponding fused module."""
216
+
217
+ def __init__(self, batch_norm, relu):
218
+ assert (
219
+ type_before_parametrizations(batch_norm) == BatchNorm3d
220
+ and type_before_parametrizations(relu) == ReLU
221
+ ), (
222
+ f"Incorrect types for input modules{type_before_parametrizations(batch_norm)}"
223
+ f"{type_before_parametrizations(relu)}"
224
+ )
225
+ super().__init__(batch_norm, relu)
226
+
227
+
228
+ class LinearBn1d(_FusedModule):
229
+ r"""This is a sequential container which calls the Linear and BatchNorm1d modules.
230
+ During quantization this will be replaced with the corresponding fused module."""
231
+
232
+ def __init__(self, linear, bn):
233
+ assert (
234
+ type_before_parametrizations(linear) == Linear
235
+ and type_before_parametrizations(bn) == BatchNorm1d
236
+ ), (
237
+ f"Incorrect types for input modules{type_before_parametrizations(linear)}"
238
+ f"{type_before_parametrizations(bn)}"
239
+ )
240
+ super().__init__(linear, bn)
241
+
242
+
243
+ class LinearLeakyReLU(_FusedModule):
244
+ r"""This is a sequential container which calls the Linear and LeakyReLU modules.
245
+ During quantization this will be replaced with the corresponding fused module."""
246
+
247
+ def __init__(self, linear, leaky_relu):
248
+ assert type(linear) is Linear and type(leaky_relu) is torch.nn.LeakyReLU, (
249
+ f"Incorrect types for input modules{type(linear)}{type(leaky_relu)}"
250
+ )
251
+ super().__init__(linear, leaky_relu)
252
+
253
+
254
+ class LinearTanh(_FusedModule):
255
+ r"""This is a sequential container which calls the Linear and Tanh modules.
256
+ During quantization this will be replaced with the corresponding fused module."""
257
+
258
+ def __init__(self, linear, tanh):
259
+ assert type(linear) is Linear and type(tanh) is torch.nn.Tanh, (
260
+ f"Incorrect types for input modules{type(linear)}{type(tanh)}"
261
+ )
262
+ super().__init__(linear, tanh)
263
+
264
+
265
+ class ConvAdd2d(_FusedModule):
266
+ r"""This is a sequential container which calls the Conv2d modules with extra Add.
267
+ During quantization this will be replaced with the corresponding fused module."""
268
+
269
+ def __init__(self, conv, add):
270
+ super().__init__(conv)
271
+ self.add = add
272
+
273
+ def forward(self, x1, x2): # type: ignore[override]
274
+ r"""Applies convolution to x1 and adds the result to x2."""
275
+ return self.add(self[0](x1), x2)
276
+
277
+
278
+ class ConvAddReLU2d(_FusedModule):
279
+ r"""This is a sequential container which calls the Conv2d, add, Relu.
280
+ During quantization this will be replaced with the corresponding fused module."""
281
+
282
+ def __init__(self, conv, add, relu):
283
+ super().__init__(conv)
284
+ self.add = add
285
+ self.relu = relu
286
+
287
+ def forward(self, x1, x2): # type: ignore[override]
288
+ r"""Applies convolution to x1, adds the result to x2, and applies ReLU."""
289
+ return self.relu(self.add(self[0](x1), x2))
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/qat/__init__.py ADDED
@@ -0,0 +1 @@
 
 
1
+ from .modules import * # noqa: F403
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/qat/__pycache__/__init__.cpython-312.pyc ADDED
Binary file (260 Bytes). View file
 
Prism/LLaDA/LLaDA_Prism/.venv/lib/python3.12/site-packages/torch/ao/nn/intrinsic/qat/modules/__init__.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .conv_fused import (
2
+ ConvBn1d,
3
+ ConvBn2d,
4
+ ConvBn3d,
5
+ ConvBnReLU1d,
6
+ ConvBnReLU2d,
7
+ ConvBnReLU3d,
8
+ ConvReLU1d,
9
+ ConvReLU2d,
10
+ ConvReLU3d,
11
+ freeze_bn_stats,
12
+ update_bn_stats,
13
+ )
14
+ from .linear_fused import LinearBn1d
15
+ from .linear_relu import LinearReLU
16
+
17
+
18
+ __all__ = [
19
+ "LinearReLU",
20
+ "LinearBn1d",
21
+ "ConvReLU1d",
22
+ "ConvReLU2d",
23
+ "ConvReLU3d",
24
+ "ConvBn1d",
25
+ "ConvBn2d",
26
+ "ConvBn3d",
27
+ "ConvBnReLU1d",
28
+ "ConvBnReLU2d",
29
+ "ConvBnReLU3d",
30
+ "update_bn_stats",
31
+ "freeze_bn_stats",
32
+ ]