Skip to content

Commit 4b34a12

Browse files
committed
Move LlmConfig to extension/llm
ghstack-source-id: bbd9434 ghstack-comment-id: 2993289332 Pull-Request: #11837
1 parent a208151 commit 4b34a12

File tree

15 files changed

+33
-27
lines changed

15 files changed

+33
-27
lines changed

backends/arm/test/models/test_llama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
TosaPipelineMI,
2424
)
2525

26-
from executorch.examples.models.llama.config.llm_config import LlmConfig
26+
from executorch.extension.llm.export.config.llm_config import LlmConfig
2727
from executorch.examples.models.llama.export_llama_lib import (
2828
build_args_parser,
2929
get_llama_model,

examples/apple/mps/scripts/mps_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
serialize_from_bundled_program_to_flatbuffer,
2121
)
2222

23-
from executorch.examples.models.llama.config.llm_config import LlmConfig
23+
from executorch.extension.llm.export.config.llm_config import LlmConfig
2424
from executorch.exir import (
2525
EdgeCompileConfig,
2626
EdgeProgramManager,

examples/models/llama/TARGETS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ runtime.python_library(
6767
"//caffe2:torch",
6868
"//executorch/examples/models:model_base",
6969
"//executorch/examples/models/llama:llama_transformer",
70-
"//executorch/examples/models/llama/config:llm_config",
70+
"//executorch/extension/llm/export/config:llm_config",
7171
"//executorch/examples/models:checkpoint",
7272
],
7373
)
@@ -150,7 +150,7 @@ runtime.python_library(
150150
":source_transformation",
151151
"//ai_codesign/gen_ai/fast_hadamard_transform:fast_hadamard_transform",
152152
"//caffe2:torch",
153-
"//executorch/examples/models/llama/config:llm_config",
153+
"//executorch/extension/llm/export/config:llm_config",
154154
"//executorch/backends/vulkan/_passes:vulkan_passes",
155155
"//executorch/exir/passes:init_mutable_pass",
156156
"//executorch/examples/models:model_base",

examples/models/llama/config/targets.bzl

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,12 @@ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
22
load("@fbcode_macros//build_defs:python_unittest.bzl", "python_unittest")
33

44
def define_common_targets():
5-
runtime.python_library(
6-
name = "llm_config",
7-
srcs = [
8-
"llm_config.py",
9-
],
10-
_is_external_target = True,
11-
base_module = "executorch.examples.models.llama.config",
12-
visibility = [
13-
"//executorch/...",
14-
"@EXECUTORCH_CLIENTS",
15-
],
16-
)
17-
185
python_unittest(
196
name = "test_llm_config",
207
srcs = [
218
"test_llm_config.py",
229
],
2310
deps = [
24-
":llm_config",
11+
"//executorch/extension/llm/export/config:llm_config",
2512
],
2613
)

examples/models/llama/export_llama_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
from executorch.devtools.etrecord import generate_etrecord as generate_etrecord_func
3030

31-
from executorch.examples.models.llama.config.llm_config import LlmConfig
31+
from executorch.extension.llm.export.config.llm_config import LlmConfig
3232
from executorch.examples.models.llama.hf_download import (
3333
download_and_convert_hf_checkpoint,
3434
)

examples/models/llama/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
get_default_model_resource_dir,
1717
)
1818

19-
from executorch.examples.models.llama.config.llm_config import LlmConfig
19+
from executorch.extension.llm.export.config.llm_config import LlmConfig
2020
from executorch.examples.models.llama.llama_transformer import construct_transformer
2121
from executorch.examples.models.llama.model_args import ModelArgs
2222
from executorch.examples.models.llama.rope import Rope

examples/models/llama/runner/eager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
import torch
1212

13-
from executorch.examples.models.llama.config.llm_config import LlmConfig
13+
from executorch.extension.llm.export.config.llm_config import LlmConfig
1414
from executorch.examples.models.llama.export_llama_lib import (
1515
_prepare_for_llama_export,
1616
build_args_parser as _build_args_parser,

examples/models/llama/tests/test_export_llama_lib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import unittest
88

99
from executorch.devtools.backend_debug import get_delegation_info
10-
from executorch.examples.models.llama.config.llm_config import LlmConfig
10+
from executorch.extension.llm.export.config.llm_config import LlmConfig
1111
from executorch.examples.models.llama.export_llama_lib import (
1212
_export_llama,
1313
build_args_parser,

examples/models/llama3_2_vision/runner/eager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from typing import Optional
99

1010
import torch
11-
from executorch.examples.models.llama.config.llm_config import LlmConfig
11+
from executorch.extension.llm.export.config.llm_config import LlmConfig
1212

1313
from executorch.examples.models.llama.export_llama_lib import _prepare_for_llama_export
1414
from executorch.examples.models.llama.runner.eager import execute_runner

examples/models/llava/export_llava.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
get_symmetric_quantization_config,
1717
XNNPACKQuantizer,
1818
)
19-
from executorch.examples.models.llama.config.llm_config import LlmConfig
19+
from executorch.extension.llm.export.config.llm_config import LlmConfig
2020
from executorch.examples.models.llama.export_llama_lib import (
2121
get_quantizer_and_quant_params,
2222
)

0 commit comments

Comments
 (0)