# 'GGML' Tensor Operations for Machine Learning

## Documentation for package ‘ggmlR’ version 0.6.1

- DESCRIPTION file.
- Package NEWS.

## Help Pages

A B C D G I L N O P Q R S W

## -- A --

ag_add | Element-wise addition with broadcasting
ag_batch_norm | Create a Batch Normalisation layer
ag_clamp | Element-wise clamp
ag_cross_entropy_loss | Categorical Cross-Entropy loss
ag_dataloader | Create a mini-batch data loader
ag_default_device | Return the current default compute device
ag_default_dtype | Return the current default dtype for GPU operations
ag_device | Set the default compute device for ag_* operations
ag_dropout | Create a Dropout layer
ag_dtype | Set the default floating-point precision for ag_* GPU operations
ag_embedding | Create an Embedding layer
ag_eval | Switch a layer or sequential model to eval mode
ag_exp | Element-wise exponential
ag_gradcheck | Numerical gradient check (like torch.autograd.gradcheck)
ag_linear | Create a dense layer with learnable parameters
ag_log | Element-wise natural logarithm
ag_matmul | Matrix multiplication
ag_mean | Mean of elements (or along a dim)
ag_mse_loss | Mean Squared Error loss
ag_mul | Element-wise multiplication
ag_multihead_attention | Create a Multi-Head Attention layer
ag_param | Create a parameter tensor (gradient tracked)
ag_pow | Element-wise power
ag_relu | ReLU activation
ag_reshape | Reshape tensor
ag_scale | Scale tensor by a scalar constant
ag_sequential | Create a sequential container of layers
ag_sigmoid | Sigmoid activation
ag_softmax | Softmax activation (column-wise)
ag_softmax_cross_entropy_loss | Fused softmax + cross-entropy loss (numerically stable)
ag_sub | Element-wise subtraction
ag_sum | Sum all elements (or along a dim): out = sum(x)
ag_tanh | Tanh activation
ag_tensor | Create a dynamic tensor (no gradient tracking)
ag_to_device | Move a tensor to the specified device
ag_train | Switch a layer or sequential model to training mode
ag_transpose | Transpose a tensor

## -- B --

backward | Run backward pass from a scalar loss tensor

## -- C --

clip_grad_norm | Clip gradients by global L2 norm

## -- D --

dequantize_row_iq1_m | Dequantize Row (IQ)
dequantize_row_iq1_s | Dequantize Row (IQ)
dequantize_row_iq2_s | Dequantize Row (IQ)
dequantize_row_iq2_xs | Dequantize Row (IQ)
dequantize_row_iq2_xxs | Dequantize Row (IQ)
dequantize_row_iq3_s | Dequantize Row (IQ)
dequantize_row_iq3_xxs | Dequantize Row (IQ)
dequantize_row_iq4_nl | Dequantize Row (IQ)
dequantize_row_iq4_xs | Dequantize Row (IQ)
dequantize_row_mxfp4 | Dequantize Row (MXFP4)
dequantize_row_q2_K | Dequantize Row (K-quants)
dequantize_row_q3_K | Dequantize Row (K-quants)
dequantize_row_q4_0 | Dequantize Row (Q4_0)
dequantize_row_q4_1 | Dequantize Row (Q4_0)
dequantize_row_q4_K | Dequantize Row (K-quants)
dequantize_row_q5_0 | Dequantize Row (Q4_0)
dequantize_row_q5_1 | Dequantize Row (Q4_0)
dequantize_row_q5_K | Dequantize Row (K-quants)
dequantize_row_q6_K | Dequantize Row (K-quants)
dequantize_row_q8_0 | Dequantize Row (Q4_0)
dequantize_row_q8_K | Dequantize Row (K-quants)
dequantize_row_tq1_0 | Dequantize Row (Ternary)
dequantize_row_tq2_0 | Dequantize Row (Ternary)
dp_train | Data-parallel training across multiple GPUs

## -- G --

