| #pragma once |
|
|
| #include "ggml.h" |
|
|
| #include <cstdint> |
| #include <optional> |
| #include <string> |
| #include <vector> |
|
|
| struct gguf_remote_tensor { |
| std::string name; |
| ggml_type type = GGML_TYPE_F32; |
| int64_t ne[4] = {1, 1, 1, 1}; |
| uint32_t n_dims = 0; |
| }; |
|
|
| struct gguf_remote_model { |
| |
| std::string architecture; |
| uint32_t n_embd = 0; |
| uint32_t n_ff = 0; |
| uint32_t n_vocab = 0; |
| uint32_t n_layer = 0; |
| uint32_t n_head = 0; |
| uint32_t n_head_kv = 0; |
| uint32_t n_expert = 0; |
| uint32_t n_embd_head_k = 0; |
| uint32_t n_embd_head_v = 0; |
| uint16_t n_split = 0; |
| uint32_t n_split_tensors = 0; |
|
|
| std::vector<gguf_remote_tensor> tensors; |
| }; |
|
|
| |
| |
| |
| |
| std::optional<gguf_remote_model> gguf_fetch_model_meta( |
| const std::string & repo, |
| const std::string & quant = "Q8_0", |
| const std::string & cache_dir = ""); |
|
|