mirror of https://gitee.com/namelin2022/ollama
17 changed files with 129 additions and 107 deletions
@ -0,0 +1,22 @@ |
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
|||
From: jmorganca <jmorganca@gmail.com> |
|||
Date: Tue, 8 Apr 2025 19:43:40 -0700 |
|||
Subject: [PATCH] maintain ordering for rules for grammar |
|||
|
|||
---
|
|||
common/json-schema-to-grammar.cpp | 2 +- |
|||
1 file changed, 1 insertion(+), 1 deletion(-) |
|||
|
|||
diff --git a/common/json-schema-to-grammar.cpp b/common/json-schema-to-grammar.cpp
|
|||
index d38a74f9..2a8aeca6 100644
|
|||
--- a/common/json-schema-to-grammar.cpp
|
|||
+++ b/common/json-schema-to-grammar.cpp
|
|||
@@ -350,7 +350,7 @@ private:
|
|||
friend std::string build_grammar(const std::function<void(const common_grammar_builder &)> & cb, const common_grammar_options & options); |
|||
std::function<json(const std::string &)> _fetch_json; |
|||
bool _dotall; |
|||
- std::map<std::string, std::string> _rules;
|
|||
+ std::unordered_map<std::string, std::string> _rules;
|
|||
std::unordered_map<std::string, json> _refs; |
|||
std::unordered_set<std::string> _refs_being_resolved; |
|||
std::vector<std::string> _errors; |
|||
@ -0,0 +1,25 @@ |
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
|||
From: jmorganca <jmorganca@gmail.com> |
|||
Date: Thu, 1 May 2025 15:05:08 -0700 |
|||
Subject: [PATCH] remove amx |
|||
|
|||
disable amx as it reduces performance on some systems |
|||
---
|
|||
ggml/src/CMakeLists.txt | 4 ---- |
|||
1 file changed, 4 deletions(-) |
|||
|
|||
diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt
|
|||
index 770e18bc..62f3dbf6 100644
|
|||
--- a/ggml/src/CMakeLists.txt
|
|||
+++ b/ggml/src/CMakeLists.txt
|
|||
@@ -300,10 +300,6 @@ if (GGML_CPU_ALL_VARIANTS)
|
|||
ggml_add_cpu_backend_variant(skylakex SSE42 AVX F16C AVX2 BMI2 FMA AVX512) |
|||
ggml_add_cpu_backend_variant(icelake SSE42 AVX F16C AVX2 BMI2 FMA AVX512 AVX512_VBMI AVX512_VNNI) |
|||
ggml_add_cpu_backend_variant(alderlake SSE42 AVX F16C AVX2 BMI2 FMA AVX_VNNI) |
|||
- if (NOT MSVC)
|
|||
- # MSVC doesn't support AMX
|
|||
- ggml_add_cpu_backend_variant(sapphirerapids SSE42 AVX F16C AVX2 BMI2 FMA AVX512 AVX512_VBMI AVX512_VNNI AVX512_BF16 AMX_TILE AMX_INT8)
|
|||
- endif()
|
|||
else() |
|||
message(FATAL_ERROR "GGML_CPU_ALL_VARIANTS not yet supported on ${GGML_SYSTEM_ARCH}") |
|||
endif() |
|||
@ -1,25 +0,0 @@ |
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
|||
From: jmorganca <jmorganca@gmail.com> |
|||
Date: Thu, 1 May 2025 15:05:08 -0700 |
|||
Subject: [PATCH] remove amx |
|||
|
|||
disable amx as it reduces performance on some systems |
|||
---
|
|||
ggml/src/CMakeLists.txt | 4 ---- |
|||
1 file changed, 4 deletions(-) |
|||
|
|||
diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt
|
|||
index 45918bf6..0beaed86 100644
|
|||
--- a/ggml/src/CMakeLists.txt
|
|||
+++ b/ggml/src/CMakeLists.txt
|
|||
@@ -296,10 +296,6 @@ if (GGML_CPU_ALL_VARIANTS)
|
|||
ggml_add_cpu_backend_variant(skylakex SSE42 AVX F16C AVX2 BMI2 FMA AVX512) |
|||
ggml_add_cpu_backend_variant(icelake SSE42 AVX F16C AVX2 BMI2 FMA AVX512 AVX512_VBMI AVX512_VNNI) |
|||
ggml_add_cpu_backend_variant(alderlake SSE42 AVX F16C AVX2 BMI2 FMA AVX_VNNI) |
|||
- if (NOT MSVC)
|
|||
- # MSVC doesn't support AMX
|
|||
- ggml_add_cpu_backend_variant(sapphirerapids SSE42 AVX F16C AVX2 BMI2 FMA AVX512 AVX512_VBMI AVX512_VNNI AVX512_BF16 AMX_TILE AMX_INT8)
|
|||
- endif()
|
|||
elseif (GGML_CPU) |
|||
ggml_add_cpu_backend_variant_impl("") |
|||
endif() |
|||
Loading…
Reference in new issue