File tree Expand file tree Collapse file tree 5 files changed +20
-29
lines changed Expand file tree Collapse file tree 5 files changed +20
-29
lines changed Original file line number Diff line number Diff line change 3
3
#define LLAMA_API_INTERNAL
4
4
#include "llama.h"
5
5
6
- #ifdef __has_include
7
- #if __has_include (< unistd .h > )
8
- #include <unistd.h>
9
- #if defined(_POSIX_MAPPED_FILES )
10
- #include <sys/mman.h>
11
- #include <fcntl.h>
12
- #endif
13
- #if defined(_POSIX_MEMLOCK_RANGE )
14
- #include <sys/resource.h>
15
- #endif
16
- #endif
17
- #endif
18
-
19
- // bump if necessary
20
- #define LLAMA_MAX_NODES 8192
21
- #define LLAMA_MAX_LAYERS 512
22
- #define LLAMA_MAX_EXPERTS 160 // DeepSeekV2
23
-
24
6
#ifdef __GNUC__
25
7
#ifdef __MINGW32__
26
8
#define LLAMA_ATTRIBUTE_FORMAT (...) __attribute__((format(gnu_printf, __VA_ARGS__)))
Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ struct llama_sampling {
18
18
}
19
19
};
20
20
21
- struct llama_sampling * llama_get_sampling (struct llama_context * ctx);
22
-
23
21
//
24
22
// internal API
25
23
//
Original file line number Diff line number Diff line change @@ -62,7 +62,6 @@ struct llama_vocab {
62
62
};
63
63
64
64
const struct llama_vocab * llama_get_vocab (const struct llama_context * ctx);
65
- const struct llama_vocab * llama_get_vocab (const struct llama_model * model);
66
65
67
66
//
68
67
// internal API
Original file line number Diff line number Diff line change 36
36
// TODO: replace with ggml API call
37
37
#define QK_K 256
38
38
39
+ #ifdef __has_include
40
+ #if __has_include(<unistd.h>)
41
+ #include <unistd.h>
42
+ #if defined(_POSIX_MAPPED_FILES)
43
+ #include <sys/mman.h>
44
+ #include <fcntl.h>
45
+ #endif
46
+ #if defined(_POSIX_MEMLOCK_RANGE)
47
+ #include <sys/resource.h>
48
+ #endif
49
+ #endif
50
+ #endif
51
+
39
52
#if defined(_WIN32)
40
53
#define WIN32_LEAN_AND_MEAN
41
54
#ifndef NOMINMAX
87
100
#pragma warning(disable: 4244 4267) // possible loss of data
88
101
#endif
89
102
103
+ // bump if necessary
104
+ #define LLAMA_MAX_NODES 8192
105
+ #define LLAMA_MAX_LAYERS 512
106
+ #define LLAMA_MAX_EXPERTS 160 // DeepSeekV2
107
+
90
108
//
91
109
// helpers
92
110
//
@@ -16794,14 +16812,6 @@ const struct llama_vocab * llama_get_vocab(const struct llama_context * ctx) {
16794
16812
return &ctx->model.vocab;
16795
16813
}
16796
16814
16797
- const struct llama_vocab * llama_get_vocab(const struct llama_model * model) {
16798
- return &model->vocab;
16799
- }
16800
-
16801
- struct llama_sampling * llama_get_sampling(struct llama_context * ctx) {
16802
- return &ctx->sampling;
16803
- }
16804
-
16805
16815
struct llama_grammar * llama_get_grammar(struct llama_context * ctx) {
16806
16816
return &ctx->grammar;
16807
16817
}
Original file line number Diff line number Diff line change 4
4
#include < string>
5
5
#include < vector>
6
6
7
+ // TODO: prefix all symbols with "llama_"
8
+
7
9
struct codepoint_flags {
8
10
enum {
9
11
UNDEFINED = 0x0001 ,
You can’t perform that action at this time.
0 commit comments