| 120 | } |
| 121 | |
| 122 | mtmd_context_params mtmd_context_params_default() { |
| 123 | mtmd_context_params params { |
| 124 | /* use_gpu */ true, |
| 125 | /* print_timings */ true, |
| 126 | /* n_threads */ 4, |
| 127 | /* image_marker */ nullptr, |
| 128 | /* media_marker */ mtmd_default_marker(), |
| 129 | /* flash_attn_type */ LLAMA_FLASH_ATTN_TYPE_AUTO, |
| 130 | /* warmup */ true, |
| 131 | /* image_min_tokens */ -1, |
| 132 | /* image_max_tokens */ -1, |
| 133 | /* cb_eval */ nullptr, |
| 134 | /* cb_eval_user_data */ nullptr, |
| 135 | }; |
| 136 | return params; |
| 137 | } |
| 138 | |
| 139 | struct mtmd_context { |
| 140 | struct clip_ctx * ctx_v; // vision |