llama : models now build their graphs using llama_graph_i

ggml-ci
This commit is contained in:
Georgi Gerganov
2025-02-12 15:08:40 +02:00
parent 0ab50f1bbb
commit f63aeecce6
6 changed files with 7457 additions and 7441 deletions

View File

@ -5,11 +5,16 @@
#include "llama-hparams.h"
#include "llama-vocab.h"
#include "ggml-cpp.h"
#include <memory>
#include <string>
#include <unordered_map>
#include <vector>
class llama_graph_i;
struct llama_cparams;
struct llama_ubatch;
struct llama_model_loader;
// available models
@ -362,6 +367,14 @@ struct llama_model {
const struct ggml_tensor * get_tensor(const char * name) const;
// TODO: add encode/decode graphs
ggml_cgraph * build_graph(
llama_graph_i & lgf,
const llama_cparams & cparams,
const llama_ubatch & ubatch,
ggml_context_ptr && ctx,
bool worst_case) const;
private:
struct impl;
std::unique_ptr<impl> pimpl;