File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -268,12 +268,16 @@ class LlavaModel(EagerModelBase):
268268 def __init__ (self , use_sdpa_with_kv_cache_op = True , max_seq_len = 768 ):
269269 self .use_sdpa_with_kv_cache_op = use_sdpa_with_kv_cache_op
270270 self .max_seq_len = max_seq_len
271- self .processor = AutoProcessor .from_pretrained ("llava-hf/llava-1.5-7b-hf" )
271+ self .processor = AutoProcessor .from_pretrained (
272+ "llava-hf/llava-1.5-7b-hf" ,
273+ revision = "a272c74b2481d8aff3aa6fc2c4bf891fe57334fb" , # Need this for transformers >= 4.44.2
274+ )
272275 self .tokenizer = self .processor .tokenizer
273276 self .image_processor = self .processor .image_processor
274277 self .model = LlavaForConditionalGeneration .from_pretrained (
275278 "llava-hf/llava-1.5-7b-hf" ,
276279 device_map = "cpu" ,
280+ revision = "a272c74b2481d8aff3aa6fc2c4bf891fe57334fb" , # Need this for transformers >= 4.44.2
277281 )
278282 self .image = Image .open (
279283 requests .get (
Original file line number Diff line number Diff line change 1+ load ("@fbsource//xplat/executorch/build:runtime_wrapper.bzl" , "get_oss_build_kwargs" , "runtime" )
2+
3+ def define_common_targets ():
4+ runtime .cxx_binary (
5+ name = "main" ,
6+ srcs = [
7+ "main.cpp" ,
8+ ],
9+ compiler_flags = ["-Wno-global-constructors" ],
10+ preprocessor_flags = [
11+ "-DET_USE_THREADPOOL" ,
12+ ],
13+ deps = [
14+ "//executorch/examples/models/llava/runner:runner" ,
15+ "//executorch/extension/evalue_util:print_evalue" ,
16+ "//executorch/extension/threadpool:cpuinfo_utils" ,
17+ "//executorch/extension/threadpool:threadpool" ,
18+ ],
19+ external_deps = [
20+ "gflags" ,
21+ "libtorch" ,
22+ ],
23+ ** get_oss_build_kwargs ()
24+ )
You can’t perform that action at this time.
0 commit comments