fix code formating of long function declarations
This commit is contained in:
parent
8d82d4c8e6
commit
9139fec7ff
1 changed files with 19 additions and 14 deletions
|
@ -39,7 +39,9 @@ struct ggml_opt_context * get_train_state_opt(struct train_state * state) {
|
||||||
return state->opt;
|
return state->opt;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct random_normal_distribution * init_random_normal_distribution(int seed, float mean, float std, float min, float max) {
|
struct random_normal_distribution * init_random_normal_distribution(
|
||||||
|
int seed, float mean, float std, float min, float max
|
||||||
|
) {
|
||||||
struct random_normal_distribution * rnd = (struct random_normal_distribution *) malloc(sizeof(struct random_normal_distribution));
|
struct random_normal_distribution * rnd = (struct random_normal_distribution *) malloc(sizeof(struct random_normal_distribution));
|
||||||
rnd->gen = std::mt19937(seed);
|
rnd->gen = std::mt19937(seed);
|
||||||
rnd->rd = std::normal_distribution<float>{mean, std};
|
rnd->rd = std::normal_distribution<float>{mean, std};
|
||||||
|
@ -203,18 +205,19 @@ void assert_shape_4d(struct ggml_tensor * tensor, int64_t ne0, int64_t ne1, int6
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t get_example_targets_batch(
|
int64_t get_example_targets_batch(
|
||||||
struct llama_context * lctx,
|
struct llama_context * lctx,
|
||||||
struct ggml_tensor * tokens_input,
|
struct ggml_tensor * tokens_input,
|
||||||
struct ggml_tensor * target_probs,
|
struct ggml_tensor * target_probs,
|
||||||
int64_t example_id,
|
int64_t example_id,
|
||||||
const size_t * samples_begin,
|
const size_t * samples_begin,
|
||||||
const size_t * samples_size,
|
const size_t * samples_size,
|
||||||
size_t samples_count,
|
size_t samples_count,
|
||||||
const llama_token * train_data,
|
const llama_token * train_data,
|
||||||
size_t n_train_data,
|
size_t n_train_data,
|
||||||
bool separate_with_eos,
|
bool separate_with_eos,
|
||||||
bool separate_with_bos,
|
bool separate_with_bos,
|
||||||
bool fill_with_next_samples) {
|
bool fill_with_next_samples
|
||||||
|
) {
|
||||||
|
|
||||||
GGML_ASSERT(tokens_input->n_dims == 2);
|
GGML_ASSERT(tokens_input->n_dims == 2);
|
||||||
GGML_ASSERT(target_probs->n_dims == 3);
|
GGML_ASSERT(target_probs->n_dims == 3);
|
||||||
|
@ -1129,7 +1132,9 @@ void print_common_train_usage(int /*argc*/, char ** argv, const struct train_par
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool consume_common_train_arg(int argc, char ** argv, int * idx, struct train_params_common * params, bool * invalid_param) {
|
bool consume_common_train_arg(
|
||||||
|
int argc, char ** argv, int * idx, struct train_params_common * params, bool * invalid_param
|
||||||
|
) {
|
||||||
int& i = *idx;
|
int& i = *idx;
|
||||||
std::string arg = argv[i];
|
std::string arg = argv[i];
|
||||||
const std::string arg_prefix = "--";
|
const std::string arg_prefix = "--";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue