ggml_sys_bleedingedge/
lib.rs

1/* automatically generated by rust-bindgen 0.69.4 */
2
3#![allow(non_upper_case_globals)]
4#![allow(non_camel_case_types)]
5#![allow(non_snake_case)]
6#![allow(unused)]
7pub const GGMLSYS_VERSION: Option<&str> = option_env!("CARGO_PKG_VERSION");
8
9pub type __off_t = ::std::os::raw::c_long;
10pub type __off64_t = ::std::os::raw::c_long;
11pub type FILE = _IO_FILE;
12pub type _IO_lock_t = ::std::os::raw::c_void;
13pub type ggml_status = ::std::os::raw::c_int;
14pub type ggml_fp16_t = u16;
15pub type ggml_type = ::std::os::raw::c_uint;
16pub type ggml_prec = ::std::os::raw::c_uint;
17pub type ggml_backend_type = ::std::os::raw::c_uint;
18pub type ggml_ftype = ::std::os::raw::c_int;
19pub type ggml_op = ::std::os::raw::c_uint;
20pub type ggml_unary_op = ::std::os::raw::c_uint;
21pub type ggml_object_type = ::std::os::raw::c_uint;
22pub type ggml_log_level = ::std::os::raw::c_uint;
23pub type ggml_tensor_flag = ::std::os::raw::c_uint;
24pub type ggml_abort_callback =
25    ::std::option::Option<unsafe extern "C" fn(data: *mut ::std::os::raw::c_void) -> bool>;
26pub type ggml_cgraph_eval_order = ::std::os::raw::c_uint;
27pub type ggml_task_type = ::std::os::raw::c_uint;
28pub type ggml_numa_strategy = ::std::os::raw::c_uint;
29pub type ggml_guid = [u8; 16usize];
30pub type ggml_guid_t = *mut ggml_guid;
31pub type ggml_op_pool = ::std::os::raw::c_uint;
32pub type ggml_sort_order = ::std::os::raw::c_uint;
33pub type ggml_unary_op_f32_t = ::std::option::Option<
34    unsafe extern "C" fn(arg1: ::std::os::raw::c_int, arg2: *mut f32, arg3: *const f32),
35>;
36pub type ggml_binary_op_f32_t = ::std::option::Option<
37    unsafe extern "C" fn(
38        arg1: ::std::os::raw::c_int,
39        arg2: *mut f32,
40        arg3: *const f32,
41        arg4: *const f32,
42    ),
43>;
44pub type ggml_custom1_op_f32_t =
45    ::std::option::Option<unsafe extern "C" fn(arg1: *mut ggml_tensor, arg2: *const ggml_tensor)>;
46pub type ggml_custom2_op_f32_t = ::std::option::Option<
47    unsafe extern "C" fn(
48        arg1: *mut ggml_tensor,
49        arg2: *const ggml_tensor,
50        arg3: *const ggml_tensor,
51    ),
52>;
53pub type ggml_custom3_op_f32_t = ::std::option::Option<
54    unsafe extern "C" fn(
55        arg1: *mut ggml_tensor,
56        arg2: *const ggml_tensor,
57        arg3: *const ggml_tensor,
58        arg4: *const ggml_tensor,
59    ),
60>;
61pub type ggml_custom1_op_t = ::std::option::Option<
62    unsafe extern "C" fn(
63        dst: *mut ggml_tensor,
64        a: *const ggml_tensor,
65        ith: ::std::os::raw::c_int,
66        nth: ::std::os::raw::c_int,
67        userdata: *mut ::std::os::raw::c_void,
68    ),
69>;
70pub type ggml_custom2_op_t = ::std::option::Option<
71    unsafe extern "C" fn(
72        dst: *mut ggml_tensor,
73        a: *const ggml_tensor,
74        b: *const ggml_tensor,
75        ith: ::std::os::raw::c_int,
76        nth: ::std::os::raw::c_int,
77        userdata: *mut ::std::os::raw::c_void,
78    ),
79>;
80pub type ggml_custom3_op_t = ::std::option::Option<
81    unsafe extern "C" fn(
82        dst: *mut ggml_tensor,
83        a: *const ggml_tensor,
84        b: *const ggml_tensor,
85        c: *const ggml_tensor,
86        ith: ::std::os::raw::c_int,
87        nth: ::std::os::raw::c_int,
88        userdata: *mut ::std::os::raw::c_void,
89    ),
90>;
91pub type ggml_opt_type = ::std::os::raw::c_uint;
92pub type ggml_linesearch = ::std::os::raw::c_uint;
93pub type ggml_opt_result = ::std::os::raw::c_int;
94pub type ggml_opt_callback = ::std::option::Option<
95    unsafe extern "C" fn(
96        data: *mut ::std::os::raw::c_void,
97        accum_step: ::std::os::raw::c_int,
98        sched: *mut f32,
99        cancel: *mut bool,
100    ),
101>;
102pub type ggml_log_callback = ::std::option::Option<
103    unsafe extern "C" fn(
104        level: ggml_log_level,
105        text: *const ::std::os::raw::c_char,
106        user_data: *mut ::std::os::raw::c_void,
107    ),
108>;
109pub type gguf_type = ::std::os::raw::c_uint;
110pub type ggml_to_float_t = ::std::option::Option<
111    unsafe extern "C" fn(x: *const ::std::os::raw::c_void, y: *mut f32, k: i64),
112>;
113pub type ggml_from_float_t = ::std::option::Option<
114    unsafe extern "C" fn(x: *const f32, y: *mut ::std::os::raw::c_void, k: i64),
115>;
116pub type ggml_vec_dot_t = ::std::option::Option<
117    unsafe extern "C" fn(
118        n: ::std::os::raw::c_int,
119        s: *mut f32,
120        bs: usize,
121        x: *const ::std::os::raw::c_void,
122        bx: usize,
123        y: *const ::std::os::raw::c_void,
124        by: usize,
125        nrc: ::std::os::raw::c_int,
126    ),
127>;
128pub type ggml_backend_sched_eval_callback = ::std::option::Option<
129    unsafe extern "C" fn(
130        t: *mut ggml_tensor,
131        ask: bool,
132        user_data: *mut ::std::os::raw::c_void,
133    ) -> bool,
134>;
135pub type llama_pos = i32;
136pub type llama_token = i32;
137pub type llama_seq_id = i32;
138pub type llama_vocab_type = ::std::os::raw::c_uint;
139pub type llama_rope_type = ::std::os::raw::c_int;
140pub type llama_token_type = ::std::os::raw::c_uint;
141pub type llama_ftype = ::std::os::raw::c_uint;
142pub type llama_rope_scaling_type = ::std::os::raw::c_int;
143pub type llama_pooling_type = ::std::os::raw::c_int;
144pub type llama_split_mode = ::std::os::raw::c_uint;
145pub type llama_progress_callback = ::std::option::Option<
146    unsafe extern "C" fn(progress: f32, ctx: *mut ::std::os::raw::c_void) -> bool,
147>;
148pub type llama_model_kv_override_type = ::std::os::raw::c_uint;
149pub type llama_gretype = ::std::os::raw::c_uint;
150pub type llama_beam_search_callback_fn_t = ::std::option::Option<
151    unsafe extern "C" fn(callback_data: *mut ::std::os::raw::c_void, arg1: llama_beams_state),
152>;
153#[repr(C)]
154#[derive(Debug, Copy, Clone)]
155pub struct _IO_marker {
156    _unused: [u8; 0],
157}
158#[repr(C)]
159#[derive(Debug, Copy, Clone)]
160pub struct _IO_codecvt {
161    _unused: [u8; 0],
162}
163#[repr(C)]
164#[derive(Debug, Copy, Clone)]
165pub struct _IO_wide_data {
166    _unused: [u8; 0],
167}
168#[repr(C)]
169#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
170pub struct _IO_FILE {
171    pub _flags: ::std::os::raw::c_int,
172    pub _IO_read_ptr: *mut ::std::os::raw::c_char,
173    pub _IO_read_end: *mut ::std::os::raw::c_char,
174    pub _IO_read_base: *mut ::std::os::raw::c_char,
175    pub _IO_write_base: *mut ::std::os::raw::c_char,
176    pub _IO_write_ptr: *mut ::std::os::raw::c_char,
177    pub _IO_write_end: *mut ::std::os::raw::c_char,
178    pub _IO_buf_base: *mut ::std::os::raw::c_char,
179    pub _IO_buf_end: *mut ::std::os::raw::c_char,
180    pub _IO_save_base: *mut ::std::os::raw::c_char,
181    pub _IO_backup_base: *mut ::std::os::raw::c_char,
182    pub _IO_save_end: *mut ::std::os::raw::c_char,
183    pub _markers: *mut _IO_marker,
184    pub _chain: *mut _IO_FILE,
185    pub _fileno: ::std::os::raw::c_int,
186    pub _flags2: ::std::os::raw::c_int,
187    pub _old_offset: __off_t,
188    pub _cur_column: ::std::os::raw::c_ushort,
189    pub _vtable_offset: ::std::os::raw::c_schar,
190    pub _shortbuf: [::std::os::raw::c_char; 1usize],
191    pub _lock: *mut _IO_lock_t,
192    pub _offset: __off64_t,
193    pub _codecvt: *mut _IO_codecvt,
194    pub _wide_data: *mut _IO_wide_data,
195    pub _freeres_list: *mut _IO_FILE,
196    pub _freeres_buf: *mut ::std::os::raw::c_void,
197    pub __pad5: usize,
198    pub _mode: ::std::os::raw::c_int,
199    pub _unused2: [::std::os::raw::c_char; 20usize],
200}
201#[repr(C)]
202#[derive(Debug, Copy, Clone)]
203pub struct ggml_context {
204    _unused: [u8; 0],
205}
206#[repr(C)]
207#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
208pub struct ggml_object {
209    pub offs: usize,
210    pub size: usize,
211    pub next: *mut ggml_object,
212    pub type_: ggml_object_type,
213    pub padding: [::std::os::raw::c_char; 4usize],
214}
215#[repr(C)]
216#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
217pub struct ggml_tensor {
218    pub type_: ggml_type,
219    pub backend: ggml_backend_type,
220    pub buffer: *mut ggml_backend_buffer,
221    pub ne: [i64; 4usize],
222    pub nb: [usize; 4usize],
223    pub op: ggml_op,
224    pub op_params: [i32; 16usize],
225    pub flags: i32,
226    pub grad: *mut ggml_tensor,
227    pub src: [*mut ggml_tensor; 10usize],
228    pub perf_runs: ::std::os::raw::c_int,
229    pub perf_cycles: i64,
230    pub perf_time_us: i64,
231    pub view_src: *mut ggml_tensor,
232    pub view_offs: usize,
233    pub data: *mut ::std::os::raw::c_void,
234    pub name: [::std::os::raw::c_char; 64usize],
235    pub extra: *mut ::std::os::raw::c_void,
236    pub padding: [::std::os::raw::c_char; 8usize],
237}
238#[repr(C)]
239#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
240pub struct ggml_cplan {
241    pub work_size: usize,
242    pub work_data: *mut u8,
243    pub n_threads: ::std::os::raw::c_int,
244    pub abort_callback: ggml_abort_callback,
245    pub abort_callback_data: *mut ::std::os::raw::c_void,
246}
247#[repr(C)]
248#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
249pub struct ggml_hash_set {
250    pub size: usize,
251    pub keys: *mut *mut ggml_tensor,
252}
253#[repr(C)]
254#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
255pub struct ggml_cgraph {
256    pub size: ::std::os::raw::c_int,
257    pub n_nodes: ::std::os::raw::c_int,
258    pub n_leafs: ::std::os::raw::c_int,
259    pub nodes: *mut *mut ggml_tensor,
260    pub grads: *mut *mut ggml_tensor,
261    pub leafs: *mut *mut ggml_tensor,
262    pub visited_hash_table: ggml_hash_set,
263    pub order: ggml_cgraph_eval_order,
264    pub perf_runs: ::std::os::raw::c_int,
265    pub perf_cycles: i64,
266    pub perf_time_us: i64,
267}
268#[repr(C)]
269#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
270pub struct ggml_scratch {
271    pub offs: usize,
272    pub size: usize,
273    pub data: *mut ::std::os::raw::c_void,
274}
275#[repr(C)]
276#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
277pub struct ggml_init_params {
278    pub mem_size: usize,
279    pub mem_buffer: *mut ::std::os::raw::c_void,
280    pub no_alloc: bool,
281}
282#[repr(C)]
283#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
284pub struct ggml_compute_params {
285    pub type_: ggml_task_type,
286    pub ith: ::std::os::raw::c_int,
287    pub nth: ::std::os::raw::c_int,
288    pub wsize: usize,
289    pub wdata: *mut ::std::os::raw::c_void,
290}
291#[repr(C)]
292#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
293pub struct ggml_opt_params {
294    pub type_: ggml_opt_type,
295    pub graph_size: usize,
296    pub n_threads: ::std::os::raw::c_int,
297    pub past: ::std::os::raw::c_int,
298    pub delta: f32,
299    pub max_no_improvement: ::std::os::raw::c_int,
300    pub print_forward_graph: bool,
301    pub print_backward_graph: bool,
302    pub n_gradient_accumulation: ::std::os::raw::c_int,
303    pub adam: ggml_opt_params__bindgen_ty_1,
304    pub lbfgs: ggml_opt_params__bindgen_ty_2,
305}
306#[repr(C)]
307#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
308pub struct ggml_opt_params__bindgen_ty_1 {
309    pub n_iter: ::std::os::raw::c_int,
310    pub sched: f32,
311    pub decay: f32,
312    pub decay_min_ndim: ::std::os::raw::c_int,
313    pub alpha: f32,
314    pub beta1: f32,
315    pub beta2: f32,
316    pub eps: f32,
317    pub eps_f: f32,
318    pub eps_g: f32,
319    pub gclip: f32,
320}
321#[repr(C)]
322#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
323pub struct ggml_opt_params__bindgen_ty_2 {
324    pub m: ::std::os::raw::c_int,
325    pub n_iter: ::std::os::raw::c_int,
326    pub max_linesearch: ::std::os::raw::c_int,
327    pub eps: f32,
328    pub ftol: f32,
329    pub wolfe: f32,
330    pub min_step: f32,
331    pub max_step: f32,
332    pub linesearch: ggml_linesearch,
333}
334#[repr(C)]
335#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
336pub struct ggml_opt_context {
337    pub ctx: *mut ggml_context,
338    pub params: ggml_opt_params,
339    pub iter: ::std::os::raw::c_int,
340    pub nx: i64,
341    pub just_initialized: bool,
342    pub loss_before: f32,
343    pub loss_after: f32,
344    pub adam: ggml_opt_context__bindgen_ty_1,
345    pub lbfgs: ggml_opt_context__bindgen_ty_2,
346}
347#[repr(C)]
348#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
349pub struct ggml_opt_context__bindgen_ty_1 {
350    pub g: *mut ggml_tensor,
351    pub m: *mut ggml_tensor,
352    pub v: *mut ggml_tensor,
353    pub pf: *mut ggml_tensor,
354    pub fx_best: f32,
355    pub fx_prev: f32,
356    pub n_no_improvement: ::std::os::raw::c_int,
357}
358#[repr(C)]
359#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
360pub struct ggml_opt_context__bindgen_ty_2 {
361    pub x: *mut ggml_tensor,
362    pub xp: *mut ggml_tensor,
363    pub g: *mut ggml_tensor,
364    pub gp: *mut ggml_tensor,
365    pub d: *mut ggml_tensor,
366    pub pf: *mut ggml_tensor,
367    pub lmal: *mut ggml_tensor,
368    pub lmys: *mut ggml_tensor,
369    pub lms: *mut ggml_tensor,
370    pub lmy: *mut ggml_tensor,
371    pub fx_best: f32,
372    pub step: f32,
373    pub j: ::std::os::raw::c_int,
374    pub k: ::std::os::raw::c_int,
375    pub end: ::std::os::raw::c_int,
376    pub n_no_improvement: ::std::os::raw::c_int,
377}
378#[repr(C)]
379#[derive(Debug, Copy, Clone)]
380pub struct gguf_context {
381    _unused: [u8; 0],
382}
383#[repr(C)]
384#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
385pub struct gguf_init_params {
386    pub no_alloc: bool,
387    pub ctx: *mut *mut ggml_context,
388}
389#[repr(C)]
390#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
391pub struct ggml_type_traits_t {
392    pub type_name: *const ::std::os::raw::c_char,
393    pub blck_size: ::std::os::raw::c_int,
394    pub type_size: usize,
395    pub is_quantized: bool,
396    pub to_float: ggml_to_float_t,
397    pub from_float: ggml_from_float_t,
398    pub from_float_reference: ggml_from_float_t,
399    pub vec_dot: ggml_vec_dot_t,
400    pub vec_dot_type: ggml_type,
401    pub nrows: i64,
402}
403#[repr(C)]
404#[derive(Debug, Copy, Clone)]
405pub struct llama_model {
406    _unused: [u8; 0],
407}
408#[repr(C)]
409#[derive(Debug, Copy, Clone)]
410pub struct llama_context {
411    _unused: [u8; 0],
412}
413#[repr(C)]
414#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
415pub struct llama_token_data {
416    pub id: llama_token,
417    pub logit: f32,
418    pub p: f32,
419}
420#[repr(C)]
421#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
422pub struct llama_token_data_array {
423    pub data: *mut llama_token_data,
424    pub size: usize,
425    pub sorted: bool,
426}
427#[repr(C)]
428#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
429pub struct llama_batch {
430    pub n_tokens: i32,
431    pub token: *mut llama_token,
432    pub embd: *mut f32,
433    pub pos: *mut llama_pos,
434    pub n_seq_id: *mut i32,
435    pub seq_id: *mut *mut llama_seq_id,
436    pub logits: *mut i8,
437    pub all_pos_0: llama_pos,
438    pub all_pos_1: llama_pos,
439    pub all_seq_id: llama_seq_id,
440}
441#[repr(C)]
442#[derive(Copy, Clone)]
443pub struct llama_model_kv_override {
444    pub tag: llama_model_kv_override_type,
445    pub key: [::std::os::raw::c_char; 128usize],
446    pub __bindgen_anon_1: llama_model_kv_override__bindgen_ty_1,
447}
448#[repr(C)]
449#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
450pub struct llama_model_params {
451    pub n_gpu_layers: i32,
452    pub split_mode: llama_split_mode,
453    pub main_gpu: i32,
454    pub tensor_split: *const f32,
455    pub progress_callback: llama_progress_callback,
456    pub progress_callback_user_data: *mut ::std::os::raw::c_void,
457    pub kv_overrides: *const llama_model_kv_override,
458    pub vocab_only: bool,
459    pub use_mmap: bool,
460    pub use_mlock: bool,
461    pub check_tensors: bool,
462}
463#[repr(C)]
464#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
465pub struct llama_context_params {
466    pub seed: u32,
467    pub n_ctx: u32,
468    pub n_batch: u32,
469    pub n_ubatch: u32,
470    pub n_seq_max: u32,
471    pub n_threads: u32,
472    pub n_threads_batch: u32,
473    pub rope_scaling_type: llama_rope_scaling_type,
474    pub pooling_type: llama_pooling_type,
475    pub rope_freq_base: f32,
476    pub rope_freq_scale: f32,
477    pub yarn_ext_factor: f32,
478    pub yarn_attn_factor: f32,
479    pub yarn_beta_fast: f32,
480    pub yarn_beta_slow: f32,
481    pub yarn_orig_ctx: u32,
482    pub defrag_thold: f32,
483    pub cb_eval: ggml_backend_sched_eval_callback,
484    pub cb_eval_user_data: *mut ::std::os::raw::c_void,
485    pub type_k: ggml_type,
486    pub type_v: ggml_type,
487    pub logits_all: bool,
488    pub embeddings: bool,
489    pub offload_kqv: bool,
490    pub abort_callback: ggml_abort_callback,
491    pub abort_callback_data: *mut ::std::os::raw::c_void,
492}
493#[repr(C)]
494#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
495pub struct llama_model_quantize_params {
496    pub nthread: i32,
497    pub ftype: llama_ftype,
498    pub output_tensor_type: ggml_type,
499    pub token_embedding_type: ggml_type,
500    pub allow_requantize: bool,
501    pub quantize_output_tensor: bool,
502    pub only_copy: bool,
503    pub pure_: bool,
504    pub keep_split: bool,
505    pub imatrix: *mut ::std::os::raw::c_void,
506    pub kv_overrides: *mut ::std::os::raw::c_void,
507}
508#[repr(C)]
509#[derive(Debug, Copy, Clone)]
510pub struct llama_grammar {
511    _unused: [u8; 0],
512}
513#[repr(C)]
514#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
515pub struct llama_grammar_element {
516    pub type_: llama_gretype,
517    pub value: u32,
518}
519#[repr(C)]
520#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
521pub struct llama_timings {
522    pub t_start_ms: f64,
523    pub t_end_ms: f64,
524    pub t_load_ms: f64,
525    pub t_sample_ms: f64,
526    pub t_p_eval_ms: f64,
527    pub t_eval_ms: f64,
528    pub n_sample: i32,
529    pub n_p_eval: i32,
530    pub n_eval: i32,
531}
532#[repr(C)]
533#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
534pub struct llama_chat_message {
535    pub role: *const ::std::os::raw::c_char,
536    pub content: *const ::std::os::raw::c_char,
537}
538#[repr(C)]
539#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
540pub struct llama_kv_cache_view_cell {
541    pub pos: llama_pos,
542}
543#[repr(C)]
544#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
545pub struct llama_kv_cache_view {
546    pub n_cells: i32,
547    pub n_seq_max: i32,
548    pub token_count: i32,
549    pub used_cells: i32,
550    pub max_contiguous: i32,
551    pub max_contiguous_idx: i32,
552    pub cells: *mut llama_kv_cache_view_cell,
553    pub cells_sequences: *mut llama_seq_id,
554}
555#[repr(C)]
556#[derive(Debug, Copy, Clone, PartialOrd, PartialEq)]
557pub struct llama_beam_view {
558    pub tokens: *const llama_token,
559    pub n_tokens: usize,
560    pub p: f32,
561    pub eob: bool,
562}
563#[repr(C)]
564#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
565pub struct llama_beams_state {
566    pub beam_views: *mut llama_beam_view,
567    pub n_beams: usize,
568    pub common_prefix_length: usize,
569    pub last_call: bool,
570}
571#[repr(C)]
572#[derive(Debug, Copy, Clone, Hash, PartialOrd, Ord, PartialEq, Eq)]
573pub struct ggml_backend_buffer {
574    pub _address: u8,
575}
576pub const GGML_FILE_MAGIC: u32 = 1734831468;
577pub const GGML_FILE_VERSION: u32 = 1;
578pub const GGML_QNT_VERSION: u32 = 2;
579pub const GGML_QNT_VERSION_FACTOR: u32 = 1000;
580pub const GGML_MAX_DIMS: u32 = 4;
581pub const GGML_MAX_PARAMS: u32 = 2048;
582pub const GGML_MAX_CONTEXTS: u32 = 64;
583pub const GGML_MAX_SRC: u32 = 10;
584pub const GGML_MAX_NAME: u32 = 64;
585pub const GGML_MAX_OP_PARAMS: u32 = 64;
586pub const GGML_DEFAULT_N_THREADS: u32 = 4;
587pub const GGML_DEFAULT_GRAPH_SIZE: u32 = 2048;
588pub const GGML_MEM_ALIGN: u32 = 16;
589pub const GGML_EXIT_SUCCESS: u32 = 0;
590pub const GGML_EXIT_ABORTED: u32 = 1;
591pub const GGUF_MAGIC: &[u8; 5] = b"GGUF\0";
592pub const GGUF_VERSION: u32 = 3;
593pub const GGUF_DEFAULT_ALIGNMENT: u32 = 32;
594pub const GGML_N_TASKS_MAX: i32 = -1;
595pub const LLAMA_DEFAULT_SEED: u32 = 4294967295;
596pub const LLAMA_MAX_RNG_STATE: u32 = 65536;
597pub const LLAMA_FILE_MAGIC_GGLA: u32 = 1734831201;
598pub const LLAMA_FILE_MAGIC_GGSN: u32 = 1734833006;
599pub const LLAMA_FILE_MAGIC_GGSQ: u32 = 1734833009;
600pub const LLAMA_SESSION_MAGIC: u32 = 1734833006;
601pub const LLAMA_SESSION_VERSION: u32 = 5;
602pub const LLAMA_STATE_SEQ_MAGIC: u32 = 1734833009;
603pub const LLAMA_STATE_SEQ_VERSION: u32 = 1;
604pub const ggml_status_GGML_STATUS_ALLOC_FAILED: ggml_status = -2;
605pub const ggml_status_GGML_STATUS_FAILED: ggml_status = -1;
606pub const ggml_status_GGML_STATUS_SUCCESS: ggml_status = 0;
607pub const ggml_status_GGML_STATUS_ABORTED: ggml_status = 1;
608pub const ggml_type_GGML_TYPE_F32: ggml_type = 0;
609pub const ggml_type_GGML_TYPE_F16: ggml_type = 1;
610pub const ggml_type_GGML_TYPE_Q4_0: ggml_type = 2;
611pub const ggml_type_GGML_TYPE_Q4_1: ggml_type = 3;
612pub const ggml_type_GGML_TYPE_Q5_0: ggml_type = 6;
613pub const ggml_type_GGML_TYPE_Q5_1: ggml_type = 7;
614pub const ggml_type_GGML_TYPE_Q8_0: ggml_type = 8;
615pub const ggml_type_GGML_TYPE_Q8_1: ggml_type = 9;
616pub const ggml_type_GGML_TYPE_Q2_K: ggml_type = 10;
617pub const ggml_type_GGML_TYPE_Q3_K: ggml_type = 11;
618pub const ggml_type_GGML_TYPE_Q4_K: ggml_type = 12;
619pub const ggml_type_GGML_TYPE_Q5_K: ggml_type = 13;
620pub const ggml_type_GGML_TYPE_Q6_K: ggml_type = 14;
621pub const ggml_type_GGML_TYPE_Q8_K: ggml_type = 15;
622pub const ggml_type_GGML_TYPE_IQ2_XXS: ggml_type = 16;
623pub const ggml_type_GGML_TYPE_IQ2_XS: ggml_type = 17;
624pub const ggml_type_GGML_TYPE_IQ3_XXS: ggml_type = 18;
625pub const ggml_type_GGML_TYPE_IQ1_S: ggml_type = 19;
626pub const ggml_type_GGML_TYPE_IQ4_NL: ggml_type = 20;
627pub const ggml_type_GGML_TYPE_IQ3_S: ggml_type = 21;
628pub const ggml_type_GGML_TYPE_IQ2_S: ggml_type = 22;
629pub const ggml_type_GGML_TYPE_IQ4_XS: ggml_type = 23;
630pub const ggml_type_GGML_TYPE_I8: ggml_type = 24;
631pub const ggml_type_GGML_TYPE_I16: ggml_type = 25;
632pub const ggml_type_GGML_TYPE_I32: ggml_type = 26;
633pub const ggml_type_GGML_TYPE_I64: ggml_type = 27;
634pub const ggml_type_GGML_TYPE_F64: ggml_type = 28;
635pub const ggml_type_GGML_TYPE_IQ1_M: ggml_type = 29;
636pub const ggml_type_GGML_TYPE_COUNT: ggml_type = 30;
637pub const ggml_prec_GGML_PREC_DEFAULT: ggml_prec = 0;
638pub const ggml_prec_GGML_PREC_F32: ggml_prec = 1;
639pub const ggml_backend_type_GGML_BACKEND_TYPE_CPU: ggml_backend_type = 0;
640pub const ggml_backend_type_GGML_BACKEND_TYPE_GPU: ggml_backend_type = 10;
641pub const ggml_backend_type_GGML_BACKEND_TYPE_GPU_SPLIT: ggml_backend_type = 20;
642pub const ggml_ftype_GGML_FTYPE_UNKNOWN: ggml_ftype = -1;
643pub const ggml_ftype_GGML_FTYPE_ALL_F32: ggml_ftype = 0;
644pub const ggml_ftype_GGML_FTYPE_MOSTLY_F16: ggml_ftype = 1;
645pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q4_0: ggml_ftype = 2;
646pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q4_1: ggml_ftype = 3;
647pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q4_1_SOME_F16: ggml_ftype = 4;
648pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q8_0: ggml_ftype = 7;
649pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q5_0: ggml_ftype = 8;
650pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q5_1: ggml_ftype = 9;
651pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q2_K: ggml_ftype = 10;
652pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q3_K: ggml_ftype = 11;
653pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q4_K: ggml_ftype = 12;
654pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q5_K: ggml_ftype = 13;
655pub const ggml_ftype_GGML_FTYPE_MOSTLY_Q6_K: ggml_ftype = 14;
656pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ2_XXS: ggml_ftype = 15;
657pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ2_XS: ggml_ftype = 16;
658pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ3_XXS: ggml_ftype = 17;
659pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ1_S: ggml_ftype = 18;
660pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ4_NL: ggml_ftype = 19;
661pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ3_S: ggml_ftype = 20;
662pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ2_S: ggml_ftype = 21;
663pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ4_XS: ggml_ftype = 22;
664pub const ggml_ftype_GGML_FTYPE_MOSTLY_IQ1_M: ggml_ftype = 23;
665pub const ggml_op_GGML_OP_NONE: ggml_op = 0;
666pub const ggml_op_GGML_OP_DUP: ggml_op = 1;
667pub const ggml_op_GGML_OP_ADD: ggml_op = 2;
668pub const ggml_op_GGML_OP_ADD1: ggml_op = 3;
669pub const ggml_op_GGML_OP_ACC: ggml_op = 4;
670pub const ggml_op_GGML_OP_SUB: ggml_op = 5;
671pub const ggml_op_GGML_OP_MUL: ggml_op = 6;
672pub const ggml_op_GGML_OP_DIV: ggml_op = 7;
673pub const ggml_op_GGML_OP_SQR: ggml_op = 8;
674pub const ggml_op_GGML_OP_SQRT: ggml_op = 9;
675pub const ggml_op_GGML_OP_LOG: ggml_op = 10;
676pub const ggml_op_GGML_OP_SUM: ggml_op = 11;
677pub const ggml_op_GGML_OP_SUM_ROWS: ggml_op = 12;
678pub const ggml_op_GGML_OP_MEAN: ggml_op = 13;
679pub const ggml_op_GGML_OP_ARGMAX: ggml_op = 14;
680pub const ggml_op_GGML_OP_REPEAT: ggml_op = 15;
681pub const ggml_op_GGML_OP_REPEAT_BACK: ggml_op = 16;
682pub const ggml_op_GGML_OP_CONCAT: ggml_op = 17;
683pub const ggml_op_GGML_OP_SILU_BACK: ggml_op = 18;
684pub const ggml_op_GGML_OP_NORM: ggml_op = 19;
685pub const ggml_op_GGML_OP_RMS_NORM: ggml_op = 20;
686pub const ggml_op_GGML_OP_RMS_NORM_BACK: ggml_op = 21;
687pub const ggml_op_GGML_OP_GROUP_NORM: ggml_op = 22;
688pub const ggml_op_GGML_OP_MUL_MAT: ggml_op = 23;
689pub const ggml_op_GGML_OP_MUL_MAT_ID: ggml_op = 24;
690pub const ggml_op_GGML_OP_OUT_PROD: ggml_op = 25;
691pub const ggml_op_GGML_OP_SCALE: ggml_op = 26;
692pub const ggml_op_GGML_OP_SET: ggml_op = 27;
693pub const ggml_op_GGML_OP_CPY: ggml_op = 28;
694pub const ggml_op_GGML_OP_CONT: ggml_op = 29;
695pub const ggml_op_GGML_OP_RESHAPE: ggml_op = 30;
696pub const ggml_op_GGML_OP_VIEW: ggml_op = 31;
697pub const ggml_op_GGML_OP_PERMUTE: ggml_op = 32;
698pub const ggml_op_GGML_OP_TRANSPOSE: ggml_op = 33;
699pub const ggml_op_GGML_OP_GET_ROWS: ggml_op = 34;
700pub const ggml_op_GGML_OP_GET_ROWS_BACK: ggml_op = 35;
701pub const ggml_op_GGML_OP_DIAG: ggml_op = 36;
702pub const ggml_op_GGML_OP_DIAG_MASK_INF: ggml_op = 37;
703pub const ggml_op_GGML_OP_DIAG_MASK_ZERO: ggml_op = 38;
704pub const ggml_op_GGML_OP_SOFT_MAX: ggml_op = 39;
705pub const ggml_op_GGML_OP_SOFT_MAX_BACK: ggml_op = 40;
706pub const ggml_op_GGML_OP_ROPE: ggml_op = 41;
707pub const ggml_op_GGML_OP_ROPE_BACK: ggml_op = 42;
708pub const ggml_op_GGML_OP_ALIBI: ggml_op = 43;
709pub const ggml_op_GGML_OP_CLAMP: ggml_op = 44;
710pub const ggml_op_GGML_OP_CONV_TRANSPOSE_1D: ggml_op = 45;
711pub const ggml_op_GGML_OP_IM2COL: ggml_op = 46;
712pub const ggml_op_GGML_OP_CONV_TRANSPOSE_2D: ggml_op = 47;
713pub const ggml_op_GGML_OP_POOL_1D: ggml_op = 48;
714pub const ggml_op_GGML_OP_POOL_2D: ggml_op = 49;
715pub const ggml_op_GGML_OP_UPSCALE: ggml_op = 50;
716pub const ggml_op_GGML_OP_PAD: ggml_op = 51;
717pub const ggml_op_GGML_OP_ARANGE: ggml_op = 52;
718pub const ggml_op_GGML_OP_TIMESTEP_EMBEDDING: ggml_op = 53;
719pub const ggml_op_GGML_OP_ARGSORT: ggml_op = 54;
720pub const ggml_op_GGML_OP_LEAKY_RELU: ggml_op = 55;
721pub const ggml_op_GGML_OP_FLASH_ATTN: ggml_op = 56;
722pub const ggml_op_GGML_OP_FLASH_FF: ggml_op = 57;
723pub const ggml_op_GGML_OP_FLASH_ATTN_BACK: ggml_op = 58;
724pub const ggml_op_GGML_OP_SSM_CONV: ggml_op = 59;
725pub const ggml_op_GGML_OP_SSM_SCAN: ggml_op = 60;
726pub const ggml_op_GGML_OP_WIN_PART: ggml_op = 61;
727pub const ggml_op_GGML_OP_WIN_UNPART: ggml_op = 62;
728pub const ggml_op_GGML_OP_GET_REL_POS: ggml_op = 63;
729pub const ggml_op_GGML_OP_ADD_REL_POS: ggml_op = 64;
730pub const ggml_op_GGML_OP_UNARY: ggml_op = 65;
731pub const ggml_op_GGML_OP_MAP_UNARY: ggml_op = 66;
732pub const ggml_op_GGML_OP_MAP_BINARY: ggml_op = 67;
733pub const ggml_op_GGML_OP_MAP_CUSTOM1_F32: ggml_op = 68;
734pub const ggml_op_GGML_OP_MAP_CUSTOM2_F32: ggml_op = 69;
735pub const ggml_op_GGML_OP_MAP_CUSTOM3_F32: ggml_op = 70;
736pub const ggml_op_GGML_OP_MAP_CUSTOM1: ggml_op = 71;
737pub const ggml_op_GGML_OP_MAP_CUSTOM2: ggml_op = 72;
738pub const ggml_op_GGML_OP_MAP_CUSTOM3: ggml_op = 73;
739pub const ggml_op_GGML_OP_CROSS_ENTROPY_LOSS: ggml_op = 74;
740pub const ggml_op_GGML_OP_CROSS_ENTROPY_LOSS_BACK: ggml_op = 75;
741pub const ggml_op_GGML_OP_COUNT: ggml_op = 76;
742pub const ggml_unary_op_GGML_UNARY_OP_ABS: ggml_unary_op = 0;
743pub const ggml_unary_op_GGML_UNARY_OP_SGN: ggml_unary_op = 1;
744pub const ggml_unary_op_GGML_UNARY_OP_NEG: ggml_unary_op = 2;
745pub const ggml_unary_op_GGML_UNARY_OP_STEP: ggml_unary_op = 3;
746pub const ggml_unary_op_GGML_UNARY_OP_TANH: ggml_unary_op = 4;
747pub const ggml_unary_op_GGML_UNARY_OP_ELU: ggml_unary_op = 5;
748pub const ggml_unary_op_GGML_UNARY_OP_RELU: ggml_unary_op = 6;
749pub const ggml_unary_op_GGML_UNARY_OP_GELU: ggml_unary_op = 7;
750pub const ggml_unary_op_GGML_UNARY_OP_GELU_QUICK: ggml_unary_op = 8;
751pub const ggml_unary_op_GGML_UNARY_OP_SILU: ggml_unary_op = 9;
752pub const ggml_unary_op_GGML_UNARY_OP_HARDSWISH: ggml_unary_op = 10;
753pub const ggml_unary_op_GGML_UNARY_OP_HARDSIGMOID: ggml_unary_op = 11;
754pub const ggml_unary_op_GGML_UNARY_OP_COUNT: ggml_unary_op = 12;
755pub const ggml_object_type_GGML_OBJECT_TYPE_TENSOR: ggml_object_type = 0;
756pub const ggml_object_type_GGML_OBJECT_TYPE_GRAPH: ggml_object_type = 1;
757pub const ggml_object_type_GGML_OBJECT_TYPE_WORK_BUFFER: ggml_object_type = 2;
758pub const ggml_log_level_GGML_LOG_LEVEL_ERROR: ggml_log_level = 2;
759pub const ggml_log_level_GGML_LOG_LEVEL_WARN: ggml_log_level = 3;
760pub const ggml_log_level_GGML_LOG_LEVEL_INFO: ggml_log_level = 4;
761pub const ggml_log_level_GGML_LOG_LEVEL_DEBUG: ggml_log_level = 5;
762pub const ggml_tensor_flag_GGML_TENSOR_FLAG_INPUT: ggml_tensor_flag = 1;
763pub const ggml_tensor_flag_GGML_TENSOR_FLAG_OUTPUT: ggml_tensor_flag = 2;
764pub const ggml_tensor_flag_GGML_TENSOR_FLAG_PARAM: ggml_tensor_flag = 4;
765pub const GGML_OBJECT_SIZE: usize = 32;
766pub const GGML_TENSOR_SIZE: usize = 368;
767pub const ggml_cgraph_eval_order_GGML_CGRAPH_EVAL_ORDER_LEFT_TO_RIGHT: ggml_cgraph_eval_order = 0;
768pub const ggml_cgraph_eval_order_GGML_CGRAPH_EVAL_ORDER_RIGHT_TO_LEFT: ggml_cgraph_eval_order = 1;
769pub const ggml_cgraph_eval_order_GGML_CGRAPH_EVAL_ORDER_COUNT: ggml_cgraph_eval_order = 2;
770pub const ggml_task_type_GGML_TASK_TYPE_INIT: ggml_task_type = 0;
771pub const ggml_task_type_GGML_TASK_TYPE_COMPUTE: ggml_task_type = 1;
772pub const ggml_task_type_GGML_TASK_TYPE_FINALIZE: ggml_task_type = 2;
773pub const ggml_numa_strategy_GGML_NUMA_STRATEGY_DISABLED: ggml_numa_strategy = 0;
774pub const ggml_numa_strategy_GGML_NUMA_STRATEGY_DISTRIBUTE: ggml_numa_strategy = 1;
775pub const ggml_numa_strategy_GGML_NUMA_STRATEGY_ISOLATE: ggml_numa_strategy = 2;
776pub const ggml_numa_strategy_GGML_NUMA_STRATEGY_NUMACTL: ggml_numa_strategy = 3;
777pub const ggml_numa_strategy_GGML_NUMA_STRATEGY_MIRROR: ggml_numa_strategy = 4;
778pub const ggml_numa_strategy_GGML_NUMA_STRATEGY_COUNT: ggml_numa_strategy = 5;
779pub const ggml_op_pool_GGML_OP_POOL_MAX: ggml_op_pool = 0;
780pub const ggml_op_pool_GGML_OP_POOL_AVG: ggml_op_pool = 1;
781pub const ggml_op_pool_GGML_OP_POOL_COUNT: ggml_op_pool = 2;
782pub const ggml_sort_order_GGML_SORT_ORDER_ASC: ggml_sort_order = 0;
783pub const ggml_sort_order_GGML_SORT_ORDER_DESC: ggml_sort_order = 1;
784pub const ggml_opt_type_GGML_OPT_TYPE_ADAM: ggml_opt_type = 0;
785pub const ggml_opt_type_GGML_OPT_TYPE_LBFGS: ggml_opt_type = 1;
786pub const ggml_linesearch_GGML_LINESEARCH_DEFAULT: ggml_linesearch = 1;
787pub const ggml_linesearch_GGML_LINESEARCH_BACKTRACKING_ARMIJO: ggml_linesearch = 0;
788pub const ggml_linesearch_GGML_LINESEARCH_BACKTRACKING_WOLFE: ggml_linesearch = 1;
789pub const ggml_linesearch_GGML_LINESEARCH_BACKTRACKING_STRONG_WOLFE: ggml_linesearch = 2;
790pub const ggml_opt_result_GGML_OPT_RESULT_OK: ggml_opt_result = 0;
791pub const ggml_opt_result_GGML_OPT_RESULT_DID_NOT_CONVERGE: ggml_opt_result = 1;
792pub const ggml_opt_result_GGML_OPT_RESULT_NO_CONTEXT: ggml_opt_result = 2;
793pub const ggml_opt_result_GGML_OPT_RESULT_INVALID_WOLFE: ggml_opt_result = 3;
794pub const ggml_opt_result_GGML_OPT_RESULT_FAIL: ggml_opt_result = 4;
795pub const ggml_opt_result_GGML_OPT_RESULT_CANCEL: ggml_opt_result = 5;
796pub const ggml_opt_result_GGML_LINESEARCH_FAIL: ggml_opt_result = -128;
797pub const ggml_opt_result_GGML_LINESEARCH_MINIMUM_STEP: ggml_opt_result = -127;
798pub const ggml_opt_result_GGML_LINESEARCH_MAXIMUM_STEP: ggml_opt_result = -126;
799pub const ggml_opt_result_GGML_LINESEARCH_MAXIMUM_ITERATIONS: ggml_opt_result = -125;
800pub const ggml_opt_result_GGML_LINESEARCH_INVALID_PARAMETERS: ggml_opt_result = -124;
801pub const gguf_type_GGUF_TYPE_UINT8: gguf_type = 0;
802pub const gguf_type_GGUF_TYPE_INT8: gguf_type = 1;
803pub const gguf_type_GGUF_TYPE_UINT16: gguf_type = 2;
804pub const gguf_type_GGUF_TYPE_INT16: gguf_type = 3;
805pub const gguf_type_GGUF_TYPE_UINT32: gguf_type = 4;
806pub const gguf_type_GGUF_TYPE_INT32: gguf_type = 5;
807pub const gguf_type_GGUF_TYPE_FLOAT32: gguf_type = 6;
808pub const gguf_type_GGUF_TYPE_BOOL: gguf_type = 7;
809pub const gguf_type_GGUF_TYPE_STRING: gguf_type = 8;
810pub const gguf_type_GGUF_TYPE_ARRAY: gguf_type = 9;
811pub const gguf_type_GGUF_TYPE_UINT64: gguf_type = 10;
812pub const gguf_type_GGUF_TYPE_INT64: gguf_type = 11;
813pub const gguf_type_GGUF_TYPE_FLOAT64: gguf_type = 12;
814pub const gguf_type_GGUF_TYPE_COUNT: gguf_type = 13;
815pub const llama_vocab_type_LLAMA_VOCAB_TYPE_NONE: llama_vocab_type = 0;
816pub const llama_vocab_type_LLAMA_VOCAB_TYPE_SPM: llama_vocab_type = 1;
817pub const llama_vocab_type_LLAMA_VOCAB_TYPE_BPE: llama_vocab_type = 2;
818pub const llama_vocab_type_LLAMA_VOCAB_TYPE_WPM: llama_vocab_type = 3;
819pub const llama_rope_type_LLAMA_ROPE_TYPE_NONE: llama_rope_type = -1;
820pub const llama_rope_type_LLAMA_ROPE_TYPE_NORM: llama_rope_type = 0;
821pub const llama_rope_type_LLAMA_ROPE_TYPE_NEOX: llama_rope_type = 2;
822pub const llama_rope_type_LLAMA_ROPE_TYPE_GLM: llama_rope_type = 4;
823pub const llama_token_type_LLAMA_TOKEN_TYPE_UNDEFINED: llama_token_type = 0;
824pub const llama_token_type_LLAMA_TOKEN_TYPE_NORMAL: llama_token_type = 1;
825pub const llama_token_type_LLAMA_TOKEN_TYPE_UNKNOWN: llama_token_type = 2;
826pub const llama_token_type_LLAMA_TOKEN_TYPE_CONTROL: llama_token_type = 3;
827pub const llama_token_type_LLAMA_TOKEN_TYPE_USER_DEFINED: llama_token_type = 4;
828pub const llama_token_type_LLAMA_TOKEN_TYPE_UNUSED: llama_token_type = 5;
829pub const llama_token_type_LLAMA_TOKEN_TYPE_BYTE: llama_token_type = 6;
830pub const llama_ftype_LLAMA_FTYPE_ALL_F32: llama_ftype = 0;
831pub const llama_ftype_LLAMA_FTYPE_MOSTLY_F16: llama_ftype = 1;
832pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_0: llama_ftype = 2;
833pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_1: llama_ftype = 3;
834pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_1_SOME_F16: llama_ftype = 4;
835pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q8_0: llama_ftype = 7;
836pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q5_0: llama_ftype = 8;
837pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q5_1: llama_ftype = 9;
838pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q2_K: llama_ftype = 10;
839pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q3_K_S: llama_ftype = 11;
840pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q3_K_M: llama_ftype = 12;
841pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q3_K_L: llama_ftype = 13;
842pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_K_S: llama_ftype = 14;
843pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q4_K_M: llama_ftype = 15;
844pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q5_K_S: llama_ftype = 16;
845pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q5_K_M: llama_ftype = 17;
846pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q6_K: llama_ftype = 18;
847pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ2_XXS: llama_ftype = 19;
848pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ2_XS: llama_ftype = 20;
849pub const llama_ftype_LLAMA_FTYPE_MOSTLY_Q2_K_S: llama_ftype = 21;
850pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ3_XS: llama_ftype = 22;
851pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ3_XXS: llama_ftype = 23;
852pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ1_S: llama_ftype = 24;
853pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ4_NL: llama_ftype = 25;
854pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ3_S: llama_ftype = 26;
855pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ3_M: llama_ftype = 27;
856pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ2_S: llama_ftype = 28;
857pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ2_M: llama_ftype = 29;
858pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ4_XS: llama_ftype = 30;
859pub const llama_ftype_LLAMA_FTYPE_MOSTLY_IQ1_M: llama_ftype = 31;
860pub const llama_ftype_LLAMA_FTYPE_GUESSED: llama_ftype = 1024;
861pub const llama_rope_scaling_type_LLAMA_ROPE_SCALING_TYPE_UNSPECIFIED: llama_rope_scaling_type = -1;
862pub const llama_rope_scaling_type_LLAMA_ROPE_SCALING_TYPE_NONE: llama_rope_scaling_type = 0;
863pub const llama_rope_scaling_type_LLAMA_ROPE_SCALING_TYPE_LINEAR: llama_rope_scaling_type = 1;
864pub const llama_rope_scaling_type_LLAMA_ROPE_SCALING_TYPE_YARN: llama_rope_scaling_type = 2;
865pub const llama_rope_scaling_type_LLAMA_ROPE_SCALING_TYPE_MAX_VALUE: llama_rope_scaling_type = 2;
866pub const llama_pooling_type_LLAMA_POOLING_TYPE_UNSPECIFIED: llama_pooling_type = -1;
867pub const llama_pooling_type_LLAMA_POOLING_TYPE_NONE: llama_pooling_type = 0;
868pub const llama_pooling_type_LLAMA_POOLING_TYPE_MEAN: llama_pooling_type = 1;
869pub const llama_pooling_type_LLAMA_POOLING_TYPE_CLS: llama_pooling_type = 2;
870pub const llama_split_mode_LLAMA_SPLIT_MODE_NONE: llama_split_mode = 0;
871pub const llama_split_mode_LLAMA_SPLIT_MODE_LAYER: llama_split_mode = 1;
872pub const llama_split_mode_LLAMA_SPLIT_MODE_ROW: llama_split_mode = 2;
873pub const llama_model_kv_override_type_LLAMA_KV_OVERRIDE_TYPE_INT: llama_model_kv_override_type = 0;
874pub const llama_model_kv_override_type_LLAMA_KV_OVERRIDE_TYPE_FLOAT: llama_model_kv_override_type =
875    1;
876pub const llama_model_kv_override_type_LLAMA_KV_OVERRIDE_TYPE_BOOL: llama_model_kv_override_type =
877    2;
878pub const llama_model_kv_override_type_LLAMA_KV_OVERRIDE_TYPE_STR: llama_model_kv_override_type = 3;
879pub const llama_gretype_LLAMA_GRETYPE_END: llama_gretype = 0;
880pub const llama_gretype_LLAMA_GRETYPE_ALT: llama_gretype = 1;
881pub const llama_gretype_LLAMA_GRETYPE_RULE_REF: llama_gretype = 2;
882pub const llama_gretype_LLAMA_GRETYPE_CHAR: llama_gretype = 3;
883pub const llama_gretype_LLAMA_GRETYPE_CHAR_NOT: llama_gretype = 4;
884pub const llama_gretype_LLAMA_GRETYPE_CHAR_RNG_UPPER: llama_gretype = 5;
885pub const llama_gretype_LLAMA_GRETYPE_CHAR_ALT: llama_gretype = 6;
886#[test]
887fn bindgen_test_layout__IO_FILE() {
888    const UNINIT: ::std::mem::MaybeUninit<_IO_FILE> = ::std::mem::MaybeUninit::uninit();
889    let ptr = UNINIT.as_ptr();
890    assert_eq!(
891        ::std::mem::size_of::<_IO_FILE>(),
892        216usize,
893        concat!("Size of: ", stringify!(_IO_FILE))
894    );
895    assert_eq!(
896        ::std::mem::align_of::<_IO_FILE>(),
897        8usize,
898        concat!("Alignment of ", stringify!(_IO_FILE))
899    );
900    assert_eq!(
901        unsafe { ::std::ptr::addr_of!((*ptr)._flags) as usize - ptr as usize },
902        0usize,
903        concat!(
904            "Offset of field: ",
905            stringify!(_IO_FILE),
906            "::",
907            stringify!(_flags)
908        )
909    );
910    assert_eq!(
911        unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_ptr) as usize - ptr as usize },
912        8usize,
913        concat!(
914            "Offset of field: ",
915            stringify!(_IO_FILE),
916            "::",
917            stringify!(_IO_read_ptr)
918        )
919    );
920    assert_eq!(
921        unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_end) as usize - ptr as usize },
922        16usize,
923        concat!(
924            "Offset of field: ",
925            stringify!(_IO_FILE),
926            "::",
927            stringify!(_IO_read_end)
928        )
929    );
930    assert_eq!(
931        unsafe { ::std::ptr::addr_of!((*ptr)._IO_read_base) as usize - ptr as usize },
932        24usize,
933        concat!(
934            "Offset of field: ",
935            stringify!(_IO_FILE),
936            "::",
937            stringify!(_IO_read_base)
938        )
939    );
940    assert_eq!(
941        unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_base) as usize - ptr as usize },
942        32usize,
943        concat!(
944            "Offset of field: ",
945            stringify!(_IO_FILE),
946            "::",
947            stringify!(_IO_write_base)
948        )
949    );
950    assert_eq!(
951        unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_ptr) as usize - ptr as usize },
952        40usize,
953        concat!(
954            "Offset of field: ",
955            stringify!(_IO_FILE),
956            "::",
957            stringify!(_IO_write_ptr)
958        )
959    );
960    assert_eq!(
961        unsafe { ::std::ptr::addr_of!((*ptr)._IO_write_end) as usize - ptr as usize },
962        48usize,
963        concat!(
964            "Offset of field: ",
965            stringify!(_IO_FILE),
966            "::",
967            stringify!(_IO_write_end)
968        )
969    );
970    assert_eq!(
971        unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_base) as usize - ptr as usize },
972        56usize,
973        concat!(
974            "Offset of field: ",
975            stringify!(_IO_FILE),
976            "::",
977            stringify!(_IO_buf_base)
978        )
979    );
980    assert_eq!(
981        unsafe { ::std::ptr::addr_of!((*ptr)._IO_buf_end) as usize - ptr as usize },
982        64usize,
983        concat!(
984            "Offset of field: ",
985            stringify!(_IO_FILE),
986            "::",
987            stringify!(_IO_buf_end)
988        )
989    );
990    assert_eq!(
991        unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_base) as usize - ptr as usize },
992        72usize,
993        concat!(
994            "Offset of field: ",
995            stringify!(_IO_FILE),
996            "::",
997            stringify!(_IO_save_base)
998        )
999    );
1000    assert_eq!(
1001        unsafe { ::std::ptr::addr_of!((*ptr)._IO_backup_base) as usize - ptr as usize },
1002        80usize,
1003        concat!(
1004            "Offset of field: ",
1005            stringify!(_IO_FILE),
1006            "::",
1007            stringify!(_IO_backup_base)
1008        )
1009    );
1010    assert_eq!(
1011        unsafe { ::std::ptr::addr_of!((*ptr)._IO_save_end) as usize - ptr as usize },
1012        88usize,
1013        concat!(
1014            "Offset of field: ",
1015            stringify!(_IO_FILE),
1016            "::",
1017            stringify!(_IO_save_end)
1018        )
1019    );
1020    assert_eq!(
1021        unsafe { ::std::ptr::addr_of!((*ptr)._markers) as usize - ptr as usize },
1022        96usize,
1023        concat!(
1024            "Offset of field: ",
1025            stringify!(_IO_FILE),
1026            "::",
1027            stringify!(_markers)
1028        )
1029    );
1030    assert_eq!(
1031        unsafe { ::std::ptr::addr_of!((*ptr)._chain) as usize - ptr as usize },
1032        104usize,
1033        concat!(
1034            "Offset of field: ",
1035            stringify!(_IO_FILE),
1036            "::",
1037            stringify!(_chain)
1038        )
1039    );
1040    assert_eq!(
1041        unsafe { ::std::ptr::addr_of!((*ptr)._fileno) as usize - ptr as usize },
1042        112usize,
1043        concat!(
1044            "Offset of field: ",
1045            stringify!(_IO_FILE),
1046            "::",
1047            stringify!(_fileno)
1048        )
1049    );
1050    assert_eq!(
1051        unsafe { ::std::ptr::addr_of!((*ptr)._flags2) as usize - ptr as usize },
1052        116usize,
1053        concat!(
1054            "Offset of field: ",
1055            stringify!(_IO_FILE),
1056            "::",
1057            stringify!(_flags2)
1058        )
1059    );
1060    assert_eq!(
1061        unsafe { ::std::ptr::addr_of!((*ptr)._old_offset) as usize - ptr as usize },
1062        120usize,
1063        concat!(
1064            "Offset of field: ",
1065            stringify!(_IO_FILE),
1066            "::",
1067            stringify!(_old_offset)
1068        )
1069    );
1070    assert_eq!(
1071        unsafe { ::std::ptr::addr_of!((*ptr)._cur_column) as usize - ptr as usize },
1072        128usize,
1073        concat!(
1074            "Offset of field: ",
1075            stringify!(_IO_FILE),
1076            "::",
1077            stringify!(_cur_column)
1078        )
1079    );
1080    assert_eq!(
1081        unsafe { ::std::ptr::addr_of!((*ptr)._vtable_offset) as usize - ptr as usize },
1082        130usize,
1083        concat!(
1084            "Offset of field: ",
1085            stringify!(_IO_FILE),
1086            "::",
1087            stringify!(_vtable_offset)
1088        )
1089    );
1090    assert_eq!(
1091        unsafe { ::std::ptr::addr_of!((*ptr)._shortbuf) as usize - ptr as usize },
1092        131usize,
1093        concat!(
1094            "Offset of field: ",
1095            stringify!(_IO_FILE),
1096            "::",
1097            stringify!(_shortbuf)
1098        )
1099    );
1100    assert_eq!(
1101        unsafe { ::std::ptr::addr_of!((*ptr)._lock) as usize - ptr as usize },
1102        136usize,
1103        concat!(
1104            "Offset of field: ",
1105            stringify!(_IO_FILE),
1106            "::",
1107            stringify!(_lock)
1108        )
1109    );
1110    assert_eq!(
1111        unsafe { ::std::ptr::addr_of!((*ptr)._offset) as usize - ptr as usize },
1112        144usize,
1113        concat!(
1114            "Offset of field: ",
1115            stringify!(_IO_FILE),
1116            "::",
1117            stringify!(_offset)
1118        )
1119    );
1120    assert_eq!(
1121        unsafe { ::std::ptr::addr_of!((*ptr)._codecvt) as usize - ptr as usize },
1122        152usize,
1123        concat!(
1124            "Offset of field: ",
1125            stringify!(_IO_FILE),
1126            "::",
1127            stringify!(_codecvt)
1128        )
1129    );
1130    assert_eq!(
1131        unsafe { ::std::ptr::addr_of!((*ptr)._wide_data) as usize - ptr as usize },
1132        160usize,
1133        concat!(
1134            "Offset of field: ",
1135            stringify!(_IO_FILE),
1136            "::",
1137            stringify!(_wide_data)
1138        )
1139    );
1140    assert_eq!(
1141        unsafe { ::std::ptr::addr_of!((*ptr)._freeres_list) as usize - ptr as usize },
1142        168usize,
1143        concat!(
1144            "Offset of field: ",
1145            stringify!(_IO_FILE),
1146            "::",
1147            stringify!(_freeres_list)
1148        )
1149    );
1150    assert_eq!(
1151        unsafe { ::std::ptr::addr_of!((*ptr)._freeres_buf) as usize - ptr as usize },
1152        176usize,
1153        concat!(
1154            "Offset of field: ",
1155            stringify!(_IO_FILE),
1156            "::",
1157            stringify!(_freeres_buf)
1158        )
1159    );
1160    assert_eq!(
1161        unsafe { ::std::ptr::addr_of!((*ptr).__pad5) as usize - ptr as usize },
1162        184usize,
1163        concat!(
1164            "Offset of field: ",
1165            stringify!(_IO_FILE),
1166            "::",
1167            stringify!(__pad5)
1168        )
1169    );
1170    assert_eq!(
1171        unsafe { ::std::ptr::addr_of!((*ptr)._mode) as usize - ptr as usize },
1172        192usize,
1173        concat!(
1174            "Offset of field: ",
1175            stringify!(_IO_FILE),
1176            "::",
1177            stringify!(_mode)
1178        )
1179    );
1180    assert_eq!(
1181        unsafe { ::std::ptr::addr_of!((*ptr)._unused2) as usize - ptr as usize },
1182        196usize,
1183        concat!(
1184            "Offset of field: ",
1185            stringify!(_IO_FILE),
1186            "::",
1187            stringify!(_unused2)
1188        )
1189    );
1190}
1191#[test]
1192fn bindgen_test_layout_ggml_object() {
1193    const UNINIT: ::std::mem::MaybeUninit<ggml_object> = ::std::mem::MaybeUninit::uninit();
1194    let ptr = UNINIT.as_ptr();
1195    assert_eq!(
1196        ::std::mem::size_of::<ggml_object>(),
1197        32usize,
1198        concat!("Size of: ", stringify!(ggml_object))
1199    );
1200    assert_eq!(
1201        ::std::mem::align_of::<ggml_object>(),
1202        8usize,
1203        concat!("Alignment of ", stringify!(ggml_object))
1204    );
1205    assert_eq!(
1206        unsafe { ::std::ptr::addr_of!((*ptr).offs) as usize - ptr as usize },
1207        0usize,
1208        concat!(
1209            "Offset of field: ",
1210            stringify!(ggml_object),
1211            "::",
1212            stringify!(offs)
1213        )
1214    );
1215    assert_eq!(
1216        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1217        8usize,
1218        concat!(
1219            "Offset of field: ",
1220            stringify!(ggml_object),
1221            "::",
1222            stringify!(size)
1223        )
1224    );
1225    assert_eq!(
1226        unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize },
1227        16usize,
1228        concat!(
1229            "Offset of field: ",
1230            stringify!(ggml_object),
1231            "::",
1232            stringify!(next)
1233        )
1234    );
1235    assert_eq!(
1236        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
1237        24usize,
1238        concat!(
1239            "Offset of field: ",
1240            stringify!(ggml_object),
1241            "::",
1242            stringify!(type_)
1243        )
1244    );
1245    assert_eq!(
1246        unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize },
1247        28usize,
1248        concat!(
1249            "Offset of field: ",
1250            stringify!(ggml_object),
1251            "::",
1252            stringify!(padding)
1253        )
1254    );
1255}
1256#[test]
1257fn bindgen_test_layout_ggml_tensor() {
1258    const UNINIT: ::std::mem::MaybeUninit<ggml_tensor> = ::std::mem::MaybeUninit::uninit();
1259    let ptr = UNINIT.as_ptr();
1260    assert_eq!(
1261        ::std::mem::size_of::<ggml_tensor>(),
1262        368usize,
1263        concat!("Size of: ", stringify!(ggml_tensor))
1264    );
1265    assert_eq!(
1266        ::std::mem::align_of::<ggml_tensor>(),
1267        8usize,
1268        concat!("Alignment of ", stringify!(ggml_tensor))
1269    );
1270    assert_eq!(
1271        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
1272        0usize,
1273        concat!(
1274            "Offset of field: ",
1275            stringify!(ggml_tensor),
1276            "::",
1277            stringify!(type_)
1278        )
1279    );
1280    assert_eq!(
1281        unsafe { ::std::ptr::addr_of!((*ptr).backend) as usize - ptr as usize },
1282        4usize,
1283        concat!(
1284            "Offset of field: ",
1285            stringify!(ggml_tensor),
1286            "::",
1287            stringify!(backend)
1288        )
1289    );
1290    assert_eq!(
1291        unsafe { ::std::ptr::addr_of!((*ptr).buffer) as usize - ptr as usize },
1292        8usize,
1293        concat!(
1294            "Offset of field: ",
1295            stringify!(ggml_tensor),
1296            "::",
1297            stringify!(buffer)
1298        )
1299    );
1300    assert_eq!(
1301        unsafe { ::std::ptr::addr_of!((*ptr).ne) as usize - ptr as usize },
1302        16usize,
1303        concat!(
1304            "Offset of field: ",
1305            stringify!(ggml_tensor),
1306            "::",
1307            stringify!(ne)
1308        )
1309    );
1310    assert_eq!(
1311        unsafe { ::std::ptr::addr_of!((*ptr).nb) as usize - ptr as usize },
1312        48usize,
1313        concat!(
1314            "Offset of field: ",
1315            stringify!(ggml_tensor),
1316            "::",
1317            stringify!(nb)
1318        )
1319    );
1320    assert_eq!(
1321        unsafe { ::std::ptr::addr_of!((*ptr).op) as usize - ptr as usize },
1322        80usize,
1323        concat!(
1324            "Offset of field: ",
1325            stringify!(ggml_tensor),
1326            "::",
1327            stringify!(op)
1328        )
1329    );
1330    assert_eq!(
1331        unsafe { ::std::ptr::addr_of!((*ptr).op_params) as usize - ptr as usize },
1332        84usize,
1333        concat!(
1334            "Offset of field: ",
1335            stringify!(ggml_tensor),
1336            "::",
1337            stringify!(op_params)
1338        )
1339    );
1340    assert_eq!(
1341        unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
1342        148usize,
1343        concat!(
1344            "Offset of field: ",
1345            stringify!(ggml_tensor),
1346            "::",
1347            stringify!(flags)
1348        )
1349    );
1350    assert_eq!(
1351        unsafe { ::std::ptr::addr_of!((*ptr).grad) as usize - ptr as usize },
1352        152usize,
1353        concat!(
1354            "Offset of field: ",
1355            stringify!(ggml_tensor),
1356            "::",
1357            stringify!(grad)
1358        )
1359    );
1360    assert_eq!(
1361        unsafe { ::std::ptr::addr_of!((*ptr).src) as usize - ptr as usize },
1362        160usize,
1363        concat!(
1364            "Offset of field: ",
1365            stringify!(ggml_tensor),
1366            "::",
1367            stringify!(src)
1368        )
1369    );
1370    assert_eq!(
1371        unsafe { ::std::ptr::addr_of!((*ptr).perf_runs) as usize - ptr as usize },
1372        240usize,
1373        concat!(
1374            "Offset of field: ",
1375            stringify!(ggml_tensor),
1376            "::",
1377            stringify!(perf_runs)
1378        )
1379    );
1380    assert_eq!(
1381        unsafe { ::std::ptr::addr_of!((*ptr).perf_cycles) as usize - ptr as usize },
1382        248usize,
1383        concat!(
1384            "Offset of field: ",
1385            stringify!(ggml_tensor),
1386            "::",
1387            stringify!(perf_cycles)
1388        )
1389    );
1390    assert_eq!(
1391        unsafe { ::std::ptr::addr_of!((*ptr).perf_time_us) as usize - ptr as usize },
1392        256usize,
1393        concat!(
1394            "Offset of field: ",
1395            stringify!(ggml_tensor),
1396            "::",
1397            stringify!(perf_time_us)
1398        )
1399    );
1400    assert_eq!(
1401        unsafe { ::std::ptr::addr_of!((*ptr).view_src) as usize - ptr as usize },
1402        264usize,
1403        concat!(
1404            "Offset of field: ",
1405            stringify!(ggml_tensor),
1406            "::",
1407            stringify!(view_src)
1408        )
1409    );
1410    assert_eq!(
1411        unsafe { ::std::ptr::addr_of!((*ptr).view_offs) as usize - ptr as usize },
1412        272usize,
1413        concat!(
1414            "Offset of field: ",
1415            stringify!(ggml_tensor),
1416            "::",
1417            stringify!(view_offs)
1418        )
1419    );
1420    assert_eq!(
1421        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
1422        280usize,
1423        concat!(
1424            "Offset of field: ",
1425            stringify!(ggml_tensor),
1426            "::",
1427            stringify!(data)
1428        )
1429    );
1430    assert_eq!(
1431        unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize },
1432        288usize,
1433        concat!(
1434            "Offset of field: ",
1435            stringify!(ggml_tensor),
1436            "::",
1437            stringify!(name)
1438        )
1439    );
1440    assert_eq!(
1441        unsafe { ::std::ptr::addr_of!((*ptr).extra) as usize - ptr as usize },
1442        352usize,
1443        concat!(
1444            "Offset of field: ",
1445            stringify!(ggml_tensor),
1446            "::",
1447            stringify!(extra)
1448        )
1449    );
1450    assert_eq!(
1451        unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize },
1452        360usize,
1453        concat!(
1454            "Offset of field: ",
1455            stringify!(ggml_tensor),
1456            "::",
1457            stringify!(padding)
1458        )
1459    );
1460}
1461#[test]
1462fn bindgen_test_layout_ggml_cplan() {
1463    const UNINIT: ::std::mem::MaybeUninit<ggml_cplan> = ::std::mem::MaybeUninit::uninit();
1464    let ptr = UNINIT.as_ptr();
1465    assert_eq!(
1466        ::std::mem::size_of::<ggml_cplan>(),
1467        40usize,
1468        concat!("Size of: ", stringify!(ggml_cplan))
1469    );
1470    assert_eq!(
1471        ::std::mem::align_of::<ggml_cplan>(),
1472        8usize,
1473        concat!("Alignment of ", stringify!(ggml_cplan))
1474    );
1475    assert_eq!(
1476        unsafe { ::std::ptr::addr_of!((*ptr).work_size) as usize - ptr as usize },
1477        0usize,
1478        concat!(
1479            "Offset of field: ",
1480            stringify!(ggml_cplan),
1481            "::",
1482            stringify!(work_size)
1483        )
1484    );
1485    assert_eq!(
1486        unsafe { ::std::ptr::addr_of!((*ptr).work_data) as usize - ptr as usize },
1487        8usize,
1488        concat!(
1489            "Offset of field: ",
1490            stringify!(ggml_cplan),
1491            "::",
1492            stringify!(work_data)
1493        )
1494    );
1495    assert_eq!(
1496        unsafe { ::std::ptr::addr_of!((*ptr).n_threads) as usize - ptr as usize },
1497        16usize,
1498        concat!(
1499            "Offset of field: ",
1500            stringify!(ggml_cplan),
1501            "::",
1502            stringify!(n_threads)
1503        )
1504    );
1505    assert_eq!(
1506        unsafe { ::std::ptr::addr_of!((*ptr).abort_callback) as usize - ptr as usize },
1507        24usize,
1508        concat!(
1509            "Offset of field: ",
1510            stringify!(ggml_cplan),
1511            "::",
1512            stringify!(abort_callback)
1513        )
1514    );
1515    assert_eq!(
1516        unsafe { ::std::ptr::addr_of!((*ptr).abort_callback_data) as usize - ptr as usize },
1517        32usize,
1518        concat!(
1519            "Offset of field: ",
1520            stringify!(ggml_cplan),
1521            "::",
1522            stringify!(abort_callback_data)
1523        )
1524    );
1525}
1526#[test]
1527fn bindgen_test_layout_ggml_hash_set() {
1528    const UNINIT: ::std::mem::MaybeUninit<ggml_hash_set> = ::std::mem::MaybeUninit::uninit();
1529    let ptr = UNINIT.as_ptr();
1530    assert_eq!(
1531        ::std::mem::size_of::<ggml_hash_set>(),
1532        16usize,
1533        concat!("Size of: ", stringify!(ggml_hash_set))
1534    );
1535    assert_eq!(
1536        ::std::mem::align_of::<ggml_hash_set>(),
1537        8usize,
1538        concat!("Alignment of ", stringify!(ggml_hash_set))
1539    );
1540    assert_eq!(
1541        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1542        0usize,
1543        concat!(
1544            "Offset of field: ",
1545            stringify!(ggml_hash_set),
1546            "::",
1547            stringify!(size)
1548        )
1549    );
1550    assert_eq!(
1551        unsafe { ::std::ptr::addr_of!((*ptr).keys) as usize - ptr as usize },
1552        8usize,
1553        concat!(
1554            "Offset of field: ",
1555            stringify!(ggml_hash_set),
1556            "::",
1557            stringify!(keys)
1558        )
1559    );
1560}
1561#[test]
1562fn bindgen_test_layout_ggml_cgraph() {
1563    const UNINIT: ::std::mem::MaybeUninit<ggml_cgraph> = ::std::mem::MaybeUninit::uninit();
1564    let ptr = UNINIT.as_ptr();
1565    assert_eq!(
1566        ::std::mem::size_of::<ggml_cgraph>(),
1567        80usize,
1568        concat!("Size of: ", stringify!(ggml_cgraph))
1569    );
1570    assert_eq!(
1571        ::std::mem::align_of::<ggml_cgraph>(),
1572        8usize,
1573        concat!("Alignment of ", stringify!(ggml_cgraph))
1574    );
1575    assert_eq!(
1576        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1577        0usize,
1578        concat!(
1579            "Offset of field: ",
1580            stringify!(ggml_cgraph),
1581            "::",
1582            stringify!(size)
1583        )
1584    );
1585    assert_eq!(
1586        unsafe { ::std::ptr::addr_of!((*ptr).n_nodes) as usize - ptr as usize },
1587        4usize,
1588        concat!(
1589            "Offset of field: ",
1590            stringify!(ggml_cgraph),
1591            "::",
1592            stringify!(n_nodes)
1593        )
1594    );
1595    assert_eq!(
1596        unsafe { ::std::ptr::addr_of!((*ptr).n_leafs) as usize - ptr as usize },
1597        8usize,
1598        concat!(
1599            "Offset of field: ",
1600            stringify!(ggml_cgraph),
1601            "::",
1602            stringify!(n_leafs)
1603        )
1604    );
1605    assert_eq!(
1606        unsafe { ::std::ptr::addr_of!((*ptr).nodes) as usize - ptr as usize },
1607        16usize,
1608        concat!(
1609            "Offset of field: ",
1610            stringify!(ggml_cgraph),
1611            "::",
1612            stringify!(nodes)
1613        )
1614    );
1615    assert_eq!(
1616        unsafe { ::std::ptr::addr_of!((*ptr).grads) as usize - ptr as usize },
1617        24usize,
1618        concat!(
1619            "Offset of field: ",
1620            stringify!(ggml_cgraph),
1621            "::",
1622            stringify!(grads)
1623        )
1624    );
1625    assert_eq!(
1626        unsafe { ::std::ptr::addr_of!((*ptr).leafs) as usize - ptr as usize },
1627        32usize,
1628        concat!(
1629            "Offset of field: ",
1630            stringify!(ggml_cgraph),
1631            "::",
1632            stringify!(leafs)
1633        )
1634    );
1635    assert_eq!(
1636        unsafe { ::std::ptr::addr_of!((*ptr).visited_hash_table) as usize - ptr as usize },
1637        40usize,
1638        concat!(
1639            "Offset of field: ",
1640            stringify!(ggml_cgraph),
1641            "::",
1642            stringify!(visited_hash_table)
1643        )
1644    );
1645    assert_eq!(
1646        unsafe { ::std::ptr::addr_of!((*ptr).order) as usize - ptr as usize },
1647        56usize,
1648        concat!(
1649            "Offset of field: ",
1650            stringify!(ggml_cgraph),
1651            "::",
1652            stringify!(order)
1653        )
1654    );
1655    assert_eq!(
1656        unsafe { ::std::ptr::addr_of!((*ptr).perf_runs) as usize - ptr as usize },
1657        60usize,
1658        concat!(
1659            "Offset of field: ",
1660            stringify!(ggml_cgraph),
1661            "::",
1662            stringify!(perf_runs)
1663        )
1664    );
1665    assert_eq!(
1666        unsafe { ::std::ptr::addr_of!((*ptr).perf_cycles) as usize - ptr as usize },
1667        64usize,
1668        concat!(
1669            "Offset of field: ",
1670            stringify!(ggml_cgraph),
1671            "::",
1672            stringify!(perf_cycles)
1673        )
1674    );
1675    assert_eq!(
1676        unsafe { ::std::ptr::addr_of!((*ptr).perf_time_us) as usize - ptr as usize },
1677        72usize,
1678        concat!(
1679            "Offset of field: ",
1680            stringify!(ggml_cgraph),
1681            "::",
1682            stringify!(perf_time_us)
1683        )
1684    );
1685}
1686#[test]
1687fn bindgen_test_layout_ggml_scratch() {
1688    const UNINIT: ::std::mem::MaybeUninit<ggml_scratch> = ::std::mem::MaybeUninit::uninit();
1689    let ptr = UNINIT.as_ptr();
1690    assert_eq!(
1691        ::std::mem::size_of::<ggml_scratch>(),
1692        24usize,
1693        concat!("Size of: ", stringify!(ggml_scratch))
1694    );
1695    assert_eq!(
1696        ::std::mem::align_of::<ggml_scratch>(),
1697        8usize,
1698        concat!("Alignment of ", stringify!(ggml_scratch))
1699    );
1700    assert_eq!(
1701        unsafe { ::std::ptr::addr_of!((*ptr).offs) as usize - ptr as usize },
1702        0usize,
1703        concat!(
1704            "Offset of field: ",
1705            stringify!(ggml_scratch),
1706            "::",
1707            stringify!(offs)
1708        )
1709    );
1710    assert_eq!(
1711        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
1712        8usize,
1713        concat!(
1714            "Offset of field: ",
1715            stringify!(ggml_scratch),
1716            "::",
1717            stringify!(size)
1718        )
1719    );
1720    assert_eq!(
1721        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
1722        16usize,
1723        concat!(
1724            "Offset of field: ",
1725            stringify!(ggml_scratch),
1726            "::",
1727            stringify!(data)
1728        )
1729    );
1730}
1731#[test]
1732fn bindgen_test_layout_ggml_init_params() {
1733    const UNINIT: ::std::mem::MaybeUninit<ggml_init_params> = ::std::mem::MaybeUninit::uninit();
1734    let ptr = UNINIT.as_ptr();
1735    assert_eq!(
1736        ::std::mem::size_of::<ggml_init_params>(),
1737        24usize,
1738        concat!("Size of: ", stringify!(ggml_init_params))
1739    );
1740    assert_eq!(
1741        ::std::mem::align_of::<ggml_init_params>(),
1742        8usize,
1743        concat!("Alignment of ", stringify!(ggml_init_params))
1744    );
1745    assert_eq!(
1746        unsafe { ::std::ptr::addr_of!((*ptr).mem_size) as usize - ptr as usize },
1747        0usize,
1748        concat!(
1749            "Offset of field: ",
1750            stringify!(ggml_init_params),
1751            "::",
1752            stringify!(mem_size)
1753        )
1754    );
1755    assert_eq!(
1756        unsafe { ::std::ptr::addr_of!((*ptr).mem_buffer) as usize - ptr as usize },
1757        8usize,
1758        concat!(
1759            "Offset of field: ",
1760            stringify!(ggml_init_params),
1761            "::",
1762            stringify!(mem_buffer)
1763        )
1764    );
1765    assert_eq!(
1766        unsafe { ::std::ptr::addr_of!((*ptr).no_alloc) as usize - ptr as usize },
1767        16usize,
1768        concat!(
1769            "Offset of field: ",
1770            stringify!(ggml_init_params),
1771            "::",
1772            stringify!(no_alloc)
1773        )
1774    );
1775}
1776#[test]
1777fn bindgen_test_layout_ggml_compute_params() {
1778    const UNINIT: ::std::mem::MaybeUninit<ggml_compute_params> = ::std::mem::MaybeUninit::uninit();
1779    let ptr = UNINIT.as_ptr();
1780    assert_eq!(
1781        ::std::mem::size_of::<ggml_compute_params>(),
1782        32usize,
1783        concat!("Size of: ", stringify!(ggml_compute_params))
1784    );
1785    assert_eq!(
1786        ::std::mem::align_of::<ggml_compute_params>(),
1787        8usize,
1788        concat!("Alignment of ", stringify!(ggml_compute_params))
1789    );
1790    assert_eq!(
1791        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
1792        0usize,
1793        concat!(
1794            "Offset of field: ",
1795            stringify!(ggml_compute_params),
1796            "::",
1797            stringify!(type_)
1798        )
1799    );
1800    assert_eq!(
1801        unsafe { ::std::ptr::addr_of!((*ptr).ith) as usize - ptr as usize },
1802        4usize,
1803        concat!(
1804            "Offset of field: ",
1805            stringify!(ggml_compute_params),
1806            "::",
1807            stringify!(ith)
1808        )
1809    );
1810    assert_eq!(
1811        unsafe { ::std::ptr::addr_of!((*ptr).nth) as usize - ptr as usize },
1812        8usize,
1813        concat!(
1814            "Offset of field: ",
1815            stringify!(ggml_compute_params),
1816            "::",
1817            stringify!(nth)
1818        )
1819    );
1820    assert_eq!(
1821        unsafe { ::std::ptr::addr_of!((*ptr).wsize) as usize - ptr as usize },
1822        16usize,
1823        concat!(
1824            "Offset of field: ",
1825            stringify!(ggml_compute_params),
1826            "::",
1827            stringify!(wsize)
1828        )
1829    );
1830    assert_eq!(
1831        unsafe { ::std::ptr::addr_of!((*ptr).wdata) as usize - ptr as usize },
1832        24usize,
1833        concat!(
1834            "Offset of field: ",
1835            stringify!(ggml_compute_params),
1836            "::",
1837            stringify!(wdata)
1838        )
1839    );
1840}
1841#[test]
1842fn bindgen_test_layout_ggml_opt_params__bindgen_ty_1() {
1843    const UNINIT: ::std::mem::MaybeUninit<ggml_opt_params__bindgen_ty_1> =
1844        ::std::mem::MaybeUninit::uninit();
1845    let ptr = UNINIT.as_ptr();
1846    assert_eq!(
1847        ::std::mem::size_of::<ggml_opt_params__bindgen_ty_1>(),
1848        44usize,
1849        concat!("Size of: ", stringify!(ggml_opt_params__bindgen_ty_1))
1850    );
1851    assert_eq!(
1852        ::std::mem::align_of::<ggml_opt_params__bindgen_ty_1>(),
1853        4usize,
1854        concat!("Alignment of ", stringify!(ggml_opt_params__bindgen_ty_1))
1855    );
1856    assert_eq!(
1857        unsafe { ::std::ptr::addr_of!((*ptr).n_iter) as usize - ptr as usize },
1858        0usize,
1859        concat!(
1860            "Offset of field: ",
1861            stringify!(ggml_opt_params__bindgen_ty_1),
1862            "::",
1863            stringify!(n_iter)
1864        )
1865    );
1866    assert_eq!(
1867        unsafe { ::std::ptr::addr_of!((*ptr).sched) as usize - ptr as usize },
1868        4usize,
1869        concat!(
1870            "Offset of field: ",
1871            stringify!(ggml_opt_params__bindgen_ty_1),
1872            "::",
1873            stringify!(sched)
1874        )
1875    );
1876    assert_eq!(
1877        unsafe { ::std::ptr::addr_of!((*ptr).decay) as usize - ptr as usize },
1878        8usize,
1879        concat!(
1880            "Offset of field: ",
1881            stringify!(ggml_opt_params__bindgen_ty_1),
1882            "::",
1883            stringify!(decay)
1884        )
1885    );
1886    assert_eq!(
1887        unsafe { ::std::ptr::addr_of!((*ptr).decay_min_ndim) as usize - ptr as usize },
1888        12usize,
1889        concat!(
1890            "Offset of field: ",
1891            stringify!(ggml_opt_params__bindgen_ty_1),
1892            "::",
1893            stringify!(decay_min_ndim)
1894        )
1895    );
1896    assert_eq!(
1897        unsafe { ::std::ptr::addr_of!((*ptr).alpha) as usize - ptr as usize },
1898        16usize,
1899        concat!(
1900            "Offset of field: ",
1901            stringify!(ggml_opt_params__bindgen_ty_1),
1902            "::",
1903            stringify!(alpha)
1904        )
1905    );
1906    assert_eq!(
1907        unsafe { ::std::ptr::addr_of!((*ptr).beta1) as usize - ptr as usize },
1908        20usize,
1909        concat!(
1910            "Offset of field: ",
1911            stringify!(ggml_opt_params__bindgen_ty_1),
1912            "::",
1913            stringify!(beta1)
1914        )
1915    );
1916    assert_eq!(
1917        unsafe { ::std::ptr::addr_of!((*ptr).beta2) as usize - ptr as usize },
1918        24usize,
1919        concat!(
1920            "Offset of field: ",
1921            stringify!(ggml_opt_params__bindgen_ty_1),
1922            "::",
1923            stringify!(beta2)
1924        )
1925    );
1926    assert_eq!(
1927        unsafe { ::std::ptr::addr_of!((*ptr).eps) as usize - ptr as usize },
1928        28usize,
1929        concat!(
1930            "Offset of field: ",
1931            stringify!(ggml_opt_params__bindgen_ty_1),
1932            "::",
1933            stringify!(eps)
1934        )
1935    );
1936    assert_eq!(
1937        unsafe { ::std::ptr::addr_of!((*ptr).eps_f) as usize - ptr as usize },
1938        32usize,
1939        concat!(
1940            "Offset of field: ",
1941            stringify!(ggml_opt_params__bindgen_ty_1),
1942            "::",
1943            stringify!(eps_f)
1944        )
1945    );
1946    assert_eq!(
1947        unsafe { ::std::ptr::addr_of!((*ptr).eps_g) as usize - ptr as usize },
1948        36usize,
1949        concat!(
1950            "Offset of field: ",
1951            stringify!(ggml_opt_params__bindgen_ty_1),
1952            "::",
1953            stringify!(eps_g)
1954        )
1955    );
1956    assert_eq!(
1957        unsafe { ::std::ptr::addr_of!((*ptr).gclip) as usize - ptr as usize },
1958        40usize,
1959        concat!(
1960            "Offset of field: ",
1961            stringify!(ggml_opt_params__bindgen_ty_1),
1962            "::",
1963            stringify!(gclip)
1964        )
1965    );
1966}
1967#[test]
1968fn bindgen_test_layout_ggml_opt_params__bindgen_ty_2() {
1969    const UNINIT: ::std::mem::MaybeUninit<ggml_opt_params__bindgen_ty_2> =
1970        ::std::mem::MaybeUninit::uninit();
1971    let ptr = UNINIT.as_ptr();
1972    assert_eq!(
1973        ::std::mem::size_of::<ggml_opt_params__bindgen_ty_2>(),
1974        36usize,
1975        concat!("Size of: ", stringify!(ggml_opt_params__bindgen_ty_2))
1976    );
1977    assert_eq!(
1978        ::std::mem::align_of::<ggml_opt_params__bindgen_ty_2>(),
1979        4usize,
1980        concat!("Alignment of ", stringify!(ggml_opt_params__bindgen_ty_2))
1981    );
1982    assert_eq!(
1983        unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize },
1984        0usize,
1985        concat!(
1986            "Offset of field: ",
1987            stringify!(ggml_opt_params__bindgen_ty_2),
1988            "::",
1989            stringify!(m)
1990        )
1991    );
1992    assert_eq!(
1993        unsafe { ::std::ptr::addr_of!((*ptr).n_iter) as usize - ptr as usize },
1994        4usize,
1995        concat!(
1996            "Offset of field: ",
1997            stringify!(ggml_opt_params__bindgen_ty_2),
1998            "::",
1999            stringify!(n_iter)
2000        )
2001    );
2002    assert_eq!(
2003        unsafe { ::std::ptr::addr_of!((*ptr).max_linesearch) as usize - ptr as usize },
2004        8usize,
2005        concat!(
2006            "Offset of field: ",
2007            stringify!(ggml_opt_params__bindgen_ty_2),
2008            "::",
2009            stringify!(max_linesearch)
2010        )
2011    );
2012    assert_eq!(
2013        unsafe { ::std::ptr::addr_of!((*ptr).eps) as usize - ptr as usize },
2014        12usize,
2015        concat!(
2016            "Offset of field: ",
2017            stringify!(ggml_opt_params__bindgen_ty_2),
2018            "::",
2019            stringify!(eps)
2020        )
2021    );
2022    assert_eq!(
2023        unsafe { ::std::ptr::addr_of!((*ptr).ftol) as usize - ptr as usize },
2024        16usize,
2025        concat!(
2026            "Offset of field: ",
2027            stringify!(ggml_opt_params__bindgen_ty_2),
2028            "::",
2029            stringify!(ftol)
2030        )
2031    );
2032    assert_eq!(
2033        unsafe { ::std::ptr::addr_of!((*ptr).wolfe) as usize - ptr as usize },
2034        20usize,
2035        concat!(
2036            "Offset of field: ",
2037            stringify!(ggml_opt_params__bindgen_ty_2),
2038            "::",
2039            stringify!(wolfe)
2040        )
2041    );
2042    assert_eq!(
2043        unsafe { ::std::ptr::addr_of!((*ptr).min_step) as usize - ptr as usize },
2044        24usize,
2045        concat!(
2046            "Offset of field: ",
2047            stringify!(ggml_opt_params__bindgen_ty_2),
2048            "::",
2049            stringify!(min_step)
2050        )
2051    );
2052    assert_eq!(
2053        unsafe { ::std::ptr::addr_of!((*ptr).max_step) as usize - ptr as usize },
2054        28usize,
2055        concat!(
2056            "Offset of field: ",
2057            stringify!(ggml_opt_params__bindgen_ty_2),
2058            "::",
2059            stringify!(max_step)
2060        )
2061    );
2062    assert_eq!(
2063        unsafe { ::std::ptr::addr_of!((*ptr).linesearch) as usize - ptr as usize },
2064        32usize,
2065        concat!(
2066            "Offset of field: ",
2067            stringify!(ggml_opt_params__bindgen_ty_2),
2068            "::",
2069            stringify!(linesearch)
2070        )
2071    );
2072}
2073#[test]
2074fn bindgen_test_layout_ggml_opt_params() {
2075    const UNINIT: ::std::mem::MaybeUninit<ggml_opt_params> = ::std::mem::MaybeUninit::uninit();
2076    let ptr = UNINIT.as_ptr();
2077    assert_eq!(
2078        ::std::mem::size_of::<ggml_opt_params>(),
2079        120usize,
2080        concat!("Size of: ", stringify!(ggml_opt_params))
2081    );
2082    assert_eq!(
2083        ::std::mem::align_of::<ggml_opt_params>(),
2084        8usize,
2085        concat!("Alignment of ", stringify!(ggml_opt_params))
2086    );
2087    assert_eq!(
2088        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
2089        0usize,
2090        concat!(
2091            "Offset of field: ",
2092            stringify!(ggml_opt_params),
2093            "::",
2094            stringify!(type_)
2095        )
2096    );
2097    assert_eq!(
2098        unsafe { ::std::ptr::addr_of!((*ptr).graph_size) as usize - ptr as usize },
2099        8usize,
2100        concat!(
2101            "Offset of field: ",
2102            stringify!(ggml_opt_params),
2103            "::",
2104            stringify!(graph_size)
2105        )
2106    );
2107    assert_eq!(
2108        unsafe { ::std::ptr::addr_of!((*ptr).n_threads) as usize - ptr as usize },
2109        16usize,
2110        concat!(
2111            "Offset of field: ",
2112            stringify!(ggml_opt_params),
2113            "::",
2114            stringify!(n_threads)
2115        )
2116    );
2117    assert_eq!(
2118        unsafe { ::std::ptr::addr_of!((*ptr).past) as usize - ptr as usize },
2119        20usize,
2120        concat!(
2121            "Offset of field: ",
2122            stringify!(ggml_opt_params),
2123            "::",
2124            stringify!(past)
2125        )
2126    );
2127    assert_eq!(
2128        unsafe { ::std::ptr::addr_of!((*ptr).delta) as usize - ptr as usize },
2129        24usize,
2130        concat!(
2131            "Offset of field: ",
2132            stringify!(ggml_opt_params),
2133            "::",
2134            stringify!(delta)
2135        )
2136    );
2137    assert_eq!(
2138        unsafe { ::std::ptr::addr_of!((*ptr).max_no_improvement) as usize - ptr as usize },
2139        28usize,
2140        concat!(
2141            "Offset of field: ",
2142            stringify!(ggml_opt_params),
2143            "::",
2144            stringify!(max_no_improvement)
2145        )
2146    );
2147    assert_eq!(
2148        unsafe { ::std::ptr::addr_of!((*ptr).print_forward_graph) as usize - ptr as usize },
2149        32usize,
2150        concat!(
2151            "Offset of field: ",
2152            stringify!(ggml_opt_params),
2153            "::",
2154            stringify!(print_forward_graph)
2155        )
2156    );
2157    assert_eq!(
2158        unsafe { ::std::ptr::addr_of!((*ptr).print_backward_graph) as usize - ptr as usize },
2159        33usize,
2160        concat!(
2161            "Offset of field: ",
2162            stringify!(ggml_opt_params),
2163            "::",
2164            stringify!(print_backward_graph)
2165        )
2166    );
2167    assert_eq!(
2168        unsafe { ::std::ptr::addr_of!((*ptr).n_gradient_accumulation) as usize - ptr as usize },
2169        36usize,
2170        concat!(
2171            "Offset of field: ",
2172            stringify!(ggml_opt_params),
2173            "::",
2174            stringify!(n_gradient_accumulation)
2175        )
2176    );
2177    assert_eq!(
2178        unsafe { ::std::ptr::addr_of!((*ptr).adam) as usize - ptr as usize },
2179        40usize,
2180        concat!(
2181            "Offset of field: ",
2182            stringify!(ggml_opt_params),
2183            "::",
2184            stringify!(adam)
2185        )
2186    );
2187    assert_eq!(
2188        unsafe { ::std::ptr::addr_of!((*ptr).lbfgs) as usize - ptr as usize },
2189        84usize,
2190        concat!(
2191            "Offset of field: ",
2192            stringify!(ggml_opt_params),
2193            "::",
2194            stringify!(lbfgs)
2195        )
2196    );
2197}
2198#[test]
2199fn bindgen_test_layout_ggml_opt_context__bindgen_ty_1() {
2200    const UNINIT: ::std::mem::MaybeUninit<ggml_opt_context__bindgen_ty_1> =
2201        ::std::mem::MaybeUninit::uninit();
2202    let ptr = UNINIT.as_ptr();
2203    assert_eq!(
2204        ::std::mem::size_of::<ggml_opt_context__bindgen_ty_1>(),
2205        48usize,
2206        concat!("Size of: ", stringify!(ggml_opt_context__bindgen_ty_1))
2207    );
2208    assert_eq!(
2209        ::std::mem::align_of::<ggml_opt_context__bindgen_ty_1>(),
2210        8usize,
2211        concat!("Alignment of ", stringify!(ggml_opt_context__bindgen_ty_1))
2212    );
2213    assert_eq!(
2214        unsafe { ::std::ptr::addr_of!((*ptr).g) as usize - ptr as usize },
2215        0usize,
2216        concat!(
2217            "Offset of field: ",
2218            stringify!(ggml_opt_context__bindgen_ty_1),
2219            "::",
2220            stringify!(g)
2221        )
2222    );
2223    assert_eq!(
2224        unsafe { ::std::ptr::addr_of!((*ptr).m) as usize - ptr as usize },
2225        8usize,
2226        concat!(
2227            "Offset of field: ",
2228            stringify!(ggml_opt_context__bindgen_ty_1),
2229            "::",
2230            stringify!(m)
2231        )
2232    );
2233    assert_eq!(
2234        unsafe { ::std::ptr::addr_of!((*ptr).v) as usize - ptr as usize },
2235        16usize,
2236        concat!(
2237            "Offset of field: ",
2238            stringify!(ggml_opt_context__bindgen_ty_1),
2239            "::",
2240            stringify!(v)
2241        )
2242    );
2243    assert_eq!(
2244        unsafe { ::std::ptr::addr_of!((*ptr).pf) as usize - ptr as usize },
2245        24usize,
2246        concat!(
2247            "Offset of field: ",
2248            stringify!(ggml_opt_context__bindgen_ty_1),
2249            "::",
2250            stringify!(pf)
2251        )
2252    );
2253    assert_eq!(
2254        unsafe { ::std::ptr::addr_of!((*ptr).fx_best) as usize - ptr as usize },
2255        32usize,
2256        concat!(
2257            "Offset of field: ",
2258            stringify!(ggml_opt_context__bindgen_ty_1),
2259            "::",
2260            stringify!(fx_best)
2261        )
2262    );
2263    assert_eq!(
2264        unsafe { ::std::ptr::addr_of!((*ptr).fx_prev) as usize - ptr as usize },
2265        36usize,
2266        concat!(
2267            "Offset of field: ",
2268            stringify!(ggml_opt_context__bindgen_ty_1),
2269            "::",
2270            stringify!(fx_prev)
2271        )
2272    );
2273    assert_eq!(
2274        unsafe { ::std::ptr::addr_of!((*ptr).n_no_improvement) as usize - ptr as usize },
2275        40usize,
2276        concat!(
2277            "Offset of field: ",
2278            stringify!(ggml_opt_context__bindgen_ty_1),
2279            "::",
2280            stringify!(n_no_improvement)
2281        )
2282    );
2283}
2284#[test]
2285fn bindgen_test_layout_ggml_opt_context__bindgen_ty_2() {
2286    const UNINIT: ::std::mem::MaybeUninit<ggml_opt_context__bindgen_ty_2> =
2287        ::std::mem::MaybeUninit::uninit();
2288    let ptr = UNINIT.as_ptr();
2289    assert_eq!(
2290        ::std::mem::size_of::<ggml_opt_context__bindgen_ty_2>(),
2291        104usize,
2292        concat!("Size of: ", stringify!(ggml_opt_context__bindgen_ty_2))
2293    );
2294    assert_eq!(
2295        ::std::mem::align_of::<ggml_opt_context__bindgen_ty_2>(),
2296        8usize,
2297        concat!("Alignment of ", stringify!(ggml_opt_context__bindgen_ty_2))
2298    );
2299    assert_eq!(
2300        unsafe { ::std::ptr::addr_of!((*ptr).x) as usize - ptr as usize },
2301        0usize,
2302        concat!(
2303            "Offset of field: ",
2304            stringify!(ggml_opt_context__bindgen_ty_2),
2305            "::",
2306            stringify!(x)
2307        )
2308    );
2309    assert_eq!(
2310        unsafe { ::std::ptr::addr_of!((*ptr).xp) as usize - ptr as usize },
2311        8usize,
2312        concat!(
2313            "Offset of field: ",
2314            stringify!(ggml_opt_context__bindgen_ty_2),
2315            "::",
2316            stringify!(xp)
2317        )
2318    );
2319    assert_eq!(
2320        unsafe { ::std::ptr::addr_of!((*ptr).g) as usize - ptr as usize },
2321        16usize,
2322        concat!(
2323            "Offset of field: ",
2324            stringify!(ggml_opt_context__bindgen_ty_2),
2325            "::",
2326            stringify!(g)
2327        )
2328    );
2329    assert_eq!(
2330        unsafe { ::std::ptr::addr_of!((*ptr).gp) as usize - ptr as usize },
2331        24usize,
2332        concat!(
2333            "Offset of field: ",
2334            stringify!(ggml_opt_context__bindgen_ty_2),
2335            "::",
2336            stringify!(gp)
2337        )
2338    );
2339    assert_eq!(
2340        unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize },
2341        32usize,
2342        concat!(
2343            "Offset of field: ",
2344            stringify!(ggml_opt_context__bindgen_ty_2),
2345            "::",
2346            stringify!(d)
2347        )
2348    );
2349    assert_eq!(
2350        unsafe { ::std::ptr::addr_of!((*ptr).pf) as usize - ptr as usize },
2351        40usize,
2352        concat!(
2353            "Offset of field: ",
2354            stringify!(ggml_opt_context__bindgen_ty_2),
2355            "::",
2356            stringify!(pf)
2357        )
2358    );
2359    assert_eq!(
2360        unsafe { ::std::ptr::addr_of!((*ptr).lmal) as usize - ptr as usize },
2361        48usize,
2362        concat!(
2363            "Offset of field: ",
2364            stringify!(ggml_opt_context__bindgen_ty_2),
2365            "::",
2366            stringify!(lmal)
2367        )
2368    );
2369    assert_eq!(
2370        unsafe { ::std::ptr::addr_of!((*ptr).lmys) as usize - ptr as usize },
2371        56usize,
2372        concat!(
2373            "Offset of field: ",
2374            stringify!(ggml_opt_context__bindgen_ty_2),
2375            "::",
2376            stringify!(lmys)
2377        )
2378    );
2379    assert_eq!(
2380        unsafe { ::std::ptr::addr_of!((*ptr).lms) as usize - ptr as usize },
2381        64usize,
2382        concat!(
2383            "Offset of field: ",
2384            stringify!(ggml_opt_context__bindgen_ty_2),
2385            "::",
2386            stringify!(lms)
2387        )
2388    );
2389    assert_eq!(
2390        unsafe { ::std::ptr::addr_of!((*ptr).lmy) as usize - ptr as usize },
2391        72usize,
2392        concat!(
2393            "Offset of field: ",
2394            stringify!(ggml_opt_context__bindgen_ty_2),
2395            "::",
2396            stringify!(lmy)
2397        )
2398    );
2399    assert_eq!(
2400        unsafe { ::std::ptr::addr_of!((*ptr).fx_best) as usize - ptr as usize },
2401        80usize,
2402        concat!(
2403            "Offset of field: ",
2404            stringify!(ggml_opt_context__bindgen_ty_2),
2405            "::",
2406            stringify!(fx_best)
2407        )
2408    );
2409    assert_eq!(
2410        unsafe { ::std::ptr::addr_of!((*ptr).step) as usize - ptr as usize },
2411        84usize,
2412        concat!(
2413            "Offset of field: ",
2414            stringify!(ggml_opt_context__bindgen_ty_2),
2415            "::",
2416            stringify!(step)
2417        )
2418    );
2419    assert_eq!(
2420        unsafe { ::std::ptr::addr_of!((*ptr).j) as usize - ptr as usize },
2421        88usize,
2422        concat!(
2423            "Offset of field: ",
2424            stringify!(ggml_opt_context__bindgen_ty_2),
2425            "::",
2426            stringify!(j)
2427        )
2428    );
2429    assert_eq!(
2430        unsafe { ::std::ptr::addr_of!((*ptr).k) as usize - ptr as usize },
2431        92usize,
2432        concat!(
2433            "Offset of field: ",
2434            stringify!(ggml_opt_context__bindgen_ty_2),
2435            "::",
2436            stringify!(k)
2437        )
2438    );
2439    assert_eq!(
2440        unsafe { ::std::ptr::addr_of!((*ptr).end) as usize - ptr as usize },
2441        96usize,
2442        concat!(
2443            "Offset of field: ",
2444            stringify!(ggml_opt_context__bindgen_ty_2),
2445            "::",
2446            stringify!(end)
2447        )
2448    );
2449    assert_eq!(
2450        unsafe { ::std::ptr::addr_of!((*ptr).n_no_improvement) as usize - ptr as usize },
2451        100usize,
2452        concat!(
2453            "Offset of field: ",
2454            stringify!(ggml_opt_context__bindgen_ty_2),
2455            "::",
2456            stringify!(n_no_improvement)
2457        )
2458    );
2459}
2460#[test]
2461fn bindgen_test_layout_ggml_opt_context() {
2462    const UNINIT: ::std::mem::MaybeUninit<ggml_opt_context> = ::std::mem::MaybeUninit::uninit();
2463    let ptr = UNINIT.as_ptr();
2464    assert_eq!(
2465        ::std::mem::size_of::<ggml_opt_context>(),
2466        312usize,
2467        concat!("Size of: ", stringify!(ggml_opt_context))
2468    );
2469    assert_eq!(
2470        ::std::mem::align_of::<ggml_opt_context>(),
2471        8usize,
2472        concat!("Alignment of ", stringify!(ggml_opt_context))
2473    );
2474    assert_eq!(
2475        unsafe { ::std::ptr::addr_of!((*ptr).ctx) as usize - ptr as usize },
2476        0usize,
2477        concat!(
2478            "Offset of field: ",
2479            stringify!(ggml_opt_context),
2480            "::",
2481            stringify!(ctx)
2482        )
2483    );
2484    assert_eq!(
2485        unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize },
2486        8usize,
2487        concat!(
2488            "Offset of field: ",
2489            stringify!(ggml_opt_context),
2490            "::",
2491            stringify!(params)
2492        )
2493    );
2494    assert_eq!(
2495        unsafe { ::std::ptr::addr_of!((*ptr).iter) as usize - ptr as usize },
2496        128usize,
2497        concat!(
2498            "Offset of field: ",
2499            stringify!(ggml_opt_context),
2500            "::",
2501            stringify!(iter)
2502        )
2503    );
2504    assert_eq!(
2505        unsafe { ::std::ptr::addr_of!((*ptr).nx) as usize - ptr as usize },
2506        136usize,
2507        concat!(
2508            "Offset of field: ",
2509            stringify!(ggml_opt_context),
2510            "::",
2511            stringify!(nx)
2512        )
2513    );
2514    assert_eq!(
2515        unsafe { ::std::ptr::addr_of!((*ptr).just_initialized) as usize - ptr as usize },
2516        144usize,
2517        concat!(
2518            "Offset of field: ",
2519            stringify!(ggml_opt_context),
2520            "::",
2521            stringify!(just_initialized)
2522        )
2523    );
2524    assert_eq!(
2525        unsafe { ::std::ptr::addr_of!((*ptr).loss_before) as usize - ptr as usize },
2526        148usize,
2527        concat!(
2528            "Offset of field: ",
2529            stringify!(ggml_opt_context),
2530            "::",
2531            stringify!(loss_before)
2532        )
2533    );
2534    assert_eq!(
2535        unsafe { ::std::ptr::addr_of!((*ptr).loss_after) as usize - ptr as usize },
2536        152usize,
2537        concat!(
2538            "Offset of field: ",
2539            stringify!(ggml_opt_context),
2540            "::",
2541            stringify!(loss_after)
2542        )
2543    );
2544    assert_eq!(
2545        unsafe { ::std::ptr::addr_of!((*ptr).adam) as usize - ptr as usize },
2546        160usize,
2547        concat!(
2548            "Offset of field: ",
2549            stringify!(ggml_opt_context),
2550            "::",
2551            stringify!(adam)
2552        )
2553    );
2554    assert_eq!(
2555        unsafe { ::std::ptr::addr_of!((*ptr).lbfgs) as usize - ptr as usize },
2556        208usize,
2557        concat!(
2558            "Offset of field: ",
2559            stringify!(ggml_opt_context),
2560            "::",
2561            stringify!(lbfgs)
2562        )
2563    );
2564}
2565#[test]
2566fn bindgen_test_layout_gguf_init_params() {
2567    const UNINIT: ::std::mem::MaybeUninit<gguf_init_params> = ::std::mem::MaybeUninit::uninit();
2568    let ptr = UNINIT.as_ptr();
2569    assert_eq!(
2570        ::std::mem::size_of::<gguf_init_params>(),
2571        16usize,
2572        concat!("Size of: ", stringify!(gguf_init_params))
2573    );
2574    assert_eq!(
2575        ::std::mem::align_of::<gguf_init_params>(),
2576        8usize,
2577        concat!("Alignment of ", stringify!(gguf_init_params))
2578    );
2579    assert_eq!(
2580        unsafe { ::std::ptr::addr_of!((*ptr).no_alloc) as usize - ptr as usize },
2581        0usize,
2582        concat!(
2583            "Offset of field: ",
2584            stringify!(gguf_init_params),
2585            "::",
2586            stringify!(no_alloc)
2587        )
2588    );
2589    assert_eq!(
2590        unsafe { ::std::ptr::addr_of!((*ptr).ctx) as usize - ptr as usize },
2591        8usize,
2592        concat!(
2593            "Offset of field: ",
2594            stringify!(gguf_init_params),
2595            "::",
2596            stringify!(ctx)
2597        )
2598    );
2599}
2600#[test]
2601fn bindgen_test_layout_ggml_type_traits_t() {
2602    const UNINIT: ::std::mem::MaybeUninit<ggml_type_traits_t> = ::std::mem::MaybeUninit::uninit();
2603    let ptr = UNINIT.as_ptr();
2604    assert_eq!(
2605        ::std::mem::size_of::<ggml_type_traits_t>(),
2606        80usize,
2607        concat!("Size of: ", stringify!(ggml_type_traits_t))
2608    );
2609    assert_eq!(
2610        ::std::mem::align_of::<ggml_type_traits_t>(),
2611        8usize,
2612        concat!("Alignment of ", stringify!(ggml_type_traits_t))
2613    );
2614    assert_eq!(
2615        unsafe { ::std::ptr::addr_of!((*ptr).type_name) as usize - ptr as usize },
2616        0usize,
2617        concat!(
2618            "Offset of field: ",
2619            stringify!(ggml_type_traits_t),
2620            "::",
2621            stringify!(type_name)
2622        )
2623    );
2624    assert_eq!(
2625        unsafe { ::std::ptr::addr_of!((*ptr).blck_size) as usize - ptr as usize },
2626        8usize,
2627        concat!(
2628            "Offset of field: ",
2629            stringify!(ggml_type_traits_t),
2630            "::",
2631            stringify!(blck_size)
2632        )
2633    );
2634    assert_eq!(
2635        unsafe { ::std::ptr::addr_of!((*ptr).type_size) as usize - ptr as usize },
2636        16usize,
2637        concat!(
2638            "Offset of field: ",
2639            stringify!(ggml_type_traits_t),
2640            "::",
2641            stringify!(type_size)
2642        )
2643    );
2644    assert_eq!(
2645        unsafe { ::std::ptr::addr_of!((*ptr).is_quantized) as usize - ptr as usize },
2646        24usize,
2647        concat!(
2648            "Offset of field: ",
2649            stringify!(ggml_type_traits_t),
2650            "::",
2651            stringify!(is_quantized)
2652        )
2653    );
2654    assert_eq!(
2655        unsafe { ::std::ptr::addr_of!((*ptr).to_float) as usize - ptr as usize },
2656        32usize,
2657        concat!(
2658            "Offset of field: ",
2659            stringify!(ggml_type_traits_t),
2660            "::",
2661            stringify!(to_float)
2662        )
2663    );
2664    assert_eq!(
2665        unsafe { ::std::ptr::addr_of!((*ptr).from_float) as usize - ptr as usize },
2666        40usize,
2667        concat!(
2668            "Offset of field: ",
2669            stringify!(ggml_type_traits_t),
2670            "::",
2671            stringify!(from_float)
2672        )
2673    );
2674    assert_eq!(
2675        unsafe { ::std::ptr::addr_of!((*ptr).from_float_reference) as usize - ptr as usize },
2676        48usize,
2677        concat!(
2678            "Offset of field: ",
2679            stringify!(ggml_type_traits_t),
2680            "::",
2681            stringify!(from_float_reference)
2682        )
2683    );
2684    assert_eq!(
2685        unsafe { ::std::ptr::addr_of!((*ptr).vec_dot) as usize - ptr as usize },
2686        56usize,
2687        concat!(
2688            "Offset of field: ",
2689            stringify!(ggml_type_traits_t),
2690            "::",
2691            stringify!(vec_dot)
2692        )
2693    );
2694    assert_eq!(
2695        unsafe { ::std::ptr::addr_of!((*ptr).vec_dot_type) as usize - ptr as usize },
2696        64usize,
2697        concat!(
2698            "Offset of field: ",
2699            stringify!(ggml_type_traits_t),
2700            "::",
2701            stringify!(vec_dot_type)
2702        )
2703    );
2704    assert_eq!(
2705        unsafe { ::std::ptr::addr_of!((*ptr).nrows) as usize - ptr as usize },
2706        72usize,
2707        concat!(
2708            "Offset of field: ",
2709            stringify!(ggml_type_traits_t),
2710            "::",
2711            stringify!(nrows)
2712        )
2713    );
2714}
2715#[test]
2716fn bindgen_test_layout_llama_token_data() {
2717    const UNINIT: ::std::mem::MaybeUninit<llama_token_data> = ::std::mem::MaybeUninit::uninit();
2718    let ptr = UNINIT.as_ptr();
2719    assert_eq!(
2720        ::std::mem::size_of::<llama_token_data>(),
2721        12usize,
2722        concat!("Size of: ", stringify!(llama_token_data))
2723    );
2724    assert_eq!(
2725        ::std::mem::align_of::<llama_token_data>(),
2726        4usize,
2727        concat!("Alignment of ", stringify!(llama_token_data))
2728    );
2729    assert_eq!(
2730        unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize },
2731        0usize,
2732        concat!(
2733            "Offset of field: ",
2734            stringify!(llama_token_data),
2735            "::",
2736            stringify!(id)
2737        )
2738    );
2739    assert_eq!(
2740        unsafe { ::std::ptr::addr_of!((*ptr).logit) as usize - ptr as usize },
2741        4usize,
2742        concat!(
2743            "Offset of field: ",
2744            stringify!(llama_token_data),
2745            "::",
2746            stringify!(logit)
2747        )
2748    );
2749    assert_eq!(
2750        unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
2751        8usize,
2752        concat!(
2753            "Offset of field: ",
2754            stringify!(llama_token_data),
2755            "::",
2756            stringify!(p)
2757        )
2758    );
2759}
2760#[test]
2761fn bindgen_test_layout_llama_token_data_array() {
2762    const UNINIT: ::std::mem::MaybeUninit<llama_token_data_array> =
2763        ::std::mem::MaybeUninit::uninit();
2764    let ptr = UNINIT.as_ptr();
2765    assert_eq!(
2766        ::std::mem::size_of::<llama_token_data_array>(),
2767        24usize,
2768        concat!("Size of: ", stringify!(llama_token_data_array))
2769    );
2770    assert_eq!(
2771        ::std::mem::align_of::<llama_token_data_array>(),
2772        8usize,
2773        concat!("Alignment of ", stringify!(llama_token_data_array))
2774    );
2775    assert_eq!(
2776        unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize },
2777        0usize,
2778        concat!(
2779            "Offset of field: ",
2780            stringify!(llama_token_data_array),
2781            "::",
2782            stringify!(data)
2783        )
2784    );
2785    assert_eq!(
2786        unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize },
2787        8usize,
2788        concat!(
2789            "Offset of field: ",
2790            stringify!(llama_token_data_array),
2791            "::",
2792            stringify!(size)
2793        )
2794    );
2795    assert_eq!(
2796        unsafe { ::std::ptr::addr_of!((*ptr).sorted) as usize - ptr as usize },
2797        16usize,
2798        concat!(
2799            "Offset of field: ",
2800            stringify!(llama_token_data_array),
2801            "::",
2802            stringify!(sorted)
2803        )
2804    );
2805}
2806#[test]
2807fn bindgen_test_layout_llama_batch() {
2808    const UNINIT: ::std::mem::MaybeUninit<llama_batch> = ::std::mem::MaybeUninit::uninit();
2809    let ptr = UNINIT.as_ptr();
2810    assert_eq!(
2811        ::std::mem::size_of::<llama_batch>(),
2812        72usize,
2813        concat!("Size of: ", stringify!(llama_batch))
2814    );
2815    assert_eq!(
2816        ::std::mem::align_of::<llama_batch>(),
2817        8usize,
2818        concat!("Alignment of ", stringify!(llama_batch))
2819    );
2820    assert_eq!(
2821        unsafe { ::std::ptr::addr_of!((*ptr).n_tokens) as usize - ptr as usize },
2822        0usize,
2823        concat!(
2824            "Offset of field: ",
2825            stringify!(llama_batch),
2826            "::",
2827            stringify!(n_tokens)
2828        )
2829    );
2830    assert_eq!(
2831        unsafe { ::std::ptr::addr_of!((*ptr).token) as usize - ptr as usize },
2832        8usize,
2833        concat!(
2834            "Offset of field: ",
2835            stringify!(llama_batch),
2836            "::",
2837            stringify!(token)
2838        )
2839    );
2840    assert_eq!(
2841        unsafe { ::std::ptr::addr_of!((*ptr).embd) as usize - ptr as usize },
2842        16usize,
2843        concat!(
2844            "Offset of field: ",
2845            stringify!(llama_batch),
2846            "::",
2847            stringify!(embd)
2848        )
2849    );
2850    assert_eq!(
2851        unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
2852        24usize,
2853        concat!(
2854            "Offset of field: ",
2855            stringify!(llama_batch),
2856            "::",
2857            stringify!(pos)
2858        )
2859    );
2860    assert_eq!(
2861        unsafe { ::std::ptr::addr_of!((*ptr).n_seq_id) as usize - ptr as usize },
2862        32usize,
2863        concat!(
2864            "Offset of field: ",
2865            stringify!(llama_batch),
2866            "::",
2867            stringify!(n_seq_id)
2868        )
2869    );
2870    assert_eq!(
2871        unsafe { ::std::ptr::addr_of!((*ptr).seq_id) as usize - ptr as usize },
2872        40usize,
2873        concat!(
2874            "Offset of field: ",
2875            stringify!(llama_batch),
2876            "::",
2877            stringify!(seq_id)
2878        )
2879    );
2880    assert_eq!(
2881        unsafe { ::std::ptr::addr_of!((*ptr).logits) as usize - ptr as usize },
2882        48usize,
2883        concat!(
2884            "Offset of field: ",
2885            stringify!(llama_batch),
2886            "::",
2887            stringify!(logits)
2888        )
2889    );
2890    assert_eq!(
2891        unsafe { ::std::ptr::addr_of!((*ptr).all_pos_0) as usize - ptr as usize },
2892        56usize,
2893        concat!(
2894            "Offset of field: ",
2895            stringify!(llama_batch),
2896            "::",
2897            stringify!(all_pos_0)
2898        )
2899    );
2900    assert_eq!(
2901        unsafe { ::std::ptr::addr_of!((*ptr).all_pos_1) as usize - ptr as usize },
2902        60usize,
2903        concat!(
2904            "Offset of field: ",
2905            stringify!(llama_batch),
2906            "::",
2907            stringify!(all_pos_1)
2908        )
2909    );
2910    assert_eq!(
2911        unsafe { ::std::ptr::addr_of!((*ptr).all_seq_id) as usize - ptr as usize },
2912        64usize,
2913        concat!(
2914            "Offset of field: ",
2915            stringify!(llama_batch),
2916            "::",
2917            stringify!(all_seq_id)
2918        )
2919    );
2920}
2921#[test]
2922fn bindgen_test_layout_llama_model_kv_override__bindgen_ty_1() {
2923    const UNINIT: ::std::mem::MaybeUninit<llama_model_kv_override__bindgen_ty_1> =
2924        ::std::mem::MaybeUninit::uninit();
2925    let ptr = UNINIT.as_ptr();
2926    assert_eq!(
2927        ::std::mem::size_of::<llama_model_kv_override__bindgen_ty_1>(),
2928        128usize,
2929        concat!(
2930            "Size of: ",
2931            stringify!(llama_model_kv_override__bindgen_ty_1)
2932        )
2933    );
2934    assert_eq!(
2935        ::std::mem::align_of::<llama_model_kv_override__bindgen_ty_1>(),
2936        8usize,
2937        concat!(
2938            "Alignment of ",
2939            stringify!(llama_model_kv_override__bindgen_ty_1)
2940        )
2941    );
2942    assert_eq!(
2943        unsafe { ::std::ptr::addr_of!((*ptr).val_i64) as usize - ptr as usize },
2944        0usize,
2945        concat!(
2946            "Offset of field: ",
2947            stringify!(llama_model_kv_override__bindgen_ty_1),
2948            "::",
2949            stringify!(val_i64)
2950        )
2951    );
2952    assert_eq!(
2953        unsafe { ::std::ptr::addr_of!((*ptr).val_f64) as usize - ptr as usize },
2954        0usize,
2955        concat!(
2956            "Offset of field: ",
2957            stringify!(llama_model_kv_override__bindgen_ty_1),
2958            "::",
2959            stringify!(val_f64)
2960        )
2961    );
2962    assert_eq!(
2963        unsafe { ::std::ptr::addr_of!((*ptr).val_bool) as usize - ptr as usize },
2964        0usize,
2965        concat!(
2966            "Offset of field: ",
2967            stringify!(llama_model_kv_override__bindgen_ty_1),
2968            "::",
2969            stringify!(val_bool)
2970        )
2971    );
2972    assert_eq!(
2973        unsafe { ::std::ptr::addr_of!((*ptr).val_str) as usize - ptr as usize },
2974        0usize,
2975        concat!(
2976            "Offset of field: ",
2977            stringify!(llama_model_kv_override__bindgen_ty_1),
2978            "::",
2979            stringify!(val_str)
2980        )
2981    );
2982}
2983#[test]
2984fn bindgen_test_layout_llama_model_kv_override() {
2985    const UNINIT: ::std::mem::MaybeUninit<llama_model_kv_override> =
2986        ::std::mem::MaybeUninit::uninit();
2987    let ptr = UNINIT.as_ptr();
2988    assert_eq!(
2989        ::std::mem::size_of::<llama_model_kv_override>(),
2990        264usize,
2991        concat!("Size of: ", stringify!(llama_model_kv_override))
2992    );
2993    assert_eq!(
2994        ::std::mem::align_of::<llama_model_kv_override>(),
2995        8usize,
2996        concat!("Alignment of ", stringify!(llama_model_kv_override))
2997    );
2998    assert_eq!(
2999        unsafe { ::std::ptr::addr_of!((*ptr).tag) as usize - ptr as usize },
3000        0usize,
3001        concat!(
3002            "Offset of field: ",
3003            stringify!(llama_model_kv_override),
3004            "::",
3005            stringify!(tag)
3006        )
3007    );
3008    assert_eq!(
3009        unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize },
3010        4usize,
3011        concat!(
3012            "Offset of field: ",
3013            stringify!(llama_model_kv_override),
3014            "::",
3015            stringify!(key)
3016        )
3017    );
3018}
3019#[test]
3020fn bindgen_test_layout_llama_model_params() {
3021    const UNINIT: ::std::mem::MaybeUninit<llama_model_params> = ::std::mem::MaybeUninit::uninit();
3022    let ptr = UNINIT.as_ptr();
3023    assert_eq!(
3024        ::std::mem::size_of::<llama_model_params>(),
3025        56usize,
3026        concat!("Size of: ", stringify!(llama_model_params))
3027    );
3028    assert_eq!(
3029        ::std::mem::align_of::<llama_model_params>(),
3030        8usize,
3031        concat!("Alignment of ", stringify!(llama_model_params))
3032    );
3033    assert_eq!(
3034        unsafe { ::std::ptr::addr_of!((*ptr).n_gpu_layers) as usize - ptr as usize },
3035        0usize,
3036        concat!(
3037            "Offset of field: ",
3038            stringify!(llama_model_params),
3039            "::",
3040            stringify!(n_gpu_layers)
3041        )
3042    );
3043    assert_eq!(
3044        unsafe { ::std::ptr::addr_of!((*ptr).split_mode) as usize - ptr as usize },
3045        4usize,
3046        concat!(
3047            "Offset of field: ",
3048            stringify!(llama_model_params),
3049            "::",
3050            stringify!(split_mode)
3051        )
3052    );
3053    assert_eq!(
3054        unsafe { ::std::ptr::addr_of!((*ptr).main_gpu) as usize - ptr as usize },
3055        8usize,
3056        concat!(
3057            "Offset of field: ",
3058            stringify!(llama_model_params),
3059            "::",
3060            stringify!(main_gpu)
3061        )
3062    );
3063    assert_eq!(
3064        unsafe { ::std::ptr::addr_of!((*ptr).tensor_split) as usize - ptr as usize },
3065        16usize,
3066        concat!(
3067            "Offset of field: ",
3068            stringify!(llama_model_params),
3069            "::",
3070            stringify!(tensor_split)
3071        )
3072    );
3073    assert_eq!(
3074        unsafe { ::std::ptr::addr_of!((*ptr).progress_callback) as usize - ptr as usize },
3075        24usize,
3076        concat!(
3077            "Offset of field: ",
3078            stringify!(llama_model_params),
3079            "::",
3080            stringify!(progress_callback)
3081        )
3082    );
3083    assert_eq!(
3084        unsafe { ::std::ptr::addr_of!((*ptr).progress_callback_user_data) as usize - ptr as usize },
3085        32usize,
3086        concat!(
3087            "Offset of field: ",
3088            stringify!(llama_model_params),
3089            "::",
3090            stringify!(progress_callback_user_data)
3091        )
3092    );
3093    assert_eq!(
3094        unsafe { ::std::ptr::addr_of!((*ptr).kv_overrides) as usize - ptr as usize },
3095        40usize,
3096        concat!(
3097            "Offset of field: ",
3098            stringify!(llama_model_params),
3099            "::",
3100            stringify!(kv_overrides)
3101        )
3102    );
3103    assert_eq!(
3104        unsafe { ::std::ptr::addr_of!((*ptr).vocab_only) as usize - ptr as usize },
3105        48usize,
3106        concat!(
3107            "Offset of field: ",
3108            stringify!(llama_model_params),
3109            "::",
3110            stringify!(vocab_only)
3111        )
3112    );
3113    assert_eq!(
3114        unsafe { ::std::ptr::addr_of!((*ptr).use_mmap) as usize - ptr as usize },
3115        49usize,
3116        concat!(
3117            "Offset of field: ",
3118            stringify!(llama_model_params),
3119            "::",
3120            stringify!(use_mmap)
3121        )
3122    );
3123    assert_eq!(
3124        unsafe { ::std::ptr::addr_of!((*ptr).use_mlock) as usize - ptr as usize },
3125        50usize,
3126        concat!(
3127            "Offset of field: ",
3128            stringify!(llama_model_params),
3129            "::",
3130            stringify!(use_mlock)
3131        )
3132    );
3133    assert_eq!(
3134        unsafe { ::std::ptr::addr_of!((*ptr).check_tensors) as usize - ptr as usize },
3135        51usize,
3136        concat!(
3137            "Offset of field: ",
3138            stringify!(llama_model_params),
3139            "::",
3140            stringify!(check_tensors)
3141        )
3142    );
3143}
3144#[test]
3145fn bindgen_test_layout_llama_context_params() {
3146    const UNINIT: ::std::mem::MaybeUninit<llama_context_params> = ::std::mem::MaybeUninit::uninit();
3147    let ptr = UNINIT.as_ptr();
3148    assert_eq!(
3149        ::std::mem::size_of::<llama_context_params>(),
3150        120usize,
3151        concat!("Size of: ", stringify!(llama_context_params))
3152    );
3153    assert_eq!(
3154        ::std::mem::align_of::<llama_context_params>(),
3155        8usize,
3156        concat!("Alignment of ", stringify!(llama_context_params))
3157    );
3158    assert_eq!(
3159        unsafe { ::std::ptr::addr_of!((*ptr).seed) as usize - ptr as usize },
3160        0usize,
3161        concat!(
3162            "Offset of field: ",
3163            stringify!(llama_context_params),
3164            "::",
3165            stringify!(seed)
3166        )
3167    );
3168    assert_eq!(
3169        unsafe { ::std::ptr::addr_of!((*ptr).n_ctx) as usize - ptr as usize },
3170        4usize,
3171        concat!(
3172            "Offset of field: ",
3173            stringify!(llama_context_params),
3174            "::",
3175            stringify!(n_ctx)
3176        )
3177    );
3178    assert_eq!(
3179        unsafe { ::std::ptr::addr_of!((*ptr).n_batch) as usize - ptr as usize },
3180        8usize,
3181        concat!(
3182            "Offset of field: ",
3183            stringify!(llama_context_params),
3184            "::",
3185            stringify!(n_batch)
3186        )
3187    );
3188    assert_eq!(
3189        unsafe { ::std::ptr::addr_of!((*ptr).n_ubatch) as usize - ptr as usize },
3190        12usize,
3191        concat!(
3192            "Offset of field: ",
3193            stringify!(llama_context_params),
3194            "::",
3195            stringify!(n_ubatch)
3196        )
3197    );
3198    assert_eq!(
3199        unsafe { ::std::ptr::addr_of!((*ptr).n_seq_max) as usize - ptr as usize },
3200        16usize,
3201        concat!(
3202            "Offset of field: ",
3203            stringify!(llama_context_params),
3204            "::",
3205            stringify!(n_seq_max)
3206        )
3207    );
3208    assert_eq!(
3209        unsafe { ::std::ptr::addr_of!((*ptr).n_threads) as usize - ptr as usize },
3210        20usize,
3211        concat!(
3212            "Offset of field: ",
3213            stringify!(llama_context_params),
3214            "::",
3215            stringify!(n_threads)
3216        )
3217    );
3218    assert_eq!(
3219        unsafe { ::std::ptr::addr_of!((*ptr).n_threads_batch) as usize - ptr as usize },
3220        24usize,
3221        concat!(
3222            "Offset of field: ",
3223            stringify!(llama_context_params),
3224            "::",
3225            stringify!(n_threads_batch)
3226        )
3227    );
3228    assert_eq!(
3229        unsafe { ::std::ptr::addr_of!((*ptr).rope_scaling_type) as usize - ptr as usize },
3230        28usize,
3231        concat!(
3232            "Offset of field: ",
3233            stringify!(llama_context_params),
3234            "::",
3235            stringify!(rope_scaling_type)
3236        )
3237    );
3238    assert_eq!(
3239        unsafe { ::std::ptr::addr_of!((*ptr).pooling_type) as usize - ptr as usize },
3240        32usize,
3241        concat!(
3242            "Offset of field: ",
3243            stringify!(llama_context_params),
3244            "::",
3245            stringify!(pooling_type)
3246        )
3247    );
3248    assert_eq!(
3249        unsafe { ::std::ptr::addr_of!((*ptr).rope_freq_base) as usize - ptr as usize },
3250        36usize,
3251        concat!(
3252            "Offset of field: ",
3253            stringify!(llama_context_params),
3254            "::",
3255            stringify!(rope_freq_base)
3256        )
3257    );
3258    assert_eq!(
3259        unsafe { ::std::ptr::addr_of!((*ptr).rope_freq_scale) as usize - ptr as usize },
3260        40usize,
3261        concat!(
3262            "Offset of field: ",
3263            stringify!(llama_context_params),
3264            "::",
3265            stringify!(rope_freq_scale)
3266        )
3267    );
3268    assert_eq!(
3269        unsafe { ::std::ptr::addr_of!((*ptr).yarn_ext_factor) as usize - ptr as usize },
3270        44usize,
3271        concat!(
3272            "Offset of field: ",
3273            stringify!(llama_context_params),
3274            "::",
3275            stringify!(yarn_ext_factor)
3276        )
3277    );
3278    assert_eq!(
3279        unsafe { ::std::ptr::addr_of!((*ptr).yarn_attn_factor) as usize - ptr as usize },
3280        48usize,
3281        concat!(
3282            "Offset of field: ",
3283            stringify!(llama_context_params),
3284            "::",
3285            stringify!(yarn_attn_factor)
3286        )
3287    );
3288    assert_eq!(
3289        unsafe { ::std::ptr::addr_of!((*ptr).yarn_beta_fast) as usize - ptr as usize },
3290        52usize,
3291        concat!(
3292            "Offset of field: ",
3293            stringify!(llama_context_params),
3294            "::",
3295            stringify!(yarn_beta_fast)
3296        )
3297    );
3298    assert_eq!(
3299        unsafe { ::std::ptr::addr_of!((*ptr).yarn_beta_slow) as usize - ptr as usize },
3300        56usize,
3301        concat!(
3302            "Offset of field: ",
3303            stringify!(llama_context_params),
3304            "::",
3305            stringify!(yarn_beta_slow)
3306        )
3307    );
3308    assert_eq!(
3309        unsafe { ::std::ptr::addr_of!((*ptr).yarn_orig_ctx) as usize - ptr as usize },
3310        60usize,
3311        concat!(
3312            "Offset of field: ",
3313            stringify!(llama_context_params),
3314            "::",
3315            stringify!(yarn_orig_ctx)
3316        )
3317    );
3318    assert_eq!(
3319        unsafe { ::std::ptr::addr_of!((*ptr).defrag_thold) as usize - ptr as usize },
3320        64usize,
3321        concat!(
3322            "Offset of field: ",
3323            stringify!(llama_context_params),
3324            "::",
3325            stringify!(defrag_thold)
3326        )
3327    );
3328    assert_eq!(
3329        unsafe { ::std::ptr::addr_of!((*ptr).cb_eval) as usize - ptr as usize },
3330        72usize,
3331        concat!(
3332            "Offset of field: ",
3333            stringify!(llama_context_params),
3334            "::",
3335            stringify!(cb_eval)
3336        )
3337    );
3338    assert_eq!(
3339        unsafe { ::std::ptr::addr_of!((*ptr).cb_eval_user_data) as usize - ptr as usize },
3340        80usize,
3341        concat!(
3342            "Offset of field: ",
3343            stringify!(llama_context_params),
3344            "::",
3345            stringify!(cb_eval_user_data)
3346        )
3347    );
3348    assert_eq!(
3349        unsafe { ::std::ptr::addr_of!((*ptr).type_k) as usize - ptr as usize },
3350        88usize,
3351        concat!(
3352            "Offset of field: ",
3353            stringify!(llama_context_params),
3354            "::",
3355            stringify!(type_k)
3356        )
3357    );
3358    assert_eq!(
3359        unsafe { ::std::ptr::addr_of!((*ptr).type_v) as usize - ptr as usize },
3360        92usize,
3361        concat!(
3362            "Offset of field: ",
3363            stringify!(llama_context_params),
3364            "::",
3365            stringify!(type_v)
3366        )
3367    );
3368    assert_eq!(
3369        unsafe { ::std::ptr::addr_of!((*ptr).logits_all) as usize - ptr as usize },
3370        96usize,
3371        concat!(
3372            "Offset of field: ",
3373            stringify!(llama_context_params),
3374            "::",
3375            stringify!(logits_all)
3376        )
3377    );
3378    assert_eq!(
3379        unsafe { ::std::ptr::addr_of!((*ptr).embeddings) as usize - ptr as usize },
3380        97usize,
3381        concat!(
3382            "Offset of field: ",
3383            stringify!(llama_context_params),
3384            "::",
3385            stringify!(embeddings)
3386        )
3387    );
3388    assert_eq!(
3389        unsafe { ::std::ptr::addr_of!((*ptr).offload_kqv) as usize - ptr as usize },
3390        98usize,
3391        concat!(
3392            "Offset of field: ",
3393            stringify!(llama_context_params),
3394            "::",
3395            stringify!(offload_kqv)
3396        )
3397    );
3398    assert_eq!(
3399        unsafe { ::std::ptr::addr_of!((*ptr).abort_callback) as usize - ptr as usize },
3400        104usize,
3401        concat!(
3402            "Offset of field: ",
3403            stringify!(llama_context_params),
3404            "::",
3405            stringify!(abort_callback)
3406        )
3407    );
3408    assert_eq!(
3409        unsafe { ::std::ptr::addr_of!((*ptr).abort_callback_data) as usize - ptr as usize },
3410        112usize,
3411        concat!(
3412            "Offset of field: ",
3413            stringify!(llama_context_params),
3414            "::",
3415            stringify!(abort_callback_data)
3416        )
3417    );
3418}
3419#[test]
3420fn bindgen_test_layout_llama_model_quantize_params() {
3421    const UNINIT: ::std::mem::MaybeUninit<llama_model_quantize_params> =
3422        ::std::mem::MaybeUninit::uninit();
3423    let ptr = UNINIT.as_ptr();
3424    assert_eq!(
3425        ::std::mem::size_of::<llama_model_quantize_params>(),
3426        40usize,
3427        concat!("Size of: ", stringify!(llama_model_quantize_params))
3428    );
3429    assert_eq!(
3430        ::std::mem::align_of::<llama_model_quantize_params>(),
3431        8usize,
3432        concat!("Alignment of ", stringify!(llama_model_quantize_params))
3433    );
3434    assert_eq!(
3435        unsafe { ::std::ptr::addr_of!((*ptr).nthread) as usize - ptr as usize },
3436        0usize,
3437        concat!(
3438            "Offset of field: ",
3439            stringify!(llama_model_quantize_params),
3440            "::",
3441            stringify!(nthread)
3442        )
3443    );
3444    assert_eq!(
3445        unsafe { ::std::ptr::addr_of!((*ptr).ftype) as usize - ptr as usize },
3446        4usize,
3447        concat!(
3448            "Offset of field: ",
3449            stringify!(llama_model_quantize_params),
3450            "::",
3451            stringify!(ftype)
3452        )
3453    );
3454    assert_eq!(
3455        unsafe { ::std::ptr::addr_of!((*ptr).output_tensor_type) as usize - ptr as usize },
3456        8usize,
3457        concat!(
3458            "Offset of field: ",
3459            stringify!(llama_model_quantize_params),
3460            "::",
3461            stringify!(output_tensor_type)
3462        )
3463    );
3464    assert_eq!(
3465        unsafe { ::std::ptr::addr_of!((*ptr).token_embedding_type) as usize - ptr as usize },
3466        12usize,
3467        concat!(
3468            "Offset of field: ",
3469            stringify!(llama_model_quantize_params),
3470            "::",
3471            stringify!(token_embedding_type)
3472        )
3473    );
3474    assert_eq!(
3475        unsafe { ::std::ptr::addr_of!((*ptr).allow_requantize) as usize - ptr as usize },
3476        16usize,
3477        concat!(
3478            "Offset of field: ",
3479            stringify!(llama_model_quantize_params),
3480            "::",
3481            stringify!(allow_requantize)
3482        )
3483    );
3484    assert_eq!(
3485        unsafe { ::std::ptr::addr_of!((*ptr).quantize_output_tensor) as usize - ptr as usize },
3486        17usize,
3487        concat!(
3488            "Offset of field: ",
3489            stringify!(llama_model_quantize_params),
3490            "::",
3491            stringify!(quantize_output_tensor)
3492        )
3493    );
3494    assert_eq!(
3495        unsafe { ::std::ptr::addr_of!((*ptr).only_copy) as usize - ptr as usize },
3496        18usize,
3497        concat!(
3498            "Offset of field: ",
3499            stringify!(llama_model_quantize_params),
3500            "::",
3501            stringify!(only_copy)
3502        )
3503    );
3504    assert_eq!(
3505        unsafe { ::std::ptr::addr_of!((*ptr).pure_) as usize - ptr as usize },
3506        19usize,
3507        concat!(
3508            "Offset of field: ",
3509            stringify!(llama_model_quantize_params),
3510            "::",
3511            stringify!(pure_)
3512        )
3513    );
3514    assert_eq!(
3515        unsafe { ::std::ptr::addr_of!((*ptr).keep_split) as usize - ptr as usize },
3516        20usize,
3517        concat!(
3518            "Offset of field: ",
3519            stringify!(llama_model_quantize_params),
3520            "::",
3521            stringify!(keep_split)
3522        )
3523    );
3524    assert_eq!(
3525        unsafe { ::std::ptr::addr_of!((*ptr).imatrix) as usize - ptr as usize },
3526        24usize,
3527        concat!(
3528            "Offset of field: ",
3529            stringify!(llama_model_quantize_params),
3530            "::",
3531            stringify!(imatrix)
3532        )
3533    );
3534    assert_eq!(
3535        unsafe { ::std::ptr::addr_of!((*ptr).kv_overrides) as usize - ptr as usize },
3536        32usize,
3537        concat!(
3538            "Offset of field: ",
3539            stringify!(llama_model_quantize_params),
3540            "::",
3541            stringify!(kv_overrides)
3542        )
3543    );
3544}
3545#[test]
3546fn bindgen_test_layout_llama_grammar_element() {
3547    const UNINIT: ::std::mem::MaybeUninit<llama_grammar_element> =
3548        ::std::mem::MaybeUninit::uninit();
3549    let ptr = UNINIT.as_ptr();
3550    assert_eq!(
3551        ::std::mem::size_of::<llama_grammar_element>(),
3552        8usize,
3553        concat!("Size of: ", stringify!(llama_grammar_element))
3554    );
3555    assert_eq!(
3556        ::std::mem::align_of::<llama_grammar_element>(),
3557        4usize,
3558        concat!("Alignment of ", stringify!(llama_grammar_element))
3559    );
3560    assert_eq!(
3561        unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
3562        0usize,
3563        concat!(
3564            "Offset of field: ",
3565            stringify!(llama_grammar_element),
3566            "::",
3567            stringify!(type_)
3568        )
3569    );
3570    assert_eq!(
3571        unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize },
3572        4usize,
3573        concat!(
3574            "Offset of field: ",
3575            stringify!(llama_grammar_element),
3576            "::",
3577            stringify!(value)
3578        )
3579    );
3580}
3581#[test]
3582fn bindgen_test_layout_llama_timings() {
3583    const UNINIT: ::std::mem::MaybeUninit<llama_timings> = ::std::mem::MaybeUninit::uninit();
3584    let ptr = UNINIT.as_ptr();
3585    assert_eq!(
3586        ::std::mem::size_of::<llama_timings>(),
3587        64usize,
3588        concat!("Size of: ", stringify!(llama_timings))
3589    );
3590    assert_eq!(
3591        ::std::mem::align_of::<llama_timings>(),
3592        8usize,
3593        concat!("Alignment of ", stringify!(llama_timings))
3594    );
3595    assert_eq!(
3596        unsafe { ::std::ptr::addr_of!((*ptr).t_start_ms) as usize - ptr as usize },
3597        0usize,
3598        concat!(
3599            "Offset of field: ",
3600            stringify!(llama_timings),
3601            "::",
3602            stringify!(t_start_ms)
3603        )
3604    );
3605    assert_eq!(
3606        unsafe { ::std::ptr::addr_of!((*ptr).t_end_ms) as usize - ptr as usize },
3607        8usize,
3608        concat!(
3609            "Offset of field: ",
3610            stringify!(llama_timings),
3611            "::",
3612            stringify!(t_end_ms)
3613        )
3614    );
3615    assert_eq!(
3616        unsafe { ::std::ptr::addr_of!((*ptr).t_load_ms) as usize - ptr as usize },
3617        16usize,
3618        concat!(
3619            "Offset of field: ",
3620            stringify!(llama_timings),
3621            "::",
3622            stringify!(t_load_ms)
3623        )
3624    );
3625    assert_eq!(
3626        unsafe { ::std::ptr::addr_of!((*ptr).t_sample_ms) as usize - ptr as usize },
3627        24usize,
3628        concat!(
3629            "Offset of field: ",
3630            stringify!(llama_timings),
3631            "::",
3632            stringify!(t_sample_ms)
3633        )
3634    );
3635    assert_eq!(
3636        unsafe { ::std::ptr::addr_of!((*ptr).t_p_eval_ms) as usize - ptr as usize },
3637        32usize,
3638        concat!(
3639            "Offset of field: ",
3640            stringify!(llama_timings),
3641            "::",
3642            stringify!(t_p_eval_ms)
3643        )
3644    );
3645    assert_eq!(
3646        unsafe { ::std::ptr::addr_of!((*ptr).t_eval_ms) as usize - ptr as usize },
3647        40usize,
3648        concat!(
3649            "Offset of field: ",
3650            stringify!(llama_timings),
3651            "::",
3652            stringify!(t_eval_ms)
3653        )
3654    );
3655    assert_eq!(
3656        unsafe { ::std::ptr::addr_of!((*ptr).n_sample) as usize - ptr as usize },
3657        48usize,
3658        concat!(
3659            "Offset of field: ",
3660            stringify!(llama_timings),
3661            "::",
3662            stringify!(n_sample)
3663        )
3664    );
3665    assert_eq!(
3666        unsafe { ::std::ptr::addr_of!((*ptr).n_p_eval) as usize - ptr as usize },
3667        52usize,
3668        concat!(
3669            "Offset of field: ",
3670            stringify!(llama_timings),
3671            "::",
3672            stringify!(n_p_eval)
3673        )
3674    );
3675    assert_eq!(
3676        unsafe { ::std::ptr::addr_of!((*ptr).n_eval) as usize - ptr as usize },
3677        56usize,
3678        concat!(
3679            "Offset of field: ",
3680            stringify!(llama_timings),
3681            "::",
3682            stringify!(n_eval)
3683        )
3684    );
3685}
3686#[test]
3687fn bindgen_test_layout_llama_chat_message() {
3688    const UNINIT: ::std::mem::MaybeUninit<llama_chat_message> = ::std::mem::MaybeUninit::uninit();
3689    let ptr = UNINIT.as_ptr();
3690    assert_eq!(
3691        ::std::mem::size_of::<llama_chat_message>(),
3692        16usize,
3693        concat!("Size of: ", stringify!(llama_chat_message))
3694    );
3695    assert_eq!(
3696        ::std::mem::align_of::<llama_chat_message>(),
3697        8usize,
3698        concat!("Alignment of ", stringify!(llama_chat_message))
3699    );
3700    assert_eq!(
3701        unsafe { ::std::ptr::addr_of!((*ptr).role) as usize - ptr as usize },
3702        0usize,
3703        concat!(
3704            "Offset of field: ",
3705            stringify!(llama_chat_message),
3706            "::",
3707            stringify!(role)
3708        )
3709    );
3710    assert_eq!(
3711        unsafe { ::std::ptr::addr_of!((*ptr).content) as usize - ptr as usize },
3712        8usize,
3713        concat!(
3714            "Offset of field: ",
3715            stringify!(llama_chat_message),
3716            "::",
3717            stringify!(content)
3718        )
3719    );
3720}
3721#[test]
3722fn bindgen_test_layout_llama_kv_cache_view_cell() {
3723    const UNINIT: ::std::mem::MaybeUninit<llama_kv_cache_view_cell> =
3724        ::std::mem::MaybeUninit::uninit();
3725    let ptr = UNINIT.as_ptr();
3726    assert_eq!(
3727        ::std::mem::size_of::<llama_kv_cache_view_cell>(),
3728        4usize,
3729        concat!("Size of: ", stringify!(llama_kv_cache_view_cell))
3730    );
3731    assert_eq!(
3732        ::std::mem::align_of::<llama_kv_cache_view_cell>(),
3733        4usize,
3734        concat!("Alignment of ", stringify!(llama_kv_cache_view_cell))
3735    );
3736    assert_eq!(
3737        unsafe { ::std::ptr::addr_of!((*ptr).pos) as usize - ptr as usize },
3738        0usize,
3739        concat!(
3740            "Offset of field: ",
3741            stringify!(llama_kv_cache_view_cell),
3742            "::",
3743            stringify!(pos)
3744        )
3745    );
3746}
3747#[test]
3748fn bindgen_test_layout_llama_kv_cache_view() {
3749    const UNINIT: ::std::mem::MaybeUninit<llama_kv_cache_view> = ::std::mem::MaybeUninit::uninit();
3750    let ptr = UNINIT.as_ptr();
3751    assert_eq!(
3752        ::std::mem::size_of::<llama_kv_cache_view>(),
3753        40usize,
3754        concat!("Size of: ", stringify!(llama_kv_cache_view))
3755    );
3756    assert_eq!(
3757        ::std::mem::align_of::<llama_kv_cache_view>(),
3758        8usize,
3759        concat!("Alignment of ", stringify!(llama_kv_cache_view))
3760    );
3761    assert_eq!(
3762        unsafe { ::std::ptr::addr_of!((*ptr).n_cells) as usize - ptr as usize },
3763        0usize,
3764        concat!(
3765            "Offset of field: ",
3766            stringify!(llama_kv_cache_view),
3767            "::",
3768            stringify!(n_cells)
3769        )
3770    );
3771    assert_eq!(
3772        unsafe { ::std::ptr::addr_of!((*ptr).n_seq_max) as usize - ptr as usize },
3773        4usize,
3774        concat!(
3775            "Offset of field: ",
3776            stringify!(llama_kv_cache_view),
3777            "::",
3778            stringify!(n_seq_max)
3779        )
3780    );
3781    assert_eq!(
3782        unsafe { ::std::ptr::addr_of!((*ptr).token_count) as usize - ptr as usize },
3783        8usize,
3784        concat!(
3785            "Offset of field: ",
3786            stringify!(llama_kv_cache_view),
3787            "::",
3788            stringify!(token_count)
3789        )
3790    );
3791    assert_eq!(
3792        unsafe { ::std::ptr::addr_of!((*ptr).used_cells) as usize - ptr as usize },
3793        12usize,
3794        concat!(
3795            "Offset of field: ",
3796            stringify!(llama_kv_cache_view),
3797            "::",
3798            stringify!(used_cells)
3799        )
3800    );
3801    assert_eq!(
3802        unsafe { ::std::ptr::addr_of!((*ptr).max_contiguous) as usize - ptr as usize },
3803        16usize,
3804        concat!(
3805            "Offset of field: ",
3806            stringify!(llama_kv_cache_view),
3807            "::",
3808            stringify!(max_contiguous)
3809        )
3810    );
3811    assert_eq!(
3812        unsafe { ::std::ptr::addr_of!((*ptr).max_contiguous_idx) as usize - ptr as usize },
3813        20usize,
3814        concat!(
3815            "Offset of field: ",
3816            stringify!(llama_kv_cache_view),
3817            "::",
3818            stringify!(max_contiguous_idx)
3819        )
3820    );
3821    assert_eq!(
3822        unsafe { ::std::ptr::addr_of!((*ptr).cells) as usize - ptr as usize },
3823        24usize,
3824        concat!(
3825            "Offset of field: ",
3826            stringify!(llama_kv_cache_view),
3827            "::",
3828            stringify!(cells)
3829        )
3830    );
3831    assert_eq!(
3832        unsafe { ::std::ptr::addr_of!((*ptr).cells_sequences) as usize - ptr as usize },
3833        32usize,
3834        concat!(
3835            "Offset of field: ",
3836            stringify!(llama_kv_cache_view),
3837            "::",
3838            stringify!(cells_sequences)
3839        )
3840    );
3841}
3842#[test]
3843fn bindgen_test_layout_llama_beam_view() {
3844    const UNINIT: ::std::mem::MaybeUninit<llama_beam_view> = ::std::mem::MaybeUninit::uninit();
3845    let ptr = UNINIT.as_ptr();
3846    assert_eq!(
3847        ::std::mem::size_of::<llama_beam_view>(),
3848        24usize,
3849        concat!("Size of: ", stringify!(llama_beam_view))
3850    );
3851    assert_eq!(
3852        ::std::mem::align_of::<llama_beam_view>(),
3853        8usize,
3854        concat!("Alignment of ", stringify!(llama_beam_view))
3855    );
3856    assert_eq!(
3857        unsafe { ::std::ptr::addr_of!((*ptr).tokens) as usize - ptr as usize },
3858        0usize,
3859        concat!(
3860            "Offset of field: ",
3861            stringify!(llama_beam_view),
3862            "::",
3863            stringify!(tokens)
3864        )
3865    );
3866    assert_eq!(
3867        unsafe { ::std::ptr::addr_of!((*ptr).n_tokens) as usize - ptr as usize },
3868        8usize,
3869        concat!(
3870            "Offset of field: ",
3871            stringify!(llama_beam_view),
3872            "::",
3873            stringify!(n_tokens)
3874        )
3875    );
3876    assert_eq!(
3877        unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize },
3878        16usize,
3879        concat!(
3880            "Offset of field: ",
3881            stringify!(llama_beam_view),
3882            "::",
3883            stringify!(p)
3884        )
3885    );
3886    assert_eq!(
3887        unsafe { ::std::ptr::addr_of!((*ptr).eob) as usize - ptr as usize },
3888        20usize,
3889        concat!(
3890            "Offset of field: ",
3891            stringify!(llama_beam_view),
3892            "::",
3893            stringify!(eob)
3894        )
3895    );
3896}
3897#[test]
3898fn bindgen_test_layout_llama_beams_state() {
3899    const UNINIT: ::std::mem::MaybeUninit<llama_beams_state> = ::std::mem::MaybeUninit::uninit();
3900    let ptr = UNINIT.as_ptr();
3901    assert_eq!(
3902        ::std::mem::size_of::<llama_beams_state>(),
3903        32usize,
3904        concat!("Size of: ", stringify!(llama_beams_state))
3905    );
3906    assert_eq!(
3907        ::std::mem::align_of::<llama_beams_state>(),
3908        8usize,
3909        concat!("Alignment of ", stringify!(llama_beams_state))
3910    );
3911    assert_eq!(
3912        unsafe { ::std::ptr::addr_of!((*ptr).beam_views) as usize - ptr as usize },
3913        0usize,
3914        concat!(
3915            "Offset of field: ",
3916            stringify!(llama_beams_state),
3917            "::",
3918            stringify!(beam_views)
3919        )
3920    );
3921    assert_eq!(
3922        unsafe { ::std::ptr::addr_of!((*ptr).n_beams) as usize - ptr as usize },
3923        8usize,
3924        concat!(
3925            "Offset of field: ",
3926            stringify!(llama_beams_state),
3927            "::",
3928            stringify!(n_beams)
3929        )
3930    );
3931    assert_eq!(
3932        unsafe { ::std::ptr::addr_of!((*ptr).common_prefix_length) as usize - ptr as usize },
3933        16usize,
3934        concat!(
3935            "Offset of field: ",
3936            stringify!(llama_beams_state),
3937            "::",
3938            stringify!(common_prefix_length)
3939        )
3940    );
3941    assert_eq!(
3942        unsafe { ::std::ptr::addr_of!((*ptr).last_call) as usize - ptr as usize },
3943        24usize,
3944        concat!(
3945            "Offset of field: ",
3946            stringify!(llama_beams_state),
3947            "::",
3948            stringify!(last_call)
3949        )
3950    );
3951}
3952#[repr(C)]
3953#[derive(Copy, Clone)]
3954pub union llama_model_kv_override__bindgen_ty_1 {
3955    pub val_i64: i64,
3956    pub val_f64: f64,
3957    pub val_bool: bool,
3958    pub val_str: [::std::os::raw::c_char; 128usize],
3959}
3960impl ::std::fmt::Debug for llama_model_kv_override__bindgen_ty_1 {
3961    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3962        write!(f, "llama_model_kv_override__bindgen_ty_1 {{ union }}")
3963    }
3964}
3965impl ::std::fmt::Debug for llama_model_kv_override {
3966    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3967        write!(
3968            f,
3969            "llama_model_kv_override {{ tag: {:?}, key: {:?}, __bindgen_anon_1: {:?} }}",
3970            self.tag, self.key, self.__bindgen_anon_1
3971        )
3972    }
3973}
3974extern "C" {
3975    pub fn ggml_status_to_string(status: ggml_status) -> *const ::std::os::raw::c_char;
3976    pub fn ggml_fp16_to_fp32(x: ggml_fp16_t) -> f32;
3977    pub fn ggml_fp32_to_fp16(x: f32) -> ggml_fp16_t;
3978    pub fn ggml_fp16_to_fp32_row(x: *const ggml_fp16_t, y: *mut f32, n: i64);
3979    pub fn ggml_fp32_to_fp16_row(x: *const f32, y: *mut ggml_fp16_t, n: i64);
3980    pub fn ggml_guid_matches(guid_a: ggml_guid_t, guid_b: ggml_guid_t) -> bool;
3981    pub fn ggml_time_init();
3982    pub fn ggml_time_ms() -> i64;
3983    pub fn ggml_time_us() -> i64;
3984    pub fn ggml_cycles() -> i64;
3985    pub fn ggml_cycles_per_ms() -> i64;
3986    pub fn ggml_print_backtrace();
3987    pub fn ggml_fopen(
3988        fname: *const ::std::os::raw::c_char,
3989        mode: *const ::std::os::raw::c_char,
3990    ) -> *mut FILE;
3991    pub fn ggml_numa_init(numa: ggml_numa_strategy);
3992    pub fn ggml_is_numa() -> bool;
3993    pub fn ggml_print_object(obj: *const ggml_object);
3994    pub fn ggml_print_objects(ctx: *const ggml_context);
3995    pub fn ggml_nelements(tensor: *const ggml_tensor) -> i64;
3996    pub fn ggml_nrows(tensor: *const ggml_tensor) -> i64;
3997    pub fn ggml_nbytes(tensor: *const ggml_tensor) -> usize;
3998    pub fn ggml_nbytes_pad(tensor: *const ggml_tensor) -> usize;
3999    pub fn ggml_blck_size(type_: ggml_type) -> ::std::os::raw::c_int;
4000    pub fn ggml_type_size(type_: ggml_type) -> usize;
4001    pub fn ggml_row_size(type_: ggml_type, ne: i64) -> usize;
4002    pub fn ggml_type_sizef(type_: ggml_type) -> f64;
4003    pub fn ggml_type_name(type_: ggml_type) -> *const ::std::os::raw::c_char;
4004    pub fn ggml_op_name(op: ggml_op) -> *const ::std::os::raw::c_char;
4005    pub fn ggml_op_symbol(op: ggml_op) -> *const ::std::os::raw::c_char;
4006    pub fn ggml_unary_op_name(op: ggml_unary_op) -> *const ::std::os::raw::c_char;
4007    pub fn ggml_op_desc(t: *const ggml_tensor) -> *const ::std::os::raw::c_char;
4008    pub fn ggml_element_size(tensor: *const ggml_tensor) -> usize;
4009    pub fn ggml_is_quantized(type_: ggml_type) -> bool;
4010    pub fn ggml_ftype_to_ggml_type(ftype: ggml_ftype) -> ggml_type;
4011    pub fn ggml_is_transposed(tensor: *const ggml_tensor) -> bool;
4012    pub fn ggml_is_contiguous(tensor: *const ggml_tensor) -> bool;
4013    pub fn ggml_is_permuted(tensor: *const ggml_tensor) -> bool;
4014    pub fn ggml_is_empty(tensor: *const ggml_tensor) -> bool;
4015    pub fn ggml_is_scalar(tensor: *const ggml_tensor) -> bool;
4016    pub fn ggml_is_vector(tensor: *const ggml_tensor) -> bool;
4017    pub fn ggml_is_matrix(tensor: *const ggml_tensor) -> bool;
4018    pub fn ggml_is_3d(tensor: *const ggml_tensor) -> bool;
4019    pub fn ggml_n_dims(tensor: *const ggml_tensor) -> ::std::os::raw::c_int;
4020    pub fn ggml_are_same_shape(t0: *const ggml_tensor, t1: *const ggml_tensor) -> bool;
4021    pub fn ggml_tensor_overhead() -> usize;
4022    pub fn ggml_validate_row_data(
4023        type_: ggml_type,
4024        data: *const ::std::os::raw::c_void,
4025        nbytes: usize,
4026    ) -> bool;
4027    pub fn ggml_init(params: ggml_init_params) -> *mut ggml_context;
4028    pub fn ggml_free(ctx: *mut ggml_context);
4029    pub fn ggml_used_mem(ctx: *const ggml_context) -> usize;
4030    pub fn ggml_set_scratch(ctx: *mut ggml_context, scratch: ggml_scratch) -> usize;
4031    pub fn ggml_get_no_alloc(ctx: *mut ggml_context) -> bool;
4032    pub fn ggml_set_no_alloc(ctx: *mut ggml_context, no_alloc: bool);
4033    pub fn ggml_get_mem_buffer(ctx: *const ggml_context) -> *mut ::std::os::raw::c_void;
4034    pub fn ggml_get_mem_size(ctx: *const ggml_context) -> usize;
4035    pub fn ggml_get_max_tensor_size(ctx: *const ggml_context) -> usize;
4036    pub fn ggml_new_tensor(
4037        ctx: *mut ggml_context,
4038        type_: ggml_type,
4039        n_dims: ::std::os::raw::c_int,
4040        ne: *const i64,
4041    ) -> *mut ggml_tensor;
4042    pub fn ggml_new_tensor_1d(
4043        ctx: *mut ggml_context,
4044        type_: ggml_type,
4045        ne0: i64,
4046    ) -> *mut ggml_tensor;
4047    pub fn ggml_new_tensor_2d(
4048        ctx: *mut ggml_context,
4049        type_: ggml_type,
4050        ne0: i64,
4051        ne1: i64,
4052    ) -> *mut ggml_tensor;
4053    pub fn ggml_new_tensor_3d(
4054        ctx: *mut ggml_context,
4055        type_: ggml_type,
4056        ne0: i64,
4057        ne1: i64,
4058        ne2: i64,
4059    ) -> *mut ggml_tensor;
4060    pub fn ggml_new_tensor_4d(
4061        ctx: *mut ggml_context,
4062        type_: ggml_type,
4063        ne0: i64,
4064        ne1: i64,
4065        ne2: i64,
4066        ne3: i64,
4067    ) -> *mut ggml_tensor;
4068    pub fn ggml_new_i32(ctx: *mut ggml_context, value: i32) -> *mut ggml_tensor;
4069    pub fn ggml_new_f32(ctx: *mut ggml_context, value: f32) -> *mut ggml_tensor;
4070    pub fn ggml_dup_tensor(ctx: *mut ggml_context, src: *const ggml_tensor) -> *mut ggml_tensor;
4071    pub fn ggml_view_tensor(ctx: *mut ggml_context, src: *mut ggml_tensor) -> *mut ggml_tensor;
4072    pub fn ggml_get_first_tensor(ctx: *const ggml_context) -> *mut ggml_tensor;
4073    pub fn ggml_get_next_tensor(
4074        ctx: *const ggml_context,
4075        tensor: *mut ggml_tensor,
4076    ) -> *mut ggml_tensor;
4077    pub fn ggml_get_tensor(
4078        ctx: *mut ggml_context,
4079        name: *const ::std::os::raw::c_char,
4080    ) -> *mut ggml_tensor;
4081    pub fn ggml_set_zero(tensor: *mut ggml_tensor) -> *mut ggml_tensor;
4082    pub fn ggml_set_i32(tensor: *mut ggml_tensor, value: i32) -> *mut ggml_tensor;
4083    pub fn ggml_set_f32(tensor: *mut ggml_tensor, value: f32) -> *mut ggml_tensor;
4084    pub fn ggml_unravel_index(
4085        tensor: *const ggml_tensor,
4086        i: i64,
4087        i0: *mut i64,
4088        i1: *mut i64,
4089        i2: *mut i64,
4090        i3: *mut i64,
4091    );
4092    pub fn ggml_get_i32_1d(tensor: *const ggml_tensor, i: ::std::os::raw::c_int) -> i32;
4093    pub fn ggml_set_i32_1d(tensor: *const ggml_tensor, i: ::std::os::raw::c_int, value: i32);
4094    pub fn ggml_get_i32_nd(
4095        tensor: *const ggml_tensor,
4096        i0: ::std::os::raw::c_int,
4097        i1: ::std::os::raw::c_int,
4098        i2: ::std::os::raw::c_int,
4099        i3: ::std::os::raw::c_int,
4100    ) -> i32;
4101    pub fn ggml_set_i32_nd(
4102        tensor: *const ggml_tensor,
4103        i0: ::std::os::raw::c_int,
4104        i1: ::std::os::raw::c_int,
4105        i2: ::std::os::raw::c_int,
4106        i3: ::std::os::raw::c_int,
4107        value: i32,
4108    );
4109    pub fn ggml_get_f32_1d(tensor: *const ggml_tensor, i: ::std::os::raw::c_int) -> f32;
4110    pub fn ggml_set_f32_1d(tensor: *const ggml_tensor, i: ::std::os::raw::c_int, value: f32);
4111    pub fn ggml_get_f32_nd(
4112        tensor: *const ggml_tensor,
4113        i0: ::std::os::raw::c_int,
4114        i1: ::std::os::raw::c_int,
4115        i2: ::std::os::raw::c_int,
4116        i3: ::std::os::raw::c_int,
4117    ) -> f32;
4118    pub fn ggml_set_f32_nd(
4119        tensor: *const ggml_tensor,
4120        i0: ::std::os::raw::c_int,
4121        i1: ::std::os::raw::c_int,
4122        i2: ::std::os::raw::c_int,
4123        i3: ::std::os::raw::c_int,
4124        value: f32,
4125    );
4126    pub fn ggml_get_data(tensor: *const ggml_tensor) -> *mut ::std::os::raw::c_void;
4127    pub fn ggml_get_data_f32(tensor: *const ggml_tensor) -> *mut f32;
4128    pub fn ggml_get_unary_op(tensor: *const ggml_tensor) -> ggml_unary_op;
4129    pub fn ggml_get_name(tensor: *const ggml_tensor) -> *const ::std::os::raw::c_char;
4130    pub fn ggml_set_name(
4131        tensor: *mut ggml_tensor,
4132        name: *const ::std::os::raw::c_char,
4133    ) -> *mut ggml_tensor;
4134    pub fn ggml_format_name(
4135        tensor: *mut ggml_tensor,
4136        fmt: *const ::std::os::raw::c_char,
4137        ...
4138    ) -> *mut ggml_tensor;
4139    pub fn ggml_dup(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4140    pub fn ggml_dup_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4141    pub fn ggml_add(
4142        ctx: *mut ggml_context,
4143        a: *mut ggml_tensor,
4144        b: *mut ggml_tensor,
4145    ) -> *mut ggml_tensor;
4146    pub fn ggml_add_inplace(
4147        ctx: *mut ggml_context,
4148        a: *mut ggml_tensor,
4149        b: *mut ggml_tensor,
4150    ) -> *mut ggml_tensor;
4151    pub fn ggml_add_cast(
4152        ctx: *mut ggml_context,
4153        a: *mut ggml_tensor,
4154        b: *mut ggml_tensor,
4155        type_: ggml_type,
4156    ) -> *mut ggml_tensor;
4157    pub fn ggml_add1(
4158        ctx: *mut ggml_context,
4159        a: *mut ggml_tensor,
4160        b: *mut ggml_tensor,
4161    ) -> *mut ggml_tensor;
4162    pub fn ggml_add1_inplace(
4163        ctx: *mut ggml_context,
4164        a: *mut ggml_tensor,
4165        b: *mut ggml_tensor,
4166    ) -> *mut ggml_tensor;
4167    pub fn ggml_acc(
4168        ctx: *mut ggml_context,
4169        a: *mut ggml_tensor,
4170        b: *mut ggml_tensor,
4171        nb1: usize,
4172        nb2: usize,
4173        nb3: usize,
4174        offset: usize,
4175    ) -> *mut ggml_tensor;
4176    pub fn ggml_acc_inplace(
4177        ctx: *mut ggml_context,
4178        a: *mut ggml_tensor,
4179        b: *mut ggml_tensor,
4180        nb1: usize,
4181        nb2: usize,
4182        nb3: usize,
4183        offset: usize,
4184    ) -> *mut ggml_tensor;
4185    pub fn ggml_sub(
4186        ctx: *mut ggml_context,
4187        a: *mut ggml_tensor,
4188        b: *mut ggml_tensor,
4189    ) -> *mut ggml_tensor;
4190    pub fn ggml_sub_inplace(
4191        ctx: *mut ggml_context,
4192        a: *mut ggml_tensor,
4193        b: *mut ggml_tensor,
4194    ) -> *mut ggml_tensor;
4195    pub fn ggml_mul(
4196        ctx: *mut ggml_context,
4197        a: *mut ggml_tensor,
4198        b: *mut ggml_tensor,
4199    ) -> *mut ggml_tensor;
4200    pub fn ggml_mul_inplace(
4201        ctx: *mut ggml_context,
4202        a: *mut ggml_tensor,
4203        b: *mut ggml_tensor,
4204    ) -> *mut ggml_tensor;
4205    pub fn ggml_div(
4206        ctx: *mut ggml_context,
4207        a: *mut ggml_tensor,
4208        b: *mut ggml_tensor,
4209    ) -> *mut ggml_tensor;
4210    pub fn ggml_div_inplace(
4211        ctx: *mut ggml_context,
4212        a: *mut ggml_tensor,
4213        b: *mut ggml_tensor,
4214    ) -> *mut ggml_tensor;
4215    pub fn ggml_sqr(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4216    pub fn ggml_sqr_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4217    pub fn ggml_sqrt(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4218    pub fn ggml_sqrt_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4219    pub fn ggml_log(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4220    pub fn ggml_log_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4221    pub fn ggml_sum(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4222    pub fn ggml_sum_rows(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4223    pub fn ggml_mean(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4224    pub fn ggml_argmax(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4225    pub fn ggml_repeat(
4226        ctx: *mut ggml_context,
4227        a: *mut ggml_tensor,
4228        b: *mut ggml_tensor,
4229    ) -> *mut ggml_tensor;
4230    pub fn ggml_repeat_back(
4231        ctx: *mut ggml_context,
4232        a: *mut ggml_tensor,
4233        b: *mut ggml_tensor,
4234    ) -> *mut ggml_tensor;
4235    pub fn ggml_concat(
4236        ctx: *mut ggml_context,
4237        a: *mut ggml_tensor,
4238        b: *mut ggml_tensor,
4239    ) -> *mut ggml_tensor;
4240    pub fn ggml_abs(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4241    pub fn ggml_abs_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4242    pub fn ggml_sgn(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4243    pub fn ggml_sgn_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4244    pub fn ggml_neg(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4245    pub fn ggml_neg_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4246    pub fn ggml_step(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4247    pub fn ggml_step_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4248    pub fn ggml_tanh(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4249    pub fn ggml_tanh_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4250    pub fn ggml_elu(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4251    pub fn ggml_elu_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4252    pub fn ggml_relu(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4253    pub fn ggml_leaky_relu(
4254        ctx: *mut ggml_context,
4255        a: *mut ggml_tensor,
4256        negative_slope: f32,
4257        inplace: bool,
4258    ) -> *mut ggml_tensor;
4259    pub fn ggml_relu_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4260    pub fn ggml_gelu(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4261    pub fn ggml_gelu_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4262    pub fn ggml_gelu_quick(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4263    pub fn ggml_gelu_quick_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor)
4264        -> *mut ggml_tensor;
4265    pub fn ggml_silu(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4266    pub fn ggml_silu_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4267    pub fn ggml_silu_back(
4268        ctx: *mut ggml_context,
4269        a: *mut ggml_tensor,
4270        b: *mut ggml_tensor,
4271    ) -> *mut ggml_tensor;
4272    pub fn ggml_hardswish(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4273    pub fn ggml_hardsigmoid(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4274    pub fn ggml_norm(ctx: *mut ggml_context, a: *mut ggml_tensor, eps: f32) -> *mut ggml_tensor;
4275    pub fn ggml_norm_inplace(
4276        ctx: *mut ggml_context,
4277        a: *mut ggml_tensor,
4278        eps: f32,
4279    ) -> *mut ggml_tensor;
4280    pub fn ggml_rms_norm(ctx: *mut ggml_context, a: *mut ggml_tensor, eps: f32)
4281        -> *mut ggml_tensor;
4282    pub fn ggml_rms_norm_inplace(
4283        ctx: *mut ggml_context,
4284        a: *mut ggml_tensor,
4285        eps: f32,
4286    ) -> *mut ggml_tensor;
4287    pub fn ggml_group_norm(
4288        ctx: *mut ggml_context,
4289        a: *mut ggml_tensor,
4290        n_groups: ::std::os::raw::c_int,
4291    ) -> *mut ggml_tensor;
4292    pub fn ggml_group_norm_inplace(
4293        ctx: *mut ggml_context,
4294        a: *mut ggml_tensor,
4295        n_groups: ::std::os::raw::c_int,
4296    ) -> *mut ggml_tensor;
4297    pub fn ggml_rms_norm_back(
4298        ctx: *mut ggml_context,
4299        a: *mut ggml_tensor,
4300        b: *mut ggml_tensor,
4301        eps: f32,
4302    ) -> *mut ggml_tensor;
4303    pub fn ggml_mul_mat(
4304        ctx: *mut ggml_context,
4305        a: *mut ggml_tensor,
4306        b: *mut ggml_tensor,
4307    ) -> *mut ggml_tensor;
4308    pub fn ggml_mul_mat_set_prec(a: *mut ggml_tensor, prec: ggml_prec);
4309    pub fn ggml_mul_mat_id(
4310        ctx: *mut ggml_context,
4311        as_: *mut ggml_tensor,
4312        b: *mut ggml_tensor,
4313        ids: *mut ggml_tensor,
4314    ) -> *mut ggml_tensor;
4315    pub fn ggml_out_prod(
4316        ctx: *mut ggml_context,
4317        a: *mut ggml_tensor,
4318        b: *mut ggml_tensor,
4319    ) -> *mut ggml_tensor;
4320    pub fn ggml_scale(ctx: *mut ggml_context, a: *mut ggml_tensor, s: f32) -> *mut ggml_tensor;
4321    pub fn ggml_scale_inplace(
4322        ctx: *mut ggml_context,
4323        a: *mut ggml_tensor,
4324        s: f32,
4325    ) -> *mut ggml_tensor;
4326    pub fn ggml_set(
4327        ctx: *mut ggml_context,
4328        a: *mut ggml_tensor,
4329        b: *mut ggml_tensor,
4330        nb1: usize,
4331        nb2: usize,
4332        nb3: usize,
4333        offset: usize,
4334    ) -> *mut ggml_tensor;
4335    pub fn ggml_set_inplace(
4336        ctx: *mut ggml_context,
4337        a: *mut ggml_tensor,
4338        b: *mut ggml_tensor,
4339        nb1: usize,
4340        nb2: usize,
4341        nb3: usize,
4342        offset: usize,
4343    ) -> *mut ggml_tensor;
4344    pub fn ggml_set_1d(
4345        ctx: *mut ggml_context,
4346        a: *mut ggml_tensor,
4347        b: *mut ggml_tensor,
4348        offset: usize,
4349    ) -> *mut ggml_tensor;
4350    pub fn ggml_set_1d_inplace(
4351        ctx: *mut ggml_context,
4352        a: *mut ggml_tensor,
4353        b: *mut ggml_tensor,
4354        offset: usize,
4355    ) -> *mut ggml_tensor;
4356    pub fn ggml_set_2d(
4357        ctx: *mut ggml_context,
4358        a: *mut ggml_tensor,
4359        b: *mut ggml_tensor,
4360        nb1: usize,
4361        offset: usize,
4362    ) -> *mut ggml_tensor;
4363    pub fn ggml_set_2d_inplace(
4364        ctx: *mut ggml_context,
4365        a: *mut ggml_tensor,
4366        b: *mut ggml_tensor,
4367        nb1: usize,
4368        offset: usize,
4369    ) -> *mut ggml_tensor;
4370    pub fn ggml_cpy(
4371        ctx: *mut ggml_context,
4372        a: *mut ggml_tensor,
4373        b: *mut ggml_tensor,
4374    ) -> *mut ggml_tensor;
4375    pub fn ggml_cast(
4376        ctx: *mut ggml_context,
4377        a: *mut ggml_tensor,
4378        type_: ggml_type,
4379    ) -> *mut ggml_tensor;
4380    pub fn ggml_cont(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4381    pub fn ggml_cont_1d(ctx: *mut ggml_context, a: *mut ggml_tensor, ne0: i64) -> *mut ggml_tensor;
4382    pub fn ggml_cont_2d(
4383        ctx: *mut ggml_context,
4384        a: *mut ggml_tensor,
4385        ne0: i64,
4386        ne1: i64,
4387    ) -> *mut ggml_tensor;
4388    pub fn ggml_cont_3d(
4389        ctx: *mut ggml_context,
4390        a: *mut ggml_tensor,
4391        ne0: i64,
4392        ne1: i64,
4393        ne2: i64,
4394    ) -> *mut ggml_tensor;
4395    pub fn ggml_cont_4d(
4396        ctx: *mut ggml_context,
4397        a: *mut ggml_tensor,
4398        ne0: i64,
4399        ne1: i64,
4400        ne2: i64,
4401        ne3: i64,
4402    ) -> *mut ggml_tensor;
4403    pub fn ggml_reshape(
4404        ctx: *mut ggml_context,
4405        a: *mut ggml_tensor,
4406        b: *mut ggml_tensor,
4407    ) -> *mut ggml_tensor;
4408    pub fn ggml_reshape_1d(
4409        ctx: *mut ggml_context,
4410        a: *mut ggml_tensor,
4411        ne0: i64,
4412    ) -> *mut ggml_tensor;
4413    pub fn ggml_reshape_2d(
4414        ctx: *mut ggml_context,
4415        a: *mut ggml_tensor,
4416        ne0: i64,
4417        ne1: i64,
4418    ) -> *mut ggml_tensor;
4419    pub fn ggml_reshape_3d(
4420        ctx: *mut ggml_context,
4421        a: *mut ggml_tensor,
4422        ne0: i64,
4423        ne1: i64,
4424        ne2: i64,
4425    ) -> *mut ggml_tensor;
4426    pub fn ggml_reshape_4d(
4427        ctx: *mut ggml_context,
4428        a: *mut ggml_tensor,
4429        ne0: i64,
4430        ne1: i64,
4431        ne2: i64,
4432        ne3: i64,
4433    ) -> *mut ggml_tensor;
4434    pub fn ggml_view_1d(
4435        ctx: *mut ggml_context,
4436        a: *mut ggml_tensor,
4437        ne0: i64,
4438        offset: usize,
4439    ) -> *mut ggml_tensor;
4440    pub fn ggml_view_2d(
4441        ctx: *mut ggml_context,
4442        a: *mut ggml_tensor,
4443        ne0: i64,
4444        ne1: i64,
4445        nb1: usize,
4446        offset: usize,
4447    ) -> *mut ggml_tensor;
4448    pub fn ggml_view_3d(
4449        ctx: *mut ggml_context,
4450        a: *mut ggml_tensor,
4451        ne0: i64,
4452        ne1: i64,
4453        ne2: i64,
4454        nb1: usize,
4455        nb2: usize,
4456        offset: usize,
4457    ) -> *mut ggml_tensor;
4458    pub fn ggml_view_4d(
4459        ctx: *mut ggml_context,
4460        a: *mut ggml_tensor,
4461        ne0: i64,
4462        ne1: i64,
4463        ne2: i64,
4464        ne3: i64,
4465        nb1: usize,
4466        nb2: usize,
4467        nb3: usize,
4468        offset: usize,
4469    ) -> *mut ggml_tensor;
4470    pub fn ggml_permute(
4471        ctx: *mut ggml_context,
4472        a: *mut ggml_tensor,
4473        axis0: ::std::os::raw::c_int,
4474        axis1: ::std::os::raw::c_int,
4475        axis2: ::std::os::raw::c_int,
4476        axis3: ::std::os::raw::c_int,
4477    ) -> *mut ggml_tensor;
4478    pub fn ggml_transpose(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4479    pub fn ggml_get_rows(
4480        ctx: *mut ggml_context,
4481        a: *mut ggml_tensor,
4482        b: *mut ggml_tensor,
4483    ) -> *mut ggml_tensor;
4484    pub fn ggml_get_rows_back(
4485        ctx: *mut ggml_context,
4486        a: *mut ggml_tensor,
4487        b: *mut ggml_tensor,
4488        c: *mut ggml_tensor,
4489    ) -> *mut ggml_tensor;
4490    pub fn ggml_diag(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4491    pub fn ggml_diag_mask_inf(
4492        ctx: *mut ggml_context,
4493        a: *mut ggml_tensor,
4494        n_past: ::std::os::raw::c_int,
4495    ) -> *mut ggml_tensor;
4496    pub fn ggml_diag_mask_inf_inplace(
4497        ctx: *mut ggml_context,
4498        a: *mut ggml_tensor,
4499        n_past: ::std::os::raw::c_int,
4500    ) -> *mut ggml_tensor;
4501    pub fn ggml_diag_mask_zero(
4502        ctx: *mut ggml_context,
4503        a: *mut ggml_tensor,
4504        n_past: ::std::os::raw::c_int,
4505    ) -> *mut ggml_tensor;
4506    pub fn ggml_diag_mask_zero_inplace(
4507        ctx: *mut ggml_context,
4508        a: *mut ggml_tensor,
4509        n_past: ::std::os::raw::c_int,
4510    ) -> *mut ggml_tensor;
4511    pub fn ggml_soft_max(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4512    pub fn ggml_soft_max_inplace(ctx: *mut ggml_context, a: *mut ggml_tensor) -> *mut ggml_tensor;
4513    pub fn ggml_soft_max_ext(
4514        ctx: *mut ggml_context,
4515        a: *mut ggml_tensor,
4516        mask: *mut ggml_tensor,
4517        pos: *mut ggml_tensor,
4518        scale: f32,
4519        max_bias: f32,
4520    ) -> *mut ggml_tensor;
4521    pub fn ggml_soft_max_back(
4522        ctx: *mut ggml_context,
4523        a: *mut ggml_tensor,
4524        b: *mut ggml_tensor,
4525    ) -> *mut ggml_tensor;
4526    pub fn ggml_soft_max_back_inplace(
4527        ctx: *mut ggml_context,
4528        a: *mut ggml_tensor,
4529        b: *mut ggml_tensor,
4530    ) -> *mut ggml_tensor;
4531    pub fn ggml_rope(
4532        ctx: *mut ggml_context,
4533        a: *mut ggml_tensor,
4534        b: *mut ggml_tensor,
4535        n_dims: ::std::os::raw::c_int,
4536        mode: ::std::os::raw::c_int,
4537        n_ctx: ::std::os::raw::c_int,
4538    ) -> *mut ggml_tensor;
4539    pub fn ggml_rope_inplace(
4540        ctx: *mut ggml_context,
4541        a: *mut ggml_tensor,
4542        b: *mut ggml_tensor,
4543        n_dims: ::std::os::raw::c_int,
4544        mode: ::std::os::raw::c_int,
4545        n_ctx: ::std::os::raw::c_int,
4546    ) -> *mut ggml_tensor;
4547    pub fn ggml_rope_custom(
4548        ctx: *mut ggml_context,
4549        a: *mut ggml_tensor,
4550        b: *mut ggml_tensor,
4551        n_dims: ::std::os::raw::c_int,
4552        mode: ::std::os::raw::c_int,
4553        n_ctx: ::std::os::raw::c_int,
4554        n_orig_ctx: ::std::os::raw::c_int,
4555        freq_base: f32,
4556        freq_scale: f32,
4557        ext_factor: f32,
4558        attn_factor: f32,
4559        beta_fast: f32,
4560        beta_slow: f32,
4561    ) -> *mut ggml_tensor;
4562    pub fn ggml_rope_custom_inplace(
4563        ctx: *mut ggml_context,
4564        a: *mut ggml_tensor,
4565        b: *mut ggml_tensor,
4566        n_dims: ::std::os::raw::c_int,
4567        mode: ::std::os::raw::c_int,
4568        n_ctx: ::std::os::raw::c_int,
4569        n_orig_ctx: ::std::os::raw::c_int,
4570        freq_base: f32,
4571        freq_scale: f32,
4572        ext_factor: f32,
4573        attn_factor: f32,
4574        beta_fast: f32,
4575        beta_slow: f32,
4576    ) -> *mut ggml_tensor;
4577    pub fn ggml_rope_yarn_corr_dims(
4578        n_dims: ::std::os::raw::c_int,
4579        n_orig_ctx: ::std::os::raw::c_int,
4580        freq_base: f32,
4581        beta_fast: f32,
4582        beta_slow: f32,
4583        dims: *mut f32,
4584    );
4585    pub fn ggml_rope_xpos_inplace(
4586        ctx: *mut ggml_context,
4587        a: *mut ggml_tensor,
4588        b: *mut ggml_tensor,
4589        n_dims: ::std::os::raw::c_int,
4590        base: f32,
4591        down: bool,
4592    ) -> *mut ggml_tensor;
4593    pub fn ggml_rope_back(
4594        ctx: *mut ggml_context,
4595        a: *mut ggml_tensor,
4596        b: *mut ggml_tensor,
4597        n_dims: ::std::os::raw::c_int,
4598        mode: ::std::os::raw::c_int,
4599        n_ctx: ::std::os::raw::c_int,
4600        n_orig_ctx: ::std::os::raw::c_int,
4601        freq_base: f32,
4602        freq_scale: f32,
4603        ext_factor: f32,
4604        attn_factor: f32,
4605        beta_fast: f32,
4606        beta_slow: f32,
4607        xpos_base: f32,
4608        xpos_down: bool,
4609    ) -> *mut ggml_tensor;
4610    pub fn ggml_alibi(
4611        ctx: *mut ggml_context,
4612        a: *mut ggml_tensor,
4613        n_past: ::std::os::raw::c_int,
4614        n_head: ::std::os::raw::c_int,
4615        bias_max: f32,
4616    ) -> *mut ggml_tensor;
4617    pub fn ggml_clamp(
4618        ctx: *mut ggml_context,
4619        a: *mut ggml_tensor,
4620        min: f32,
4621        max: f32,
4622    ) -> *mut ggml_tensor;
4623    pub fn ggml_im2col(
4624        ctx: *mut ggml_context,
4625        a: *mut ggml_tensor,
4626        b: *mut ggml_tensor,
4627        s0: ::std::os::raw::c_int,
4628        s1: ::std::os::raw::c_int,
4629        p0: ::std::os::raw::c_int,
4630        p1: ::std::os::raw::c_int,
4631        d0: ::std::os::raw::c_int,
4632        d1: ::std::os::raw::c_int,
4633        is_2D: bool,
4634        dst_type: ggml_type,
4635    ) -> *mut ggml_tensor;
4636    pub fn ggml_conv_depthwise_2d(
4637        ctx: *mut ggml_context,
4638        a: *mut ggml_tensor,
4639        b: *mut ggml_tensor,
4640        s0: ::std::os::raw::c_int,
4641        s1: ::std::os::raw::c_int,
4642        p0: ::std::os::raw::c_int,
4643        p1: ::std::os::raw::c_int,
4644        d0: ::std::os::raw::c_int,
4645        d1: ::std::os::raw::c_int,
4646    ) -> *mut ggml_tensor;
4647    pub fn ggml_conv_1d(
4648        ctx: *mut ggml_context,
4649        a: *mut ggml_tensor,
4650        b: *mut ggml_tensor,
4651        s0: ::std::os::raw::c_int,
4652        p0: ::std::os::raw::c_int,
4653        d0: ::std::os::raw::c_int,
4654    ) -> *mut ggml_tensor;
4655    pub fn ggml_conv_1d_ph(
4656        ctx: *mut ggml_context,
4657        a: *mut ggml_tensor,
4658        b: *mut ggml_tensor,
4659        s: ::std::os::raw::c_int,
4660        d: ::std::os::raw::c_int,
4661    ) -> *mut ggml_tensor;
4662    pub fn ggml_conv_transpose_1d(
4663        ctx: *mut ggml_context,
4664        a: *mut ggml_tensor,
4665        b: *mut ggml_tensor,
4666        s0: ::std::os::raw::c_int,
4667        p0: ::std::os::raw::c_int,
4668        d0: ::std::os::raw::c_int,
4669    ) -> *mut ggml_tensor;
4670    pub fn ggml_conv_2d(
4671        ctx: *mut ggml_context,
4672        a: *mut ggml_tensor,
4673        b: *mut ggml_tensor,
4674        s0: ::std::os::raw::c_int,
4675        s1: ::std::os::raw::c_int,
4676        p0: ::std::os::raw::c_int,
4677        p1: ::std::os::raw::c_int,
4678        d0: ::std::os::raw::c_int,
4679        d1: ::std::os::raw::c_int,
4680    ) -> *mut ggml_tensor;
4681    pub fn ggml_conv_2d_sk_p0(
4682        ctx: *mut ggml_context,
4683        a: *mut ggml_tensor,
4684        b: *mut ggml_tensor,
4685    ) -> *mut ggml_tensor;
4686    pub fn ggml_conv_2d_s1_ph(
4687        ctx: *mut ggml_context,
4688        a: *mut ggml_tensor,
4689        b: *mut ggml_tensor,
4690    ) -> *mut ggml_tensor;
4691    pub fn ggml_conv_transpose_2d_p0(
4692        ctx: *mut ggml_context,
4693        a: *mut ggml_tensor,
4694        b: *mut ggml_tensor,
4695        stride: ::std::os::raw::c_int,
4696    ) -> *mut ggml_tensor;
4697    pub fn ggml_pool_1d(
4698        ctx: *mut ggml_context,
4699        a: *mut ggml_tensor,
4700        op: ggml_op_pool,
4701        k0: ::std::os::raw::c_int,
4702        s0: ::std::os::raw::c_int,
4703        p0: ::std::os::raw::c_int,
4704    ) -> *mut ggml_tensor;
4705    pub fn ggml_pool_2d(
4706        ctx: *mut ggml_context,
4707        a: *mut ggml_tensor,
4708        op: ggml_op_pool,
4709        k0: ::std::os::raw::c_int,
4710        k1: ::std::os::raw::c_int,
4711        s0: ::std::os::raw::c_int,
4712        s1: ::std::os::raw::c_int,
4713        p0: f32,
4714        p1: f32,
4715    ) -> *mut ggml_tensor;
4716    pub fn ggml_upscale(
4717        ctx: *mut ggml_context,
4718        a: *mut ggml_tensor,
4719        scale_factor: ::std::os::raw::c_int,
4720    ) -> *mut ggml_tensor;
4721    pub fn ggml_pad(
4722        ctx: *mut ggml_context,
4723        a: *mut ggml_tensor,
4724        p0: ::std::os::raw::c_int,
4725        p1: ::std::os::raw::c_int,
4726        p2: ::std::os::raw::c_int,
4727        p3: ::std::os::raw::c_int,
4728    ) -> *mut ggml_tensor;
4729    pub fn ggml_timestep_embedding(
4730        ctx: *mut ggml_context,
4731        timesteps: *mut ggml_tensor,
4732        dim: ::std::os::raw::c_int,
4733        max_period: ::std::os::raw::c_int,
4734    ) -> *mut ggml_tensor;
4735    pub fn ggml_argsort(
4736        ctx: *mut ggml_context,
4737        a: *mut ggml_tensor,
4738        order: ggml_sort_order,
4739    ) -> *mut ggml_tensor;
4740    pub fn ggml_arange(
4741        ctx: *mut ggml_context,
4742        start: f32,
4743        stop: f32,
4744        step: f32,
4745    ) -> *mut ggml_tensor;
4746    pub fn ggml_top_k(
4747        ctx: *mut ggml_context,
4748        a: *mut ggml_tensor,
4749        k: ::std::os::raw::c_int,
4750    ) -> *mut ggml_tensor;
4751    pub fn ggml_flash_attn(
4752        ctx: *mut ggml_context,
4753        q: *mut ggml_tensor,
4754        k: *mut ggml_tensor,
4755        v: *mut ggml_tensor,
4756        masked: bool,
4757    ) -> *mut ggml_tensor;
4758    pub fn ggml_flash_attn_back(
4759        ctx: *mut ggml_context,
4760        q: *mut ggml_tensor,
4761        k: *mut ggml_tensor,
4762        v: *mut ggml_tensor,
4763        d: *mut ggml_tensor,
4764        masked: bool,
4765    ) -> *mut ggml_tensor;
4766    pub fn ggml_flash_ff(
4767        ctx: *mut ggml_context,
4768        a: *mut ggml_tensor,
4769        b0: *mut ggml_tensor,
4770        b1: *mut ggml_tensor,
4771        c0: *mut ggml_tensor,
4772        c1: *mut ggml_tensor,
4773    ) -> *mut ggml_tensor;
4774    pub fn ggml_ssm_conv(
4775        ctx: *mut ggml_context,
4776        s: *mut ggml_tensor,
4777        x: *mut ggml_tensor,
4778        c: *mut ggml_tensor,
4779        sq: *mut ggml_tensor,
4780    ) -> *mut ggml_tensor;
4781    pub fn ggml_ssm_scan(
4782        ctx: *mut ggml_context,
4783        s: *mut ggml_tensor,
4784        x: *mut ggml_tensor,
4785        dt: *mut ggml_tensor,
4786        A: *mut ggml_tensor,
4787        B: *mut ggml_tensor,
4788        C: *mut ggml_tensor,
4789        sq: *mut ggml_tensor,
4790    ) -> *mut ggml_tensor;
4791    pub fn ggml_win_part(
4792        ctx: *mut ggml_context,
4793        a: *mut ggml_tensor,
4794        w: ::std::os::raw::c_int,
4795    ) -> *mut ggml_tensor;
4796    pub fn ggml_win_unpart(
4797        ctx: *mut ggml_context,
4798        a: *mut ggml_tensor,
4799        w0: ::std::os::raw::c_int,
4800        h0: ::std::os::raw::c_int,
4801        w: ::std::os::raw::c_int,
4802    ) -> *mut ggml_tensor;
4803    pub fn ggml_unary(
4804        ctx: *mut ggml_context,
4805        a: *mut ggml_tensor,
4806        op: ggml_unary_op,
4807    ) -> *mut ggml_tensor;
4808    pub fn ggml_unary_inplace(
4809        ctx: *mut ggml_context,
4810        a: *mut ggml_tensor,
4811        op: ggml_unary_op,
4812    ) -> *mut ggml_tensor;
4813    pub fn ggml_get_rel_pos(
4814        ctx: *mut ggml_context,
4815        a: *mut ggml_tensor,
4816        qh: ::std::os::raw::c_int,
4817        kh: ::std::os::raw::c_int,
4818    ) -> *mut ggml_tensor;
4819    pub fn ggml_add_rel_pos(
4820        ctx: *mut ggml_context,
4821        a: *mut ggml_tensor,
4822        pw: *mut ggml_tensor,
4823        ph: *mut ggml_tensor,
4824    ) -> *mut ggml_tensor;
4825    pub fn ggml_add_rel_pos_inplace(
4826        ctx: *mut ggml_context,
4827        a: *mut ggml_tensor,
4828        pw: *mut ggml_tensor,
4829        ph: *mut ggml_tensor,
4830    ) -> *mut ggml_tensor;
4831    pub fn ggml_map_unary_f32(
4832        ctx: *mut ggml_context,
4833        a: *mut ggml_tensor,
4834        fun: ggml_unary_op_f32_t,
4835    ) -> *mut ggml_tensor;
4836    pub fn ggml_map_unary_inplace_f32(
4837        ctx: *mut ggml_context,
4838        a: *mut ggml_tensor,
4839        fun: ggml_unary_op_f32_t,
4840    ) -> *mut ggml_tensor;
4841    pub fn ggml_map_binary_f32(
4842        ctx: *mut ggml_context,
4843        a: *mut ggml_tensor,
4844        b: *mut ggml_tensor,
4845        fun: ggml_binary_op_f32_t,
4846    ) -> *mut ggml_tensor;
4847    pub fn ggml_map_binary_inplace_f32(
4848        ctx: *mut ggml_context,
4849        a: *mut ggml_tensor,
4850        b: *mut ggml_tensor,
4851        fun: ggml_binary_op_f32_t,
4852    ) -> *mut ggml_tensor;
4853    pub fn ggml_map_custom1_f32(
4854        ctx: *mut ggml_context,
4855        a: *mut ggml_tensor,
4856        fun: ggml_custom1_op_f32_t,
4857    ) -> *mut ggml_tensor;
4858    pub fn ggml_map_custom1_inplace_f32(
4859        ctx: *mut ggml_context,
4860        a: *mut ggml_tensor,
4861        fun: ggml_custom1_op_f32_t,
4862    ) -> *mut ggml_tensor;
4863    pub fn ggml_map_custom2_f32(
4864        ctx: *mut ggml_context,
4865        a: *mut ggml_tensor,
4866        b: *mut ggml_tensor,
4867        fun: ggml_custom2_op_f32_t,
4868    ) -> *mut ggml_tensor;
4869    pub fn ggml_map_custom2_inplace_f32(
4870        ctx: *mut ggml_context,
4871        a: *mut ggml_tensor,
4872        b: *mut ggml_tensor,
4873        fun: ggml_custom2_op_f32_t,
4874    ) -> *mut ggml_tensor;
4875    pub fn ggml_map_custom3_f32(
4876        ctx: *mut ggml_context,
4877        a: *mut ggml_tensor,
4878        b: *mut ggml_tensor,
4879        c: *mut ggml_tensor,
4880        fun: ggml_custom3_op_f32_t,
4881    ) -> *mut ggml_tensor;
4882    pub fn ggml_map_custom3_inplace_f32(
4883        ctx: *mut ggml_context,
4884        a: *mut ggml_tensor,
4885        b: *mut ggml_tensor,
4886        c: *mut ggml_tensor,
4887        fun: ggml_custom3_op_f32_t,
4888    ) -> *mut ggml_tensor;
4889    pub fn ggml_map_custom1(
4890        ctx: *mut ggml_context,
4891        a: *mut ggml_tensor,
4892        fun: ggml_custom1_op_t,
4893        n_tasks: ::std::os::raw::c_int,
4894        userdata: *mut ::std::os::raw::c_void,
4895    ) -> *mut ggml_tensor;
4896    pub fn ggml_map_custom1_inplace(
4897        ctx: *mut ggml_context,
4898        a: *mut ggml_tensor,
4899        fun: ggml_custom1_op_t,
4900        n_tasks: ::std::os::raw::c_int,
4901        userdata: *mut ::std::os::raw::c_void,
4902    ) -> *mut ggml_tensor;
4903    pub fn ggml_map_custom2(
4904        ctx: *mut ggml_context,
4905        a: *mut ggml_tensor,
4906        b: *mut ggml_tensor,
4907        fun: ggml_custom2_op_t,
4908        n_tasks: ::std::os::raw::c_int,
4909        userdata: *mut ::std::os::raw::c_void,
4910    ) -> *mut ggml_tensor;
4911    pub fn ggml_map_custom2_inplace(
4912        ctx: *mut ggml_context,
4913        a: *mut ggml_tensor,
4914        b: *mut ggml_tensor,
4915        fun: ggml_custom2_op_t,
4916        n_tasks: ::std::os::raw::c_int,
4917        userdata: *mut ::std::os::raw::c_void,
4918    ) -> *mut ggml_tensor;
4919    pub fn ggml_map_custom3(
4920        ctx: *mut ggml_context,
4921        a: *mut ggml_tensor,
4922        b: *mut ggml_tensor,
4923        c: *mut ggml_tensor,
4924        fun: ggml_custom3_op_t,
4925        n_tasks: ::std::os::raw::c_int,
4926        userdata: *mut ::std::os::raw::c_void,
4927    ) -> *mut ggml_tensor;
4928    pub fn ggml_map_custom3_inplace(
4929        ctx: *mut ggml_context,
4930        a: *mut ggml_tensor,
4931        b: *mut ggml_tensor,
4932        c: *mut ggml_tensor,
4933        fun: ggml_custom3_op_t,
4934        n_tasks: ::std::os::raw::c_int,
4935        userdata: *mut ::std::os::raw::c_void,
4936    ) -> *mut ggml_tensor;
4937    pub fn ggml_cross_entropy_loss(
4938        ctx: *mut ggml_context,
4939        a: *mut ggml_tensor,
4940        b: *mut ggml_tensor,
4941    ) -> *mut ggml_tensor;
4942    pub fn ggml_cross_entropy_loss_back(
4943        ctx: *mut ggml_context,
4944        a: *mut ggml_tensor,
4945        b: *mut ggml_tensor,
4946        c: *mut ggml_tensor,
4947    ) -> *mut ggml_tensor;
4948    pub fn ggml_set_param(ctx: *mut ggml_context, tensor: *mut ggml_tensor);
4949    pub fn ggml_build_forward_expand(cgraph: *mut ggml_cgraph, tensor: *mut ggml_tensor);
4950    pub fn ggml_build_backward_expand(
4951        ctx: *mut ggml_context,
4952        gf: *mut ggml_cgraph,
4953        gb: *mut ggml_cgraph,
4954        keep: bool,
4955    );
4956    pub fn ggml_new_graph(ctx: *mut ggml_context) -> *mut ggml_cgraph;
4957    pub fn ggml_new_graph_custom(
4958        ctx: *mut ggml_context,
4959        size: usize,
4960        grads: bool,
4961    ) -> *mut ggml_cgraph;
4962    pub fn ggml_graph_dup(ctx: *mut ggml_context, cgraph: *mut ggml_cgraph) -> *mut ggml_cgraph;
4963    pub fn ggml_graph_view(
4964        cgraph: *mut ggml_cgraph,
4965        i0: ::std::os::raw::c_int,
4966        i1: ::std::os::raw::c_int,
4967    ) -> ggml_cgraph;
4968    pub fn ggml_graph_cpy(src: *mut ggml_cgraph, dst: *mut ggml_cgraph);
4969    pub fn ggml_graph_reset(cgraph: *mut ggml_cgraph);
4970    pub fn ggml_graph_clear(cgraph: *mut ggml_cgraph);
4971    pub fn ggml_graph_overhead() -> usize;
4972    pub fn ggml_graph_overhead_custom(size: usize, grads: bool) -> usize;
4973    pub fn ggml_graph_plan(
4974        cgraph: *const ggml_cgraph,
4975        n_threads: ::std::os::raw::c_int,
4976    ) -> ggml_cplan;
4977    pub fn ggml_graph_compute(cgraph: *mut ggml_cgraph, cplan: *mut ggml_cplan) -> ggml_status;
4978    pub fn ggml_graph_compute_with_ctx(
4979        ctx: *mut ggml_context,
4980        cgraph: *mut ggml_cgraph,
4981        n_threads: ::std::os::raw::c_int,
4982    ) -> ggml_status;
4983    pub fn ggml_graph_get_tensor(
4984        cgraph: *mut ggml_cgraph,
4985        name: *const ::std::os::raw::c_char,
4986    ) -> *mut ggml_tensor;
4987    pub fn ggml_graph_export(cgraph: *const ggml_cgraph, fname: *const ::std::os::raw::c_char);
4988    pub fn ggml_graph_import(
4989        fname: *const ::std::os::raw::c_char,
4990        ctx_data: *mut *mut ggml_context,
4991        ctx_eval: *mut *mut ggml_context,
4992    ) -> *mut ggml_cgraph;
4993    pub fn ggml_graph_print(cgraph: *const ggml_cgraph);
4994    pub fn ggml_graph_dump_dot(
4995        gb: *const ggml_cgraph,
4996        gf: *const ggml_cgraph,
4997        filename: *const ::std::os::raw::c_char,
4998    );
4999    pub fn ggml_build_backward_gradient_checkpointing(
5000        ctx: *mut ggml_context,
5001        gf: *mut ggml_cgraph,
5002        gb: *mut ggml_cgraph,
5003        gb_tmp: *mut ggml_cgraph,
5004        checkpoints: *mut *mut ggml_tensor,
5005        n_checkpoints: ::std::os::raw::c_int,
5006    );
5007    pub fn ggml_opt_default_params(type_: ggml_opt_type) -> ggml_opt_params;
5008    pub fn ggml_opt(
5009        ctx: *mut ggml_context,
5010        params: ggml_opt_params,
5011        f: *mut ggml_tensor,
5012    ) -> ggml_opt_result;
5013    pub fn ggml_opt_init(
5014        ctx: *mut ggml_context,
5015        opt: *mut ggml_opt_context,
5016        params: ggml_opt_params,
5017        nx: i64,
5018    );
5019    pub fn ggml_opt_resume(
5020        ctx: *mut ggml_context,
5021        opt: *mut ggml_opt_context,
5022        f: *mut ggml_tensor,
5023    ) -> ggml_opt_result;
5024    pub fn ggml_opt_resume_g(
5025        ctx: *mut ggml_context,
5026        opt: *mut ggml_opt_context,
5027        f: *mut ggml_tensor,
5028        gf: *mut ggml_cgraph,
5029        gb: *mut ggml_cgraph,
5030        callback: ggml_opt_callback,
5031        callback_data: *mut ::std::os::raw::c_void,
5032    ) -> ggml_opt_result;
5033    pub fn ggml_set_input(tensor: *mut ggml_tensor);
5034    pub fn ggml_set_output(tensor: *mut ggml_tensor);
5035    pub fn ggml_quantize_init(type_: ggml_type);
5036    pub fn ggml_quantize_free();
5037    pub fn ggml_quantize_requires_imatrix(type_: ggml_type) -> bool;
5038    pub fn ggml_quantize_chunk(
5039        type_: ggml_type,
5040        src: *const f32,
5041        dst: *mut ::std::os::raw::c_void,
5042        start: i64,
5043        nrows: i64,
5044        n_per_row: i64,
5045        imatrix: *const f32,
5046    ) -> usize;
5047    pub fn gguf_init_empty() -> *mut gguf_context;
5048    pub fn gguf_init_from_file(
5049        fname: *const ::std::os::raw::c_char,
5050        params: gguf_init_params,
5051    ) -> *mut gguf_context;
5052    pub fn gguf_free(ctx: *mut gguf_context);
5053    pub fn gguf_type_name(type_: gguf_type) -> *const ::std::os::raw::c_char;
5054    pub fn gguf_get_version(ctx: *const gguf_context) -> ::std::os::raw::c_int;
5055    pub fn gguf_get_alignment(ctx: *const gguf_context) -> usize;
5056    pub fn gguf_get_data_offset(ctx: *const gguf_context) -> usize;
5057    pub fn gguf_get_data(ctx: *const gguf_context) -> *mut ::std::os::raw::c_void;
5058    pub fn gguf_get_n_kv(ctx: *const gguf_context) -> ::std::os::raw::c_int;
5059    pub fn gguf_find_key(
5060        ctx: *const gguf_context,
5061        key: *const ::std::os::raw::c_char,
5062    ) -> ::std::os::raw::c_int;
5063    pub fn gguf_get_key(
5064        ctx: *const gguf_context,
5065        key_id: ::std::os::raw::c_int,
5066    ) -> *const ::std::os::raw::c_char;
5067    pub fn gguf_get_kv_type(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> gguf_type;
5068    pub fn gguf_get_arr_type(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> gguf_type;
5069    pub fn gguf_get_val_u8(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> u8;
5070    pub fn gguf_get_val_i8(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> i8;
5071    pub fn gguf_get_val_u16(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> u16;
5072    pub fn gguf_get_val_i16(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> i16;
5073    pub fn gguf_get_val_u32(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> u32;
5074    pub fn gguf_get_val_i32(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> i32;
5075    pub fn gguf_get_val_f32(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> f32;
5076    pub fn gguf_get_val_u64(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> u64;
5077    pub fn gguf_get_val_i64(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> i64;
5078    pub fn gguf_get_val_f64(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> f64;
5079    pub fn gguf_get_val_bool(ctx: *const gguf_context, key_id: ::std::os::raw::c_int) -> bool;
5080    pub fn gguf_get_val_str(
5081        ctx: *const gguf_context,
5082        key_id: ::std::os::raw::c_int,
5083    ) -> *const ::std::os::raw::c_char;
5084    pub fn gguf_get_val_data(
5085        ctx: *const gguf_context,
5086        key_id: ::std::os::raw::c_int,
5087    ) -> *const ::std::os::raw::c_void;
5088    pub fn gguf_get_arr_n(
5089        ctx: *const gguf_context,
5090        key_id: ::std::os::raw::c_int,
5091    ) -> ::std::os::raw::c_int;
5092    pub fn gguf_get_arr_data(
5093        ctx: *const gguf_context,
5094        key_id: ::std::os::raw::c_int,
5095    ) -> *const ::std::os::raw::c_void;
5096    pub fn gguf_get_arr_str(
5097        ctx: *const gguf_context,
5098        key_id: ::std::os::raw::c_int,
5099        i: ::std::os::raw::c_int,
5100    ) -> *const ::std::os::raw::c_char;
5101    pub fn gguf_get_n_tensors(ctx: *const gguf_context) -> ::std::os::raw::c_int;
5102    pub fn gguf_find_tensor(
5103        ctx: *const gguf_context,
5104        name: *const ::std::os::raw::c_char,
5105    ) -> ::std::os::raw::c_int;
5106    pub fn gguf_get_tensor_offset(ctx: *const gguf_context, i: ::std::os::raw::c_int) -> usize;
5107    pub fn gguf_get_tensor_name(
5108        ctx: *const gguf_context,
5109        i: ::std::os::raw::c_int,
5110    ) -> *mut ::std::os::raw::c_char;
5111    pub fn gguf_get_tensor_type(ctx: *const gguf_context, i: ::std::os::raw::c_int) -> ggml_type;
5112    pub fn gguf_remove_key(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char);
5113    pub fn gguf_set_val_u8(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: u8);
5114    pub fn gguf_set_val_i8(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: i8);
5115    pub fn gguf_set_val_u16(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: u16);
5116    pub fn gguf_set_val_i16(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: i16);
5117    pub fn gguf_set_val_u32(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: u32);
5118    pub fn gguf_set_val_i32(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: i32);
5119    pub fn gguf_set_val_f32(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: f32);
5120    pub fn gguf_set_val_u64(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: u64);
5121    pub fn gguf_set_val_i64(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: i64);
5122    pub fn gguf_set_val_f64(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: f64);
5123    pub fn gguf_set_val_bool(ctx: *mut gguf_context, key: *const ::std::os::raw::c_char, val: bool);
5124    pub fn gguf_set_val_str(
5125        ctx: *mut gguf_context,
5126        key: *const ::std::os::raw::c_char,
5127        val: *const ::std::os::raw::c_char,
5128    );
5129    pub fn gguf_set_arr_data(
5130        ctx: *mut gguf_context,
5131        key: *const ::std::os::raw::c_char,
5132        type_: gguf_type,
5133        data: *const ::std::os::raw::c_void,
5134        n: ::std::os::raw::c_int,
5135    );
5136    pub fn gguf_set_arr_str(
5137        ctx: *mut gguf_context,
5138        key: *const ::std::os::raw::c_char,
5139        data: *mut *const ::std::os::raw::c_char,
5140        n: ::std::os::raw::c_int,
5141    );
5142    pub fn gguf_set_kv(ctx: *mut gguf_context, src: *mut gguf_context);
5143    pub fn gguf_add_tensor(ctx: *mut gguf_context, tensor: *const ggml_tensor);
5144    pub fn gguf_set_tensor_type(
5145        ctx: *mut gguf_context,
5146        name: *const ::std::os::raw::c_char,
5147        type_: ggml_type,
5148    );
5149    pub fn gguf_set_tensor_data(
5150        ctx: *mut gguf_context,
5151        name: *const ::std::os::raw::c_char,
5152        data: *const ::std::os::raw::c_void,
5153        size: usize,
5154    );
5155    pub fn gguf_write_to_file(
5156        ctx: *const gguf_context,
5157        fname: *const ::std::os::raw::c_char,
5158        only_meta: bool,
5159    );
5160    pub fn gguf_get_meta_size(ctx: *const gguf_context) -> usize;
5161    pub fn gguf_get_meta_data(ctx: *const gguf_context, data: *mut ::std::os::raw::c_void);
5162    pub fn ggml_cpu_has_avx() -> ::std::os::raw::c_int;
5163    pub fn ggml_cpu_has_avx_vnni() -> ::std::os::raw::c_int;
5164    pub fn ggml_cpu_has_avx2() -> ::std::os::raw::c_int;
5165    pub fn ggml_cpu_has_avx512() -> ::std::os::raw::c_int;
5166    pub fn ggml_cpu_has_avx512_vbmi() -> ::std::os::raw::c_int;
5167    pub fn ggml_cpu_has_avx512_vnni() -> ::std::os::raw::c_int;
5168    pub fn ggml_cpu_has_fma() -> ::std::os::raw::c_int;
5169    pub fn ggml_cpu_has_neon() -> ::std::os::raw::c_int;
5170    pub fn ggml_cpu_has_arm_fma() -> ::std::os::raw::c_int;
5171    pub fn ggml_cpu_has_metal() -> ::std::os::raw::c_int;
5172    pub fn ggml_cpu_has_f16c() -> ::std::os::raw::c_int;
5173    pub fn ggml_cpu_has_fp16_va() -> ::std::os::raw::c_int;
5174    pub fn ggml_cpu_has_wasm_simd() -> ::std::os::raw::c_int;
5175    pub fn ggml_cpu_has_blas() -> ::std::os::raw::c_int;
5176    pub fn ggml_cpu_has_cuda() -> ::std::os::raw::c_int;
5177    pub fn ggml_cpu_has_clblast() -> ::std::os::raw::c_int;
5178    pub fn ggml_cpu_has_vulkan() -> ::std::os::raw::c_int;
5179    pub fn ggml_cpu_has_kompute() -> ::std::os::raw::c_int;
5180    pub fn ggml_cpu_has_gpublas() -> ::std::os::raw::c_int;
5181    pub fn ggml_cpu_has_sse3() -> ::std::os::raw::c_int;
5182    pub fn ggml_cpu_has_ssse3() -> ::std::os::raw::c_int;
5183    pub fn ggml_cpu_has_sycl() -> ::std::os::raw::c_int;
5184    pub fn ggml_cpu_has_vsx() -> ::std::os::raw::c_int;
5185    pub fn ggml_cpu_has_matmul_int8() -> ::std::os::raw::c_int;
5186    pub fn ggml_internal_get_type_traits(type_: ggml_type) -> ggml_type_traits_t;
5187    pub fn llama_model_default_params() -> llama_model_params;
5188    pub fn llama_context_default_params() -> llama_context_params;
5189    pub fn llama_model_quantize_default_params() -> llama_model_quantize_params;
5190    pub fn llama_backend_init();
5191    pub fn llama_numa_init(numa: ggml_numa_strategy);
5192    pub fn llama_backend_free();
5193    pub fn llama_load_model_from_file(
5194        path_model: *const ::std::os::raw::c_char,
5195        params: llama_model_params,
5196    ) -> *mut llama_model;
5197    pub fn llama_free_model(model: *mut llama_model);
5198    pub fn llama_new_context_with_model(
5199        model: *mut llama_model,
5200        params: llama_context_params,
5201    ) -> *mut llama_context;
5202    pub fn llama_free(ctx: *mut llama_context);
5203    pub fn llama_time_us() -> i64;
5204    pub fn llama_max_devices() -> usize;
5205    pub fn llama_supports_mmap() -> bool;
5206    pub fn llama_supports_mlock() -> bool;
5207    pub fn llama_supports_gpu_offload() -> bool;
5208    pub fn llama_get_model(ctx: *const llama_context) -> *const llama_model;
5209    pub fn llama_n_ctx(ctx: *const llama_context) -> u32;
5210    pub fn llama_n_batch(ctx: *const llama_context) -> u32;
5211    pub fn llama_n_ubatch(ctx: *const llama_context) -> u32;
5212    pub fn llama_n_seq_max(ctx: *const llama_context) -> u32;
5213    pub fn llama_pooling_type(ctx: *const llama_context) -> llama_pooling_type;
5214    pub fn llama_vocab_type(model: *const llama_model) -> llama_vocab_type;
5215    pub fn llama_rope_type(model: *const llama_model) -> llama_rope_type;
5216    pub fn llama_n_vocab(model: *const llama_model) -> i32;
5217    pub fn llama_n_ctx_train(model: *const llama_model) -> i32;
5218    pub fn llama_n_embd(model: *const llama_model) -> i32;
5219    pub fn llama_n_layer(model: *const llama_model) -> i32;
5220    pub fn llama_rope_freq_scale_train(model: *const llama_model) -> f32;
5221    pub fn llama_model_meta_val_str(
5222        model: *const llama_model,
5223        key: *const ::std::os::raw::c_char,
5224        buf: *mut ::std::os::raw::c_char,
5225        buf_size: usize,
5226    ) -> i32;
5227    pub fn llama_model_meta_count(model: *const llama_model) -> i32;
5228    pub fn llama_model_meta_key_by_index(
5229        model: *const llama_model,
5230        i: i32,
5231        buf: *mut ::std::os::raw::c_char,
5232        buf_size: usize,
5233    ) -> i32;
5234    pub fn llama_model_meta_val_str_by_index(
5235        model: *const llama_model,
5236        i: i32,
5237        buf: *mut ::std::os::raw::c_char,
5238        buf_size: usize,
5239    ) -> i32;
5240    pub fn llama_model_desc(
5241        model: *const llama_model,
5242        buf: *mut ::std::os::raw::c_char,
5243        buf_size: usize,
5244    ) -> i32;
5245    pub fn llama_model_size(model: *const llama_model) -> u64;
5246    pub fn llama_model_n_params(model: *const llama_model) -> u64;
5247    pub fn llama_get_model_tensor(
5248        model: *mut llama_model,
5249        name: *const ::std::os::raw::c_char,
5250    ) -> *mut ggml_tensor;
5251    pub fn llama_model_quantize(
5252        fname_inp: *const ::std::os::raw::c_char,
5253        fname_out: *const ::std::os::raw::c_char,
5254        params: *const llama_model_quantize_params,
5255    ) -> u32;
5256    pub fn llama_model_apply_lora_from_file(
5257        model: *const llama_model,
5258        path_lora: *const ::std::os::raw::c_char,
5259        scale: f32,
5260        path_base_model: *const ::std::os::raw::c_char,
5261        n_threads: i32,
5262    ) -> i32;
5263    pub fn llama_control_vector_apply(
5264        lctx: *mut llama_context,
5265        data: *const f32,
5266        len: usize,
5267        n_embd: i32,
5268        il_start: i32,
5269        il_end: i32,
5270    ) -> i32;
5271    pub fn llama_kv_cache_view_init(
5272        ctx: *const llama_context,
5273        n_seq_max: i32,
5274    ) -> llama_kv_cache_view;
5275    pub fn llama_kv_cache_view_free(view: *mut llama_kv_cache_view);
5276    pub fn llama_kv_cache_view_update(ctx: *const llama_context, view: *mut llama_kv_cache_view);
5277    pub fn llama_get_kv_cache_token_count(ctx: *const llama_context) -> i32;
5278    pub fn llama_get_kv_cache_used_cells(ctx: *const llama_context) -> i32;
5279    pub fn llama_kv_cache_clear(ctx: *mut llama_context);
5280    pub fn llama_kv_cache_seq_rm(
5281        ctx: *mut llama_context,
5282        seq_id: llama_seq_id,
5283        p0: llama_pos,
5284        p1: llama_pos,
5285    ) -> bool;
5286    pub fn llama_kv_cache_seq_cp(
5287        ctx: *mut llama_context,
5288        seq_id_src: llama_seq_id,
5289        seq_id_dst: llama_seq_id,
5290        p0: llama_pos,
5291        p1: llama_pos,
5292    );
5293    pub fn llama_kv_cache_seq_keep(ctx: *mut llama_context, seq_id: llama_seq_id);
5294    pub fn llama_kv_cache_seq_add(
5295        ctx: *mut llama_context,
5296        seq_id: llama_seq_id,
5297        p0: llama_pos,
5298        p1: llama_pos,
5299        delta: llama_pos,
5300    );
5301    pub fn llama_kv_cache_seq_div(
5302        ctx: *mut llama_context,
5303        seq_id: llama_seq_id,
5304        p0: llama_pos,
5305        p1: llama_pos,
5306        d: ::std::os::raw::c_int,
5307    );
5308    pub fn llama_kv_cache_seq_pos_max(ctx: *mut llama_context, seq_id: llama_seq_id) -> llama_pos;
5309    pub fn llama_kv_cache_defrag(ctx: *mut llama_context);
5310    pub fn llama_kv_cache_update(ctx: *mut llama_context);
5311    pub fn llama_state_get_size(ctx: *const llama_context) -> usize;
5312    pub fn llama_get_state_size(ctx: *const llama_context) -> usize;
5313    pub fn llama_state_get_data(ctx: *mut llama_context, dst: *mut u8) -> usize;
5314    pub fn llama_copy_state_data(ctx: *mut llama_context, dst: *mut u8) -> usize;
5315    pub fn llama_state_set_data(ctx: *mut llama_context, src: *const u8) -> usize;
5316    pub fn llama_set_state_data(ctx: *mut llama_context, src: *const u8) -> usize;
5317    pub fn llama_state_load_file(
5318        ctx: *mut llama_context,
5319        path_session: *const ::std::os::raw::c_char,
5320        tokens_out: *mut llama_token,
5321        n_token_capacity: usize,
5322        n_token_count_out: *mut usize,
5323    ) -> bool;
5324    pub fn llama_load_session_file(
5325        ctx: *mut llama_context,
5326        path_session: *const ::std::os::raw::c_char,
5327        tokens_out: *mut llama_token,
5328        n_token_capacity: usize,
5329        n_token_count_out: *mut usize,
5330    ) -> bool;
5331    pub fn llama_state_save_file(
5332        ctx: *mut llama_context,
5333        path_session: *const ::std::os::raw::c_char,
5334        tokens: *const llama_token,
5335        n_token_count: usize,
5336    ) -> bool;
5337    pub fn llama_save_session_file(
5338        ctx: *mut llama_context,
5339        path_session: *const ::std::os::raw::c_char,
5340        tokens: *const llama_token,
5341        n_token_count: usize,
5342    ) -> bool;
5343    pub fn llama_state_seq_get_size(ctx: *mut llama_context, seq_id: llama_seq_id) -> usize;
5344    pub fn llama_state_seq_get_data(
5345        ctx: *mut llama_context,
5346        dst: *mut u8,
5347        seq_id: llama_seq_id,
5348    ) -> usize;
5349    pub fn llama_state_seq_set_data(
5350        ctx: *mut llama_context,
5351        src: *const u8,
5352        dest_seq_id: llama_seq_id,
5353    ) -> usize;
5354    pub fn llama_state_seq_save_file(
5355        ctx: *mut llama_context,
5356        filepath: *const ::std::os::raw::c_char,
5357        seq_id: llama_seq_id,
5358        tokens: *const llama_token,
5359        n_token_count: usize,
5360    ) -> usize;
5361    pub fn llama_state_seq_load_file(
5362        ctx: *mut llama_context,
5363        filepath: *const ::std::os::raw::c_char,
5364        dest_seq_id: llama_seq_id,
5365        tokens_out: *mut llama_token,
5366        n_token_capacity: usize,
5367        n_token_count_out: *mut usize,
5368    ) -> usize;
5369    pub fn llama_batch_get_one(
5370        tokens: *mut llama_token,
5371        n_tokens: i32,
5372        pos_0: llama_pos,
5373        seq_id: llama_seq_id,
5374    ) -> llama_batch;
5375    pub fn llama_batch_init(n_tokens: i32, embd: i32, n_seq_max: i32) -> llama_batch;
5376    pub fn llama_batch_free(batch: llama_batch);
5377    pub fn llama_decode(ctx: *mut llama_context, batch: llama_batch) -> i32;
5378    pub fn llama_set_n_threads(ctx: *mut llama_context, n_threads: u32, n_threads_batch: u32);
5379    pub fn llama_set_causal_attn(ctx: *mut llama_context, causal_attn: bool);
5380    pub fn llama_set_abort_callback(
5381        ctx: *mut llama_context,
5382        abort_callback: ggml_abort_callback,
5383        abort_callback_data: *mut ::std::os::raw::c_void,
5384    );
5385    pub fn llama_synchronize(ctx: *mut llama_context);
5386    pub fn llama_get_logits(ctx: *mut llama_context) -> *mut f32;
5387    pub fn llama_get_logits_ith(ctx: *mut llama_context, i: i32) -> *mut f32;
5388    pub fn llama_get_embeddings(ctx: *mut llama_context) -> *mut f32;
5389    pub fn llama_get_embeddings_ith(ctx: *mut llama_context, i: i32) -> *mut f32;
5390    pub fn llama_get_embeddings_seq(ctx: *mut llama_context, seq_id: llama_seq_id) -> *mut f32;
5391    pub fn llama_token_get_text(
5392        model: *const llama_model,
5393        token: llama_token,
5394    ) -> *const ::std::os::raw::c_char;
5395    pub fn llama_token_get_score(model: *const llama_model, token: llama_token) -> f32;
5396    pub fn llama_token_get_type(model: *const llama_model, token: llama_token) -> llama_token_type;
5397    pub fn llama_token_is_eog(model: *const llama_model, token: llama_token) -> bool;
5398    pub fn llama_token_bos(model: *const llama_model) -> llama_token;
5399    pub fn llama_token_eos(model: *const llama_model) -> llama_token;
5400    pub fn llama_token_cls(model: *const llama_model) -> llama_token;
5401    pub fn llama_token_sep(model: *const llama_model) -> llama_token;
5402    pub fn llama_token_nl(model: *const llama_model) -> llama_token;
5403    pub fn llama_add_bos_token(model: *const llama_model) -> i32;
5404    pub fn llama_add_eos_token(model: *const llama_model) -> i32;
5405    pub fn llama_token_prefix(model: *const llama_model) -> llama_token;
5406    pub fn llama_token_middle(model: *const llama_model) -> llama_token;
5407    pub fn llama_token_suffix(model: *const llama_model) -> llama_token;
5408    pub fn llama_token_eot(model: *const llama_model) -> llama_token;
5409    #[doc = " @details Convert the provided text into tokens.\n @param tokens The tokens pointer must be large enough to hold the resulting tokens.\n @return Returns the number of tokens on success, no more than n_tokens_max\n @return Returns a negative number on failure - the number of tokens that would have been returned\n @param parse_special Allow tokenizing special and/or control tokens which otherwise are not exposed and treated\n                      as plaintext. Does not insert a leading space."]
5410    pub fn llama_tokenize(
5411        model: *const llama_model,
5412        text: *const ::std::os::raw::c_char,
5413        text_len: i32,
5414        tokens: *mut llama_token,
5415        n_tokens_max: i32,
5416        add_special: bool,
5417        parse_special: bool,
5418    ) -> i32;
5419    pub fn llama_token_to_piece(
5420        model: *const llama_model,
5421        token: llama_token,
5422        buf: *mut ::std::os::raw::c_char,
5423        length: i32,
5424        special: bool,
5425    ) -> i32;
5426    #[doc = " Apply chat template. Inspired by hf apply_chat_template() on python.\n Both \"model\" and \"custom_template\" are optional, but at least one is required. \"custom_template\" has higher precedence than \"model\"\n NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https://github.com/ggerganov/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template\n @param tmpl A Jinja template to use for this chat. If this is nullptr, the model’s default chat template will be used instead.\n @param chat Pointer to a list of multiple llama_chat_message\n @param n_msg Number of llama_chat_message in this chat\n @param add_ass Whether to end the prompt with the token(s) that indicate the start of an assistant message.\n @param buf A buffer to hold the output formatted prompt. The recommended alloc size is 2 * (total number of characters of all messages)\n @param length The size of the allocated buffer\n @return The total number of bytes of the formatted prompt. If is it larger than the size of buffer, you may need to re-alloc it and then re-apply the template."]
5427    pub fn llama_chat_apply_template(
5428        model: *const llama_model,
5429        tmpl: *const ::std::os::raw::c_char,
5430        chat: *const llama_chat_message,
5431        n_msg: usize,
5432        add_ass: bool,
5433        buf: *mut ::std::os::raw::c_char,
5434        length: i32,
5435    ) -> i32;
5436    pub fn llama_grammar_init(
5437        rules: *mut *const llama_grammar_element,
5438        n_rules: usize,
5439        start_rule_index: usize,
5440    ) -> *mut llama_grammar;
5441    pub fn llama_grammar_free(grammar: *mut llama_grammar);
5442    pub fn llama_grammar_copy(grammar: *const llama_grammar) -> *mut llama_grammar;
5443    pub fn llama_set_rng_seed(ctx: *mut llama_context, seed: u32);
5444    #[doc = " @details Repetition penalty described in CTRL academic paper https://arxiv.org/abs/1909.05858, with negative logit fix.\n @details Frequency and presence penalties described in OpenAI API https://platform.openai.com/docs/api-reference/parameter-details."]
5445    pub fn llama_sample_repetition_penalties(
5446        ctx: *mut llama_context,
5447        candidates: *mut llama_token_data_array,
5448        last_tokens: *const llama_token,
5449        penalty_last_n: usize,
5450        penalty_repeat: f32,
5451        penalty_freq: f32,
5452        penalty_present: f32,
5453    );
5454    #[doc = " @details Apply classifier-free guidance to the logits as described in academic paper \"Stay on topic with Classifier-Free Guidance\" https://arxiv.org/abs/2306.17806\n @param logits Logits extracted from the original generation context.\n @param logits_guidance Logits extracted from a separate context from the same model. Other than a negative prompt at the beginning, it should have all generated and user input tokens copied from the main context.\n @param scale Guidance strength. 1.0f means no guidance. Higher values mean stronger guidance."]
5455    pub fn llama_sample_apply_guidance(
5456        ctx: *mut llama_context,
5457        logits: *mut f32,
5458        logits_guidance: *mut f32,
5459        scale: f32,
5460    );
5461    #[doc = " @details Sorts candidate tokens by their logits in descending order and calculate probabilities based on logits."]
5462    pub fn llama_sample_softmax(ctx: *mut llama_context, candidates: *mut llama_token_data_array);
5463    #[doc = " @details Top-K sampling described in academic paper \"The Curious Case of Neural Text Degeneration\" https://arxiv.org/abs/1904.09751"]
5464    pub fn llama_sample_top_k(
5465        ctx: *mut llama_context,
5466        candidates: *mut llama_token_data_array,
5467        k: i32,
5468        min_keep: usize,
5469    );
5470    #[doc = " @details Nucleus sampling described in academic paper \"The Curious Case of Neural Text Degeneration\" https://arxiv.org/abs/1904.09751"]
5471    pub fn llama_sample_top_p(
5472        ctx: *mut llama_context,
5473        candidates: *mut llama_token_data_array,
5474        p: f32,
5475        min_keep: usize,
5476    );
5477    #[doc = " @details Minimum P sampling as described in https://github.com/ggerganov/llama.cpp/pull/3841"]
5478    pub fn llama_sample_min_p(
5479        ctx: *mut llama_context,
5480        candidates: *mut llama_token_data_array,
5481        p: f32,
5482        min_keep: usize,
5483    );
5484    #[doc = " @details Tail Free Sampling described in https://www.trentonbricken.com/Tail-Free-Sampling/."]
5485    pub fn llama_sample_tail_free(
5486        ctx: *mut llama_context,
5487        candidates: *mut llama_token_data_array,
5488        z: f32,
5489        min_keep: usize,
5490    );
5491    #[doc = " @details Locally Typical Sampling implementation described in the paper https://arxiv.org/abs/2202.00666."]
5492    pub fn llama_sample_typical(
5493        ctx: *mut llama_context,
5494        candidates: *mut llama_token_data_array,
5495        p: f32,
5496        min_keep: usize,
5497    );
5498    #[doc = " @details Dynamic temperature implementation described in the paper https://arxiv.org/abs/2309.02772."]
5499    pub fn llama_sample_entropy(
5500        ctx: *mut llama_context,
5501        candidates_p: *mut llama_token_data_array,
5502        min_temp: f32,
5503        max_temp: f32,
5504        exponent_val: f32,
5505    );
5506    pub fn llama_sample_temp(
5507        ctx: *mut llama_context,
5508        candidates: *mut llama_token_data_array,
5509        temp: f32,
5510    );
5511    #[doc = " @details Apply constraints from grammar"]
5512    pub fn llama_sample_grammar(
5513        ctx: *mut llama_context,
5514        candidates: *mut llama_token_data_array,
5515        grammar: *const llama_grammar,
5516    );
5517    #[doc = " @details Mirostat 1.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words.\n @param candidates A vector of `llama_token_data` containing the candidate tokens, their probabilities (p), and log-odds (logit) for the current position in the generated text.\n @param tau  The target cross-entropy (or surprise) value you want to achieve for the generated text. A higher value corresponds to more surprising or less predictable text, while a lower value corresponds to less surprising or more predictable text.\n @param eta The learning rate used to update `mu` based on the error between the target and observed surprisal of the sampled word. A larger learning rate will cause `mu` to be updated more quickly, while a smaller learning rate will result in slower updates.\n @param m The number of tokens considered in the estimation of `s_hat`. This is an arbitrary value that is used to calculate `s_hat`, which in turn helps to calculate the value of `k`. In the paper, they use `m = 100`, but you can experiment with different values to see how it affects the performance of the algorithm.\n @param mu Maximum cross-entropy. This value is initialized to be twice the target cross-entropy (`2 * tau`) and is updated in the algorithm based on the error between the target and observed surprisal."]
5518    pub fn llama_sample_token_mirostat(
5519        ctx: *mut llama_context,
5520        candidates: *mut llama_token_data_array,
5521        tau: f32,
5522        eta: f32,
5523        m: i32,
5524        mu: *mut f32,
5525    ) -> llama_token;
5526    #[doc = " @details Mirostat 2.0 algorithm described in the paper https://arxiv.org/abs/2007.14966. Uses tokens instead of words.\n @param candidates A vector of `llama_token_data` containing the candidate tokens, their probabilities (p), and log-odds (logit) for the current position in the generated text.\n @param tau  The target cross-entropy (or surprise) value you want to achieve for the generated text. A higher value corresponds to more surprising or less predictable text, while a lower value corresponds to less surprising or more predictable text.\n @param eta The learning rate used to update `mu` based on the error between the target and observed surprisal of the sampled word. A larger learning rate will cause `mu` to be updated more quickly, while a smaller learning rate will result in slower updates.\n @param mu Maximum cross-entropy. This value is initialized to be twice the target cross-entropy (`2 * tau`) and is updated in the algorithm based on the error between the target and observed surprisal."]
5527    pub fn llama_sample_token_mirostat_v2(
5528        ctx: *mut llama_context,
5529        candidates: *mut llama_token_data_array,
5530        tau: f32,
5531        eta: f32,
5532        mu: *mut f32,
5533    ) -> llama_token;
5534    #[doc = " @details Selects the token with the highest probability.\n          Does not compute the token probabilities. Use llama_sample_softmax() instead."]
5535    pub fn llama_sample_token_greedy(
5536        ctx: *mut llama_context,
5537        candidates: *mut llama_token_data_array,
5538    ) -> llama_token;
5539    #[doc = " @details Randomly selects a token from the candidates based on their probabilities using the RNG of ctx."]
5540    pub fn llama_sample_token(
5541        ctx: *mut llama_context,
5542        candidates: *mut llama_token_data_array,
5543    ) -> llama_token;
5544    #[doc = " @details Accepts the sampled token into the grammar"]
5545    pub fn llama_grammar_accept_token(
5546        ctx: *mut llama_context,
5547        grammar: *mut llama_grammar,
5548        token: llama_token,
5549    );
5550    #[doc = " @details Deterministically returns entire sentence constructed by a beam search.\n @param ctx Pointer to the llama_context.\n @param callback Invoked for each iteration of the beam_search loop, passing in beams_state.\n @param callback_data A pointer that is simply passed back to callback.\n @param n_beams Number of beams to use.\n @param n_past Number of tokens already evaluated.\n @param n_predict Maximum number of tokens to predict. EOS may occur earlier."]
5551    pub fn llama_beam_search(
5552        ctx: *mut llama_context,
5553        callback: llama_beam_search_callback_fn_t,
5554        callback_data: *mut ::std::os::raw::c_void,
5555        n_beams: usize,
5556        n_past: i32,
5557        n_predict: i32,
5558    );
5559    #[doc = " @details Build a split GGUF final path for this chunk.\n          llama_split_path(split_path, sizeof(split_path), \"/models/ggml-model-q4_0\", 2, 4) => split_path = \"/models/ggml-model-q4_0-00002-of-00004.gguf\""]
5560    pub fn llama_split_path(
5561        split_path: *mut ::std::os::raw::c_char,
5562        maxlen: usize,
5563        path_prefix: *const ::std::os::raw::c_char,
5564        split_no: ::std::os::raw::c_int,
5565        split_count: ::std::os::raw::c_int,
5566    ) -> ::std::os::raw::c_int;
5567    #[doc = " @details Extract the path prefix from the split_path if and only if the split_no and split_count match.\n          llama_split_prefix(split_prefix, 64, \"/models/ggml-model-q4_0-00002-of-00004.gguf\", 2, 4) => split_prefix = \"/models/ggml-model-q4_0\""]
5568    pub fn llama_split_prefix(
5569        split_prefix: *mut ::std::os::raw::c_char,
5570        maxlen: usize,
5571        split_path: *const ::std::os::raw::c_char,
5572        split_no: ::std::os::raw::c_int,
5573        split_count: ::std::os::raw::c_int,
5574    ) -> ::std::os::raw::c_int;
5575    pub fn llama_get_timings(ctx: *mut llama_context) -> llama_timings;
5576    pub fn llama_print_timings(ctx: *mut llama_context);
5577    pub fn llama_reset_timings(ctx: *mut llama_context);
5578    pub fn llama_print_system_info() -> *const ::std::os::raw::c_char;
5579    pub fn llama_log_set(log_callback: ggml_log_callback, user_data: *mut ::std::os::raw::c_void);
5580    pub fn llama_dump_timing_info_yaml(stream: *mut FILE, ctx: *const llama_context);
5581}