ggml_abort_is_r_enabled | Check if R Abort Handler is Enabled
ggml_abs | Absolute Value (Graph)
ggml_abs_inplace | Absolute Value In-place (Graph)
ggml_add | Add tensors
ggml_add1 | Add Scalar to Tensor (Graph)
ggml_add_inplace | Element-wise Addition In-place (Graph)
ggml_apply | Apply a Layer Object to a Tensor Node
ggml_are_same_layout | Check if Two Tensors Have the Same Layout
ggml_are_same_shape | Compare Tensor Shapes
ggml_are_same_stride | Compare Tensor Strides
ggml_argmax | Argmax (Graph)
ggml_argsort | Argsort - Get Sorting Indices (Graph)
ggml_backend_alloc_ctx_tensors | Allocate Context Tensors to Backend
ggml_backend_buffer_clear | Clear buffer memory
ggml_backend_buffer_free | Free Backend Buffer
ggml_backend_buffer_get_size | Get Backend Buffer Size
ggml_backend_buffer_get_usage | Get buffer usage
ggml_backend_buffer_is_host | Check if buffer is host memory
ggml_backend_buffer_is_multi_buffer | Check if buffer is a multi-buffer
ggml_backend_buffer_name | Get Backend Buffer Name
ggml_backend_buffer_reset | Reset buffer
ggml_backend_buffer_set_usage | Set buffer usage hint
ggml_backend_buffer_usage_any | Buffer usage: Any
ggml_backend_buffer_usage_compute | Buffer usage: Compute
ggml_backend_buffer_usage_weights | Buffer usage: Weights
ggml_backend_cpu_init | Initialize CPU Backend
ggml_backend_cpu_set_n_threads | Set CPU Backend Threads
ggml_backend_device_register | Register a device
ggml_backend_device_type_accel | Device type: Accelerator
ggml_backend_device_type_cpu | Device type: CPU
ggml_backend_device_type_gpu | Device type: GPU
ggml_backend_device_type_igpu | Device type: Integrated GPU
ggml_backend_dev_by_name | Get device by name
ggml_backend_dev_by_type | Get device by type
ggml_backend_dev_count | Get number of available devices
ggml_backend_dev_description | Get device description
ggml_backend_dev_get | Get device by index
ggml_backend_dev_get_props | Get device properties
ggml_backend_dev_init | Initialize backend from device
ggml_backend_dev_memory | Get device memory
ggml_backend_dev_name | Get device name
ggml_backend_dev_offload_op | Check if device should offload operation
ggml_backend_dev_supports_buft | Check if device supports buffer type
ggml_backend_dev_supports_op | Check if device supports operation
ggml_backend_dev_type | Get device type
ggml_backend_event_free | Free event
ggml_backend_event_new | Create new event
ggml_backend_event_record | Record event
ggml_backend_event_synchronize | Synchronize event
ggml_backend_event_wait | Wait for event
ggml_backend_free | Free Backend
ggml_backend_get_device | Get device from backend
ggml_backend_graph_compute | Compute Graph with Backend
ggml_backend_graph_compute_async | Compute graph asynchronously
ggml_backend_graph_plan_compute | Execute graph plan
ggml_backend_graph_plan_create | Create graph execution plan
ggml_backend_graph_plan_free | Free graph execution plan
ggml_backend_init_best | Initialize best available backend
ggml_backend_init_by_name | Initialize backend by name
ggml_backend_init_by_type | Initialize backend by type
ggml_backend_load | Load backend from dynamic library
ggml_backend_load_all | Load all available backends
ggml_backend_multi_buffer_alloc_buffer | Allocate multi-buffer
ggml_backend_multi_buffer_set_usage | Set usage for all buffers in a multi-buffer
ggml_backend_name | Get Backend Name
ggml_backend_register | Register a backend
ggml_backend_reg_by_name | Get backend registry by name
ggml_backend_reg_count | Get number of registered backends
ggml_backend_reg_dev_count | Get number of devices in registry
ggml_backend_reg_dev_get | Get device from registry
ggml_backend_reg_get | Get backend registry by index
ggml_backend_reg_name | Get registry name
ggml_backend_sched_alloc_graph | Allocate graph on scheduler
ggml_backend_sched_free | Free backend scheduler
ggml_backend_sched_get_backend | Get backend from scheduler
ggml_backend_sched_get_n_backends | Get number of backends in scheduler
ggml_backend_sched_get_n_copies | Get number of tensor copies
ggml_backend_sched_get_n_splits | Get number of graph splits
ggml_backend_sched_get_tensor_backend | Get tensor backend assignment
ggml_backend_sched_graph_compute | Compute graph using scheduler
ggml_backend_sched_graph_compute_async | Compute graph asynchronously
ggml_backend_sched_new | Create a new backend scheduler
ggml_backend_sched_reserve | Reserve memory for scheduler
ggml_backend_sched_reset | Reset scheduler
ggml_backend_sched_set_tensor_backend | Set tensor backend assignment
ggml_backend_sched_synchronize | Synchronize scheduler
ggml_backend_synchronize | Synchronize backend
ggml_backend_tensor_copy_async | Copy tensor asynchronously between backends
ggml_backend_tensor_get_and_sync | Backend Tensor Get and Sync
ggml_backend_tensor_get_async | Get tensor data asynchronously
ggml_backend_tensor_get_data | Get Tensor Data via Backend
ggml_backend_tensor_get_f32_first | Get First Float from Backend Tensor
ggml_backend_tensor_set_async | Set tensor data asynchronously
ggml_backend_tensor_set_data | Set Tensor Data via Backend
ggml_backend_unload | Unload backend
ggml_batch_norm | Create a Batch Normalization Layer Object
ggml_blck_size | Get Block Size
ggml_build_forward_expand | Build forward expand
ggml_callback_early_stopping | Early stopping callback
ggml_can_repeat | Check If Tensor Can Be Repeated
ggml_ceil | Ceiling (Graph)
ggml_ceil_inplace | Ceiling In-place (Graph)
ggml_clamp | Clamp (Graph)
ggml_compile | Compile a Sequential Model
ggml_compile.ggml_functional_model | Compile a Sequential Model
ggml_compile.ggml_sequential_model | Compile a Sequential Model
ggml_concat | Concatenate Tensors (Graph)
ggml_cont | Make Contiguous (Graph)
ggml_conv_1d | 1D Convolution (Graph)
ggml_conv_2d | 2D Convolution (Graph)
ggml_conv_transpose_1d | Transposed 1D Convolution (Graph)
ggml_cos | Cosine (Graph)
ggml_count_equal | Count Equal Elements (Graph)
ggml_cpu_add | Element-wise Addition (CPU Direct)
ggml_cpu_features | Get All CPU Features
ggml_cpu_get_rvv_vlen | Get RISC-V Vector Length
ggml_cpu_get_sve_cnt | Get SVE Vector Length (ARM)
ggml_cpu_has_amx_int8 | CPU Feature Detection - AMX INT8
ggml_cpu_has_arm_fma | CPU Feature Detection - ARM FMA
ggml_cpu_has_avx | CPU Feature Detection - AVX
ggml_cpu_has_avx2 | CPU Feature Detection - AVX2
ggml_cpu_has_avx512 | CPU Feature Detection - AVX-512
ggml_cpu_has_avx512_bf16 | CPU Feature Detection - AVX-512 BF16
ggml_cpu_has_avx512_vbmi | CPU Feature Detection - AVX-512 VBMI
ggml_cpu_has_avx512_vnni | CPU Feature Detection - AVX-512 VNNI
ggml_cpu_has_avx_vnni | CPU Feature Detection - AVX-VNNI
ggml_cpu_has_bmi2 | CPU Feature Detection - BMI2
ggml_cpu_has_dotprod | CPU Feature Detection - Dot Product (ARM)
ggml_cpu_has_f16c | CPU Feature Detection - F16C
ggml_cpu_has_fma | CPU Feature Detection - FMA
ggml_cpu_has_fp16_va | CPU Feature Detection - FP16 Vector Arithmetic (ARM)
ggml_cpu_has_llamafile | CPU Feature Detection - Llamafile
ggml_cpu_has_matmul_int8 | CPU Feature Detection - INT8 Matrix Multiply (ARM)
ggml_cpu_has_neon | CPU Feature Detection - NEON (ARM)
ggml_cpu_has_riscv_v | CPU Feature Detection - RISC-V Vector
ggml_cpu_has_sme | CPU Feature Detection - SME (ARM)
ggml_cpu_has_sse3 | CPU Feature Detection - SSE3
ggml_cpu_has_ssse3 | CPU Feature Detection - SSSE3
ggml_cpu_has_sve | CPU Feature Detection - SVE (ARM)
ggml_cpu_has_vsx | CPU Feature Detection - VSX (PowerPC)
ggml_cpu_has_vxe | CPU Feature Detection - VXE (IBM z/Architecture)
ggml_cpu_has_wasm_simd | CPU Feature Detection - WebAssembly SIMD
ggml_cpu_mul | Element-wise Multiplication (CPU Direct)
ggml_cpy | Copy Tensor with Type Conversion (Graph)
ggml_cycles | Get CPU Cycles
ggml_cycles_per_ms | Get CPU Cycles per Millisecond
ggml_dense | Create a Dense Layer Object
ggml_diag | Diagonal Matrix (Graph)
ggml_diag_mask_inf | Diagonal Mask with -Inf (Graph)
ggml_diag_mask_inf_inplace | Diagonal Mask with -Inf In-place (Graph)
ggml_diag_mask_zero | Diagonal Mask with Zero (Graph)
ggml_div | Element-wise Division (Graph)
ggml_div_inplace | Element-wise Division In-place (Graph)
ggml_dup | Duplicate Tensor (Graph)
ggml_dup_inplace | Duplicate Tensor In-place (Graph)
ggml_dup_tensor | Duplicate Tensor
ggml_element_size | Get Element Size
ggml_elu | ELU Activation (Graph)
ggml_elu_inplace | ELU Activation In-place (Graph)
ggml_embedding | Create an Embedding Layer Object
ggml_estimate_memory | Estimate Required Memory
ggml_evaluate | Evaluate a Trained Model
ggml_evaluate.ggml_functional_model | Evaluate a Trained Model
ggml_evaluate.ggml_sequential_model | Evaluate a Trained Model
ggml_exp | Exponential (Graph)
ggml_exp_inplace | Exponential In-place (Graph)
ggml_fit | Train a Model (dispatcher)
ggml_fit.default | Train a Model (dispatcher)
ggml_fit.ggml_functional_model | Train a Model (dispatcher)
ggml_fit.ggml_sequential_model | Train a Model (dispatcher)
ggml_fit_opt | Fit model with R-side epoch loop and callbacks
ggml_flash_attn_back | Flash Attention Backward (Graph)
ggml_flash_attn_ext | Flash Attention (Graph)
ggml_floor | Floor (Graph)
ggml_floor_inplace | Floor In-place (Graph)
ggml_free | Free GGML context
ggml_freeze_weights | Freeze Layer Weights
ggml_ftype_to_ggml_type | Convert ftype to ggml_type
ggml_gallocr_alloc_graph | Allocate Memory for Graph
ggml_gallocr_free | Free Graph Allocator
ggml_gallocr_get_buffer_size | Get Graph Allocator Buffer Size
ggml_gallocr_new | Create Graph Allocator
ggml_gallocr_reserve | Reserve Memory for Graph
ggml_geglu | GeGLU (GELU Gated Linear Unit) (Graph)
ggml_geglu_quick | GeGLU Quick (Fast GeGLU) (Graph)
ggml_geglu_split | GeGLU Split (Graph)
ggml_gelu | GELU Activation (Graph)
ggml_gelu_erf | Exact GELU Activation (Graph)
ggml_gelu_inplace | GELU Activation In-place (Graph)
ggml_gelu_quick | GELU Quick Activation (Graph)
ggml_get_f32 | Get F32 data
ggml_get_f32_nd | Get Single Float Value by N-D Index
ggml_get_first_tensor | Get First Tensor from Context
ggml_get_i32 | Get I32 Data
ggml_get_i32_nd | Get Single Int32 Value by N-D Index
ggml_get_layer | Get a Layer from a Sequential Model
ggml_get_max_tensor_size | Get Maximum Tensor Size
ggml_get_mem_size | Get Context Memory Size
ggml_get_name | Get Tensor Name
ggml_get_next_tensor | Get Next Tensor from Context
ggml_get_no_alloc | Get No Allocation Mode
ggml_get_n_threads | Get Number of Threads
ggml_get_op_params | Get Tensor Operation Parameters
ggml_get_op_params_f32 | Get Float Op Parameter
ggml_get_op_params_i32 | Get Integer Op Parameter
ggml_get_rows | Get Rows by Indices (Graph)
ggml_get_rows_back | Get Rows Backward (Graph)
ggml_get_unary_op | Get Unary Operation from Tensor
ggml_glu | Generic GLU (Gated Linear Unit) (Graph)
GGML_GLU_OP_GEGLU | GLU Operation Types
GGML_GLU_OP_GEGLU_ERF | GLU Operation Types
GGML_GLU_OP_GEGLU_QUICK | GLU Operation Types
GGML_GLU_OP_REGLU | GLU Operation Types
GGML_GLU_OP_SWIGLU | GLU Operation Types
GGML_GLU_OP_SWIGLU_OAI | GLU Operation Types
ggml_glu_split | Generic GLU Split (Graph)
ggml_graph_compute | Compute graph
ggml_graph_compute_with_ctx | Compute Graph with Context (Alternative Method)
ggml_graph_dump_dot | Export Graph to DOT Format
ggml_graph_get_tensor | Get Tensor from Graph by Name
ggml_graph_node | Get Graph Node
ggml_graph_n_nodes | Get Number of Nodes in Graph
ggml_graph_overhead | Get Graph Overhead
ggml_graph_print | Print Graph Information
ggml_graph_reset | Reset Graph (for backpropagation)
ggml_graph_view | Create a View of a Subgraph
ggml_group_norm | Group Normalization (Graph)
ggml_group_norm_inplace | Group Normalization In-place (Graph)
ggml_gru | Create a GRU Layer Object
ggml_hardsigmoid | Hard Sigmoid Activation (Graph)
ggml_hardswish | Hard Swish Activation (Graph)
ggml_im2col | Image to Column (Graph)
ggml_init | Initialize GGML context
ggml_init_auto | Create Context with Auto-sizing
ggml_input | Declare a Functional API Input Tensor
ggml_is_available | Check if GGML is available
ggml_is_contiguous | Check if Tensor is Contiguous
ggml_is_contiguously_allocated | Check If Tensor is Contiguously Allocated
ggml_is_contiguous_0 | Check Tensor Contiguity (Dimension 0)
ggml_is_contiguous_1 | Check Tensor Contiguity (Dimensions >= 1)
ggml_is_contiguous_2 | Check Tensor Contiguity (Dimensions >= 2)
ggml_is_contiguous_channels | Check Channel-wise Contiguity
ggml_is_contiguous_rows | Check Row-wise Contiguity
ggml_is_permuted | Check if Tensor is Permuted
ggml_is_quantized | Check If Type is Quantized
ggml_is_transposed | Check if Tensor is Transposed
ggml_l2_norm | L2 Normalization (Graph)
ggml_l2_norm_inplace | L2 Normalization In-place (Graph)
ggml_layer_add | Element-wise Addition of Two Tensor Nodes
ggml_layer_batch_norm | Add Batch Normalization Layer
ggml_layer_concatenate | Concatenate Tensor Nodes Along an Axis
ggml_layer_conv_1d | Create a Conv1D Layer Object
ggml_layer_conv_2d | Create a Conv2D Layer Object
ggml_layer_dense | Add Dense (Fully Connected) Layer
ggml_layer_dropout | Add Dropout Layer
ggml_layer_embedding | Add Embedding Layer
ggml_layer_flatten | Add Flatten Layer
ggml_layer_global_average_pooling_2d | Global Average Pooling for 2D Feature Maps
ggml_layer_global_max_pooling_2d | Global Max Pooling for 2D Feature Maps
ggml_layer_gru | Add a GRU Layer
ggml_layer_lstm | Add an LSTM Layer
ggml_layer_max_pooling_2d | Add 2D Max Pooling Layer
ggml_leaky_relu | Leaky ReLU Activation (Graph)
ggml_load_model | Load a Full Model (Architecture + Weights)
ggml_load_weights | Load Model Weights from File
ggml_log | Natural Logarithm (Graph)
ggml_log_inplace | Natural Logarithm In-place (Graph)
ggml_log_is_r_enabled | Check if R Logging is Enabled
ggml_log_set_default | Restore Default GGML Logging
ggml_log_set_r | Enable R-compatible GGML Logging
ggml_lstm | Create an LSTM Layer Object
ggml_mean | Mean (Graph)
ggml_model | Create a Functional Model
ggml_model_sequential | Create a Sequential Neural Network Model
ggml_mul | Multiply tensors
ggml_mul_inplace | Element-wise Multiplication In-place (Graph)
ggml_mul_mat | Matrix Multiplication (Graph)
ggml_mul_mat_id | Matrix Multiplication with Expert Selection (Graph)
ggml_nbytes | Get number of bytes
ggml_neg | Negation (Graph)
ggml_neg_inplace | Negation In-place (Graph)
ggml_nelements | Get number of elements
ggml_new_f32 | Create Scalar F32 Tensor
ggml_new_i32 | Create Scalar I32 Tensor
ggml_new_tensor | Create Tensor with Arbitrary Dimensions
ggml_new_tensor_1d | Create 1D tensor
ggml_new_tensor_2d | Create 2D tensor
ggml_new_tensor_3d | Create 3D Tensor
ggml_new_tensor_4d | Create 4D Tensor
ggml_norm | Layer Normalization (Graph)
ggml_norm_inplace | Layer Normalization In-place (Graph)
ggml_nrows | Get Number of Rows
ggml_n_dims | Get Number of Dimensions
ggml_opt_alloc | Allocate graph for evaluation
ggml_opt_context_optimizer_type | Get optimizer type from context
ggml_opt_dataset_data | Get data tensor from dataset
ggml_opt_dataset_free | Free optimization dataset
ggml_opt_dataset_get_batch | Get batch from dataset
ggml_opt_dataset_init | Create a new optimization dataset
ggml_opt_dataset_labels | Get labels tensor from dataset
ggml_opt_dataset_ndata | Get number of datapoints in dataset
ggml_opt_dataset_shuffle | Shuffle dataset
ggml_opt_default_params | Get default optimizer parameters
ggml_opt_epoch | Run one training epoch
ggml_opt_eval | Evaluate model
ggml_opt_fit | Fit model to dataset
ggml_opt_free | Free optimizer context
ggml_opt_get_lr | Get current learning rate from optimizer context
ggml_opt_grad_acc | Get gradient accumulator for a tensor
ggml_opt_init | Initialize optimizer context
ggml_opt_init_for_fit | Initialize optimizer context for R-side epoch loop
ggml_opt_inputs | Get inputs tensor from optimizer context
ggml_opt_labels | Get labels tensor from optimizer context
ggml_opt_loss | Get loss tensor from optimizer context
ggml_opt_loss_type_cross_entropy | Loss type: Cross Entropy
ggml_opt_loss_type_mean | Loss type: Mean
ggml_opt_loss_type_mse | Loss type: Mean Squared Error
ggml_opt_loss_type_sum | Loss type: Sum
ggml_opt_ncorrect | Get number of correct predictions tensor
ggml_opt_optimizer_name | Get optimizer name
ggml_opt_optimizer_type_adamw | Optimizer type: AdamW
ggml_opt_optimizer_type_sgd | Optimizer type: SGD
ggml_opt_outputs | Get outputs tensor from optimizer context
ggml_opt_pred | Get predictions tensor from optimizer context
ggml_opt_prepare_alloc | Prepare allocation for non-static graphs
ggml_opt_reset | Reset optimizer context
ggml_opt_result_accuracy | Get accuracy from result
ggml_opt_result_free | Free optimization result
ggml_opt_result_init | Initialize optimization result
ggml_opt_result_loss | Get loss from result
ggml_opt_result_ndata | Get number of datapoints from result
ggml_opt_result_pred | Get predictions from result
ggml_opt_result_reset | Reset optimization result
ggml_opt_set_lr | Set learning rate in optimizer context
ggml_opt_static_graphs | Check if using static graphs
ggml_op_can_inplace | Check if Operation Can Be Done In-place
ggml_op_desc | Get Operation Description from Tensor
ggml_op_name | Get Operation Name
GGML_OP_POOL_AVG | 1D Pooling (Graph)
GGML_OP_POOL_MAX | 1D Pooling (Graph)
ggml_op_symbol | Get Operation Symbol
ggml_out_prod | Outer Product (Graph)
ggml_pad | Pad Tensor with Zeros (Graph)
ggml_permute | Permute Tensor Dimensions (Graph)
ggml_pool_1d | 1D Pooling (Graph)
ggml_pool_2d | 2D Pooling (Graph)
ggml_pop_layer | Remove the Last Layer from a Sequential Model
ggml_predict | Get Predictions from a Trained Model
ggml_predict.ggml_functional_model | Get Predictions from a Trained Model
ggml_predict.ggml_sequential_model | Get Predictions from a Trained Model
ggml_predict_classes | Predict Classes from a Trained Model
ggml_print_mem_status | Print Context Memory Status
ggml_print_objects | Print Objects in Context
ggml_quantize_chunk | Quantize Data Chunk
ggml_quantize_free | Free Quantization Resources
ggml_quantize_init | Initialize Quantization Tables
ggml_quantize_requires_imatrix | Check if Quantization Requires Importance Matrix
ggml_quant_block_info | Get Quantization Block Info
ggml_reglu | ReGLU (ReLU Gated Linear Unit) (Graph)
ggml_reglu_split | ReGLU Split (Graph)
ggml_relu | ReLU Activation (Graph)
ggml_relu_inplace | ReLU Activation In-place (Graph)
ggml_repeat | Repeat (Graph)
ggml_repeat_back | Repeat Backward (Graph)
ggml_reset | Reset GGML Context
ggml_reshape_1d | Reshape to 1D (Graph)
ggml_reshape_2d | Reshape to 2D (Graph)
ggml_reshape_3d | Reshape to 3D (Graph)
ggml_reshape_4d | Reshape to 4D (Graph)
ggml_rms_norm | RMS Normalization (Graph)
ggml_rms_norm_back | RMS Norm Backward (Graph)
ggml_rms_norm_inplace | RMS Normalization In-place (Graph)
ggml_rope | Rotary Position Embedding (Graph)
ggml_rope_ext | Extended RoPE with Frequency Scaling (Graph)
ggml_rope_ext_back | RoPE Extended Backward (Graph)
ggml_rope_ext_inplace | Extended RoPE Inplace (Graph)
ggml_rope_inplace | Rotary Position Embedding In-place (Graph)
ggml_rope_multi | Multi-RoPE for Vision Models (Graph)
ggml_rope_multi_inplace | Multi-RoPE Inplace (Graph)
GGML_ROPE_TYPE_MROPE | RoPE Mode Constants
GGML_ROPE_TYPE_NEOX | RoPE Mode Constants
GGML_ROPE_TYPE_NORM | RoPE Mode Constants
GGML_ROPE_TYPE_VISION | RoPE Mode Constants
ggml_round | Round (Graph)
ggml_round_inplace | Round In-place (Graph)
ggml_save_model | Save a Full Model (Architecture + Weights)
ggml_save_weights | Save Model Weights to File
ggml_scale | Scale (Graph)
ggml_scale_inplace | Scale Tensor In-place (Graph)
GGML_SCALE_MODE_BICUBIC | Upscale Tensor (Graph)
GGML_SCALE_MODE_BILINEAR | Upscale Tensor (Graph)
GGML_SCALE_MODE_NEAREST | Upscale Tensor (Graph)
ggml_schedule_cosine_decay | Cosine annealing LR scheduler
ggml_schedule_reduce_on_plateau | Reduce on plateau LR scheduler
ggml_schedule_step_decay | Step decay LR scheduler
ggml_set | Set Tensor Region (Graph)
ggml_set_1d | Set 1D Tensor Region (Graph)
ggml_set_2d | Set 2D Tensor Region (Graph)
ggml_set_abort_callback_default | Restore Default Abort Behavior
ggml_set_abort_callback_r | Enable R-compatible Abort Handling
ggml_set_f32 | Set F32 data
ggml_set_f32_nd | Set Single Float Value by N-D Index
ggml_set_i32 | Set I32 Data
ggml_set_i32_nd | Set Single Int32 Value by N-D Index
ggml_set_input | Mark Tensor as Input
ggml_set_name | Set Tensor Name
ggml_set_no_alloc | Set No Allocation Mode
ggml_set_n_threads | Set Number of Threads
ggml_set_op_params | Set Tensor Operation Parameters
ggml_set_op_params_f32 | Set Float Op Parameter
ggml_set_op_params_i32 | Set Integer Op Parameter
ggml_set_output | Mark Tensor as Output
ggml_set_param | Set Tensor as Trainable Parameter
ggml_set_zero | Set Tensor to Zero
ggml_sgn | Sign Function (Graph)
ggml_sigmoid | Sigmoid Activation (Graph)
ggml_sigmoid_inplace | Sigmoid Activation In-place (Graph)
ggml_silu | SiLU Activation (Graph)
ggml_silu_back | SiLU Backward (Graph)
ggml_silu_inplace | SiLU Activation In-place (Graph)
ggml_sin | Sine (Graph)
ggml_softplus | Softplus Activation (Graph)
ggml_softplus_inplace | Softplus Activation In-place (Graph)
ggml_soft_max | Softmax (Graph)
ggml_soft_max_ext | Extended Softmax with Masking and Scaling (Graph)
ggml_soft_max_ext_back | Softmax Backward Extended (Graph)
ggml_soft_max_ext_back_inplace | Extended Softmax Backward Inplace (Graph)
ggml_soft_max_ext_inplace | Extended Softmax Inplace (Graph)
ggml_soft_max_inplace | Softmax In-place (Graph)
GGML_SORT_ORDER_ASC | Sort Order Constants
GGML_SORT_ORDER_DESC | Sort Order Constants
ggml_sqr | Square (Graph)
ggml_sqrt | Square Root (Graph)
ggml_sqrt_inplace | Square Root In-place (Graph)
ggml_sqr_inplace | Square In-place (Graph)
ggml_step | Step Function (Graph)
ggml_sub | Element-wise Subtraction (Graph)
ggml_sub_inplace | Element-wise Subtraction In-place (Graph)
ggml_sum | Sum (Graph)
ggml_sum_rows | Sum Rows (Graph)
ggml_swiglu | SwiGLU (Swish/SiLU Gated Linear Unit) (Graph)
ggml_swiglu_split | SwiGLU Split (Graph)
ggml_tanh | Tanh Activation (Graph)
ggml_tanh_inplace | Tanh Activation In-place (Graph)
ggml_tensor_copy | Copy Tensor Data
ggml_tensor_nb | Get Tensor Strides (nb)
ggml_tensor_num | Count Tensors in Context
ggml_tensor_overhead | Get Tensor Overhead
ggml_tensor_set_f32_scalar | Fill Tensor with Scalar
ggml_tensor_shape | Get Tensor Shape
ggml_tensor_type | Get Tensor Type
ggml_test | Test GGML
ggml_timestep_embedding | Timestep Embedding (Graph Operation)
ggml_time_init | Initialize GGML Timer
ggml_time_ms | Get Time in Milliseconds
ggml_time_us | Get Time in Microseconds
ggml_top_k | Top-K Indices (Graph)
ggml_transpose | Transpose (Graph)
GGML_TYPE_BF16 | GGML Data Types
GGML_TYPE_F16 | GGML Data Types
GGML_TYPE_F32 | GGML Data Types
GGML_TYPE_I32 | GGML Data Types
ggml_type_name | Get Type Name
GGML_TYPE_Q4_0 | GGML Data Types
GGML_TYPE_Q4_1 | GGML Data Types
GGML_TYPE_Q8_0 | GGML Data Types
ggml_type_size | Get Type Size in Bytes
ggml_type_sizef | Get Type Size as Float
ggml_unary_op_name | Get Unary Operation Name
ggml_unfreeze_weights | Unfreeze Layer Weights
ggml_upscale | Upscale Tensor (Graph)
ggml_used_mem | Get Used Memory
ggml_version | Get GGML version
ggml_view_1d | 1D View with Byte Offset (Graph)
ggml_view_2d | 2D View with Byte Offset (Graph)
ggml_view_3d | 3D View with Byte Offset (Graph)
ggml_view_4d | 4D View with Byte Offset (Graph)
ggml_view_tensor | View Tensor
ggml_vulkan_available | Check if Vulkan support is available
ggml_vulkan_backend_name | Get Vulkan backend name
ggml_vulkan_device_count | Get number of Vulkan devices
ggml_vulkan_device_description | Get Vulkan device description
ggml_vulkan_device_memory | Get Vulkan device memory
ggml_vulkan_free | Free Vulkan backend
ggml_vulkan_init | Initialize Vulkan backend
ggml_vulkan_is_backend | Check if backend is Vulkan
ggml_vulkan_list_devices | List all Vulkan devices
ggml_vulkan_status | Print Vulkan status
ggml_with_temp_ctx | Execute with Temporary Context

