Skip to content

Commit 809393c

Browse files
committed
Merge branch 'master' into sparkle_master_fix
2 parents cb6d4b3 + 99a3755 commit 809393c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2695
-1764
lines changed

.github/ISSUE_TEMPLATE/010-bug-compilation.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,22 @@ body:
6565
If possible, please do a git bisect and identify the exact commit that introduced the bug.
6666
validations:
6767
required: false
68+
- type: textarea
69+
id: command
70+
attributes:
71+
label: Compile command
72+
description: >
73+
Please provide the exact command you used to compile llama.cpp. For example: `cmake -B ...`.
74+
This will be automatically formatted into code, so no need for backticks.
75+
render: shell
76+
validations:
77+
required: true
6878
- type: textarea
6979
id: logs
7080
attributes:
7181
label: Relevant log output
7282
description: >
73-
Please copy and paste any relevant log output, including the command that you entered and any generated text.
83+
Please copy and paste any relevant log output, including any generated text.
7484
This will be automatically formatted into code, so no need for backticks.
7585
render: shell
7686
validations:

.github/ISSUE_TEMPLATE/019-bug-misc.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ body:
5252
- Other (Please specify in the next section)
5353
validations:
5454
required: false
55+
- type: textarea
56+
id: command
57+
attributes:
58+
label: Command line
59+
description: >
60+
Please provide the exact commands you entered, if applicable. For example: `llama-server -m ... -c ...`, `llama-cli -m ...`, etc.
61+
This will be automatically formatted into code, so no need for backticks.
62+
render: shell
63+
validations:
64+
required: false
5565
- type: textarea
5666
id: info
5767
attributes:
@@ -74,7 +84,7 @@ body:
7484
attributes:
7585
label: Relevant log output
7686
description: >
77-
If applicable, please copy and paste any relevant log output, including the command that you entered and any generated text.
87+
If applicable, please copy and paste any relevant log output, including any generated text.
7888
This will be automatically formatted into code, so no need for backticks.
7989
render: shell
8090
validations:

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ jobs:
665665
- build: 'llvm-arm64'
666666
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
667667
- build: 'msvc-arm64'
668-
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON -DBUILD_SHARED_LIBS=O'
668+
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-msvc.cmake -DGGML_NATIVE=OFF -DLLAMA_BUILD_SERVER=ON'
669669
- build: 'llvm-arm64-opencl-adreno'
670670
defines: '-G "Ninja Multi-Config" -D CMAKE_TOOLCHAIN_FILE=cmake/arm64-windows-llvm.cmake -DCMAKE_PREFIX_PATH="$env:RUNNER_TEMP/opencl-arm64-release" -DGGML_OPENCL=ON -DGGML_OPENCL_USE_ADRENO_KERNELS=ON'
671671

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
# https://github.com/jlumbroso/free-disk-space/tree/54081f138730dfa15788a46383842cd2f914a1be#example
101101
- name: Free Disk Space (Ubuntu)
102102
if: ${{ matrix.config.free_disk_space == true }}
103-
uses: jlumbroso/free-disk-space@main
103+
uses: jlumbroso/free-disk-space@v1.3.1
104104
with:
105105
# this might remove tools that are actually needed,
106106
# if set to "true" but frees about 6 GB

.github/workflows/editorconfig.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v4
26-
- uses: editorconfig-checker/action-editorconfig-checker@main
26+
- uses: editorconfig-checker/action-editorconfig-checker@v2
27+
with:
28+
version: v3.0.3
2729
- run: editorconfig-checker

CODEOWNERS

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# collaborators can optionally add themselves here to indicate their availability for reviewing related PRs
22

