char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
dfc29b64e
char/aliceai-t5-moe
1#pragma once 2 3#include "llama.h" 4 5#include <cstdint> 6#include <vector> 7 8#define LLAMA_MAX_SEQ 256 9 10struct llama_cparams { 11uint32_t n_ctx ;// context size used during inference 12uint32_t n_ctx_seq ;// context for a single sequence 13uint32_t n_batch ; 14uint32_t n_ubatch ; 15uint32_t n_seq_max ; 16uint32_t n_rs_seq ;// number of recurrent-state snapshots per seq for rollback 17uint32_t n_outputs_max ;// max outputs supported by the context 18uint32_t n_outputs_max_per_seq ; 19int32_t n_threads ;// number of threads to use for generation 20int32_t n_threads_batch ;// number of threads to use for batch processing 21 22int32_t nextn_layer_offset = 0 ; 23 24float rope_freq_base ; 25float rope_freq_scale ; 26 27uint32_t n_ctx_orig_yarn ; 28// These hyperparameters are not exposed in GGUF, because all 29// existing YaRN models use the same values for them. 30float yarn_ext_factor ; 31float yarn_attn_factor ; 32float yarn_beta_fast ; 33float yarn_beta_slow ; 34 35bool embeddings ; 36bool embeddings_nextn ;// also extract the hidden state before the final output norm 37bool embeddings_nextn_masked ;// extract for only rows where batch.logits != 0 38bool causal_attn ; 39bool offload_kqv ; 40bool flash_attn ; 41bool auto_fa ; 42bool fused_gdn_ar ;// use fused gated delta net (autoregressive) 43bool fused_gdn_ch ;// use fused gated delta net (chunked) 44bool auto_fgdn ; 45bool fused_lid ;// use fused lightning indexer 46bool auto_flid ; 47bool fused_dsv4_hc_pre ; 48bool fused_dsv4_hc_comb ; 49bool fused_dsv4_hc_post ; 50bool auto_fhc ; 51bool no_perf ; 52bool warmup ;// TODO: remove [TAG_LLAMA_GRAPH_NO_WARMUP] 53bool op_offload ; 54bool kv_unified ; 55bool pipeline_parallel ; 56 57std ::vector < bool > embeddings_layer_inp ;// [n_layer()] extract input embeddings for layer 58 59enum llama_context_type ctx_type ; 60enum llama_rope_scaling_type rope_scaling_type ; 61enum llama_pooling_type pooling_type ; 62 63ggml_backend_sched_eval_callback cb_eval ; 64void * cb_eval_user_data ; 65 66llama_context * ctx_other ; 67};