Skip to content

Commit 95780cd

Browse files
ikawrakowIwan Kawrakow
andauthored
Move minja and nlohmann/json to vendor (ikawrakow#802)
Co-authored-by: Iwan Kawrakow <[email protected]>
1 parent 5064ff8 commit 95780cd

File tree

14 files changed

+195
-15
lines changed

14 files changed

+195
-15
lines changed

common/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,12 @@ add_library(${TARGET} STATIC
6565
console.cpp
6666
grammar-parser.h
6767
grammar-parser.cpp
68-
json.hpp
6968
json-partial.h
7069
json-partial.cpp
7170
llguidance.cpp
7271
json-schema-to-grammar.cpp
7372
train.h
7473
train.cpp
75-
minja/chat-template.hpp
76-
minja/minja.hpp
7774
ngram-cache.h
7875
ngram-cache.cpp
7976
speculative.cpp

common/chat-parser.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "chat.h"
44
#include "json-partial.h"
5-
#include "json.hpp"
65
#include "regex-partial.h"
76

87
#include <optional>

common/common.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
#include "common.h"
1313
// Change JSON_ASSERT from assert() to GGML_ASSERT:
1414
#define JSON_ASSERT GGML_ASSERT
15-
#include "json.hpp"
1615
#include "llama-vocab.h"
1716
#include "llama.h"
1817
#include "chat.h"

common/json-partial.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#include "log.h"
44
#include <string>
55

6-
#include <json.hpp>
7-
86
using json = nlohmann::ordered_json;
97

108
enum common_json_stack_element_type {

common/json-partial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#pragma once
2-
#include <json.hpp>
2+
#include <nlohmann/json.hpp>
33

44
// Healing marker (empty if the JSON was fully parsed / wasn't healed).
55
struct common_healing_marker {

common/json-schema-to-grammar.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "ggml.h"
44
// Change JSON_ASSERT from assert() to GGML_ASSERT:
55
#define JSON_ASSERT GGML_ASSERT
6-
#include "json.hpp"
6+
#include <nlohmann/json.hpp>
77

88
std::string json_schema_to_grammar(const nlohmann::ordered_json & schema,
99
bool force_gbnf = false);

common/sampling.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "llama-vocab.h"
44
#include "common.h"
55
#include <random>
6-
#include "json.hpp"
6+
#include <nlohmann/json.hpp>
77
using json = nlohmann::ordered_json;
88

99
struct llama_sampling_context * llama_sampling_init(const struct llama_vocab* vocab, const struct llama_sampling_params & params) {

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "httplib.h"
2222
// Change JSON_ASSERT from assert() to GGML_ASSERT:
2323
#define JSON_ASSERT GGML_ASSERT
24-
#include "json.hpp"
24+
#include <nlohmann/json.hpp>
2525
#include "index.html.gz.hpp"
2626
#include "loading.html.hpp"
2727

examples/server/utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
// Change JSON_ASSERT from assert() to GGML_ASSERT:
77
#define JSON_ASSERT GGML_ASSERT
8-
#include "json.hpp"
8+
#include <nlohmann/json.hpp>
99
#include "chat.h"
1010
#include <string>
1111
#include <vector>

tests/test-chat-parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//
88
#include <exception>
99
#include <iostream>
10-
#include <json.hpp>
10+
#include <nlohmann/json.hpp>
1111
#include <string>
1212

1313
#include "chat-parser.h"

0 commit comments

Comments
 (0)