-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hparam comparison uses memcpy for floating point comparison, which is in general a bad idea #3446
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cebtenzzre
reviewed
Oct 2, 2023
ggerganov
approved these changes
Oct 3, 2023
cebtenzzre
reviewed
Oct 4, 2023
cebtenzzre
approved these changes
Oct 4, 2023
joelkuiper
added a commit
to vortext/llama.cpp
that referenced
this pull request
Oct 6, 2023
…example * 'master' of github.com:ggerganov/llama.cpp: kv cache slot search improvements (ggerganov#3493) prompts : fix editorconfig checks after ggerganov#3416 parallel : add option to load external prompt file (ggerganov#3416) server : reuse llama_sample_token common util (ggerganov#3494) llama : correct hparams comparison (ggerganov#3446) ci : fix xcodebuild destinations (ggerganov#3491) convert : update Falcon script for new HF config (ggerganov#3448) build : use std::make_tuple() for compatibility with older GCC versions (ggerganov#3488) common : process escape sequences in reverse prompts (ggerganov#3461) CLBlast: Fix handling of on-device tensor data server : fix incorrect num_tokens_predicted (ggerganov#3480) swift : disable ACCELERATE_NEW_LAPACK (ggerganov#3481) ci : add swift build via xcodebuild (ggerganov#3482)
yusiwen
pushed a commit
to yusiwen/llama.cpp
that referenced
this pull request
Oct 7, 2023
* fixed floating point comparison issues * updated implementation for hparam comparison to handle inf and NaN * fixed code review comments * minor simplification * rename is_float_eq -> is_float_close --------- Co-authored-by: Cebtenzzre <cebtenzzre@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Tested by saving and loading a session using a llama2 model. Sometimes the
hparam
comparison check would fail. I think it's due to the floating point comparisons foreps_norm
values etc.Updated to use
epsilon
comparison method which should be more robust.