File tree Expand file tree Collapse file tree 2 files changed +35
-3
lines changed
examples/models/llama/runner Expand file tree Collapse file tree 2 files changed +35
-3
lines changed Original file line number Diff line number Diff line change 11# Any targets that should be shared between fbcode and xplat must be defined in
22# targets.bzl. This file can contain fbcode-only targets.
33
4+ load("@fbsource//xplat/executorch/build:runtime_wrapper.bzl", "runtime")
45load(":targets.bzl", "define_common_targets")
56
67oncall("executorch")
78
89define_common_targets()
10+
11+ runtime.python_library(
12+ name = "eager_runner_library",
13+ srcs = [
14+ "eager.py",
15+ "generation.py"
16+ ],
17+ _is_external_target = True,
18+ base_module = "executorch.examples.models.llama.runner",
19+ visibility = [
20+ "//bento/...",
21+ "//bento_kernels/...",
22+ "//executorch/examples/...",
23+ "@EXECUTORCH_CLIENTS",
24+ ],
25+ deps = [
26+ "//executorch/examples/models/llama:export_library",
27+ ],
28+ )
29+
30+ runtime.python_binary(
31+ name = "eager",
32+ main_function = "executorch.examples.models.llama.runner.eager.main",
33+ preload_deps = [
34+ "//executorch/extension/llm/custom_ops:custom_ops_aot_lib",
35+ "//executorch/kernels/quantized:aot_lib",
36+ ],
37+ deps = [
38+ ":eager_runner_library",
39+ "//caffe2:torch",
40+ ],
41+ )
Original file line number Diff line number Diff line change 99from typing import Optional
1010
1111import torch
12-
13- from examples .models .llama .llama_transformer import ModelArgs
1412from executorch .examples .models .llama .export_llama_lib import (
1513 _prepare_for_llama_export ,
1614 build_args_parser as _build_args_parser ,
1715)
16+ from executorch .examples .models .llama .llama_transformer import ModelArgs
1817from executorch .examples .models .llama .runner .generation import LlamaRunner
19- from executorch .extension .llm .export import LLMEdgeManager
18+ from executorch .extension .llm .export . builder import LLMEdgeManager
2019
2120
2221class EagerLlamaRunner (LlamaRunner ):
You can’t perform that action at this time.
0 commit comments