Follow established naming patterns and conventions consistently throughout the codebase. This includes using consistent formatting (dashes vs underscores), proper capitalization, descriptive parameter names, and uniform data type representations.
Follow established naming patterns and conventions consistently throughout the codebase. This includes using consistent formatting (dashes vs underscores), proper capitalization, descriptive parameter names, and uniform data type representations.
Key principles:
"falcon-h1"
instead of "falcon_h1"
"kFLOP"
not "KFLOP"
type
instead of single letters like T
send_progress
instead of include_prompt_progress
Example of inconsistent naming:
// Inconsistent - mixing byte and element offsets
params[1] = src_misalignment; // byte offset
params[3] = src->nb[0]/ggml_type_size(src->type); // element offset
// Consistent - all element offsets
params[1] = src_misalignment_elements;
params[3] = src_stride_elements;
Before introducing new names, check existing codebase patterns and follow the established conventions. This reduces cognitive load and makes the code more maintainable.
Enter the URL of a public GitHub repository