Skip to content

Commit eeff53e

Browse files
authored
Merge branch 'ggml-org:master' into master
2 parents 6b8a605 + d969e93 commit eeff53e

77 files changed

Lines changed: 3071 additions & 692 deletions

File tree

Some content is hidden

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

.github/workflows/gguf-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
jobs:
2222
deploy:
2323

24-
runs-on: ubuntu-slim
24+
runs-on: ubuntu-latest
2525

2626
steps:
2727
- uses: actions/checkout@v6

docs/build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Building through oneAPI compilers will make avx_vnni instruction set available f
108108
- Using oneAPI docker image:
109109
If you do not want to source the environment vars and install oneAPI manually, you can also build the code using intel docker container: [oneAPI-basekit](https://hub.docker.com/r/intel/oneapi-basekit). Then, you can use the commands given above.
110110
111-
Check [Optimizing and Running LLaMA2 on Intel® CPU](https://www.intel.com/content/www/us/en/content-details/791610/optimizing-and-running-llama2-on-intel-cpu.html) for more information.
111+
Check [Optimizing and Running LLaMA2 on Intel® CPU](https://builders.intel.com/solutionslibrary/optimizing-and-running-llama2-on-intel-cpu) for more information.
112112
113113
### Other BLAS libraries
114114

examples/batched/batched.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "sampling.h"
66

77
#include <algorithm>
8+
#include <clocale>
89
#include <cstdio>
910
#include <string>
1011
#include <vector>
@@ -16,6 +17,8 @@ static void print_usage(int, char ** argv) {
1617
}
1718

1819
int main(int argc, char ** argv) {
20+
std::setlocale(LC_NUMERIC, "C");
21+
1922
common_params params;
2023

2124
params.prompt = "Hello my name is";

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
#include "common.h"
66
#include "log.h"
77

8-
#include <unordered_map>
9-
#include <vector>
8+
#include <algorithm>
109
#include <cassert>
10+
#include <cinttypes>
1111
#include <climits>
12-
#include <cstring>
12+
#include <clocale>
1313
#include <cstdarg>
14-
#include <cinttypes>
14+
#include <cstring>
1515
#include <ctime>
16+
#include <unordered_map>
17+
#include <vector>
1618
#include <random>
1719
#include <stdexcept>
1820
#include <sstream>
@@ -874,6 +876,8 @@ static std::string basename(const std::string &path) {
874876
}
875877

876878
int main(int argc, char ** argv) {
879+
std::setlocale(LC_NUMERIC, "C");
880+
877881
common_init();
878882

879883
struct train_params params = get_default_train_params();

examples/deprecation-warning/deprecation-warning.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
// Warns users that this filename was deprecated, and provides a link for more information.
22

3+
#include <clocale>
34
#include <cstdio>
45
#include <string>
56
#include <unordered_map>
67

78
// Main
89
int main(int argc, char** argv) {
10+
std::setlocale(LC_NUMERIC, "C");
11+
912
std::string filename = "main";
1013
if (argc >= 1) {
1114
filename = argv[0];

examples/diffusion/diffusion-cli.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <limits.h>
88

99
#include <algorithm>
10+
#include <clocale>
1011
#include <cmath>
1112
#include <cstring>
1213
#include <limits>
@@ -538,6 +539,8 @@ static std::string format_input_text(const std::string & prompt, const std::stri
538539
}
539540

540541
int main(int argc, char ** argv) {
542+
std::setlocale(LC_NUMERIC, "C");
543+
541544
ggml_time_init();
542545

543546
common_params params;

examples/embedding/embedding.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "log.h"
44
#include "llama.h"
55

6+
#include <clocale>
67
#include <ctime>
78
#include <algorithm>
89

@@ -94,6 +95,8 @@ static void print_raw_embeddings(const float * emb,
9495
}
9596

9697
int main(int argc, char ** argv) {
98+
std::setlocale(LC_NUMERIC, "C");
99+
97100
common_params params;
98101

99102
if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_EMBEDDING)) {

examples/eval-callback/eval-callback.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#include "log.h"
55
#include "llama.h"
66
#include "llama-cpp.h"
7+
8+
#include <clocale>
79
#include <string>
810
#include <vector>
911

@@ -29,6 +31,8 @@ static bool run(llama_context * ctx, const common_params & params) {
2931
}
3032

3133
int main(int argc, char ** argv) {
34+
std::setlocale(LC_NUMERIC, "C");
35+
3236
base_callback_data cb_data;
3337

3438
common_params params;

examples/gen-docs/gen-docs.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "arg.h"
22
#include "common.h"
33

4+
#include <clocale>
45
#include <fstream>
56
#include <sstream>
67
#include <string>
@@ -100,6 +101,8 @@ static void write_help(std::ostringstream & ss, const md_file & md) {
100101
}
101102

102103
int main(int, char **) {
104+
std::setlocale(LC_NUMERIC, "C");
105+
103106
for (const auto & md : md_files) {
104107
std::ifstream infile(md.fname);
105108
if (!infile.is_open()) {

examples/gguf-hash/gguf-hash.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#include "ggml.h"
22
#include "gguf.h"
33

4-
#include <cstdlib> /* abort() */
4+
#include <algorithm>
5+
#include <clocale>
56
#include <cstddef>
67
#include <cstdio>
7-
#include <string>
8-
#include <stdexcept>
9-
#include <algorithm>
8+
#include <cstdlib> /* abort() */
109
#include <cstring>
10+
#include <stdexcept>
11+
#include <string>
1112

1213
#include <sstream>
1314
#include <fstream>
@@ -626,6 +627,8 @@ static hash_exit_code_t gguf_hash(const hash_params & hash_params) {
626627
}
627628

628629
int main(int argc, const char ** argv) {
630+
std::setlocale(LC_NUMERIC, "C");
631+
629632
hash_params params;
630633
manifest_check_params manifest_check;
631634
hash_params_parse(argc, argv, params);

0 commit comments

Comments
 (0)