llama-cparams.h 998 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "llama.h"
  3. #include <cstdint>
  4. #define LLAMA_MAX_SEQ 64
  5. struct llama_cparams {
  6. uint32_t n_ctx; // context size used during inference
  7. uint32_t n_batch;
  8. uint32_t n_ubatch;
  9. uint32_t n_seq_max;
  10. int n_threads; // number of threads to use for generation
  11. int n_threads_batch; // number of threads to use for batch processing
  12. float rope_freq_base;
  13. float rope_freq_scale;
  14. uint32_t n_ctx_orig_yarn;
  15. // These hyperparameters are not exposed in GGUF, because all
  16. // existing YaRN models use the same values for them.
  17. float yarn_ext_factor;
  18. float yarn_attn_factor;
  19. float yarn_beta_fast;
  20. float yarn_beta_slow;
  21. float defrag_thold;
  22. bool embeddings;
  23. bool causal_attn;
  24. bool offload_kqv;
  25. bool flash_attn;
  26. bool no_perf;
  27. bool warmup;
  28. bool op_offload;
  29. enum llama_pooling_type pooling_type;
  30. ggml_backend_sched_eval_callback cb_eval;
  31. void * cb_eval_user_data;
  32. };