33
/ci/ @ggerganov
4-
/.devops/ @ngxson
4+
/.devops/*.Dockerfile @ngxson
55
/examples/server/ @ngxson
6+
/ggml/src/ggml-cuda/fattn* @JohannesGaessler
7+
/ggml/src/ggml-cuda/mmq.* @JohannesGaessler
8+
/ggml/src/ggml-cuda/mmv.* @JohannesGaessler
9+
/ggml/src/ggml-cuda/mmvq.* @JohannesGaessler
10+
/ggml/src/ggml-opt.cpp @JohannesGaessler
11+
/ggml/src/gguf.cpp @JohannesGaessler

common/arg.cpp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ common_arg & common_arg::set_examples(std::initializer_list<enum llama_example>
2222
return *this;
2323
}
2424

25+
common_arg & common_arg::set_excludes(std::initializer_list<enum llama_example> excludes) {
26+
this->excludes = std::move(excludes);
27+
return *this;
28+
}
29+
2530
common_arg & common_arg::set_env(const char * env) {
2631
help = help + "\n(env: " + env + ")";
2732
this->env = env;
@@ -37,6 +42,10 @@ bool common_arg::in_example(enum llama_example ex) {
3742
return examples.find(ex) != examples.end();
3843
}
3944

45+
bool common_arg::is_exclude(enum llama_example ex) {
46+
return excludes.find(ex) != excludes.end();
47+
}
48+
4049
bool common_arg::get_value_from_env(std::string & output) {
4150
if (env == nullptr) return false;
4251
char * value = std::getenv(env);
@@ -420,7 +429,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
420429
* - if both {LLAMA_EXAMPLE_COMMON, LLAMA_EXAMPLE_*,} are set, we will prioritize the LLAMA_EXAMPLE_* matching current example
421430
*/
422431
auto add_opt = [&](common_arg arg) {
423-
if (arg.in_example(ex) || arg.in_example(LLAMA_EXAMPLE_COMMON)) {
432+
if ((arg.in_example(ex) || arg.in_example(LLAMA_EXAMPLE_COMMON)) && !arg.is_exclude(ex)) {
424433
ctx_arg.options.push_back(std::move(arg));
425434
}
426435
};
@@ -649,7 +658,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
649658
[](common_params & params, const std::string & value) {
650659
params.prompt = value;
651660
}
652-
));
661+
).set_excludes({LLAMA_EXAMPLE_SERVER}));
653662
add_opt(common_arg(
654663
{"--no-perf"},
655664
string_format("disable internal libllama performance timings (default: %s)", params.no_perf ? "true" : "false"),
@@ -673,7 +682,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
673682
params.prompt.pop_back();
674683
}
675684
}
676-
));
685+
).set_excludes({LLAMA_EXAMPLE_SERVER}));
677686
add_opt(common_arg(
678687
{"--in-file"}, "FNAME",
679688
"an input file (repeat to specify multiple files)",
@@ -700,7 +709,7 @@ common_params_context common_params_parser_init(common_params & params, llama_ex
700709
params.prompt = ss.str();
701710
fprintf(stderr, "Read %zu bytes from binary file %s\n", params.prompt.size(), value.c_str());
702711
}
703-
));
712+
).set_excludes({LLAMA_EXAMPLE_SERVER}));
704713
add_opt(common_arg(
705714
{"-e", "--escape"},
706715
string_format("process escapes sequences (\\n, \\r, \\t, \\', \\\", \\\\) (default: %s)", params.escape ? "true" : "false"),

common/arg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
struct common_arg {
1414
std::set<enum llama_example> examples = {LLAMA_EXAMPLE_COMMON};
15+
std::set<enum llama_example> excludes = {};
1516
std::vector<const char *> args;
1617
const char * value_hint = nullptr; // help text or example for arg value
1718
const char * value_hint_2 = nullptr; // for second arg value
@@ -53,9 +54,11 @@ struct common_arg {
5354
) : args(args), value_hint(value_hint), value_hint_2(value_hint_2), help(help), handler_str_str(handler) {}
5455

5556
common_arg & set_examples(std::initializer_list<enum llama_example> examples);
57+
common_arg & set_excludes(std::initializer_list<enum llama_example> excludes);
5658
common_arg & set_env(const char * env);
5759
common_arg & set_sparam();
5860
bool in_example(enum llama_example ex);
61+
bool is_exclude(enum llama_example ex);
5962
bool get_value_from_env(std::string & output);
6063
bool has_value_from_env();
6164
std::string to_string();

common/common.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
33
#endif
44

5+
#include "ggml.h"
6+
#include "gguf.h"
7+
58
#include "common.h"
69
#include "log.h"
710
// Change JSON_ASSERT from assert() to GGML_ASSERT:

examples/convert-llama2c-to-ggml/convert-llama2c-to-ggml.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "ggml.h"
2+
#include "gguf.h"
3+
24
#include "llama.h"
35
#include "common.h"
46
#include "log.h"

0 commit comments

Comments
 (0)