Skip to content

Commit

Permalink
Merge branch 'mlc-ai:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
JackWeiw authored May 6, 2024
2 parents 6fcd10d + 23636e5 commit 78a753b
Show file tree
Hide file tree
Showing 98 changed files with 3,364 additions and 2,920 deletions.
9 changes: 5 additions & 4 deletions android/library/prepare_model_lib.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import os

from tvm.contrib import ndk


Expand All @@ -23,8 +24,8 @@ def main():
tar_list = []
model_set = set()

for model, model_lib_path in app_config["model_lib_path_for_prepare_libs"].items():
path = os.path.join(artifact_path, model_lib_path)
for model, model_lib in app_config["model_lib_path_for_prepare_libs"].items():
path = os.path.join(artifact_path, model_lib)
if not os.path.isfile(path):
raise RuntimeError(f"Cannot find android library {path}")
tar_list.append(path)
Expand Down Expand Up @@ -58,11 +59,11 @@ def main():
model_prefix_pattern not in global_symbol_map
and "_" + model_prefix_pattern not in global_symbol_map
):
model_lib_path = app_config["model_lib_path_for_prepare_libs"][model_lib]
model_lib = app_config["model_lib_path_for_prepare_libs"][model_lib]
print(
"ValidationError:\n"
f"\tmodel_lib {model_lib} requested in {app_config_path} is not found in {lib_path}\n"
f"\tspecifically the model_lib for {model_lib_path} in model_lib_path_for_prepare_libs.\n"
f"\tspecifically the model_lib for {model_lib} in model_lib_path_for_prepare_libs.\n"
f"\tcurrent available model_libs in {lib_path}: {available_model_libs}"
)
error_happened = True
Expand Down
6 changes: 3 additions & 3 deletions cpp/conv_templates.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ Conversation Llama2() {
Conversation conv;
conv.name = "llama-2";
conv.system =
("[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant.\n<</SYS>>\n\n ");
conv.roles = {"[INST]", "[/INST]"};
("[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant.\n<</SYS>>\n\n");
conv.roles = {"<s>[INST]", "[/INST]"};
conv.messages = {};
conv.offset = 0;
conv.separator_style = SeparatorStyle::kSepRoleMsg;
conv.seps = {" "};
conv.seps = {" ", " </s>"};
conv.role_msg_sep = " ";
conv.role_empty_sep = " ";
conv.stop_tokens = {2};
Expand Down
Loading

0 comments on commit 78a753b

Please sign in to comment.