|
|
@@ -428,6 +428,11 @@ struct common_params {
|
|
|
|
|
|
// common params
|
|
|
std::string out_file; // output filename for all example programs
|
|
|
+ // optional callback for model loading progress and cancellation:
|
|
|
+ // called with a progress value between 0.0 and 1.0.
|
|
|
+ // return false from callback to abort model loading or true to continue
|
|
|
+ llama_progress_callback load_progress_callback = NULL;
|
|
|
+ void * load_progress_callback_user_data = NULL;
|
|
|
};
|
|
|
|
|
|
// call once at the start of a program if it uses libcommon
|