Distribute and run LLMs with a single file.
C++ cross-platformggufllama-cpplocal-ailocal-inferencelocal-llmopen-source-aisingle-file-executablespeech-to-text
diff --git a/src/models/t5.cpp b/src/models/t5.cpp
--- a/llama.cpp/src/models/t5.cpp
+++ b/llama.cpp/src/models/t5.cpp
@@ -355,6 +355,12 @@ llama_model_t5::graph<true>::graph(const llama_model & model, const llm_graph_pa
ggml_build_forward_expand(gf, cur);
}
+// Forward-declare the explicit specializations so that the std::make_unique
+// calls below see them before triggering implicit instantiation. Required
+// when compiling with -std=gnu++23 on clang.
+template <> llama_model_t5::graph<false>::graph(const llama_model & model, const llm_graph_params & params);
+template <> llama_model_t5::graph<true>::graph(const llama_model & model, const llm_graph_params & params);
+
std::unique_ptr<llm_graph_context> llama_model_t5::build_arch_graph(const llm_graph_params & params) const {
switch (params.gtype) {
case LLM_GRAPH_TYPE_ENCODER: