We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1da3377 commit 6ff3e64Copy full SHA for 6ff3e64
llama.cpp
@@ -15,6 +15,17 @@
15
// TODO: move somewhere else
16
#define QK 32
17
18
+// Define std::make_unique if it's not available
19
+// (e.g. on C++11)
20
+#ifndef __cpp_lib_make_unique
21
+template<typename T, typename... Args>
22
+std::unique_ptr<T> make_unique(Args&&... args) {
23
+ return std::unique_ptr<T>(new T(std::forward<Args>(args)...));
24
+}
25
+#else
26
+using std::make_unique;
27
+#endif
28
+
29
// determine number of model parts based on the dimension
30
static const std::map<int, int> LLAMA_N_PARTS = {
31
{ 4096, 1 },
@@ -106,7 +117,7 @@ struct llama_context
106
117
model(std::move(model)),
107
118
vocab(std::move(vocab)),
108
119
params(params),
109
- state(std::make_unique<llama_state>())
120
+ state(make_unique<llama_state>())
110
121
{
111
122
}
112
123
~llama_context(){
0 commit comments