clean up
This commit is contained in:
parent
d244fe1a3e
commit
1bd8d1870f
|
|
@ -311,11 +311,11 @@ struct clip_model {
|
||||||
ggml_tensor * mm_boi = nullptr;
|
ggml_tensor * mm_boi = nullptr;
|
||||||
ggml_tensor * mm_eoi = nullptr;
|
ggml_tensor * mm_eoi = nullptr;
|
||||||
|
|
||||||
// lfm2
|
// lfm2 audio
|
||||||
std::array<ggml_tensor *, 7> pre_encode_conv_X_w = {nullptr};
|
std::array<ggml_tensor *, 7> pre_encode_conv_X_w = {nullptr};
|
||||||
std::array<ggml_tensor *, 7> pre_encode_conv_X_b = {nullptr};
|
std::array<ggml_tensor *, 7> pre_encode_conv_X_b = {nullptr};
|
||||||
ggml_tensor * pre_encode_out_w = nullptr;
|
ggml_tensor * pre_encode_out_w = nullptr;
|
||||||
ggml_tensor * pre_encode_out_b = nullptr;
|
ggml_tensor * pre_encode_out_b = nullptr;
|
||||||
|
|
||||||
bool audio_has_avgpool() const {
|
bool audio_has_avgpool() const {
|
||||||
return proj_type == PROJECTOR_TYPE_QWEN2A
|
return proj_type == PROJECTOR_TYPE_QWEN2A
|
||||||
|
|
|
||||||
|
|
@ -565,7 +565,7 @@ bool mtmd_audio_preprocessor_conformer::preprocess(
|
||||||
params.hop_length = hparams.audio_hop_len;
|
params.hop_length = hparams.audio_hop_len;
|
||||||
params.sample_rate = hparams.audio_sample_rate;
|
params.sample_rate = hparams.audio_sample_rate;
|
||||||
params.center_padding = true;
|
params.center_padding = true;
|
||||||
params.preemph = 0.97f; // disabled
|
params.preemph = 0.97f;
|
||||||
params.use_natural_log = true;
|
params.use_natural_log = true;
|
||||||
params.norm_per_feature = true;
|
params.norm_per_feature = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -323,7 +323,9 @@ int main(int argc, char ** argv) {
|
||||||
LOG_WRN("WARN: This is an experimental CLI for testing multimodal capability.\n");
|
LOG_WRN("WARN: This is an experimental CLI for testing multimodal capability.\n");
|
||||||
LOG_WRN(" For normal use cases, please use the standard llama-cli\n");
|
LOG_WRN(" For normal use cases, please use the standard llama-cli\n");
|
||||||
|
|
||||||
eval_system_prompt_if_present();
|
if (eval_system_prompt_if_present()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
if (is_single_turn) {
|
if (is_single_turn) {
|
||||||
g_is_generating = true;
|
g_is_generating = true;
|
||||||
|
|
@ -383,8 +385,10 @@ int main(int argc, char ** argv) {
|
||||||
ctx.n_past = 0;
|
ctx.n_past = 0;
|
||||||
ctx.chat_history.clear();
|
ctx.chat_history.clear();
|
||||||
llama_memory_clear(llama_get_memory(ctx.lctx), true);
|
llama_memory_clear(llama_get_memory(ctx.lctx), true);
|
||||||
|
if (eval_system_prompt_if_present()) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
LOG("Chat history cleared\n\n");
|
LOG("Chat history cleared\n\n");
|
||||||
eval_system_prompt_if_present();
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
g_is_generating = true;
|
g_is_generating = true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue