diff options
author | Kawrakow <48489457+ikawrakow@users.noreply.github.com> | 2023-07-25 18:35:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-25 18:35:53 +0300 |
commit | eb542d39324574a6778fad9ba9e34ba7a14a82a3 (patch) | |
tree | 3009fde3ceb24f19dfbb2da7c072942ba06eaa83 /examples/baby-llama | |
parent | 07aaa0f63fccaeab099b3a732abda20b921bc5a5 (diff) |
Add LLAMA_DEFAULT_RMS_EPS so we can change the default (#2384)
Co-authored-by: Iwan Kawrakow <iwan.kawrakow@gmail.com>
Diffstat (limited to 'examples/baby-llama')
-rw-r--r-- | examples/baby-llama/baby-llama.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/baby-llama/baby-llama.cpp b/examples/baby-llama/baby-llama.cpp index f9dc0aa..6fa55b3 100644 --- a/examples/baby-llama/baby-llama.cpp +++ b/examples/baby-llama/baby-llama.cpp @@ -8,7 +8,11 @@ #pragma warning(disable: 4244 4267) // possible loss of data #endif -static const float rms_norm_eps = 1e-6f; +#ifdef LLAMA_DEFAULT_RMS_EPS +static const float rms_norm_eps = LLAMA_DEFAULT_RMS_EPS; +#else +static const float rms_norm_eps = 5e-6f; +#endif float frand() { return (float)rand()/(float)RAND_MAX; |