llama : correct typos 'occured' and 'occurences' (#19414)
Co-authored-by: thecaptain789 <thecaptain789@users.noreply.github.com>
This commit is contained in:
@@ -461,7 +461,7 @@ void common_ngram_map_draft(common_ngram_map & map,
|
|||||||
slot_max = v;
|
slot_max = v;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// What is sum of the other occurences?
|
// What is sum of the other occurrences?
|
||||||
uint32_t sum_occur = 0;
|
uint32_t sum_occur = 0;
|
||||||
for (int v = 0; v < COMMON_NGRAM_MAX_VALUES; ++v) {
|
for (int v = 0; v < COMMON_NGRAM_MAX_VALUES; ++v) {
|
||||||
if (v == slot_max) {
|
if (v == slot_max) {
|
||||||
|
|||||||
+2
-2
@@ -44,7 +44,7 @@ llama_tokens common_ngram_simple_draft(
|
|||||||
// statistics of a m-gram after a known n-gram
|
// statistics of a m-gram after a known n-gram
|
||||||
struct common_ngram_map_value {
|
struct common_ngram_map_value {
|
||||||
size_t value_idx = 0; // index of value m-gram in token-history (0 if unused)
|
size_t value_idx = 0; // index of value m-gram in token-history (0 if unused)
|
||||||
uint16_t value_num = 0; // number of occurences of this value m-gram after the key n-gram (0 in an unused values-slot)
|
uint16_t value_num = 0; // number of occurrences of this value m-gram after the key n-gram (0 in an unused values-slot)
|
||||||
int16_t n_accepted = -1; // number of accepted tokens at last draft (-1 if unused)
|
int16_t n_accepted = -1; // number of accepted tokens at last draft (-1 if unused)
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ struct common_ngram_map_key {
|
|||||||
size_t key_idx; // index of key n-gram in token-history
|
size_t key_idx; // index of key n-gram in token-history
|
||||||
size_t stat_idx; // index of last token of stastistics computation (key_num, values)
|
size_t stat_idx; // index of last token of stastistics computation (key_num, values)
|
||||||
|
|
||||||
uint16_t key_num; // number of occurences of this key n-gram in token-history
|
uint16_t key_num; // number of occurrences of this key n-gram in token-history
|
||||||
common_ngram_map_value values[COMMON_NGRAM_MAX_VALUES]; // some known values after the key
|
common_ngram_map_value values[COMMON_NGRAM_MAX_VALUES]; // some known values after the key
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -482,7 +482,7 @@ extern "C" {
|
|||||||
enum llama_params_fit_status {
|
enum llama_params_fit_status {
|
||||||
LLAMA_PARAMS_FIT_STATUS_SUCCESS = 0, // found allocations that are projected to fit
|
LLAMA_PARAMS_FIT_STATUS_SUCCESS = 0, // found allocations that are projected to fit
|
||||||
LLAMA_PARAMS_FIT_STATUS_FAILURE = 1, // could not find allocations that are projected to fit
|
LLAMA_PARAMS_FIT_STATUS_FAILURE = 1, // could not find allocations that are projected to fit
|
||||||
LLAMA_PARAMS_FIT_STATUS_ERROR = 2, // a hard error occured, e.g. because no model could be found at the specified path
|
LLAMA_PARAMS_FIT_STATUS_ERROR = 2, // a hard error occurred, e.g. because no model could be found at the specified path
|
||||||
};
|
};
|
||||||
|
|
||||||
// fits mparams and cparams to free device memory (assumes system memory is unlimited)
|
// fits mparams and cparams to free device memory (assumes system memory is unlimited)
|
||||||
|
|||||||
Reference in New Issue
Block a user