Skip to content

Commit

Permalink
minor : updates after rebase to latest master
Browse files Browse the repository at this point in the history
  • Loading branch information
ggerganov committed Apr 14, 2023
1 parent 1c806be commit 05bf3ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ bool gpt_params_parse(int argc, char ** argv, gpt_params & params) {
args_string.pop_back();
}
split_args(args_string, args);
for (int j = 0; j < args.size(); j++) {
for (int j = 0; j < (int) args.size(); j++) {
args[j] = unescape(args[j]);
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions examples/main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ int main(int argc, char ** argv) {
if (!params.clean_interface && !params.instruct_prefix.empty() && !antiprompt.any) {
// avoid printing again user's new line (TODO: try to revert enter press and print newline)
int i = params.instruct_prefix.front() == '\n' ? 1 : 0;
for (; i < inp_pfx.size(); i++) {
for (; i < (int) inp_pfx.size(); i++) {
printf("%s", llama_token_to_str(ctx, inp_pfx[i]));
}
fflush(stdout);
Expand Down Expand Up @@ -476,7 +476,7 @@ int main(int argc, char ** argv) {
if (!params.clean_interface && !params.instruct_suffix.empty() && !antiprompt.is_stop_prompt) {
// avoid printing again user's new line (TODO: try to revert enter press and print newline)
int i = params.instruct_suffix.front() == '\n' ? 1 : 0;
for (; i < inp_sfx.size(); i++) {
for (; i < (int) inp_sfx.size(); i++) {
printf("%s", llama_token_to_str(ctx, inp_sfx[i]));
}
// if (remove trailing space workaround) {
Expand Down
5 changes: 4 additions & 1 deletion ggml.c
Original file line number Diff line number Diff line change
Expand Up @@ -3040,11 +3040,12 @@ static const char * GGML_TYPE_NAME[GGML_TYPE_COUNT] = {
[GGML_TYPE_F16] = "f16",
[GGML_TYPE_Q4_0] = "q4_0",
[GGML_TYPE_Q4_1] = "q4_1",
[GGML_TYPE_Q8_0] = "q8_0",
[GGML_TYPE_I8] = "i8",
[GGML_TYPE_I16] = "i16",
[GGML_TYPE_I32] = "i32",
};
static_assert(GGML_TYPE_COUNT == 7, "GGML_TYPE_NAME is outdated");
static_assert(GGML_TYPE_COUNT == 8, "GGML_TYPE_NAME is outdated");

static const char * GGML_OP_LABEL[GGML_OP_COUNT] = {
"NONE",
Expand Down Expand Up @@ -9440,6 +9441,7 @@ static void ggml_compute_forward_map_unary(
} break;
case GGML_TYPE_Q4_0:
case GGML_TYPE_Q4_1:
case GGML_TYPE_Q8_0:
case GGML_TYPE_I8:
case GGML_TYPE_I16:
case GGML_TYPE_I32:
Expand Down Expand Up @@ -9495,6 +9497,7 @@ static void ggml_compute_forward_map_binary(
} break;
case GGML_TYPE_Q4_0:
case GGML_TYPE_Q4_1:
case GGML_TYPE_Q8_0:
case GGML_TYPE_I8:
case GGML_TYPE_I16:
case GGML_TYPE_I32:
Expand Down

0 comments on commit 05bf3ab

Please sign in to comment.