llama-cparams.h 951 B

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