Skip to content

Commit caaee0e

Browse files
committed
Update on "Add new export LLM config"
Differential Revision: [D75263991](https://our.internmc.facebook.com/intern/diff/D75263991) [ghstack-poisoned]
2 parents a2c19be + bda1387 commit caaee0e

File tree

3 files changed

+41
-1
lines changed

3 files changed

+41
-1
lines changed

examples/models/llama/config/TARGETS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Any targets that should be shared between fbcode and xplat must be defined in
2+
# targets.bzl. This file can contain fbcode-only targets.
3+
4+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
5+
load(":targets.bzl", "define_common_targets")
6+
7+
oncall("executorch")
8+
9+
define_common_targets()

examples/models/llama/config/llm_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ class CoreMLConfig:
218218
enable_state: bool = False
219219
preserve_sdpa: bool = False
220220
quantize: Optional[CoreMLQuantize] = None
221-
ios: Literal[15, 16, 17, 18] = 15
221+
ios: int = 15
222222
compute_units: CoreMLComputeUnit = CoreMLComputeUnit.CPU_ONLY
223223

224224
def __post_init__(self):
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
2+
3+
def define_common_targets():
4+
runtime.python_library(
5+
name = "llm_config",
6+
srcs = [
7+
"llm_config.py",
8+
],
9+
_is_external_target = True,
10+
base_module = "executorch.examples.models.llama.config",
11+
visibility = [
12+
"//executorch/...",
13+
"@EXECUTORCH_CLIENTS",
14+
],
15+
)
16+
17+
runtime.python_library(
18+
name = "llm_config_utils",
19+
srcs = [
20+
"llm_config_utils.py",
21+
],
22+
_is_external_target = True,
23+
base_module = "executorch.examples.models.llama.config",
24+
visibility = [
25+
"//executorch/...",
26+
"@EXECUTORCH_CLIENTS",
27+
],
28+
deps = [
29+
":llm_config",
30+
],
31+
)

0 commit comments

Comments
 (0)