## -- I --

iq2xs_free_impl | Free IQ2 Quantization Tables
iq2xs_init_impl | Initialize IQ2 Quantization Tables
iq3xs_free_impl | Free IQ3 Quantization Tables
iq3xs_init_impl | Initialize IQ3 Quantization Tables

## -- L --

lr_scheduler_cosine | Cosine-annealing learning rate scheduler
lr_scheduler_step | Step-decay learning rate scheduler

## -- N --

nn_topo_sort | Topologically sort nodes reachable from output nodes

## -- O --

optimizer_adam | Create an Adam optimizer
optimizer_sgd | Create an SGD optimizer

## -- P --

plot.ggml_history | Plot training history
print.ag_tensor | Print method for ag_tensor
print.ggml_functional_model | Print method for ggml_functional_model
print.ggml_history | Print method for ggml_history
print.ggml_sequential_model | Print method for ggml_sequential_model

## -- Q --

quantize_iq1_m | Quantize Data (IQ)
quantize_iq1_s | Quantize Data (IQ)
quantize_iq2_s | Quantize Data (IQ)
quantize_iq2_xs | Quantize Data (IQ)
quantize_iq2_xxs | Quantize Data (IQ)
quantize_iq3_s | Quantize Data (IQ)
quantize_iq3_xxs | Quantize Data (IQ)
quantize_iq4_nl | Quantize Data (IQ)
quantize_iq4_xs | Quantize Data (IQ)
quantize_mxfp4 | Quantize Data (MXFP4)
quantize_q2_K | Quantize Data (K-quants)
quantize_q3_K | Quantize Data (K-quants)
quantize_q4_0 | Quantize Data (Q4_0)
quantize_q4_1 | Quantize Data (Q4_0)
quantize_q4_K | Quantize Data (K-quants)
quantize_q5_0 | Quantize Data (Q4_0)
quantize_q5_1 | Quantize Data (Q4_0)
quantize_q5_K | Quantize Data (K-quants)
quantize_q6_K | Quantize Data (K-quants)
quantize_q8_0 | Quantize Data (Q4_0)
quantize_row_iq2_s_ref | Quantize Row Reference (IQ)
quantize_row_iq3_s_ref | Quantize Row Reference (IQ)
quantize_row_iq3_xxs_ref | Quantize Row Reference (IQ)
quantize_row_iq4_nl_ref | Quantize Row Reference (IQ)
quantize_row_iq4_xs_ref | Quantize Row Reference (IQ)
quantize_row_mxfp4_ref | Quantize Row Reference (MXFP4)
quantize_row_q2_K_ref | Quantize Row Reference (K-quants)
quantize_row_q3_K_ref | Quantize Row Reference (K-quants)
quantize_row_q4_0_ref | Quantize Row Reference (Basic)
quantize_row_q4_1_ref | Quantize Row Reference (Basic)
quantize_row_q4_K_ref | Quantize Row Reference (K-quants)
quantize_row_q5_0_ref | Quantize Row Reference (Basic)
quantize_row_q5_1_ref | Quantize Row Reference (Basic)
quantize_row_q5_K_ref | Quantize Row Reference (K-quants)
quantize_row_q6_K_ref | Quantize Row Reference (K-quants)
quantize_row_q8_0_ref | Quantize Row Reference (Basic)
quantize_row_q8_1_ref | Quantize Row Reference (Basic)
quantize_row_q8_K_ref | Quantize Row Reference (K-quants)
quantize_row_tq1_0_ref | Quantize Row Reference (Ternary)
quantize_row_tq2_0_ref | Quantize Row Reference (Ternary)
quantize_tq1_0 | Quantize Data (Ternary)
quantize_tq2_0 | Quantize Data (Ternary)

## -- R --

rope_types | RoPE Mode Constants

## -- S --

summary.ggml_sequential_model | Summary method for ggml_sequential_model

## -- W --

with_grad_tape | Run code with gradient tape enabled