diff --git a/examples/common.cpp b/examples/common.cpp index fe7308b17..5a2cbaf8d 100644 --- a/examples/common.cpp +++ b/examples/common.cpp @@ -566,7 +566,7 @@ void gpt_print_usage(int /*argc*/, char ** argv, const gpt_params & params) { fprintf(stdout, " --temp N temperature (default: %.1f)\n", (double)params.temp); fprintf(stdout, " --perplexity compute perplexity over each ctx window of the prompt\n"); fprintf(stdout, " --hellaswag compute HellaSwag score over random tasks from datafile supplied with -f\n"); - fprintf(stdout, " --hellaswag-tasks N number of tasks to use when computing the HellaSwag score (default: %d)\n", params.hellaswag_tasks); + fprintf(stdout, " --hellaswag-tasks N number of tasks to use when computing the HellaSwag score (default: %zu)\n", params.hellaswag_tasks); fprintf(stdout, " --keep N number of tokens to keep from the initial prompt (default: %d, -1 = all)\n", params.n_keep); fprintf(stdout, " --chunks N max number of chunks to process (default: %d, -1 = all)\n", params.n_chunks); if (llama_mlock_supported()) { diff --git a/tests/test-double-float.c b/tests/test-double-float.c index 89dafc9f2..cd7bbf666 100644 --- a/tests/test-double-float.c +++ b/tests/test-double-float.c @@ -32,7 +32,8 @@ inline static float silu_float(float x) { int main(void) { uint32_t x = UINT32_MAX; do { - float f = *(float *)&x; + float *y = (float *)&x; + float f = *y; assert(!isfinite(f) || (round_orig(f) == round_float(f))); } while (x--);