From c48c525f8711780f3f7c59bf92f1760f38317218 Mon Sep 17 00:00:00 2001 From: Shangning Xu <32517059+xushangning@users.noreply.github.com> Date: Sat, 15 Jul 2023 02:40:05 +0800 Subject: examples : fixed path typos in embd-input (#2214) --- examples/embd-input/README.md | 2 +- examples/embd-input/llava.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/embd-input') diff --git a/examples/embd-input/README.md b/examples/embd-input/README.md index 02d028f..5c4c75e 100644 --- a/examples/embd-input/README.md +++ b/examples/embd-input/README.md @@ -17,7 +17,7 @@ make import torch bin_path = "../LLaVA-13b-delta-v1-1/pytorch_model-00003-of-00003.bin" -pth_path = "./examples/embd_input/llava_projection.pth" +pth_path = "./examples/embd-input/llava_projection.pth" dic = torch.load(bin_path) used_key = ["model.mm_projector.weight","model.mm_projector.bias"] diff --git a/examples/embd-input/llava.py b/examples/embd-input/llava.py index 2f20cb7..bcbdd2b 100644 --- a/examples/embd-input/llava.py +++ b/examples/embd-input/llava.py @@ -59,7 +59,7 @@ if __name__=="__main__": # Also here can use pytorch_model-00003-of-00003.bin directly. a.load_projection(os.path.join( os.path.dirname(__file__) , - "llava_projetion.pth")) + "llava_projection.pth")) respose = a.chat_with_image( Image.open("./media/llama1-logo.png").convert('RGB'), "what is the text in the picture?") -- cgit v1.2.3 From b1f429095328a34556c0e9a7a2fefced3db3368c Mon Sep 17 00:00:00 2001 From: wzy <32936898+Freed-Wu@users.noreply.github.com> Date: Wed, 19 Jul 2023 15:01:11 +0800 Subject: cmake : install targets (#2256) fix #2252 --- examples/embd-input/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/embd-input') diff --git a/examples/embd-input/CMakeLists.txt b/examples/embd-input/CMakeLists.txt index 2b62395..5bbb1ea 100644 --- a/examples/embd-input/CMakeLists.txt +++ b/examples/embd-input/CMakeLists.txt @@ -1,5 +1,6 @@ set(TARGET embdinput) add_library(${TARGET} embd-input-lib.cpp embd-input.h) +install(TARGETS ${TARGET} LIBRARY) target_link_libraries(${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT}) target_compile_features(${TARGET} PRIVATE cxx_std_11) if(TARGET BUILD_INFO) @@ -8,6 +9,7 @@ endif() set(TARGET embd-input-test) add_executable(${TARGET} embd-input-test.cpp) +install(TARGETS ${TARGET} RUNTIME) target_link_libraries(${TARGET} PRIVATE common llama embdinput ${CMAKE_THREAD_LIBS_INIT}) target_compile_features(${TARGET} PRIVATE cxx_std_11) if(TARGET BUILD_INFO) -- cgit v1.2.3 From 03e566977b277937c5f706180171c5d12b597b0b Mon Sep 17 00:00:00 2001 From: Ikko Eltociear Ashimine Date: Fri, 21 Jul 2023 20:53:07 +0900 Subject: examples : fix typo in minigpt4.py (#2298) promt -> prompt --- examples/embd-input/minigpt4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/embd-input') diff --git a/examples/embd-input/minigpt4.py b/examples/embd-input/minigpt4.py index 8e98f85..15c9b77 100644 --- a/examples/embd-input/minigpt4.py +++ b/examples/embd-input/minigpt4.py @@ -64,7 +64,7 @@ class MiniGPT4(Blip2Base): self.max_txt_len = max_txt_len self.end_sym = end_sym self.model = MyModel(["main", *args]) - # system promt + # system prompt self.model.eval_string("Give the following image: ImageContent. " "You will be able to see the image once I provide it to you. Please answer my questions." "###") -- cgit v1.2.3 From ff966e7ca6af127c9405523cdb07ef8fa01bf6d6 Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Fri, 4 Aug 2023 13:07:21 +0300 Subject: build : fix several cast and printf warnings (#2499) --- examples/embd-input/embd-input-lib.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/embd-input') diff --git a/examples/embd-input/embd-input-lib.cpp b/examples/embd-input/embd-input-lib.cpp index 2656382..2185b9b 100644 --- a/examples/embd-input/embd-input-lib.cpp +++ b/examples/embd-input/embd-input-lib.cpp @@ -30,7 +30,7 @@ struct MyModel* create_mymodel(int argc, char ** argv) { fprintf(stderr, "%s: build = %d (%s)\n", __func__, BUILD_NUMBER, BUILD_COMMIT); if (params.seed == LLAMA_DEFAULT_SEED) { - params.seed = time(NULL); + params.seed = uint32_t(time(NULL)); } fprintf(stderr, "%s: seed = %d\n", __func__, params.seed); -- cgit v1.2.3