Skip to content

Commit bc924e0

Browse files
committed
Merge branch 'master' into add-stablelm-hash
2 parents de3d9e3 + f98eb31 commit bc924e0

Some content is hidden

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

45 files changed

+3444
-1415
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ if (LLAMA_CUDA)
405405
list(APPEND GGML_SOURCES_CUDA "ggml-cuda.cu")
406406

407407
add_compile_definitions(GGML_USE_CUDA)
408+
add_compile_definitions(GGML_CUDA_USE_GRAPHS)
408409
if (LLAMA_CUDA_FORCE_DMMV)
409410
add_compile_definitions(GGML_CUDA_FORCE_DMMV)
410411
endif()

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ ifdef LLAMA_CUDA
433433
else
434434
CUDA_PATH ?= /usr/local/cuda
435435
endif
436-
MK_CPPFLAGS += -DGGML_USE_CUDA -I$(CUDA_PATH)/include -I$(CUDA_PATH)/targets/$(UNAME_M)-linux/include
436+
MK_CPPFLAGS += -DGGML_USE_CUDA -I$(CUDA_PATH)/include -I$(CUDA_PATH)/targets/$(UNAME_M)-linux/include -DGGML_CUDA_USE_GRAPHS
437437
MK_LDFLAGS += -lcuda -lcublas -lculibos -lcudart -lcublasLt -lpthread -ldl -lrt -L$(CUDA_PATH)/lib64 -L/usr/lib64 -L$(CUDA_PATH)/targets/$(UNAME_M)-linux/lib -L/usr/lib/wsl/lib
438438
OBJS += ggml-cuda.o
439439
OBJS += $(patsubst %.cu,%.o,$(wildcard ggml-cuda/*.cu))

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ Typically finetunes of the base models below are supported as well.
140140
- [x] [MobileVLM 1.7B/3B models](https://huggingface.co/models?search=mobileVLM)
141141
- [x] [Yi-VL](https://huggingface.co/models?search=Yi-VL)
142142
- [x] [Mini CPM](https://huggingface.co/models?search=MiniCPM)
143-
- [x] [Moondream](https://huggingface.co/vikhyatk/moondream2)
144143

145144
**HTTP server**
146145

common/common.cpp

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#include "common.h"
2+
// Change JSON_ASSERT from assert() to GGML_ASSERT:
3+
#define JSON_ASSERT GGML_ASSERT
24
#include "json.hpp"
35
#include "json-schema-to-grammar.h"
46
#include "llama.h"
@@ -1969,18 +1971,18 @@ static bool llama_download_file(const std::string & url, const std::string & pat
19691971
try {
19701972
metadata_in >> metadata;
19711973
fprintf(stderr, "%s: previous metadata file found %s: %s\n", __func__, metadata_path.c_str(), metadata.dump().c_str());
1972-
if (metadata.contains("url") && metadata["url"].is_string()) {
1973-
auto previous_url = metadata["url"].get<std::string>();
1974+
if (metadata.contains("url") && metadata.at("url").is_string()) {
1975+
auto previous_url = metadata.at("url").get<std::string>();
19741976
if (previous_url != url) {
19751977
fprintf(stderr, "%s: Model URL mismatch: %s != %s\n", __func__, url.c_str(), previous_url.c_str());
19761978
return false;
19771979
}
19781980
}
1979-
if (metadata.contains("etag") && metadata["etag"].is_string()) {
1980-
etag = metadata["etag"];
1981+
if (metadata.contains("etag") && metadata.at("etag").is_string()) {
1982+
etag = metadata.at("etag");
19811983
}
1982-
if (metadata.contains("lastModified") && metadata["lastModified"].is_string()) {
1983-
last_modified = metadata["lastModified"];
1984+
if (metadata.contains("lastModified") && metadata.at("lastModified").is_string()) {
1985+
last_modified = metadata.at("lastModified");
19841986
}
19851987
} catch (const nlohmann::json::exception & e) {
19861988
fprintf(stderr, "%s: error reading metadata file %s: %s\n", __func__, metadata_path.c_str(), e.what());

common/json-schema-to-grammar.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#pragma once
2+
3+
#include "ggml.h"
4+
// Change JSON_ASSERT from assert() to GGML_ASSERT:
5+
#define JSON_ASSERT GGML_ASSERT
26
#include "json.hpp"
37

48
std::string json_schema_to_grammar(const nlohmann::ordered_json& schema);

0 commit comments

Comments
 (0)