| Rmlx: R Interface to Apple's MLX Arrays | Rmlx-package Rmlx |
| Subset MLX array | mlx_subset [.mlx [<-.mlx |
| Matrix multiplication for MLX arrays | %*%.mlx |
| Bind mlx arrays along an axis | abind |
| Test if two MLX arrays are (nearly) equal | all.equal.mlx |
| Create MLX array from R object | as_mlx |
| Convert MLX array to base R objects | as_r |
| Convert MLX array to R array | as.array.mlx |
| Convert MLX array to R matrix | as.matrix.mlx |
| Convert MLX array to R vector | as.double.mlx as.integer.mlx as.logical.mlx as.numeric.mlx as.vector.mlx |
| Split mlx arrays along a margin | asplit asplit.default asplit.mlx |
| Column-bind mlx arrays | cbind.mlx |
| Cholesky decomposition for mlx arrays | chol.mlx |
| Inverse from Cholesky decomposition | chol2inv chol2inv.default chol2inv.mlx |
| Column means for mlx arrays | colMeans colMeans.default colMeans.mlx |
| Column sums for mlx arrays | colSums colSums.default colSums.mlx |
| Cross product | crossprod.mlx |
| Diagonal matrix extraction and construction | diag |
| Extract diagonal or construct diagonal matrix for mlx arrays | diag.mlx mlx_diagonal |
| Get dimensions of MLX array | dim.mlx mlx_shape |
| Set dimensions of MLX array | dim<-.mlx |
| Drop singleton dimensions | drop drop.default drop.mlx |
| Fast Fourier Transform | fft fft.default fft.mlx |
| Format method for mlx_stream | format.mlx_stream |
| Test if object is an MLX array | is_mlx |
| Kronecker product dispatcher | kronecker kronecker,ANY,mlx-method kronecker,mlx,ANY-method kronecker,mlx,mlx-method kronecker.default kronecker.mlx |
| Get length of MLX array | length.mlx |
| Math operations for MLX arrays | abs.mlx acos.mlx acosh.mlx asin.mlx asinh.mlx atan.mlx atanh.mlx ceiling.mlx cos.mlx cosh.mlx cospi.mlx cummax.mlx cummin.mlx cumprod.mlx cumsum.mlx exp.mlx expm1.mlx floor.mlx log.mlx log10.mlx log1p.mlx log2.mlx Math.mlx round.mlx sign.mlx signif.mlx sin.mlx sinh.mlx sinpi.mlx sqrt.mlx tan.mlx tanh.mlx tanpi.mlx trunc.mlx |
| Mean of MLX array elements | mean.mlx |
| Fused matrix multiply and add for MLX arrays | mlx_addmm |
| Test if all elements of two arrays are close | mlx_allclose |
| Numerical ranges on MLX devices | mlx_arange |
| Argmax and argmin on mlx arrays | mlx_argmax mlx_argmin |
| Construct an MLX array from R data | mlx_array |
| Batch normalization | mlx_batch_norm |
| Get best available device | mlx_best_device |
| Binary cross-entropy loss | mlx_binary_cross_entropy |
| Broadcast multiple arrays to a shared shape | mlx_broadcast_arrays |
| Broadcast an array to a new shape | mlx_broadcast_to |
| Cast an mlx array | mlx_cast |
| Compute matrix inverse via Cholesky decomposition | mlx_cholesky_inv |
| Clip mlx array values into a range | mlx_clip |
| Compile an MLX Function for Optimized Execution | mlx_compile |
| Ensure contiguous memory layout | mlx_contiguous |
| 1D Transposed Convolution | mlx_conv_transpose1d |
| 2D Transposed Convolution | mlx_conv_transpose2d |
| 3D Transposed Convolution | mlx_conv_transpose3d |
| 1D Convolution | mlx_conv1d |
| 2D Convolution | mlx_conv2d |
| 3D Convolution | mlx_conv3d |
| Coordinate Descent with L1 Regularization | mlx_coordinate_descent |
| Vector cross product with mlx arrays | mlx_cross |
| Cross-entropy loss | mlx_cross_entropy |
| Cumulative sum and product | mlx_cumprod mlx_cumsum |
| Convert between radians and degrees | mlx_degrees mlx_radians |
| Dequantize a Matrix | mlx_dequantize |
| Get or set current MLX device | mlx_device |
| Exponential distribution functions | mlx_dexp mlx_pexp mlx_qexp |
| Control Global Compilation Behavior | mlx_disable_compile mlx_enable_compile |
| Lognormal distribution functions | mlx_dlnorm mlx_plnorm mlx_qlnorm |
| Logistic distribution functions | mlx_dlogis mlx_plogis mlx_qlogis |
| Normal distribution functions | mlx_dnorm mlx_pnorm mlx_qnorm |
| Dropout layer | mlx_dropout |
| Get the data type of an MLX array | mlx_dtype |
| Uniform distribution functions | mlx_dunif mlx_punif mlx_qunif |
| Eigen decomposition for mlx arrays | mlx_eig |
| Eigen decomposition of Hermitian mlx arrays | mlx_eigh |
| Eigenvalues of mlx arrays | mlx_eigvals |
| Eigenvalues of Hermitian mlx arrays | mlx_eigvalsh |
| Embedding layer | mlx_embedding |
| Error function and inverse error function | mlx_erf mlx_erfinv |
| Force evaluation of an MLX operations | mlx_eval |
| Insert singleton dimensions | mlx_expand_dims |
| Identity-like matrices on MLX devices | mlx_eye |
| Fast Fourier transforms for MLX arrays | mlx_fft mlx_fft2 mlx_fftn |
| Flatten axes of an mlx array | mlx_flatten |
| Forward pass utility | mlx_forward |
| Fill an mlx array with a constant value | mlx_full |
| Gather elements from an mlx array | mlx_gather |
| Gather-based Quantized Matrix Multiplication | mlx_gather_qmm |
| GELU activation | mlx_gelu |
| Automatic differentiation for MLX functions | mlx_grad mlx_value_grad |
| Hadamard transform for MLX arrays | mlx_hadamard_transform |
| Check if GPU backend is available | mlx_has_gpu |
| Identity matrices on MLX devices | mlx_identity |
| Import an exported MLX function | mlx_import_function |
| Compute matrix inverse | mlx_inv |
| Element-wise approximate equality | mlx_isclose |
| Elementwise NaN and infinity predicates | mlx_isfinite mlx_isinf mlx_isnan |
| Detect signed infinities in mlx arrays | mlx_isneginf mlx_isposinf |
| Construct MLX random number generator keys | mlx_key mlx_key_split |
| Generate raw random bits on MLX arrays | mlx_key_bits |
| Kronecker product for mlx arrays | mlx_kron |
| L1 loss (Mean Absolute Error) | mlx_l1_loss |
| Layer normalization | mlx_layer_norm |
| Leaky ReLU activation | mlx_leaky_relu |
| Create a learnable linear transformation | mlx_linear |
| Evenly spaced ranges on MLX devices | mlx_linspace |
| Load an MLX array from disk | mlx_load |
| Load MLX tensors from the GGUF format | mlx_load_gguf |
| Load MLX arrays from the safetensors format | mlx_load_safetensors |
| Log cumulative sum exponential for mlx arrays | mlx_logcumsumexp |
| Log-sum-exp reduction for mlx arrays | mlx_logsumexp |
| LU factorization | mlx_lu |
| Construct MLX matrices efficiently | mlx_matrix |
| Elementwise maximum of two mlx arrays | mlx_maximum |
| Construct coordinate arrays from input vectors | mlx_meshgrid |
| Create a JIT-compiled custom Metal kernel | mlx_metal_kernel |
| Elementwise minimum of two mlx arrays | mlx_minimum |
| Reorder mlx array axes | aperm.mlx mlx_moveaxis |
| Mean squared error loss | mlx_mse_loss |
| Replace NaN and infinite values with finite numbers | mlx_nan_to_num |
| MLX streams for asynchronous execution | mlx_default_stream mlx_new_stream |
| Matrix and vector norms for mlx arrays | mlx_norm |
| Create arrays of ones on MLX devices | mlx_ones |
| Ones shaped like an existing mlx array | mlx_ones_like |
| Stochastic gradient descent optimizer | mlx_optimizer_sgd |
| Pad mlx arrays | mlx_pad |
| Assign arrays back to parameters | mlx_param_set_values |
| Retrieve parameter arrays | mlx_param_values |
| Collect parameters from modules | mlx_parameters |
| Write values using per-position axis indices | mlx_put_along_axis |
| Compute quantiles of MLX arrays | mlx_quantile quantile.mlx |
| Quantize a Matrix | mlx_quantize |
| Quantized Matrix Multiplication | mlx_quantized_matmul |
| Sample Bernoulli random variables on mlx arrays | mlx_rand_bernoulli |
| Sample from a categorical distribution on mlx arrays | mlx_rand_categorical |
| Sample from the Gumbel distribution on mlx arrays | mlx_rand_gumbel |
| Sample from the Laplace distribution on mlx arrays | mlx_rand_laplace |
| Sample from a multivariate normal distribution on mlx arrays | mlx_rand_multivariate_normal |
| Sample from a normal distribution on mlx arrays | mlx_rand_normal |
| Generate random permutations on mlx arrays | mlx_rand_permutation |
| Sample random integers on mlx arrays | mlx_rand_randint |
| Sample from a truncated normal distribution on mlx arrays | mlx_rand_truncated_normal |
| Sample from a uniform distribution on mlx arrays | mlx_rand_uniform |
| Complex-valued helpers for mlx arrays | mlx_conjugate mlx_imag mlx_real |
| Rectified linear activation module | mlx_relu |
| Repeat array elements | mlx_repeat |
| Reshape an mlx array | mlx_reshape |
| Roll array elements | mlx_roll |
| Save an MLX array to disk | mlx_save |
| Save MLX arrays to the GGUF format | mlx_save_gguf |
| Save MLX arrays to the safetensors format | mlx_save_safetensors |
| Construct MLX scalars | mlx_scalar |
| Add values using per-position axis indices | mlx_scatter_add_axis |
| Compose modules sequentially | mlx_sequential |
| Set the default MLX stream | mlx_set_default_stream |
| Toggle training mode for MLX modules | mlx_set_training |
| Sigmoid activation | mlx_sigmoid |
| SiLU (Swish) activation | mlx_silu |
| Update a slice of an mlx array | mlx_slice_update |
| Softmax for mlx arrays | mlx_softmax |
| Softmax activation | mlx_softmax_layer |
| Solve triangular systems with mlx arrays | backsolve backsolve.default backsolve.mlx mlx_solve_triangular |
| Sort and argsort for mlx arrays | mlx_argsort mlx_sort |
| Split mlx arrays | mlx_split |
| Remove singleton dimensions | mlx_squeeze |
| Stack mlx arrays along a new axis | mlx_stack |
| Stop gradient propagation through an mlx array | mlx_stop_gradient |
| Reduce mlx arrays | mlx_all mlx_any mlx_mean mlx_prod mlx_sd mlx_std mlx_sum mlx_var |
| Swap two axes of an mlx array | mlx_swapaxes |
| Synchronize MLX execution | mlx_synchronize |
| Take values using per-position axis indices | mlx_take_along_axis |
| Tanh activation | mlx_tanh |
| Tile an array | mlx_tile |
| Top-k selection and partitioning on mlx arrays | mlx_argpartition mlx_partition mlx_topk |
| Matrix trace for mlx arrays | mlx_trace |
| Single training step helper | mlx_train_step |
| Triangular helpers for MLX arrays | mlx_tri mlx_tril mlx_triu |
| Compute triangular matrix inverse | mlx_tri_inv |
| Unflatten an axis into multiple axes | mlx_unflatten |
| Construct MLX vectors | mlx_vector |
| Elementwise conditional selection | mlx_where |
| Create arrays of zeros on MLX devices | mlx_zeros |
| Zeros shaped like an existing mlx array | mlx_zeros_like |
| Dimnames and names for MLX arrays | dimnames.mlx dimnames<-.mlx mlx-dimnames names.mlx names<-.mlx |
| Base R generics with mlx methods | mlx-methods |
| Arithmetic and comparison operators for MLX arrays | !.mlx !=.mlx %%.mlx %/%.mlx &.mlx *.mlx +.mlx -.mlx /.mlx <.mlx <=.mlx ==.mlx >.mlx >=.mlx Ops.mlx ^.mlx |.mlx |
| Outer product of two vectors | outer outer.mlx |
| Moore-Penrose pseudoinverse for MLX arrays | pinv |
| Print MLX array | print.mlx |
| Print method for mlx_stream | print.mlx_stream |
| QR decomposition for mlx arrays | qr.mlx |
| Row-bind mlx arrays | rbind.mlx |
| Row and column indices for mlx arrays | col col.default col.mlx row row.default row.mlx |
| Row means for mlx arrays | rowMeans rowMeans.default rowMeans.mlx |
| Row sums for mlx arrays | rowSums rowSums.default rowSums.mlx |
| Scale mlx arrays | scale.mlx |
| Solve a system of linear equations | solve.mlx |
| Object structure for MLX array | str.mlx |
| Summary operations for MLX arrays | all.mlx any.mlx max.mlx min.mlx prod.mlx sum.mlx Summary.mlx |
| Singular value decomposition | svd |
| Singular value decomposition for mlx arrays | svd.mlx |
| Transpose of MLX matrix | t.mlx |
| Transposed cross product | tcrossprod.mlx |
| Temporarily set the current MLX device or stream | local_device with_device |