aboutsummaryrefslogtreecommitdiff
path: root/examples/common.h
diff options
context:
space:
mode:
authorSIGSEGV <21287366+akr2002@users.noreply.github.com>2023-07-12 19:18:43 +0530
committerGitHub <noreply@github.com>2023-07-12 19:18:43 +0530
commit2516af4cd61f509c995b4f78fdf123cba33f3509 (patch)
treede7324f01b9454fb30e4d827b8300d02fd982ed3 /examples/common.h
parentff34a7d385fc47c4d432fd8c19306d5aca814d05 (diff)
parent4e7464ef88885cb3532738b03cac890f4077fa20 (diff)
Merge branch 'ggerganov:master' into master
Diffstat (limited to 'examples/common.h')
-rw-r--r--examples/common.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/common.h b/examples/common.h
index 96f2228..6315df9 100644
--- a/examples/common.h
+++ b/examples/common.h
@@ -48,6 +48,12 @@ struct gpt_params {
float mirostat_tau = 5.00f; // target entropy
float mirostat_eta = 0.10f; // learning rate
+ // Classifier-Free Guidance
+ // https://arxiv.org/abs/2306.17806
+ std::string cfg_negative_prompt; // string to help guidance
+ float cfg_scale = 1.f; // How strong is guidance
+ float cfg_smooth_factor = 1.f; // Smooth factor between old and new logits
+
std::string model = "models/7B/ggml-model.bin"; // model path
std::string model_alias = "unknown"; // model alias
std::string prompt = "";
@@ -99,6 +105,7 @@ std::vector<llama_token> llama_tokenize(struct llama_context * ctx, const std::s
//
std::tuple<struct llama_model *, struct llama_context *> llama_init_from_gpt_params(const gpt_params & params);
+struct llama_context_params llama_context_params_from_gpt_params(const gpt_params & params);
//
// Console utils