|
| 1 | +load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime") |
| 2 | +load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target") |
| 3 | + |
| 4 | +oncall("executorch") |
| 5 | + |
| 6 | +fbcode_target(_kind = runtime.python_library, |
| 7 | + name = "quant", |
| 8 | + srcs = [ |
| 9 | + "cuda_packers.py", |
| 10 | + "quant/quantize.py", |
| 11 | + "quant/recipe.py", |
| 12 | + ], |
| 13 | + base_module = "executorch.examples.models.gemma4_31b", |
| 14 | + visibility = ["PUBLIC"], |
| 15 | + deps = [ |
| 16 | + "//caffe2:torch", |
| 17 | + "//executorch/backends/cuda:coalesced_int4_tensor", |
| 18 | + "//executorch/backends/cuda:dp4a_planar_int5_tensor", |
| 19 | + "//executorch/backends/cuda:dp4a_planar_int6_tensor", |
| 20 | + "//executorch/extension/llm/export:gguf", |
| 21 | + "//executorch/extension/llm/export:int4", |
| 22 | + "//executorch/extension/llm/export:quant", |
| 23 | + "//pytorch/ao:torchao", |
| 24 | + "fbsource//third-party/pypi/safetensors:safetensors", |
| 25 | + ], |
| 26 | +) |
| 27 | + |
| 28 | +fbcode_target(_kind = runtime.python_library, |
| 29 | + name = "quantize_and_save", |
| 30 | + srcs = ["quantize_and_save.py"], |
| 31 | + base_module = "executorch.examples.models.gemma4_31b", |
| 32 | + visibility = ["PUBLIC"], |
| 33 | + deps = [ |
| 34 | + "//caffe2:torch", |
| 35 | + "//executorch/extension/llm/export:load", |
| 36 | + "//executorch/extension/llm/export:quant", |
| 37 | + "//pytorch/ao:torchao", |
| 38 | + "fbsource//third-party/pypi/safetensors:safetensors", |
| 39 | + ], |
| 40 | +) |
0 commit comments