mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
units (+2 squashed commit)
Squashed commit: [166979d9] units coversion [038dd5d4] get rid of all warnings (+1 squashed commits) Squashed commits: [6efd1e1b] get rid of all warnings
This commit is contained in:
parent
71e9a64171
commit
5639c1a520
5 changed files with 6 additions and 12 deletions
|
@ -2073,7 +2073,7 @@ generation_outputs gpttype_generate(const generation_inputs inputs, generation_o
|
||||||
int realnpredict = kcpp_params->n_predict-stopper_unused_tokens;
|
int realnpredict = kcpp_params->n_predict-stopper_unused_tokens;
|
||||||
float pt2 = (time2*1000.0/(realnpredict==0?1:realnpredict));
|
float pt2 = (time2*1000.0/(realnpredict==0?1:realnpredict));
|
||||||
float tokens_per_second = (realnpredict == 0 ? 0 : realnpredict / (time1 + time2));
|
float tokens_per_second = (realnpredict == 0 ? 0 : realnpredict / (time1 + time2));
|
||||||
printf("\nContextLimit: %d/%d, Processing:%.2fs (%.1fms/T), Generation:%.2fs (%.1fms/T), Total:%.2fs (%.2fT/s)",current_context_tokens.size(),nctx, time1, pt1, time2, pt2, (time1 + time2), tokens_per_second);
|
printf("\nContextLimit: %d/%d, Processing:%.2fs (%.1fms/T), Generation:%.2fs (%.1fms/T), Total:%.2fs (%.1fms/T = %.2fT/s)",current_context_tokens.size(),nctx, time1, pt1, time2, pt2, (time1 + time2), (1000.0f/tokens_per_second) , tokens_per_second);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
output.status = 1;
|
output.status = 1;
|
||||||
generation_finished = true;
|
generation_finished = true;
|
||||||
|
|
|
@ -6482,6 +6482,7 @@ static uint8_t llama_token_to_byte(const llama_vocab& vocab, llama_token id) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
GGML_ASSERT_CONTINUE(false);
|
GGML_ASSERT_CONTINUE(false);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6497,6 +6498,7 @@ static llama_token llama_byte_to_token(const llama_vocab & vocab, uint8_t ch) {
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
GGML_ASSERT_CONTINUE(false);
|
GGML_ASSERT_CONTINUE(false);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,9 +48,9 @@
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __MINGW32__
|
#ifdef __MINGW32__
|
||||||
__attribute__((format_old(gnu_printf, 1, 2)))
|
__attribute__((format(gnu_printf, 1, 2)))
|
||||||
#else
|
#else
|
||||||
__attribute__((format_old(printf, 1, 2)))
|
__attribute__((format(printf, 1, 2)))
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
static std::string format_old(const char * fmt, ...) {
|
static std::string format_old(const char * fmt, ...) {
|
||||||
|
|
|
@ -48,14 +48,6 @@
|
||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#ifdef __MINGW32__
|
|
||||||
__attribute__((format_old(gnu_printf, 1, 2)))
|
|
||||||
#else
|
|
||||||
__attribute__((format_old(printf, 1, 2)))
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
struct llama_v2_file {
|
struct llama_v2_file {
|
||||||
// use FILE * so we don't have to re-open the file to mmap
|
// use FILE * so we don't have to re-open the file to mmap
|
||||||
|
|
|
@ -227,7 +227,7 @@ extern const enum rwkv_type rwkv_type_from_ggml[GGML_V3_TYPE_COUNT + 1] = {
|
||||||
TYPE_COUNT, /* COUNT */
|
TYPE_COUNT, /* COUNT */
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const char * rwkv_type_to_string[TYPE_COUNT + 1] = {"FP32", "FP16", "Q4_0", "Q4_1", "Q4_1_O", "Q4_2", "Q4_3", "Q5_0", "Q5_1", "Q8_0", "unknown"};
|
const char * rwkv_type_to_string[TYPE_COUNT + 1] = {"FP32", "FP16", "Q4_0", "Q4_1", "Q4_1_O", "Q4_2", "Q4_3", "Q5_0", "Q5_1", "Q8_0", "unknown"};
|
||||||
|
|
||||||
enum rwkv_type rwkv_type_from_string(const char * str) {
|
enum rwkv_type rwkv_type_from_string(const char * str) {
|
||||||
for (int ord = 0; ord < TYPE_COUNT; ord++) {
|
for (int ord = 0; ord < TYPE_COUNT; ord++) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue