Download src/llama-impl.h from OpenTransformer/llama.cpp-prismml: direct link, hf CLI and curl.
- Browser
- Download file 1.99 kB
-
https://huggingface.co/OpenTransformer/llama.cpp-prismml/resolve/main/src/llama-impl.h
- Command line
-
hf download hf://OpenTransformer/llama.cpp-prismml/src/llama-impl.h
-
curl -L -o llama-impl.h https://huggingface.co/OpenTransformer/llama.cpp-prismml/resolve/main/src/llama-impl.h
1.99 kB
| // | |
| // logging | |
| // | |
| LLAMA_ATTRIBUTE_FORMAT(2, 3) | |
| void llama_log_internal (ggml_log_level level, const char * format, ...); | |
| void llama_log_callback_default(ggml_log_level level, const char * text, void * user_data); | |
| // | |
| // helpers | |
| // | |
| template <typename T> | |
| struct no_init { | |
| T value; | |
| no_init() = default; | |
| }; | |
| struct time_meas { | |
| time_meas(int64_t & t_acc, bool disable = false); | |
| ~time_meas(); | |
| const int64_t t_start_us; | |
| int64_t & t_acc; | |
| }; | |
| template <typename T> | |
| struct buffer_view { | |
| T * data; | |
| size_t size = 0; | |
| bool has_data() const { | |
| return data && size > 0; | |
| } | |
| }; | |
| void replace_all(std::string & s, const std::string & search, const std::string & replace); | |
| // TODO: rename to llama_format ? | |
| LLAMA_ATTRIBUTE_FORMAT(1, 2) | |
| std::string format(const char * fmt, ...); | |
| std::string llama_format_tensor_shape(const std::vector<int64_t> & ne); | |
| std::string llama_format_tensor_shape(const struct ggml_tensor * t); | |
| std::string gguf_kv_to_str(const struct gguf_context * ctx_gguf, int i); | |