Skip to content

Commit 4b4df96

Browse files
authored
Clean up remaining TARGETS files (pytorch#21462)
Differential Revision: D113976390 Pull Request resolved: pytorch#21462
1 parent 7af1a4c commit 4b4df96

2 files changed

Lines changed: 42 additions & 1 deletion

File tree

  • examples
    • llm_server/python
    • models/gemma4_31b
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
load("@fbcode_macros//build_defs:build_file_migration.bzl", "fbcode_target")
23

34
oncall("executorch")
45

5-
runtime.python_library(
6+
fbcode_target(_kind = runtime.python_library,
67
name = "lib",
78
srcs = [
89
"__init__.py",

‎examples/models/gemma4_31b/BUCK‎

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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

Comments
 (0)