Search.setIndex({"docnames": ["cpp/ops", "dev/extensions", "dev/metal_debugger", "examples/linear_regression", "examples/llama-inference", "examples/mlp", "index", "install", "python/_autosummary/mlx.core.Device", "python/_autosummary/mlx.core.Dtype", "python/_autosummary/mlx.core.DtypeCategory", "python/_autosummary/mlx.core.abs", "python/_autosummary/mlx.core.add", "python/_autosummary/mlx.core.all", "python/_autosummary/mlx.core.allclose", "python/_autosummary/mlx.core.any", "python/_autosummary/mlx.core.arange", "python/_autosummary/mlx.core.arccos", "python/_autosummary/mlx.core.arccosh", "python/_autosummary/mlx.core.arcsin", "python/_autosummary/mlx.core.arcsinh", "python/_autosummary/mlx.core.arctan", "python/_autosummary/mlx.core.arctanh", "python/_autosummary/mlx.core.argmax", "python/_autosummary/mlx.core.argmin", "python/_autosummary/mlx.core.argpartition", "python/_autosummary/mlx.core.argsort", "python/_autosummary/mlx.core.array", "python/_autosummary/mlx.core.array.T", "python/_autosummary/mlx.core.array.abs", "python/_autosummary/mlx.core.array.all", "python/_autosummary/mlx.core.array.any", "python/_autosummary/mlx.core.array.argmax", "python/_autosummary/mlx.core.array.argmin", "python/_autosummary/mlx.core.array.astype", "python/_autosummary/mlx.core.array.at", "python/_autosummary/mlx.core.array.cos", "python/_autosummary/mlx.core.array.cummax", "python/_autosummary/mlx.core.array.cummin", "python/_autosummary/mlx.core.array.cumprod", "python/_autosummary/mlx.core.array.cumsum", "python/_autosummary/mlx.core.array.diag", "python/_autosummary/mlx.core.array.diagonal", "python/_autosummary/mlx.core.array.dtype", "python/_autosummary/mlx.core.array.exp", "python/_autosummary/mlx.core.array.flatten", "python/_autosummary/mlx.core.array.item", "python/_autosummary/mlx.core.array.itemsize", "python/_autosummary/mlx.core.array.log", "python/_autosummary/mlx.core.array.log10", "python/_autosummary/mlx.core.array.log1p", "python/_autosummary/mlx.core.array.log2", "python/_autosummary/mlx.core.array.logsumexp", "python/_autosummary/mlx.core.array.max", "python/_autosummary/mlx.core.array.mean", "python/_autosummary/mlx.core.array.min", "python/_autosummary/mlx.core.array.moveaxis", "python/_autosummary/mlx.core.array.nbytes", "python/_autosummary/mlx.core.array.ndim", "python/_autosummary/mlx.core.array.prod", "python/_autosummary/mlx.core.array.reciprocal", "python/_autosummary/mlx.core.array.reshape", "python/_autosummary/mlx.core.array.round", "python/_autosummary/mlx.core.array.rsqrt", "python/_autosummary/mlx.core.array.shape", "python/_autosummary/mlx.core.array.sin", "python/_autosummary/mlx.core.array.size", "python/_autosummary/mlx.core.array.split", "python/_autosummary/mlx.core.array.sqrt", "python/_autosummary/mlx.core.array.square", "python/_autosummary/mlx.core.array.squeeze", "python/_autosummary/mlx.core.array.sum", "python/_autosummary/mlx.core.array.swapaxes", "python/_autosummary/mlx.core.array.tolist", "python/_autosummary/mlx.core.array.transpose", "python/_autosummary/mlx.core.array.var", "python/_autosummary/mlx.core.array_equal", "python/_autosummary/mlx.core.atleast_1d", "python/_autosummary/mlx.core.atleast_2d", "python/_autosummary/mlx.core.atleast_3d", "python/_autosummary/mlx.core.broadcast_to", "python/_autosummary/mlx.core.ceil", "python/_autosummary/mlx.core.clip", "python/_autosummary/mlx.core.compile", "python/_autosummary/mlx.core.concatenate", "python/_autosummary/mlx.core.conv1d", "python/_autosummary/mlx.core.conv2d", "python/_autosummary/mlx.core.conv_general", "python/_autosummary/mlx.core.convolve", "python/_autosummary/mlx.core.cos", "python/_autosummary/mlx.core.cosh", "python/_autosummary/mlx.core.cummax", "python/_autosummary/mlx.core.cummin", "python/_autosummary/mlx.core.cumprod", "python/_autosummary/mlx.core.cumsum", "python/_autosummary/mlx.core.default_device", "python/_autosummary/mlx.core.default_stream", "python/_autosummary/mlx.core.dequantize", "python/_autosummary/mlx.core.diag", "python/_autosummary/mlx.core.diagonal", "python/_autosummary/mlx.core.disable_compile", "python/_autosummary/mlx.core.divide", "python/_autosummary/mlx.core.divmod", "python/_autosummary/mlx.core.enable_compile", "python/_autosummary/mlx.core.equal", "python/_autosummary/mlx.core.erf", "python/_autosummary/mlx.core.erfinv", "python/_autosummary/mlx.core.eval", "python/_autosummary/mlx.core.exp", "python/_autosummary/mlx.core.expand_dims", "python/_autosummary/mlx.core.eye", "python/_autosummary/mlx.core.fast.layer_norm", "python/_autosummary/mlx.core.fast.rms_norm", "python/_autosummary/mlx.core.fast.rope", "python/_autosummary/mlx.core.fast.scaled_dot_product_attention", "python/_autosummary/mlx.core.fft.fft", "python/_autosummary/mlx.core.fft.fft2", "python/_autosummary/mlx.core.fft.fftn", "python/_autosummary/mlx.core.fft.ifft", "python/_autosummary/mlx.core.fft.ifft2", "python/_autosummary/mlx.core.fft.ifftn", "python/_autosummary/mlx.core.fft.irfft", "python/_autosummary/mlx.core.fft.irfft2", "python/_autosummary/mlx.core.fft.irfftn", "python/_autosummary/mlx.core.fft.rfft", "python/_autosummary/mlx.core.fft.rfft2", "python/_autosummary/mlx.core.fft.rfftn", "python/_autosummary/mlx.core.flatten", "python/_autosummary/mlx.core.floor", "python/_autosummary/mlx.core.floor_divide", "python/_autosummary/mlx.core.full", "python/_autosummary/mlx.core.grad", "python/_autosummary/mlx.core.greater", "python/_autosummary/mlx.core.greater_equal", "python/_autosummary/mlx.core.identity", "python/_autosummary/mlx.core.inner", "python/_autosummary/mlx.core.isclose", "python/_autosummary/mlx.core.isinf", "python/_autosummary/mlx.core.isnan", "python/_autosummary/mlx.core.isneginf", "python/_autosummary/mlx.core.isposinf", "python/_autosummary/mlx.core.issubdtype", "python/_autosummary/mlx.core.jvp", "python/_autosummary/mlx.core.less", "python/_autosummary/mlx.core.less_equal", "python/_autosummary/mlx.core.linalg.norm", "python/_autosummary/mlx.core.linalg.qr", "python/_autosummary/mlx.core.linspace", "python/_autosummary/mlx.core.load", "python/_autosummary/mlx.core.log", "python/_autosummary/mlx.core.log10", "python/_autosummary/mlx.core.log1p", "python/_autosummary/mlx.core.log2", "python/_autosummary/mlx.core.logaddexp", "python/_autosummary/mlx.core.logical_and", "python/_autosummary/mlx.core.logical_not", "python/_autosummary/mlx.core.logical_or", "python/_autosummary/mlx.core.logsumexp", "python/_autosummary/mlx.core.matmul", "python/_autosummary/mlx.core.max", "python/_autosummary/mlx.core.maximum", "python/_autosummary/mlx.core.mean", "python/_autosummary/mlx.core.metal.get_active_memory", "python/_autosummary/mlx.core.metal.get_cache_memory", "python/_autosummary/mlx.core.metal.get_peak_memory", "python/_autosummary/mlx.core.metal.is_available", "python/_autosummary/mlx.core.metal.set_cache_limit", "python/_autosummary/mlx.core.metal.set_memory_limit", "python/_autosummary/mlx.core.min", "python/_autosummary/mlx.core.minimum", "python/_autosummary/mlx.core.moveaxis", "python/_autosummary/mlx.core.multiply", "python/_autosummary/mlx.core.negative", "python/_autosummary/mlx.core.new_stream", "python/_autosummary/mlx.core.ones", "python/_autosummary/mlx.core.ones_like", "python/_autosummary/mlx.core.outer", "python/_autosummary/mlx.core.pad", "python/_autosummary/mlx.core.partition", "python/_autosummary/mlx.core.prod", "python/_autosummary/mlx.core.quantize", "python/_autosummary/mlx.core.quantized_matmul", "python/_autosummary/mlx.core.random.bernoulli", "python/_autosummary/mlx.core.random.categorical", "python/_autosummary/mlx.core.random.gumbel", "python/_autosummary/mlx.core.random.key", "python/_autosummary/mlx.core.random.normal", "python/_autosummary/mlx.core.random.randint", "python/_autosummary/mlx.core.random.seed", "python/_autosummary/mlx.core.random.split", "python/_autosummary/mlx.core.random.truncated_normal", "python/_autosummary/mlx.core.random.uniform", "python/_autosummary/mlx.core.reciprocal", "python/_autosummary/mlx.core.repeat", "python/_autosummary/mlx.core.reshape", "python/_autosummary/mlx.core.round", "python/_autosummary/mlx.core.rsqrt", "python/_autosummary/mlx.core.save", "python/_autosummary/mlx.core.save_gguf", "python/_autosummary/mlx.core.save_safetensors", "python/_autosummary/mlx.core.savez", "python/_autosummary/mlx.core.savez_compressed", "python/_autosummary/mlx.core.set_default_device", "python/_autosummary/mlx.core.set_default_stream", "python/_autosummary/mlx.core.sigmoid", "python/_autosummary/mlx.core.sign", "python/_autosummary/mlx.core.sin", "python/_autosummary/mlx.core.sinh", "python/_autosummary/mlx.core.softmax", "python/_autosummary/mlx.core.sort", "python/_autosummary/mlx.core.split", "python/_autosummary/mlx.core.sqrt", "python/_autosummary/mlx.core.square", "python/_autosummary/mlx.core.squeeze", "python/_autosummary/mlx.core.stack", "python/_autosummary/mlx.core.stop_gradient", "python/_autosummary/mlx.core.stream", "python/_autosummary/mlx.core.subtract", "python/_autosummary/mlx.core.sum", "python/_autosummary/mlx.core.swapaxes", "python/_autosummary/mlx.core.take", "python/_autosummary/mlx.core.take_along_axis", "python/_autosummary/mlx.core.tan", "python/_autosummary/mlx.core.tanh", "python/_autosummary/mlx.core.tensordot", "python/_autosummary/mlx.core.tile", "python/_autosummary/mlx.core.topk", "python/_autosummary/mlx.core.transpose", "python/_autosummary/mlx.core.tri", "python/_autosummary/mlx.core.tril", "python/_autosummary/mlx.core.triu", "python/_autosummary/mlx.core.value_and_grad", "python/_autosummary/mlx.core.var", "python/_autosummary/mlx.core.vjp", "python/_autosummary/mlx.core.vmap", "python/_autosummary/mlx.core.where", "python/_autosummary/mlx.core.zeros", "python/_autosummary/mlx.core.zeros_like", "python/_autosummary/mlx.nn.value_and_grad", "python/_autosummary/mlx.utils.tree_flatten", "python/_autosummary/mlx.utils.tree_map", "python/_autosummary/mlx.utils.tree_unflatten", "python/_autosummary/stream_class", "python/array", "python/data_types", "python/devices_and_streams", "python/fast", "python/fft", "python/linalg", "python/metal", "python/nn", "python/nn/_autosummary/mlx.nn.ALiBi", "python/nn/_autosummary/mlx.nn.AvgPool1d", "python/nn/_autosummary/mlx.nn.AvgPool2d", "python/nn/_autosummary/mlx.nn.BatchNorm", "python/nn/_autosummary/mlx.nn.Conv1d", "python/nn/_autosummary/mlx.nn.Conv2d", "python/nn/_autosummary/mlx.nn.Dropout", "python/nn/_autosummary/mlx.nn.Dropout2d", "python/nn/_autosummary/mlx.nn.Dropout3d", "python/nn/_autosummary/mlx.nn.Embedding", "python/nn/_autosummary/mlx.nn.GELU", "python/nn/_autosummary/mlx.nn.GRU", "python/nn/_autosummary/mlx.nn.GroupNorm", "python/nn/_autosummary/mlx.nn.InstanceNorm", "python/nn/_autosummary/mlx.nn.LSTM", "python/nn/_autosummary/mlx.nn.LayerNorm", "python/nn/_autosummary/mlx.nn.Linear", "python/nn/_autosummary/mlx.nn.MaxPool1d", "python/nn/_autosummary/mlx.nn.MaxPool2d", "python/nn/_autosummary/mlx.nn.Mish", "python/nn/_autosummary/mlx.nn.Module.apply", "python/nn/_autosummary/mlx.nn.Module.apply_to_modules", "python/nn/_autosummary/mlx.nn.Module.children", "python/nn/_autosummary/mlx.nn.Module.eval", "python/nn/_autosummary/mlx.nn.Module.filter_and_map", "python/nn/_autosummary/mlx.nn.Module.freeze", "python/nn/_autosummary/mlx.nn.Module.leaf_modules", "python/nn/_autosummary/mlx.nn.Module.load_weights", "python/nn/_autosummary/mlx.nn.Module.modules", "python/nn/_autosummary/mlx.nn.Module.named_modules", "python/nn/_autosummary/mlx.nn.Module.parameters", "python/nn/_autosummary/mlx.nn.Module.save_weights", "python/nn/_autosummary/mlx.nn.Module.set_dtype", "python/nn/_autosummary/mlx.nn.Module.state", "python/nn/_autosummary/mlx.nn.Module.train", "python/nn/_autosummary/mlx.nn.Module.trainable_parameters", "python/nn/_autosummary/mlx.nn.Module.training", "python/nn/_autosummary/mlx.nn.Module.unfreeze", "python/nn/_autosummary/mlx.nn.Module.update", "python/nn/_autosummary/mlx.nn.Module.update_modules", "python/nn/_autosummary/mlx.nn.MultiHeadAttention", "python/nn/_autosummary/mlx.nn.PReLU", "python/nn/_autosummary/mlx.nn.QuantizedLinear", "python/nn/_autosummary/mlx.nn.RMSNorm", "python/nn/_autosummary/mlx.nn.RNN", "python/nn/_autosummary/mlx.nn.ReLU", "python/nn/_autosummary/mlx.nn.RoPE", "python/nn/_autosummary/mlx.nn.SELU", "python/nn/_autosummary/mlx.nn.Sequential", "python/nn/_autosummary/mlx.nn.SiLU", "python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding", "python/nn/_autosummary/mlx.nn.Softshrink", "python/nn/_autosummary/mlx.nn.Step", "python/nn/_autosummary/mlx.nn.Transformer", "python/nn/_autosummary/mlx.nn.Upsample", "python/nn/_autosummary/mlx.nn.init.constant", "python/nn/_autosummary/mlx.nn.init.glorot_normal", "python/nn/_autosummary/mlx.nn.init.glorot_uniform", "python/nn/_autosummary/mlx.nn.init.he_normal", "python/nn/_autosummary/mlx.nn.init.he_uniform", "python/nn/_autosummary/mlx.nn.init.identity", "python/nn/_autosummary/mlx.nn.init.normal", "python/nn/_autosummary/mlx.nn.init.uniform", "python/nn/_autosummary_functions/mlx.nn.elu", "python/nn/_autosummary_functions/mlx.nn.gelu", "python/nn/_autosummary_functions/mlx.nn.gelu_approx", "python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx", "python/nn/_autosummary_functions/mlx.nn.glu", "python/nn/_autosummary_functions/mlx.nn.hardswish", "python/nn/_autosummary_functions/mlx.nn.leaky_relu", "python/nn/_autosummary_functions/mlx.nn.log_sigmoid", "python/nn/_autosummary_functions/mlx.nn.log_softmax", "python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy", "python/nn/_autosummary_functions/mlx.nn.losses.cosine_similarity_loss", "python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy", "python/nn/_autosummary_functions/mlx.nn.losses.gaussian_nll_loss", "python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss", "python/nn/_autosummary_functions/mlx.nn.losses.huber_loss", "python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss", "python/nn/_autosummary_functions/mlx.nn.losses.l1_loss", "python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss", "python/nn/_autosummary_functions/mlx.nn.losses.margin_ranking_loss", "python/nn/_autosummary_functions/mlx.nn.losses.mse_loss", "python/nn/_autosummary_functions/mlx.nn.losses.nll_loss", "python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss", "python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss", "python/nn/_autosummary_functions/mlx.nn.mish", "python/nn/_autosummary_functions/mlx.nn.prelu", "python/nn/_autosummary_functions/mlx.nn.relu", "python/nn/_autosummary_functions/mlx.nn.relu6", "python/nn/_autosummary_functions/mlx.nn.selu", "python/nn/_autosummary_functions/mlx.nn.sigmoid", "python/nn/_autosummary_functions/mlx.nn.silu", "python/nn/_autosummary_functions/mlx.nn.softmax", "python/nn/_autosummary_functions/mlx.nn.softplus", "python/nn/_autosummary_functions/mlx.nn.softshrink", "python/nn/_autosummary_functions/mlx.nn.step", "python/nn/_autosummary_functions/mlx.nn.tanh", "python/nn/functions", "python/nn/init", "python/nn/layers", "python/nn/losses", "python/nn/module", "python/ops", "python/optimizers", "python/optimizers/_autosummary/mlx.optimizers.AdaDelta", "python/optimizers/_autosummary/mlx.optimizers.Adafactor", "python/optimizers/_autosummary/mlx.optimizers.Adagrad", "python/optimizers/_autosummary/mlx.optimizers.Adam", "python/optimizers/_autosummary/mlx.optimizers.AdamW", "python/optimizers/_autosummary/mlx.optimizers.Adamax", "python/optimizers/_autosummary/mlx.optimizers.Lion", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.apply_gradients", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.init", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.state", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.update", "python/optimizers/_autosummary/mlx.optimizers.RMSprop", "python/optimizers/_autosummary/mlx.optimizers.SGD", "python/optimizers/_autosummary/mlx.optimizers.cosine_decay", "python/optimizers/_autosummary/mlx.optimizers.exponential_decay", "python/optimizers/_autosummary/mlx.optimizers.join_schedules", "python/optimizers/_autosummary/mlx.optimizers.linear_schedule", "python/optimizers/_autosummary/mlx.optimizers.step_decay", "python/optimizers/common_optimizers", "python/optimizers/optimizer", "python/optimizers/schedulers", "python/random", "python/transforms", "python/tree_utils", "usage/compile", "usage/function_transforms", "usage/indexing", "usage/lazy_evaluation", "usage/numpy", "usage/quick_start", "usage/saving_and_loading", "usage/unified_memory", "usage/using_streams"], "filenames": ["cpp/ops.rst", "dev/extensions.rst", "dev/metal_debugger.rst", "examples/linear_regression.rst", "examples/llama-inference.rst", "examples/mlp.rst", "index.rst", "install.rst", "python/_autosummary/mlx.core.Device.rst", "python/_autosummary/mlx.core.Dtype.rst", "python/_autosummary/mlx.core.DtypeCategory.rst", "python/_autosummary/mlx.core.abs.rst", "python/_autosummary/mlx.core.add.rst", "python/_autosummary/mlx.core.all.rst", "python/_autosummary/mlx.core.allclose.rst", "python/_autosummary/mlx.core.any.rst", "python/_autosummary/mlx.core.arange.rst", "python/_autosummary/mlx.core.arccos.rst", "python/_autosummary/mlx.core.arccosh.rst", "python/_autosummary/mlx.core.arcsin.rst", "python/_autosummary/mlx.core.arcsinh.rst", "python/_autosummary/mlx.core.arctan.rst", "python/_autosummary/mlx.core.arctanh.rst", "python/_autosummary/mlx.core.argmax.rst", "python/_autosummary/mlx.core.argmin.rst", "python/_autosummary/mlx.core.argpartition.rst", "python/_autosummary/mlx.core.argsort.rst", "python/_autosummary/mlx.core.array.rst", "python/_autosummary/mlx.core.array.T.rst", "python/_autosummary/mlx.core.array.abs.rst", "python/_autosummary/mlx.core.array.all.rst", "python/_autosummary/mlx.core.array.any.rst", "python/_autosummary/mlx.core.array.argmax.rst", "python/_autosummary/mlx.core.array.argmin.rst", "python/_autosummary/mlx.core.array.astype.rst", "python/_autosummary/mlx.core.array.at.rst", "python/_autosummary/mlx.core.array.cos.rst", "python/_autosummary/mlx.core.array.cummax.rst", "python/_autosummary/mlx.core.array.cummin.rst", "python/_autosummary/mlx.core.array.cumprod.rst", "python/_autosummary/mlx.core.array.cumsum.rst", "python/_autosummary/mlx.core.array.diag.rst", "python/_autosummary/mlx.core.array.diagonal.rst", "python/_autosummary/mlx.core.array.dtype.rst", "python/_autosummary/mlx.core.array.exp.rst", "python/_autosummary/mlx.core.array.flatten.rst", "python/_autosummary/mlx.core.array.item.rst", "python/_autosummary/mlx.core.array.itemsize.rst", "python/_autosummary/mlx.core.array.log.rst", "python/_autosummary/mlx.core.array.log10.rst", "python/_autosummary/mlx.core.array.log1p.rst", "python/_autosummary/mlx.core.array.log2.rst", "python/_autosummary/mlx.core.array.logsumexp.rst", "python/_autosummary/mlx.core.array.max.rst", "python/_autosummary/mlx.core.array.mean.rst", "python/_autosummary/mlx.core.array.min.rst", "python/_autosummary/mlx.core.array.moveaxis.rst", "python/_autosummary/mlx.core.array.nbytes.rst", "python/_autosummary/mlx.core.array.ndim.rst", "python/_autosummary/mlx.core.array.prod.rst", "python/_autosummary/mlx.core.array.reciprocal.rst", "python/_autosummary/mlx.core.array.reshape.rst", "python/_autosummary/mlx.core.array.round.rst", "python/_autosummary/mlx.core.array.rsqrt.rst", "python/_autosummary/mlx.core.array.shape.rst", "python/_autosummary/mlx.core.array.sin.rst", "python/_autosummary/mlx.core.array.size.rst", "python/_autosummary/mlx.core.array.split.rst", "python/_autosummary/mlx.core.array.sqrt.rst", "python/_autosummary/mlx.core.array.square.rst", "python/_autosummary/mlx.core.array.squeeze.rst", "python/_autosummary/mlx.core.array.sum.rst", "python/_autosummary/mlx.core.array.swapaxes.rst", "python/_autosummary/mlx.core.array.tolist.rst", "python/_autosummary/mlx.core.array.transpose.rst", "python/_autosummary/mlx.core.array.var.rst", "python/_autosummary/mlx.core.array_equal.rst", "python/_autosummary/mlx.core.atleast_1d.rst", "python/_autosummary/mlx.core.atleast_2d.rst", "python/_autosummary/mlx.core.atleast_3d.rst", "python/_autosummary/mlx.core.broadcast_to.rst", "python/_autosummary/mlx.core.ceil.rst", "python/_autosummary/mlx.core.clip.rst", "python/_autosummary/mlx.core.compile.rst", "python/_autosummary/mlx.core.concatenate.rst", "python/_autosummary/mlx.core.conv1d.rst", "python/_autosummary/mlx.core.conv2d.rst", "python/_autosummary/mlx.core.conv_general.rst", "python/_autosummary/mlx.core.convolve.rst", "python/_autosummary/mlx.core.cos.rst", "python/_autosummary/mlx.core.cosh.rst", "python/_autosummary/mlx.core.cummax.rst", "python/_autosummary/mlx.core.cummin.rst", "python/_autosummary/mlx.core.cumprod.rst", "python/_autosummary/mlx.core.cumsum.rst", "python/_autosummary/mlx.core.default_device.rst", "python/_autosummary/mlx.core.default_stream.rst", "python/_autosummary/mlx.core.dequantize.rst", "python/_autosummary/mlx.core.diag.rst", "python/_autosummary/mlx.core.diagonal.rst", "python/_autosummary/mlx.core.disable_compile.rst", "python/_autosummary/mlx.core.divide.rst", "python/_autosummary/mlx.core.divmod.rst", "python/_autosummary/mlx.core.enable_compile.rst", "python/_autosummary/mlx.core.equal.rst", "python/_autosummary/mlx.core.erf.rst", "python/_autosummary/mlx.core.erfinv.rst", "python/_autosummary/mlx.core.eval.rst", "python/_autosummary/mlx.core.exp.rst", "python/_autosummary/mlx.core.expand_dims.rst", "python/_autosummary/mlx.core.eye.rst", "python/_autosummary/mlx.core.fast.layer_norm.rst", "python/_autosummary/mlx.core.fast.rms_norm.rst", "python/_autosummary/mlx.core.fast.rope.rst", "python/_autosummary/mlx.core.fast.scaled_dot_product_attention.rst", "python/_autosummary/mlx.core.fft.fft.rst", "python/_autosummary/mlx.core.fft.fft2.rst", "python/_autosummary/mlx.core.fft.fftn.rst", "python/_autosummary/mlx.core.fft.ifft.rst", "python/_autosummary/mlx.core.fft.ifft2.rst", "python/_autosummary/mlx.core.fft.ifftn.rst", "python/_autosummary/mlx.core.fft.irfft.rst", "python/_autosummary/mlx.core.fft.irfft2.rst", "python/_autosummary/mlx.core.fft.irfftn.rst", "python/_autosummary/mlx.core.fft.rfft.rst", "python/_autosummary/mlx.core.fft.rfft2.rst", "python/_autosummary/mlx.core.fft.rfftn.rst", "python/_autosummary/mlx.core.flatten.rst", "python/_autosummary/mlx.core.floor.rst", "python/_autosummary/mlx.core.floor_divide.rst", "python/_autosummary/mlx.core.full.rst", "python/_autosummary/mlx.core.grad.rst", "python/_autosummary/mlx.core.greater.rst", "python/_autosummary/mlx.core.greater_equal.rst", "python/_autosummary/mlx.core.identity.rst", "python/_autosummary/mlx.core.inner.rst", "python/_autosummary/mlx.core.isclose.rst", "python/_autosummary/mlx.core.isinf.rst", "python/_autosummary/mlx.core.isnan.rst", "python/_autosummary/mlx.core.isneginf.rst", "python/_autosummary/mlx.core.isposinf.rst", "python/_autosummary/mlx.core.issubdtype.rst", "python/_autosummary/mlx.core.jvp.rst", "python/_autosummary/mlx.core.less.rst", "python/_autosummary/mlx.core.less_equal.rst", "python/_autosummary/mlx.core.linalg.norm.rst", "python/_autosummary/mlx.core.linalg.qr.rst", "python/_autosummary/mlx.core.linspace.rst", "python/_autosummary/mlx.core.load.rst", "python/_autosummary/mlx.core.log.rst", "python/_autosummary/mlx.core.log10.rst", "python/_autosummary/mlx.core.log1p.rst", "python/_autosummary/mlx.core.log2.rst", "python/_autosummary/mlx.core.logaddexp.rst", "python/_autosummary/mlx.core.logical_and.rst", "python/_autosummary/mlx.core.logical_not.rst", "python/_autosummary/mlx.core.logical_or.rst", "python/_autosummary/mlx.core.logsumexp.rst", "python/_autosummary/mlx.core.matmul.rst", "python/_autosummary/mlx.core.max.rst", "python/_autosummary/mlx.core.maximum.rst", "python/_autosummary/mlx.core.mean.rst", "python/_autosummary/mlx.core.metal.get_active_memory.rst", "python/_autosummary/mlx.core.metal.get_cache_memory.rst", "python/_autosummary/mlx.core.metal.get_peak_memory.rst", "python/_autosummary/mlx.core.metal.is_available.rst", "python/_autosummary/mlx.core.metal.set_cache_limit.rst", "python/_autosummary/mlx.core.metal.set_memory_limit.rst", "python/_autosummary/mlx.core.min.rst", "python/_autosummary/mlx.core.minimum.rst", "python/_autosummary/mlx.core.moveaxis.rst", "python/_autosummary/mlx.core.multiply.rst", "python/_autosummary/mlx.core.negative.rst", "python/_autosummary/mlx.core.new_stream.rst", "python/_autosummary/mlx.core.ones.rst", "python/_autosummary/mlx.core.ones_like.rst", "python/_autosummary/mlx.core.outer.rst", "python/_autosummary/mlx.core.pad.rst", "python/_autosummary/mlx.core.partition.rst", "python/_autosummary/mlx.core.prod.rst", "python/_autosummary/mlx.core.quantize.rst", "python/_autosummary/mlx.core.quantized_matmul.rst", "python/_autosummary/mlx.core.random.bernoulli.rst", "python/_autosummary/mlx.core.random.categorical.rst", "python/_autosummary/mlx.core.random.gumbel.rst", "python/_autosummary/mlx.core.random.key.rst", "python/_autosummary/mlx.core.random.normal.rst", "python/_autosummary/mlx.core.random.randint.rst", "python/_autosummary/mlx.core.random.seed.rst", "python/_autosummary/mlx.core.random.split.rst", "python/_autosummary/mlx.core.random.truncated_normal.rst", "python/_autosummary/mlx.core.random.uniform.rst", "python/_autosummary/mlx.core.reciprocal.rst", "python/_autosummary/mlx.core.repeat.rst", "python/_autosummary/mlx.core.reshape.rst", "python/_autosummary/mlx.core.round.rst", "python/_autosummary/mlx.core.rsqrt.rst", "python/_autosummary/mlx.core.save.rst", "python/_autosummary/mlx.core.save_gguf.rst", "python/_autosummary/mlx.core.save_safetensors.rst", "python/_autosummary/mlx.core.savez.rst", "python/_autosummary/mlx.core.savez_compressed.rst", "python/_autosummary/mlx.core.set_default_device.rst", "python/_autosummary/mlx.core.set_default_stream.rst", "python/_autosummary/mlx.core.sigmoid.rst", "python/_autosummary/mlx.core.sign.rst", "python/_autosummary/mlx.core.sin.rst", "python/_autosummary/mlx.core.sinh.rst", "python/_autosummary/mlx.core.softmax.rst", "python/_autosummary/mlx.core.sort.rst", "python/_autosummary/mlx.core.split.rst", "python/_autosummary/mlx.core.sqrt.rst", "python/_autosummary/mlx.core.square.rst", "python/_autosummary/mlx.core.squeeze.rst", "python/_autosummary/mlx.core.stack.rst", "python/_autosummary/mlx.core.stop_gradient.rst", "python/_autosummary/mlx.core.stream.rst", "python/_autosummary/mlx.core.subtract.rst", "python/_autosummary/mlx.core.sum.rst", "python/_autosummary/mlx.core.swapaxes.rst", "python/_autosummary/mlx.core.take.rst", "python/_autosummary/mlx.core.take_along_axis.rst", "python/_autosummary/mlx.core.tan.rst", "python/_autosummary/mlx.core.tanh.rst", "python/_autosummary/mlx.core.tensordot.rst", "python/_autosummary/mlx.core.tile.rst", "python/_autosummary/mlx.core.topk.rst", "python/_autosummary/mlx.core.transpose.rst", "python/_autosummary/mlx.core.tri.rst", "python/_autosummary/mlx.core.tril.rst", "python/_autosummary/mlx.core.triu.rst", "python/_autosummary/mlx.core.value_and_grad.rst", "python/_autosummary/mlx.core.var.rst", "python/_autosummary/mlx.core.vjp.rst", "python/_autosummary/mlx.core.vmap.rst", "python/_autosummary/mlx.core.where.rst", "python/_autosummary/mlx.core.zeros.rst", "python/_autosummary/mlx.core.zeros_like.rst", "python/_autosummary/mlx.nn.value_and_grad.rst", "python/_autosummary/mlx.utils.tree_flatten.rst", "python/_autosummary/mlx.utils.tree_map.rst", "python/_autosummary/mlx.utils.tree_unflatten.rst", "python/_autosummary/stream_class.rst", "python/array.rst", "python/data_types.rst", "python/devices_and_streams.rst", "python/fast.rst", "python/fft.rst", "python/linalg.rst", "python/metal.rst", "python/nn.rst", "python/nn/_autosummary/mlx.nn.ALiBi.rst", "python/nn/_autosummary/mlx.nn.AvgPool1d.rst", "python/nn/_autosummary/mlx.nn.AvgPool2d.rst", "python/nn/_autosummary/mlx.nn.BatchNorm.rst", "python/nn/_autosummary/mlx.nn.Conv1d.rst", "python/nn/_autosummary/mlx.nn.Conv2d.rst", "python/nn/_autosummary/mlx.nn.Dropout.rst", "python/nn/_autosummary/mlx.nn.Dropout2d.rst", "python/nn/_autosummary/mlx.nn.Dropout3d.rst", "python/nn/_autosummary/mlx.nn.Embedding.rst", "python/nn/_autosummary/mlx.nn.GELU.rst", "python/nn/_autosummary/mlx.nn.GRU.rst", "python/nn/_autosummary/mlx.nn.GroupNorm.rst", "python/nn/_autosummary/mlx.nn.InstanceNorm.rst", "python/nn/_autosummary/mlx.nn.LSTM.rst", "python/nn/_autosummary/mlx.nn.LayerNorm.rst", "python/nn/_autosummary/mlx.nn.Linear.rst", "python/nn/_autosummary/mlx.nn.MaxPool1d.rst", "python/nn/_autosummary/mlx.nn.MaxPool2d.rst", "python/nn/_autosummary/mlx.nn.Mish.rst", "python/nn/_autosummary/mlx.nn.Module.apply.rst", "python/nn/_autosummary/mlx.nn.Module.apply_to_modules.rst", "python/nn/_autosummary/mlx.nn.Module.children.rst", "python/nn/_autosummary/mlx.nn.Module.eval.rst", "python/nn/_autosummary/mlx.nn.Module.filter_and_map.rst", "python/nn/_autosummary/mlx.nn.Module.freeze.rst", "python/nn/_autosummary/mlx.nn.Module.leaf_modules.rst", "python/nn/_autosummary/mlx.nn.Module.load_weights.rst", "python/nn/_autosummary/mlx.nn.Module.modules.rst", "python/nn/_autosummary/mlx.nn.Module.named_modules.rst", "python/nn/_autosummary/mlx.nn.Module.parameters.rst", "python/nn/_autosummary/mlx.nn.Module.save_weights.rst", "python/nn/_autosummary/mlx.nn.Module.set_dtype.rst", "python/nn/_autosummary/mlx.nn.Module.state.rst", "python/nn/_autosummary/mlx.nn.Module.train.rst", "python/nn/_autosummary/mlx.nn.Module.trainable_parameters.rst", "python/nn/_autosummary/mlx.nn.Module.training.rst", "python/nn/_autosummary/mlx.nn.Module.unfreeze.rst", "python/nn/_autosummary/mlx.nn.Module.update.rst", "python/nn/_autosummary/mlx.nn.Module.update_modules.rst", "python/nn/_autosummary/mlx.nn.MultiHeadAttention.rst", "python/nn/_autosummary/mlx.nn.PReLU.rst", "python/nn/_autosummary/mlx.nn.QuantizedLinear.rst", "python/nn/_autosummary/mlx.nn.RMSNorm.rst", "python/nn/_autosummary/mlx.nn.RNN.rst", "python/nn/_autosummary/mlx.nn.ReLU.rst", "python/nn/_autosummary/mlx.nn.RoPE.rst", "python/nn/_autosummary/mlx.nn.SELU.rst", "python/nn/_autosummary/mlx.nn.Sequential.rst", "python/nn/_autosummary/mlx.nn.SiLU.rst", "python/nn/_autosummary/mlx.nn.SinusoidalPositionalEncoding.rst", "python/nn/_autosummary/mlx.nn.Softshrink.rst", "python/nn/_autosummary/mlx.nn.Step.rst", "python/nn/_autosummary/mlx.nn.Transformer.rst", "python/nn/_autosummary/mlx.nn.Upsample.rst", "python/nn/_autosummary/mlx.nn.init.constant.rst", "python/nn/_autosummary/mlx.nn.init.glorot_normal.rst", "python/nn/_autosummary/mlx.nn.init.glorot_uniform.rst", "python/nn/_autosummary/mlx.nn.init.he_normal.rst", "python/nn/_autosummary/mlx.nn.init.he_uniform.rst", "python/nn/_autosummary/mlx.nn.init.identity.rst", "python/nn/_autosummary/mlx.nn.init.normal.rst", "python/nn/_autosummary/mlx.nn.init.uniform.rst", "python/nn/_autosummary_functions/mlx.nn.elu.rst", "python/nn/_autosummary_functions/mlx.nn.gelu.rst", "python/nn/_autosummary_functions/mlx.nn.gelu_approx.rst", "python/nn/_autosummary_functions/mlx.nn.gelu_fast_approx.rst", "python/nn/_autosummary_functions/mlx.nn.glu.rst", "python/nn/_autosummary_functions/mlx.nn.hardswish.rst", "python/nn/_autosummary_functions/mlx.nn.leaky_relu.rst", "python/nn/_autosummary_functions/mlx.nn.log_sigmoid.rst", "python/nn/_autosummary_functions/mlx.nn.log_softmax.rst", "python/nn/_autosummary_functions/mlx.nn.losses.binary_cross_entropy.rst", "python/nn/_autosummary_functions/mlx.nn.losses.cosine_similarity_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.cross_entropy.rst", "python/nn/_autosummary_functions/mlx.nn.losses.gaussian_nll_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.hinge_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.huber_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.kl_div_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.l1_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.log_cosh_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.margin_ranking_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.mse_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.nll_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.smooth_l1_loss.rst", "python/nn/_autosummary_functions/mlx.nn.losses.triplet_loss.rst", "python/nn/_autosummary_functions/mlx.nn.mish.rst", "python/nn/_autosummary_functions/mlx.nn.prelu.rst", "python/nn/_autosummary_functions/mlx.nn.relu.rst", "python/nn/_autosummary_functions/mlx.nn.relu6.rst", "python/nn/_autosummary_functions/mlx.nn.selu.rst", "python/nn/_autosummary_functions/mlx.nn.sigmoid.rst", "python/nn/_autosummary_functions/mlx.nn.silu.rst", "python/nn/_autosummary_functions/mlx.nn.softmax.rst", "python/nn/_autosummary_functions/mlx.nn.softplus.rst", "python/nn/_autosummary_functions/mlx.nn.softshrink.rst", "python/nn/_autosummary_functions/mlx.nn.step.rst", "python/nn/_autosummary_functions/mlx.nn.tanh.rst", "python/nn/functions.rst", "python/nn/init.rst", "python/nn/layers.rst", "python/nn/losses.rst", "python/nn/module.rst", "python/ops.rst", "python/optimizers.rst", "python/optimizers/_autosummary/mlx.optimizers.AdaDelta.rst", "python/optimizers/_autosummary/mlx.optimizers.Adafactor.rst", "python/optimizers/_autosummary/mlx.optimizers.Adagrad.rst", "python/optimizers/_autosummary/mlx.optimizers.Adam.rst", "python/optimizers/_autosummary/mlx.optimizers.AdamW.rst", "python/optimizers/_autosummary/mlx.optimizers.Adamax.rst", "python/optimizers/_autosummary/mlx.optimizers.Lion.rst", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.apply_gradients.rst", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.init.rst", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.state.rst", "python/optimizers/_autosummary/mlx.optimizers.Optimizer.update.rst", "python/optimizers/_autosummary/mlx.optimizers.RMSprop.rst", "python/optimizers/_autosummary/mlx.optimizers.SGD.rst", "python/optimizers/_autosummary/mlx.optimizers.cosine_decay.rst", "python/optimizers/_autosummary/mlx.optimizers.exponential_decay.rst", "python/optimizers/_autosummary/mlx.optimizers.join_schedules.rst", "python/optimizers/_autosummary/mlx.optimizers.linear_schedule.rst", "python/optimizers/_autosummary/mlx.optimizers.step_decay.rst", "python/optimizers/common_optimizers.rst", "python/optimizers/optimizer.rst", "python/optimizers/schedulers.rst", "python/random.rst", "python/transforms.rst", "python/tree_utils.rst", "usage/compile.rst", "usage/function_transforms.rst", "usage/indexing.rst", "usage/lazy_evaluation.rst", "usage/numpy.rst", "usage/quick_start.rst", "usage/saving_and_loading.rst", "usage/unified_memory.rst", "usage/using_streams.rst"], "titles": ["Operations", "Developer Documentation", "Metal Debugger", "Linear Regression", "LLM inference", "Multi-Layer Perceptron", "MLX", "Build and Install", "mlx.core.Device", "mlx.core.Dtype", "mlx.core.DtypeCategory", "mlx.core.abs", "mlx.core.add", "mlx.core.all", "mlx.core.allclose", "mlx.core.any", "mlx.core.arange", "mlx.core.arccos", "mlx.core.arccosh", "mlx.core.arcsin", "mlx.core.arcsinh", "mlx.core.arctan", "mlx.core.arctanh", "mlx.core.argmax", "mlx.core.argmin", "mlx.core.argpartition", "mlx.core.argsort", "mlx.core.array", "mlx.core.array.T", "mlx.core.array.abs", "mlx.core.array.all", "mlx.core.array.any", "mlx.core.array.argmax", "mlx.core.array.argmin", "mlx.core.array.astype", "mlx.core.array.at", "mlx.core.array.cos", "mlx.core.array.cummax", "mlx.core.array.cummin", "mlx.core.array.cumprod", "mlx.core.array.cumsum", "mlx.core.array.diag", "mlx.core.array.diagonal", "mlx.core.array.dtype", "mlx.core.array.exp", "mlx.core.array.flatten", "mlx.core.array.item", "mlx.core.array.itemsize", "mlx.core.array.log", "mlx.core.array.log10", "mlx.core.array.log1p", "mlx.core.array.log2", "mlx.core.array.logsumexp", "mlx.core.array.max", "mlx.core.array.mean", "mlx.core.array.min", "mlx.core.array.moveaxis", "mlx.core.array.nbytes", "mlx.core.array.ndim", "mlx.core.array.prod", "mlx.core.array.reciprocal", "mlx.core.array.reshape", "mlx.core.array.round", "mlx.core.array.rsqrt", "mlx.core.array.shape", "mlx.core.array.sin", "mlx.core.array.size", "mlx.core.array.split", "mlx.core.array.sqrt", "mlx.core.array.square", "mlx.core.array.squeeze", "mlx.core.array.sum", "mlx.core.array.swapaxes", "mlx.core.array.tolist", "mlx.core.array.transpose", "mlx.core.array.var", "mlx.core.array_equal", "mlx.core.atleast_1d", "mlx.core.atleast_2d", "mlx.core.atleast_3d", "mlx.core.broadcast_to", "mlx.core.ceil", "mlx.core.clip", "mlx.core.compile", "mlx.core.concatenate", "mlx.core.conv1d", "mlx.core.conv2d", "mlx.core.conv_general", "mlx.core.convolve", "mlx.core.cos", "mlx.core.cosh", "mlx.core.cummax", "mlx.core.cummin", "mlx.core.cumprod", "mlx.core.cumsum", "mlx.core.default_device", "mlx.core.default_stream", "mlx.core.dequantize", "mlx.core.diag", "mlx.core.diagonal", "mlx.core.disable_compile", "mlx.core.divide", "mlx.core.divmod", "mlx.core.enable_compile", "mlx.core.equal", "mlx.core.erf", "mlx.core.erfinv", "mlx.core.eval", "mlx.core.exp", "mlx.core.expand_dims", "mlx.core.eye", "mlx.core.fast.layer_norm", "mlx.core.fast.rms_norm", "mlx.core.fast.rope", "mlx.core.fast.scaled_dot_product_attention", "mlx.core.fft.fft", "mlx.core.fft.fft2", "mlx.core.fft.fftn", "mlx.core.fft.ifft", "mlx.core.fft.ifft2", "mlx.core.fft.ifftn", "mlx.core.fft.irfft", "mlx.core.fft.irfft2", "mlx.core.fft.irfftn", "mlx.core.fft.rfft", "mlx.core.fft.rfft2", "mlx.core.fft.rfftn", "mlx.core.flatten", "mlx.core.floor", "mlx.core.floor_divide", "mlx.core.full", "mlx.core.grad", "mlx.core.greater", "mlx.core.greater_equal", "mlx.core.identity", "mlx.core.inner", "mlx.core.isclose", "mlx.core.isinf", "mlx.core.isnan", "mlx.core.isneginf", "mlx.core.isposinf", "mlx.core.issubdtype", "mlx.core.jvp", "mlx.core.less", "mlx.core.less_equal", "mlx.core.linalg.norm", "mlx.core.linalg.qr", "mlx.core.linspace", "mlx.core.load", "mlx.core.log", "mlx.core.log10", "mlx.core.log1p", "mlx.core.log2", "mlx.core.logaddexp", "mlx.core.logical_and", "mlx.core.logical_not", "mlx.core.logical_or", "mlx.core.logsumexp", "mlx.core.matmul", "mlx.core.max", "mlx.core.maximum", "mlx.core.mean", "mlx.core.metal.get_active_memory", "mlx.core.metal.get_cache_memory", "mlx.core.metal.get_peak_memory", "mlx.core.metal.is_available", "mlx.core.metal.set_cache_limit", "mlx.core.metal.set_memory_limit", "mlx.core.min", "mlx.core.minimum", "mlx.core.moveaxis", "mlx.core.multiply", "mlx.core.negative", "mlx.core.new_stream", "mlx.core.ones", "mlx.core.ones_like", "mlx.core.outer", "mlx.core.pad", "mlx.core.partition", "mlx.core.prod", "mlx.core.quantize", "mlx.core.quantized_matmul", "mlx.core.random.bernoulli", "mlx.core.random.categorical", "mlx.core.random.gumbel", "mlx.core.random.key", "mlx.core.random.normal", "mlx.core.random.randint", "mlx.core.random.seed", "mlx.core.random.split", "mlx.core.random.truncated_normal", "mlx.core.random.uniform", "mlx.core.reciprocal", "mlx.core.repeat", "mlx.core.reshape", "mlx.core.round", "mlx.core.rsqrt", "mlx.core.save", "mlx.core.save_gguf", "mlx.core.save_safetensors", "mlx.core.savez", "mlx.core.savez_compressed", "mlx.core.set_default_device", "mlx.core.set_default_stream", "mlx.core.sigmoid", "mlx.core.sign", "mlx.core.sin", "mlx.core.sinh", "mlx.core.softmax", "mlx.core.sort", "mlx.core.split", "mlx.core.sqrt", "mlx.core.square", "mlx.core.squeeze", "mlx.core.stack", "mlx.core.stop_gradient", "mlx.core.stream", "mlx.core.subtract", "mlx.core.sum", "mlx.core.swapaxes", "mlx.core.take", "mlx.core.take_along_axis", "mlx.core.tan", "mlx.core.tanh", "mlx.core.tensordot", "mlx.core.tile", "mlx.core.topk", "mlx.core.transpose", "mlx.core.tri", "mlx.core.tril", "mlx.core.triu", "mlx.core.value_and_grad", "mlx.core.var", "mlx.core.vjp", "mlx.core.vmap", "mlx.core.where", "mlx.core.zeros", "mlx.core.zeros_like", "mlx.nn.value_and_grad", "mlx.utils.tree_flatten", "mlx.utils.tree_map", "mlx.utils.tree_unflatten", "mlx.core.Stream", "Array", "Data Types", "Devices and Streams", "Fast", "FFT", "Linear Algebra", "Metal", "Neural Networks", "mlx.nn.ALiBi", "mlx.nn.AvgPool1d", "mlx.nn.AvgPool2d", "mlx.nn.BatchNorm", "mlx.nn.Conv1d", "mlx.nn.Conv2d", "mlx.nn.Dropout", "mlx.nn.Dropout2d", "mlx.nn.Dropout3d", "mlx.nn.Embedding", "mlx.nn.GELU", "mlx.nn.GRU", "mlx.nn.GroupNorm", "mlx.nn.InstanceNorm", "mlx.nn.LSTM", "mlx.nn.LayerNorm", "mlx.nn.Linear", "mlx.nn.MaxPool1d", "mlx.nn.MaxPool2d", "mlx.nn.Mish", "mlx.nn.Module.apply", "mlx.nn.Module.apply_to_modules", "mlx.nn.Module.children", "mlx.nn.Module.eval", "mlx.nn.Module.filter_and_map", "mlx.nn.Module.freeze", "mlx.nn.Module.leaf_modules", "mlx.nn.Module.load_weights", "mlx.nn.Module.modules", "mlx.nn.Module.named_modules", "mlx.nn.Module.parameters", "mlx.nn.Module.save_weights", "mlx.nn.Module.set_dtype", "mlx.nn.Module.state", "mlx.nn.Module.train", "mlx.nn.Module.trainable_parameters", "mlx.nn.Module.training", "mlx.nn.Module.unfreeze", "mlx.nn.Module.update", "mlx.nn.Module.update_modules", "mlx.nn.MultiHeadAttention", "mlx.nn.PReLU", "mlx.nn.QuantizedLinear", "mlx.nn.RMSNorm", "mlx.nn.RNN", "mlx.nn.ReLU", "mlx.nn.RoPE", "mlx.nn.SELU", "mlx.nn.Sequential", "mlx.nn.SiLU", "mlx.nn.SinusoidalPositionalEncoding", "mlx.nn.Softshrink", "mlx.nn.Step", "mlx.nn.Transformer", "mlx.nn.Upsample", "mlx.nn.init.constant", "mlx.nn.init.glorot_normal", "mlx.nn.init.glorot_uniform", "mlx.nn.init.he_normal", "mlx.nn.init.he_uniform", "mlx.nn.init.identity", "mlx.nn.init.normal", "mlx.nn.init.uniform", "mlx.nn.elu", "mlx.nn.gelu", "mlx.nn.gelu_approx", "mlx.nn.gelu_fast_approx", "mlx.nn.glu", "mlx.nn.hardswish", "mlx.nn.leaky_relu", "mlx.nn.log_sigmoid", "mlx.nn.log_softmax", "mlx.nn.losses.binary_cross_entropy", "mlx.nn.losses.cosine_similarity_loss", "mlx.nn.losses.cross_entropy", "mlx.nn.losses.gaussian_nll_loss", "mlx.nn.losses.hinge_loss", "mlx.nn.losses.huber_loss", "mlx.nn.losses.kl_div_loss", "mlx.nn.losses.l1_loss", "mlx.nn.losses.log_cosh_loss", "mlx.nn.losses.margin_ranking_loss", "mlx.nn.losses.mse_loss", "mlx.nn.losses.nll_loss", "mlx.nn.losses.smooth_l1_loss", "mlx.nn.losses.triplet_loss", "mlx.nn.mish", "mlx.nn.prelu", "mlx.nn.relu", "mlx.nn.relu6", "mlx.nn.selu", "mlx.nn.sigmoid", "mlx.nn.silu", "mlx.nn.softmax", "mlx.nn.softplus", "mlx.nn.softshrink", "mlx.nn.step", "mlx.nn.tanh", "Functions", "Initializers", "Layers", "Loss Functions", "Module", "Operations", "Optimizers", "mlx.optimizers.AdaDelta", "mlx.optimizers.Adafactor", "mlx.optimizers.Adagrad", "mlx.optimizers.Adam", "mlx.optimizers.AdamW", "mlx.optimizers.Adamax", "mlx.optimizers.Lion", "mlx.optimizers.Optimizer.apply_gradients", "mlx.optimizers.Optimizer.init", "mlx.optimizers.Optimizer.state", "mlx.optimizers.Optimizer.update", "mlx.optimizers.RMSprop", "mlx.optimizers.SGD", "mlx.optimizers.cosine_decay", "mlx.optimizers.exponential_decay", "mlx.optimizers.join_schedules", "mlx.optimizers.linear_schedule", "mlx.optimizers.step_decay", "Common Optimizers", "Optimizer", "Schedulers", "Random", "Transforms", "Tree Utils", "Compilation", "Function Transforms", "Indexing Arrays", "Lazy Evaluation", "Conversion to NumPy and Other Frameworks", "Quick Start Guide", "Saving and Loading Arrays", "Unified Memory", "Using Streams"], "terms": {"mlx": [1, 2, 3, 4, 5, 7, 250, 350, 353, 355, 377, 379, 380, 381, 382, 383, 384, 385, 386, 387], "provid": [1, 4, 97, 131, 224, 231, 240, 250, 271, 276, 278, 288, 289, 290, 293, 304, 305, 349, 353, 386, 388], "open": [1, 2, 7, 16, 187, 191], "flexibl": [1, 6], "which": [1, 4, 5, 6, 7, 16, 34, 83, 87, 99, 107, 113, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 131, 137, 138, 139, 140, 142, 145, 146, 148, 180, 183, 184, 193, 194, 197, 198, 199, 200, 201, 213, 214, 220, 231, 233, 234, 253, 258, 259, 261, 269, 271, 275, 297, 325, 328, 332, 335, 350, 363, 364, 377, 380, 381, 382, 383, 387, 388], "user": [1, 2, 4, 250], "mai": [1, 145, 258, 381, 382], "add": [1, 2, 4, 35, 109, 153, 177, 180, 255, 256, 381, 387], "special": 1, "without": [1, 4, 6, 215, 291, 349, 379, 380, 383, 384, 387], "much": [1, 4, 252, 253, 268, 269, 380, 383], "hassl": 1, "while": [1, 2, 4, 7, 194, 297, 383, 384], "librari": [1, 7, 250], "suppli": 1, "effici": [1, 4, 6, 258, 297, 383, 385], "can": [1, 2, 4, 6, 7, 12, 16, 61, 74, 83, 99, 100, 101, 102, 104, 107, 132, 133, 143, 144, 145, 153, 160, 169, 171, 182, 183, 187, 190, 191, 198, 217, 231, 250, 253, 260, 269, 275, 288, 299, 305, 325, 350, 353, 355, 363, 364, 377, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388], "compos": [1, 6, 250, 380, 381, 385], "ani": [1, 4, 6, 16, 83, 239, 240, 241, 250, 261, 271, 272, 275, 284, 293, 304, 305, 350, 372, 379, 380, 381, 383, 385, 386, 387], "number": [1, 10, 16, 57, 66, 83, 86, 87, 97, 110, 131, 134, 142, 147, 177, 180, 181, 183, 186, 189, 191, 193, 195, 224, 225, 228, 231, 233, 234, 250, 254, 255, 256, 258, 259, 263, 264, 291, 292, 304, 305, 307, 308, 309, 310, 369, 371, 372, 377, 380, 381, 388], "applic": [1, 7], "aris": [1, 384], "case": [1, 4, 117, 120, 121, 123, 124, 125, 126, 127, 146, 158, 194, 213, 253, 258, 269, 303, 335, 341, 346, 347, 363, 364, 380, 381, 385, 386, 387, 388], "where": [1, 5, 110, 136, 180, 231, 234, 252, 253, 254, 255, 256, 257, 258, 259, 261, 262, 263, 264, 265, 266, 267, 268, 269, 275, 292, 294, 295, 303, 309, 310, 314, 315, 316, 317, 326, 332, 338, 341, 343, 347, 364, 381, 382], "new": [1, 5, 80, 99, 170, 173, 194, 214, 227, 240, 283, 291, 353, 355, 366, 371, 380, 382, 383, 384], "function": [1, 2, 3, 4, 5, 6, 14, 83, 102, 105, 106, 131, 136, 142, 145, 146, 158, 204, 231, 233, 234, 238, 240, 250, 261, 270, 272, 276, 283, 288, 292, 295, 296, 298, 299, 300, 302, 303, 304, 315, 316, 317, 318, 319, 321, 322, 337, 342, 344, 345, 346, 347, 348, 350, 355, 364, 377, 379, 382, 383, 384, 386], "highli": [1, 7], "optim": [1, 2, 3, 5, 6, 289, 380, 381, 383], "ar": [1, 3, 4, 5, 6, 7, 14, 16, 76, 80, 82, 83, 87, 88, 99, 107, 110, 116, 117, 119, 120, 122, 123, 125, 126, 127, 131, 136, 137, 138, 139, 140, 141, 142, 145, 146, 148, 158, 167, 176, 177, 178, 180, 181, 182, 183, 184, 187, 190, 191, 200, 201, 213, 214, 220, 231, 233, 234, 239, 240, 244, 254, 255, 256, 257, 258, 259, 263, 264, 266, 267, 278, 291, 293, 305, 323, 325, 326, 349, 353, 362, 364, 379, 380, 381, 382, 383, 384, 385, 386, 387], "need": [1, 4, 5, 6, 76, 180, 250, 289, 290, 301, 304, 377, 381, 383, 384, 385, 387], "For": [1, 4, 7, 35, 114, 141, 145, 180, 241, 250, 254, 258, 271, 276, 285, 288, 293, 297, 301, 305, 307, 308, 309, 310, 350, 377, 380, 381, 382, 383, 384, 385, 386, 387], "you": [1, 2, 4, 5, 6, 7, 250, 301, 304, 350, 377, 380, 381, 382, 384, 386, 387], "design": [1, 3, 6, 377, 387], "your": [1, 4, 7, 353, 381, 383], "own": [1, 7, 384], "link": [1, 7], "top": [1, 226, 267, 305], "core": [1, 3, 4, 5, 250, 252, 253, 254, 264, 268, 269, 278, 281, 283, 286, 305, 306, 307, 308, 309, 310, 311, 312, 313, 323, 325, 332, 350, 353, 355, 380, 384, 385], "we": [1, 3, 4, 5, 97, 180, 181, 250, 260, 299, 360, 362, 377, 379, 380, 381, 383, 387], "inner": [1, 380], "work": [1, 2, 4, 7, 167, 380, 381, 382, 383], "go": [1, 4, 381], "over": [1, 4, 5, 13, 15, 23, 24, 25, 26, 85, 86, 87, 91, 92, 93, 94, 117, 120, 123, 126, 135, 145, 147, 157, 159, 161, 168, 178, 179, 196, 208, 209, 218, 224, 226, 232, 254, 255, 256, 263, 266, 294, 325, 369, 372, 381], "simpl": [1, 4, 5, 250, 260, 349, 380, 381, 383], "learn": [1, 3, 5, 6, 254, 263, 264, 266, 292, 294, 356, 357, 358, 359, 360, 361, 362, 367, 368], "step": [1, 2, 4, 5, 16, 250, 262, 265, 295, 357, 364, 369, 371, 372, 373, 380], "involv": [1, 355, 380], "ad": [1, 3, 7, 111, 264, 353, 356, 357, 358, 359, 360, 361, 367, 383, 386], "let": [1, 3, 4, 380, 381, 383, 384], "": [1, 3, 4, 5, 43, 47, 58, 83, 96, 97, 116, 117, 119, 120, 122, 123, 125, 126, 131, 145, 148, 161, 176, 180, 183, 195, 198, 199, 216, 231, 232, 234, 238, 250, 253, 262, 265, 269, 275, 276, 278, 282, 283, 284, 288, 295, 355, 364, 365, 377, 380, 381, 383, 384, 385, 386, 387], "sai": [1, 4, 350, 383], "would": [1, 4, 305, 382, 383, 384, 387], "like": [1, 4, 6, 141, 175, 237, 259, 331, 364, 366, 380, 381, 383, 384, 385, 387], "an": [1, 2, 4, 5, 7, 9, 13, 15, 27, 77, 78, 79, 80, 85, 86, 87, 107, 110, 111, 114, 127, 130, 134, 145, 148, 167, 170, 174, 175, 177, 179, 180, 181, 193, 194, 195, 210, 213, 219, 220, 221, 224, 225, 228, 234, 236, 237, 239, 240, 250, 252, 253, 257, 263, 265, 266, 267, 268, 269, 271, 291, 292, 293, 295, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 316, 338, 350, 356, 366, 370, 375, 377, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388], "take": [1, 4, 5, 83, 131, 142, 160, 169, 175, 181, 221, 231, 233, 234, 237, 291, 377, 381, 382, 386, 387, 388], "two": [1, 12, 14, 76, 78, 99, 101, 104, 116, 119, 125, 132, 133, 136, 143, 144, 146, 153, 158, 160, 169, 171, 176, 219, 253, 265, 269, 293, 305, 318, 324, 380, 381, 382, 387], "arrai": [1, 4, 5, 6, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 250, 254, 265, 271, 278, 281, 286, 292, 305, 306, 307, 308, 309, 310, 311, 312, 313, 315, 318, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 347, 350, 353, 356, 357, 358, 359, 360, 361, 362, 367, 368, 369, 370, 371, 372, 373, 380, 381, 383, 384, 385, 387], "x": [1, 3, 4, 5, 35, 105, 111, 112, 134, 145, 181, 184, 195, 200, 204, 229, 230, 235, 240, 250, 252, 253, 254, 261, 263, 264, 266, 267, 268, 269, 270, 271, 292, 294, 296, 301, 303, 305, 314, 315, 316, 317, 318, 319, 320, 321, 322, 335, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 353, 355, 362, 380, 381, 382, 383, 384, 385, 387], "y": [1, 3, 4, 5, 35, 235, 250, 254, 258, 263, 264, 266, 267, 294, 327, 332, 335, 355, 358, 380, 381, 383, 384], "scale": [1, 4, 97, 111, 112, 113, 114, 180, 181, 186, 258, 259, 266, 291, 297, 298, 301, 305, 341, 357], "them": [1, 4, 250, 276, 288, 387], "both": [1, 12, 101, 102, 104, 132, 133, 141, 143, 144, 145, 153, 160, 169, 171, 183, 217, 252, 253, 264, 265, 268, 269, 305, 355, 380, 381, 385, 387], "some": [1, 3, 4, 5, 276, 288, 364, 380, 381, 383], "coeffici": [1, 356, 357, 359, 360, 361, 362], "alpha": [1, 180, 314, 336, 338, 341, 360, 367], "beta": [1, 97, 180, 254, 263, 264, 266, 335, 359, 360, 361, 362], "respect": [1, 3, 5, 111, 112, 131, 180, 231, 240, 250, 254, 261, 263, 264, 266, 353, 381, 385], "togeth": [1, 5, 180, 240], "get": [1, 3, 5, 7, 86, 87, 95, 96, 162, 163, 164, 185, 250, 380, 381, 383, 387], "z": [1, 262, 380, 383], "well": [1, 4, 250, 276, 288, 291, 383], "veri": [1, 4, 291, 383, 387], "easili": 1, "do": [1, 4, 7, 250, 277, 288, 350, 353, 360, 380, 381, 383], "just": [1, 5, 266, 380, 382], "write": [1, 4, 250, 384], "out": [1, 7, 252, 253, 258, 259, 268, 269, 285, 380, 381, 382], "follow": [1, 4, 5, 6, 7, 16, 88, 97, 145, 180, 250, 316, 317, 329, 356, 357, 358, 359, 360, 361, 362, 368, 377, 380, 381, 387], "import": [1, 3, 4, 5, 7, 145, 200, 231, 239, 240, 241, 250, 252, 253, 254, 264, 268, 269, 278, 305, 323, 325, 332, 350, 353, 380, 381, 382, 383, 384, 385], "mx": [1, 3, 4, 5, 35, 127, 141, 145, 146, 148, 200, 231, 250, 252, 253, 254, 264, 268, 269, 271, 278, 282, 296, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 320, 323, 324, 325, 329, 332, 339, 348, 350, 353, 355, 377, 380, 381, 382, 383, 384, 385, 386, 387, 388], "def": [1, 3, 4, 5, 231, 250, 353, 380, 381, 382, 383, 384, 387], "simple_axpbi": 1, "float": [1, 10, 14, 16, 73, 111, 112, 113, 114, 129, 130, 136, 141, 145, 181, 182, 186, 244, 254, 257, 258, 259, 263, 264, 266, 271, 283, 294, 297, 301, 303, 304, 305, 306, 307, 308, 309, 310, 312, 313, 324, 325, 326, 328, 332, 335, 336, 346, 347, 356, 357, 358, 359, 360, 361, 362, 367, 368, 369, 370, 372, 373], "return": [1, 3, 4, 5, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 34, 46, 64, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 163, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 250, 262, 265, 271, 272, 273, 275, 276, 277, 278, 279, 280, 281, 285, 286, 288, 289, 290, 293, 295, 306, 307, 308, 309, 310, 311, 312, 313, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 350, 353, 363, 379, 380, 381, 382, 383, 384, 386, 387], "thi": [1, 4, 5, 7, 13, 14, 15, 16, 23, 24, 25, 26, 103, 136, 142, 145, 146, 153, 157, 158, 159, 161, 162, 168, 178, 179, 183, 203, 208, 209, 210, 218, 220, 226, 232, 250, 257, 258, 259, 262, 265, 272, 273, 275, 276, 279, 280, 281, 286, 288, 289, 290, 291, 293, 295, 303, 307, 308, 309, 310, 316, 317, 318, 331, 347, 353, 364, 379, 380, 381, 383, 384, 386], "perform": [1, 2, 4, 6, 87, 91, 92, 93, 94, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 158, 181, 195, 208, 220, 250, 263, 304, 309, 310, 380, 382, 383, 387], "leav": [1, 107, 240], "differenti": [1, 6], "howev": [1, 250, 261, 263, 364, 377, 380, 383, 384], "vector": [1, 3, 6, 135, 142, 145, 220, 233, 234, 260, 325, 385], "math": [1, 4, 336, 380], "often": [1, 259], "realiz": 1, "axpbi": 1, "routin": 1, "defin": [1, 3, 4, 5, 7, 145, 181, 239, 384], "same": [1, 4, 7, 14, 35, 76, 80, 83, 86, 87, 88, 111, 112, 121, 124, 125, 126, 131, 136, 142, 177, 183, 195, 233, 235, 250, 253, 254, 257, 263, 264, 269, 293, 306, 307, 308, 309, 310, 311, 312, 313, 325, 336, 353, 363, 377, 380, 382, 387], "realli": [1, 266], "part": [1, 381, 382], "doe": [1, 4, 7, 162, 250, 380, 382, 383, 384], "fast": [1, 6, 261, 317, 387], "so": [1, 4, 7, 131, 231, 257, 305, 355, 380, 383, 387], "decid": [1, 240, 275], "want": [1, 4, 381, 387], "reli": 1, "acceler": [1, 254], "framework": [1, 6], "continu": [1, 381], "impos": 1, "our": [1, 4, 5, 299, 356, 357, 358, 359, 361, 362], "assumpt": 1, "also": [1, 4, 5, 6, 7, 10, 12, 100, 101, 102, 104, 117, 120, 123, 126, 132, 133, 143, 144, 153, 160, 169, 171, 180, 217, 238, 250, 275, 289, 291, 293, 300, 315, 341, 343, 349, 355, 380, 381, 382, 383, 384, 385, 388], "assum": [1, 4, 146, 240, 250, 252, 253, 263, 268, 269], "how": [1, 4, 5, 250, 252, 253, 255, 256, 260, 268, 269, 305, 363, 380, 382, 387], "gradient": [1, 3, 5, 131, 215, 231, 238, 250, 276, 289, 293, 304, 331, 353, 355, 356, 357, 359, 360, 361, 362, 363, 366, 368, 380, 381, 382, 383, 384, 385], "ins": 1, "what": [1, 4, 240], "coincid": 1, "right": [1, 7, 180, 252, 253, 261, 268, 269, 305, 316, 317, 326, 328, 336], "place": [1, 4, 35, 195, 383, 384], "cours": [1, 381], "The": [1, 2, 4, 5, 6, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 34, 43, 47, 57, 58, 64, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 163, 164, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, 198, 199, 204, 205, 206, 207, 208, 209, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 244, 252, 253, 254, 255, 256, 257, 258, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 276, 278, 282, 283, 284, 285, 288, 289, 290, 291, 293, 294, 295, 297, 299, 301, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 318, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 347, 350, 353, 355, 356, 357, 358, 359, 360, 361, 362, 365, 367, 368, 369, 372, 375, 380, 381, 382, 383, 384, 385, 386, 387, 388], "structur": [1, 363, 381], "from": [1, 4, 5, 6, 97, 99, 122, 123, 125, 126, 130, 145, 148, 158, 164, 166, 175, 180, 182, 183, 184, 185, 187, 190, 200, 213, 215, 217, 220, 221, 226, 235, 237, 239, 240, 241, 250, 267, 276, 278, 291, 307, 308, 309, 310, 312, 313, 326, 335, 350, 379, 380, 381, 383, 384, 385, 386, 387], "frontend": 1, "api": [1, 381], "redirect": 1, "when": [1, 4, 6, 7, 83, 87, 145, 148, 255, 256, 305, 309, 310, 329, 335, 353, 371, 377, 380, 387], "appropri": [1, 380], "fallback": 1, "metal": [1, 6], "vjp": [1, 385], "jvp": [1, 385], "In": [1, 4, 5, 35, 158, 180, 240, 250, 258, 263, 353, 356, 358, 359, 361, 362, 363, 379, 380, 381, 383, 386, 387], "one": [1, 4, 7, 35, 73, 77, 82, 86, 87, 109, 110, 111, 112, 145, 151, 158, 181, 183, 213, 217, 244, 288, 305, 325, 387], "sentenc": 1, "comput": [1, 3, 4, 5, 6, 7, 91, 92, 93, 94, 97, 113, 131, 142, 145, 153, 161, 176, 180, 208, 215, 224, 231, 232, 233, 238, 250, 254, 262, 263, 264, 265, 266, 276, 289, 293, 294, 297, 304, 307, 308, 309, 310, 316, 317, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 355, 356, 357, 359, 360, 361, 362, 366, 380, 381, 385, 387], "graph": [1, 4, 5, 6, 381], "rule": 1, "evalu": [1, 4, 5, 6, 107, 142, 233, 250, 274, 285, 353, 355, 380, 385], "said": [1, 4], "start": [1, 3, 4, 6, 7, 16, 113, 147, 210, 380, 382, 387], "discuss": 1, "more": [1, 2, 5, 9, 73, 99, 158, 166, 167, 198, 199, 244, 250, 254, 258, 297, 301, 304, 305, 307, 308, 309, 310, 377, 380, 381, 382, 385, 387], "detail": [1, 9, 166, 250, 258, 297, 301, 305, 307, 308, 309, 310, 356, 358, 359, 361, 362, 382, 385], "thei": [1, 3, 4, 14, 88, 136, 299, 327, 353, 362, 379, 380, 383, 385, 386, 387], "c": [1, 2, 4, 145, 252, 253, 254, 255, 256, 258, 259, 264, 265, 268, 269, 384, 385, 387], "scalar": [1, 12, 14, 27, 46, 73, 76, 80, 82, 101, 102, 104, 129, 130, 131, 132, 133, 136, 143, 144, 145, 147, 153, 154, 155, 156, 158, 160, 169, 171, 177, 182, 187, 190, 191, 198, 217, 231, 235, 238, 336, 381, 383, 385], "i": [1, 2, 4, 5, 6, 7, 14, 16, 25, 34, 73, 82, 85, 86, 87, 88, 91, 92, 93, 94, 98, 99, 102, 107, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 129, 130, 136, 141, 142, 145, 146, 148, 153, 157, 158, 164, 165, 167, 177, 178, 180, 181, 182, 183, 186, 189, 190, 191, 194, 197, 198, 199, 204, 208, 210, 215, 220, 221, 224, 227, 231, 232, 233, 234, 235, 239, 240, 244, 250, 252, 253, 254, 255, 256, 257, 258, 259, 261, 262, 263, 264, 265, 266, 267, 268, 269, 275, 276, 282, 284, 285, 287, 288, 290, 291, 292, 293, 294, 295, 297, 301, 303, 304, 305, 309, 310, 315, 316, 317, 323, 324, 326, 331, 332, 335, 336, 338, 343, 347, 353, 357, 360, 362, 363, 364, 369, 371, 372, 377, 380, 381, 382, 383, 384, 385, 386, 387, 388], "sum": [1, 3, 12, 94, 135, 145, 157, 208, 224, 250, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 382, 384], "element": [1, 11, 12, 17, 18, 19, 20, 21, 22, 25, 66, 81, 89, 90, 91, 92, 93, 94, 97, 101, 102, 104, 105, 106, 108, 110, 128, 129, 132, 133, 136, 137, 138, 139, 140, 143, 144, 149, 150, 151, 152, 153, 154, 155, 156, 160, 169, 171, 172, 178, 180, 181, 192, 193, 196, 204, 205, 206, 207, 211, 212, 217, 220, 222, 223, 226, 231, 235, 257, 258, 259, 262, 265, 270, 292, 295, 297, 319, 321, 322, 337, 338, 340, 343, 344, 345, 380, 381], "wise": [1, 11, 12, 17, 18, 19, 20, 21, 22, 81, 89, 90, 101, 102, 104, 105, 106, 108, 128, 129, 132, 133, 136, 143, 144, 149, 150, 151, 152, 153, 154, 155, 156, 160, 169, 171, 172, 192, 196, 204, 205, 206, 207, 211, 212, 217, 222, 223, 258, 259, 270, 292, 319, 321, 322, 337, 338, 340, 343, 344, 345, 380], "numpi": [1, 4, 5, 6, 12, 14, 16, 80, 101, 102, 104, 132, 133, 136, 143, 144, 153, 158, 160, 169, 171, 217, 383, 385, 386], "style": [1, 12, 14, 101, 102, 104, 132, 133, 136, 143, 144, 153, 158, 160, 169, 171, 217], "broadcast": [1, 12, 14, 80, 82, 101, 102, 104, 130, 132, 133, 136, 143, 144, 153, 158, 160, 169, 171, 182, 183, 190, 191, 217, 221, 235, 291], "between": [1, 6, 82, 127, 304, 324, 327, 328, 331, 371, 383, 387], "input": [1, 3, 4, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 98, 99, 101, 102, 104, 105, 106, 108, 109, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 131, 132, 133, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 168, 169, 170, 171, 172, 175, 176, 177, 178, 179, 180, 181, 189, 192, 193, 194, 195, 196, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 229, 230, 231, 232, 234, 235, 237, 252, 253, 254, 255, 256, 258, 259, 260, 262, 263, 264, 265, 266, 267, 268, 269, 291, 293, 294, 295, 297, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 318, 323, 324, 326, 327, 328, 329, 331, 332, 334, 336, 347, 350, 380, 381, 382, 385, 386], "upcast": 1, "const": [1, 326], "factor": [1, 146, 305, 325, 370, 373], "streamordevic": 1, "stream": [1, 6, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 140, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 232, 235, 236, 237, 387], "schedul": [1, 167, 355, 369, 370, 371, 372, 373, 375, 387], "itself": [1, 364], "call": [1, 4, 5, 28, 129, 250, 260, 276, 288, 299, 353, 355, 364, 380, 381, 383], "other": [1, 4, 6, 141, 145, 250, 277, 353, 362, 380, 382, 383, 385], "within": [1, 2, 25, 136], "simplest": [1, 250], "wai": [1, 4, 7, 250, 305, 380, 381, 382], "about": [1, 4, 5, 383, 387], "term": [1, 326, 356, 357, 358, 359, 360, 361, 367], "exist": [1, 4, 276, 288], "auto": [1, 2, 7], "ax": [1, 13, 15, 23, 24, 74, 109, 116, 117, 119, 120, 122, 123, 125, 126, 127, 135, 145, 157, 159, 161, 168, 177, 179, 208, 213, 218, 219, 224, 227, 232, 381], "multipli": [1, 35, 180, 181, 257, 301, 305], "earlier": 1, "goal": 1, "themselv": [1, 380], "contain": [1, 4, 25, 26, 64, 83, 99, 121, 122, 123, 145, 154, 155, 156, 180, 210, 235, 250, 275, 277, 278, 284, 304, 332, 350, 353, 380, 381], "act": [1, 331], "data": [1, 5, 6, 9, 16, 110, 124, 125, 130, 134, 147, 174, 190, 228, 236, 259, 306, 307, 308, 309, 310, 311, 312, 313, 380, 382, 384], "nor": [1, 131, 231], "rather": [1, 381, 387], "easi": [1, 250], "interfac": 1, "block": [1, 4, 304], "A": [1, 4, 6, 7, 8, 64, 76, 83, 111, 112, 114, 131, 142, 145, 146, 148, 157, 158, 159, 168, 180, 182, 183, 184, 186, 187, 190, 191, 210, 214, 216, 231, 233, 234, 238, 239, 240, 241, 242, 250, 254, 258, 262, 263, 264, 266, 275, 279, 280, 283, 289, 290, 294, 299, 301, 304, 307, 308, 310, 317, 336, 337, 353, 355, 359, 361, 363, 364, 366, 371, 380, 381, 383, 384], "It": [1, 4, 7, 131, 203, 231, 250, 290, 293, 363, 375, 384, 386], "creat": [1, 4, 7, 110, 134, 216, 250, 353, 355, 371, 380, 382, 384], "output": [1, 4, 7, 13, 14, 15, 16, 25, 80, 83, 91, 92, 93, 94, 110, 111, 112, 113, 114, 121, 124, 125, 126, 130, 131, 134, 136, 145, 147, 157, 159, 161, 168, 174, 175, 178, 179, 182, 183, 184, 186, 187, 190, 191, 200, 201, 208, 213, 218, 221, 228, 231, 232, 233, 234, 235, 236, 237, 252, 253, 254, 255, 256, 264, 267, 268, 269, 291, 293, 303, 304, 305, 307, 308, 309, 310, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 347, 350, 380, 381, 382, 383, 384, 385, 386, 387], "given": [1, 13, 15, 25, 35, 80, 82, 84, 91, 92, 93, 94, 97, 99, 107, 109, 115, 116, 117, 118, 119, 120, 124, 125, 126, 130, 145, 157, 159, 161, 166, 168, 173, 179, 187, 195, 203, 208, 210, 218, 225, 226, 228, 229, 230, 232, 242, 252, 253, 257, 268, 269, 275, 291, 324, 326, 332], "set": [1, 4, 5, 7, 83, 100, 103, 111, 113, 166, 167, 202, 203, 216, 261, 266, 267, 274, 276, 283, 284, 285, 288, 289, 293, 297, 303, 324, 336, 347, 353, 357, 364, 377, 381, 383], "further": [1, 7, 381], "class": [1, 4, 5, 8, 9, 10, 27, 242, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 325, 353, 356, 357, 358, 359, 360, 361, 362, 367, 368, 375], "under": [1, 145], "These": [1, 83, 221, 325, 387], "word": 1, "bit": [1, 97, 180, 181, 244, 271, 293, 294], "abstract": 1, "back": [1, 4, 165, 384], "give": [1, 4, 5, 25, 380], "ourselv": 1, "concret": [1, 262, 265, 267, 295, 383, 387], "imag": [1, 256, 258, 259, 305], "public": [1, 250], "explicit": [1, 364, 377, 384], "alpha_": 1, "beta_": 1, "must": [1, 7, 82, 130, 145, 182, 183, 187, 190, 191, 235, 305, 384], "know": [1, 4], "popul": 1, "To": [1, 3, 4, 5, 7, 166, 250, 350, 380, 381, 385], "avoid": [1, 283, 380], "unnecessari": [1, 4], "alloc": [1, 163, 166, 167, 353], "respons": 1, "space": [1, 147, 334], "void": 1, "eval_cpu": 1, "std": [1, 312], "overrid": [1, 103], "eval_gpu": 1, "jacobian": [1, 142, 233, 385], "product": [1, 93, 135, 142, 158, 176, 179, 224, 233, 291, 385], "primal": [1, 142, 233], "tangent": [1, 21, 22, 142, 222, 223, 348], "int": [1, 2, 4, 5, 8, 13, 15, 16, 23, 24, 25, 26, 30, 31, 32, 33, 37, 38, 39, 40, 41, 42, 45, 52, 53, 54, 55, 56, 59, 62, 64, 67, 70, 71, 72, 73, 75, 80, 84, 85, 86, 87, 91, 92, 93, 94, 97, 98, 99, 109, 110, 113, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 130, 131, 134, 141, 145, 147, 157, 159, 161, 162, 163, 164, 166, 167, 168, 170, 174, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 193, 194, 195, 208, 209, 210, 213, 214, 218, 219, 220, 221, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 236, 242, 250, 252, 253, 254, 255, 256, 260, 262, 263, 264, 265, 266, 267, 268, 269, 291, 293, 294, 295, 297, 301, 304, 318, 324, 325, 329, 334, 336, 353, 369, 371, 372, 373], "argnum": [1, 131, 231, 381], "cotan": 1, "across": [1, 263], "pair": [1, 177, 278, 297], "repres": [1, 4, 332, 336, 384], "axi": [1, 4, 5, 13, 15, 23, 24, 25, 26, 30, 31, 32, 33, 37, 38, 39, 40, 52, 53, 54, 55, 59, 67, 70, 71, 75, 84, 91, 92, 93, 94, 99, 109, 111, 112, 115, 118, 121, 122, 123, 124, 125, 126, 127, 145, 157, 159, 161, 168, 170, 177, 178, 179, 183, 193, 208, 209, 210, 213, 214, 218, 219, 220, 221, 225, 226, 227, 232, 234, 252, 253, 268, 269, 295, 318, 322, 324, 325, 329, 334, 336, 344, 382], "correspond": [1, 13, 15, 73, 82, 97, 99, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 157, 159, 168, 179, 218, 224, 234, 240, 381], "dimens": [1, 4, 13, 15, 23, 24, 58, 64, 73, 77, 78, 79, 83, 86, 87, 99, 109, 113, 122, 123, 125, 126, 127, 135, 145, 146, 157, 158, 159, 161, 168, 179, 180, 183, 189, 218, 221, 224, 227, 232, 254, 255, 256, 258, 259, 262, 263, 264, 265, 266, 291, 294, 295, 297, 304, 305, 318, 325, 380, 381], "vmap": [1, 381, 383, 385], "print": [1, 3, 4, 5, 7, 239, 240, 241, 250, 377, 380, 381, 382, 383, 384, 385], "ostream": 1, "o": [1, 7, 114, 265], "equival": [1, 28, 61, 74, 102, 129, 220, 261, 290, 292, 293, 296, 298, 300, 302], "check": [1, 7, 76, 141, 165, 278, 381, 382], "bool": [1, 13, 14, 15, 23, 24, 30, 31, 32, 33, 37, 38, 39, 40, 52, 53, 54, 55, 59, 71, 73, 75, 76, 83, 87, 91, 92, 93, 94, 113, 136, 141, 145, 148, 157, 159, 161, 165, 167, 168, 179, 181, 218, 232, 254, 255, 256, 262, 263, 264, 265, 266, 267, 271, 275, 276, 278, 283, 285, 288, 291, 293, 295, 297, 301, 304, 305, 323, 326, 357, 368], "is_equival": 1, "privat": 1, "fall": 1, "eval": [1, 2, 3, 4, 5, 250, 353, 355, 380, 381, 383, 385], "deriv": [1, 381, 383], "base": [1, 113, 145, 150, 152, 297, 304, 353, 355, 361, 375, 377, 380, 382], "abov": [1, 4, 180, 229, 250, 305, 360, 381, 382, 383, 387], "demonstr": [1, 384], "treat": [1, 122, 123, 125, 126, 220, 305, 380], "paramet": [1, 3, 4, 5, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 34, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 101, 102, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 271, 272, 275, 276, 278, 283, 284, 285, 288, 289, 290, 291, 292, 293, 294, 295, 297, 299, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 318, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 347, 349, 350, 353, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 366, 367, 368, 369, 370, 371, 372, 373, 375, 380, 381, 383], "produc": [1, 83, 291, 350], "through": [1, 215, 304, 362, 380, 381, 384], "construct": [1, 5, 41, 98, 130, 174, 225, 236], "its": [1, 7, 158, 178, 189, 228, 238, 241, 250, 293, 359, 360, 361, 384, 387], "type": [1, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 34, 64, 73, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 166, 167, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 239, 250, 283, 304, 306, 307, 308, 309, 310, 311, 312, 313, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 380, 382], "shape": [1, 4, 5, 61, 76, 80, 83, 85, 86, 87, 99, 114, 115, 118, 121, 124, 125, 126, 130, 142, 158, 174, 175, 182, 183, 184, 186, 187, 190, 191, 194, 221, 233, 235, 236, 237, 250, 252, 253, 254, 255, 256, 258, 259, 262, 264, 265, 267, 268, 269, 278, 295, 306, 307, 308, 309, 310, 311, 312, 313, 325, 336, 355, 380, 381, 382, 385, 387], "pass": [1, 4, 5, 61, 74, 176, 177, 231, 238, 239, 240, 250, 276, 288, 289, 290, 293, 299, 380, 383], "re": [1, 5, 7, 350], "now": [1, 4, 7, 293, 380, 384], "promot": 1, "dtype": [1, 4, 10, 16, 27, 34, 35, 73, 110, 127, 130, 134, 141, 145, 146, 147, 174, 184, 186, 187, 190, 191, 228, 236, 244, 283, 305, 306, 307, 308, 309, 310, 311, 312, 313, 323, 325, 332, 369, 370, 371, 372, 373, 380, 381, 382, 384, 385, 386], "promoted_dtyp": 1, "promote_typ": 1, "float32": [1, 2, 10, 16, 110, 114, 134, 141, 145, 146, 147, 174, 184, 186, 190, 191, 228, 236, 244, 305, 306, 307, 308, 309, 310, 311, 312, 313, 323, 325, 332, 369, 370, 371, 372, 373, 380, 381, 382, 383, 384, 385, 386], "non": [1, 7, 286, 295, 337, 353], "point": [1, 3, 4, 7, 129, 181, 244], "out_dtyp": 1, "is_floating_point": 1, "cast": [1, 34, 124, 125, 126, 148, 271, 283, 384], "up": [1, 4, 293, 380], "determin": [1, 99, 244, 282, 386], "x_cast": 1, "astyp": [1, 4, 271, 384], "y_cast": 1, "broadcasted_input": 1, "broadcast_arrai": 1, "out_shap": 1, "0": [1, 3, 4, 5, 7, 8, 16, 35, 41, 42, 45, 62, 67, 75, 84, 85, 86, 87, 98, 99, 110, 114, 127, 131, 145, 146, 166, 177, 182, 186, 191, 193, 195, 210, 214, 228, 229, 230, 231, 232, 234, 239, 250, 252, 253, 254, 255, 256, 257, 258, 259, 261, 263, 264, 266, 268, 269, 292, 296, 297, 301, 302, 303, 304, 306, 307, 308, 309, 310, 311, 312, 313, 314, 316, 317, 319, 320, 323, 325, 327, 328, 332, 335, 336, 338, 339, 340, 341, 346, 347, 350, 353, 356, 357, 359, 360, 361, 362, 364, 367, 368, 369, 370, 371, 372, 373, 377, 380, 381, 382, 383, 384, 385, 386], "unique_ptr": 1, "make_shar": 1, "to_stream": 1, "handl": [1, 250, 380], "resolv": 1, "No": [1, 4], "happen": [1, 4, 111, 304, 355, 380, 383], "alon": [1, 384], "effect": [1, 258, 380, 383], "onli": [1, 4, 6, 7, 76, 85, 86, 87, 145, 180, 250, 275, 276, 278, 283, 285, 288, 289, 290, 353, 380, 381, 386, 387], "execut": [1, 7, 77, 78, 79, 164, 384, 387], "depend": [1, 2, 3, 73, 145, 262, 265, 295, 382, 386, 387], "devic": [1, 6, 7, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 104, 105, 106, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 132, 133, 134, 135, 136, 137, 138, 139, 140, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 187, 189, 190, 191, 192, 193, 194, 195, 196, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 232, 235, 236, 237, 242, 387, 388], "specifi": [1, 16, 34, 86, 87, 99, 122, 123, 130, 131, 145, 147, 170, 174, 183, 193, 219, 220, 221, 224, 227, 231, 234, 236, 254, 303, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 347, 381, 387], "memori": [1, 6, 162, 163, 164, 166, 167, 304, 353, 357, 380, 383, 384], "ha": [1, 2, 4, 5, 6, 73, 83, 99, 121, 122, 124, 125, 126, 131, 163, 183, 254, 262, 265, 267, 295, 353, 355, 380, 382, 383, 385, 387], "been": [1, 4, 163, 383], "try": [1, 7], "naiv": [1, 381], "gener": [1, 2, 3, 10, 16, 87, 110, 122, 123, 147, 182, 186, 187, 190, 191, 304, 377, 380, 382, 383, 388], "version": [1, 7, 97, 153, 157, 180, 208, 234, 377, 381, 382], "declar": 1, "member": [1, 250, 281, 286], "method": [1, 4, 8, 9, 10, 27, 242, 250, 282, 353, 356, 357, 358, 359, 360, 361, 362, 364, 367, 368, 375], "each": [1, 64, 97, 107, 113, 141, 158, 177, 180, 181, 183, 193, 200, 201, 210, 225, 227, 234, 235, 258, 259, 260, 262, 263, 265, 295, 297, 304, 323, 325, 377, 380, 383], "find": [1, 3, 7], "pointwis": 1, "captur": [1, 2, 83, 250, 380], "templat": 1, "axpby_impl": 1, "typenam": 1, "t": [1, 4, 105, 114, 181, 231, 250, 252, 262, 265, 268, 295, 356, 357, 358, 359, 360, 361, 362, 367, 368, 380, 381, 387], "readi": 1, "fill": [1, 130, 175, 228, 237, 306, 307, 308, 309, 310, 312, 313], "malloc_or_wait": 1, "synchron": [1, 380], "avail": [1, 3, 4, 5, 7, 9, 165, 387], "There": [1, 250, 305, 380], "wait": [1, 4, 167], "here": [1, 4, 380, 381, 383, 386, 387], "request": 1, "pressur": 1, "condit": [1, 235, 387], "set_data": 1, "nbyte": 1, "collect": [1, 240, 379], "pointer": 1, "x_ptr": 1, "y_ptr": 1, "out_ptr": 1, "relev": 1, "static_cast": 1, "size_t": 1, "out_idx": 1, "size": [1, 4, 5, 47, 64, 86, 97, 109, 111, 112, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 130, 134, 141, 145, 163, 167, 180, 181, 183, 194, 210, 213, 250, 252, 253, 255, 256, 260, 264, 268, 269, 293, 305, 357, 383, 384], "map": [1, 5, 35, 148, 240, 260, 271], "linear": [1, 4, 5, 6, 240, 250, 261, 278, 293, 295, 296, 298, 300, 305, 314, 315, 316, 317, 318, 320, 339, 340, 341, 343, 350, 353, 364, 372, 380], "indic": [1, 14, 23, 24, 25, 26, 35, 131, 136, 137, 138, 139, 140, 210, 220, 221, 231, 285, 287, 325, 332, 371, 382], "offset": [1, 4, 42, 99, 111, 113], "x_offset": 1, "elem_to_loc": 1, "stride": [1, 85, 86, 87, 252, 253, 255, 256, 268, 269, 297, 382], "y_offset": 1, "contigu": 1, "regularli": 1, "default": [1, 7, 13, 14, 15, 16, 23, 24, 25, 26, 76, 83, 84, 85, 86, 87, 95, 96, 97, 98, 99, 110, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 131, 134, 136, 145, 146, 147, 148, 157, 159, 161, 166, 167, 168, 174, 178, 179, 180, 181, 182, 183, 184, 186, 187, 189, 190, 191, 193, 194, 195, 202, 203, 209, 210, 213, 214, 216, 218, 224, 226, 227, 228, 229, 230, 231, 232, 234, 236, 244, 252, 253, 254, 255, 256, 262, 264, 265, 267, 268, 269, 271, 276, 278, 283, 285, 288, 291, 292, 293, 295, 297, 301, 302, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 318, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 353, 356, 357, 358, 359, 360, 361, 362, 367, 368, 369, 377, 379, 380, 381, 384, 386, 388], "row": [1, 110, 134, 180, 228], "major": 1, "henc": [1, 180, 380], "doesn": [1, 250], "addit": [1, 4, 12, 111, 112, 114, 148, 254, 263, 266, 291, 294, 353, 381], "abl": [1, 180], "all": [1, 2, 5, 7, 14, 25, 35, 77, 78, 79, 83, 86, 87, 110, 117, 120, 123, 126, 158, 177, 178, 213, 250, 271, 272, 276, 279, 280, 281, 286, 288, 291, 293, 301, 304, 305, 350, 353, 375, 377, 380, 382, 383, 385, 388], "incom": 1, "accordingli": 1, "dispatch": 1, "float16": [1, 10, 148, 244, 271, 383, 384], "bfloat16": [1, 10, 244, 384], "complex64": [1, 244], "throw": [1, 83], "error": [1, 7, 105, 106, 167, 210, 261, 293, 315, 316, 317, 331, 333, 381, 384], "encount": [1, 381], "unexpect": [1, 16], "regist": [1, 5], "op": [1, 176, 276, 383], "assert": 1, "2": [1, 3, 4, 5, 35, 86, 98, 99, 105, 116, 119, 121, 122, 123, 124, 125, 126, 127, 141, 145, 146, 152, 158, 180, 189, 224, 228, 229, 230, 244, 250, 252, 253, 256, 261, 268, 269, 294, 301, 305, 306, 307, 308, 309, 310, 311, 312, 313, 316, 325, 326, 328, 335, 336, 350, 353, 356, 358, 359, 360, 364, 367, 380, 381, 382, 383, 384, 385, 386, 387], "1": [1, 2, 4, 5, 16, 25, 26, 35, 42, 45, 85, 86, 87, 98, 99, 114, 115, 116, 118, 119, 121, 122, 123, 124, 125, 126, 127, 135, 141, 145, 146, 158, 167, 176, 178, 180, 183, 186, 191, 204, 209, 220, 226, 231, 244, 250, 252, 253, 254, 255, 256, 257, 258, 259, 261, 262, 263, 264, 265, 266, 267, 268, 269, 292, 294, 295, 297, 301, 303, 305, 307, 308, 309, 310, 311, 312, 313, 314, 316, 317, 318, 321, 322, 323, 324, 325, 326, 327, 328, 329, 331, 332, 334, 335, 336, 341, 342, 344, 345, 347, 350, 353, 355, 356, 357, 358, 359, 360, 361, 362, 364, 367, 368, 369, 370, 371, 372, 373, 380, 381, 382, 384, 385, 386, 387], "correct": [1, 7, 359, 360, 361, 382, 383], "els": [1, 4, 250, 276, 383], "float16_t": 1, "bfloat16_t": 1, "complex64_t": 1, "runtime_error": 1, "support": [1, 4, 6, 7, 14, 85, 86, 87, 114, 127, 136, 146, 148, 158, 180, 381, 382, 384, 386], "have": [1, 4, 7, 14, 76, 77, 78, 79, 122, 123, 125, 126, 136, 158, 183, 239, 265, 291, 299, 362, 364, 379, 380, 382, 383, 387], "rememb": 1, "3": [1, 4, 7, 127, 141, 145, 146, 305, 308, 310, 319, 357, 362, 377, 380, 382, 384, 385], "complic": 1, "keep": [1, 13, 15, 23, 24, 157, 159, 161, 168, 179, 218, 232, 250, 275, 381, 383], "mind": [1, 4], "half": [1, 16, 187, 191, 297, 383], "precis": [1, 4, 114, 250, 261, 294, 363, 380], "direct": [1, 4, 273, 362, 387], "fix": [1, 4, 7, 383], "possibli": [1, 4, 158], "due": 1, "transpos": [1, 4, 28, 181], "aren": 1, "guarante": 1, "fit": [1, 180, 387], "requir": [1, 4, 250, 383, 384], "column": [1, 110, 134, 180], "inplac": 1, "expect": [1, 4, 255, 256, 257, 258, 259, 301, 304, 326, 380, 382], "answer": 1, "copi": [1, 4, 6, 178, 209, 384], "simpli": [1, 4, 7, 296, 314, 320, 339, 348, 353, 380, 381], "catlas_saxpbi": 1, "axpby_impl_acceler": 1, "first": [1, 2, 3, 4, 5, 7, 99, 127, 131, 154, 156, 158, 178, 189, 219, 224, 231, 239, 250, 253, 263, 269, 305, 324, 332, 357, 359, 360, 361, 364, 380, 381, 384, 387], "mode": [1, 88, 274, 285, 287, 305, 309, 310], "e": [1, 5, 7, 105, 142, 204, 254, 255, 256, 258, 259, 263, 264, 266, 276, 294, 321, 322, 344, 349, 355, 358, 380, 383, 388], "match": [1, 7, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 162, 278, 305, 325, 382, 384], "transposit": 1, "data_s": 1, "items": 1, "flag": [1, 380, 384], "copy_inplac": 1, "copytyp": 1, "n": [1, 4, 27, 85, 86, 87, 110, 115, 117, 118, 120, 121, 124, 126, 134, 228, 232, 252, 253, 254, 255, 256, 258, 259, 262, 265, 268, 269, 295, 305, 331, 336], "incx": 1, "inci": 1, "great": [1, 2], "But": [1, 387], "criteria": 1, "luckili": [1, 383], "alwai": [1, 162, 239, 381], "With": 1, "final": [1, 3, 4, 5, 372], "singl": [1, 5, 107, 142, 148, 177, 233, 253, 269, 380, 382, 386], "row_contigu": 1, "col_contigu": 1, "common": [1, 355, 380, 383], "hit": 1, "mileston": 1, "enough": [1, 383], "run": [1, 2, 4, 5, 6, 7, 8, 176, 242, 254, 271, 356, 357, 359, 360, 361, 380, 383, 387, 388], "If": [1, 4, 7, 13, 14, 15, 16, 23, 24, 25, 26, 73, 76, 82, 84, 88, 91, 92, 93, 94, 98, 99, 107, 111, 113, 124, 125, 126, 129, 130, 131, 136, 145, 148, 157, 158, 159, 161, 166, 167, 168, 174, 177, 178, 179, 183, 193, 208, 209, 210, 218, 220, 221, 224, 226, 231, 232, 234, 236, 240, 254, 255, 256, 263, 266, 267, 276, 278, 288, 293, 295, 297, 299, 301, 305, 323, 325, 336, 357, 380, 381, 383, 386, 387, 388], "plan": [1, 380], "stop": [1, 4, 16, 147, 215, 381, 382], "enjoi": 1, "speed": 1, "appl": [1, 4, 6, 7, 387], "silicon": [1, 4, 6, 7, 387], "address": 1, "shade": 1, "languag": 1, "kernel": [1, 85, 86, 87, 252, 253, 268, 269, 380, 382], "written": 1, "help": [1, 4, 380, 387], "resourc": 1, "walkthrough": 1, "pipelin": 1, "specif": [1, 7, 381], "cpp": 1, "algorithm": [1, 305, 362], "launch": [1, 382], "exactli": [1, 4, 278, 381], "mani": [1, 210, 255, 256, 260, 380, 383], "thread": 1, "pick": 1, "updat": [1, 3, 4, 5, 35, 83, 240, 254, 271, 272, 278, 283, 284, 285, 290, 355, 357, 360, 362, 363, 364, 368, 369, 370, 371, 372, 373, 380, 383], "assign": [1, 35, 353], "axpby_gener": 1, "buffer": [1, 162, 384], "constant": [1, 4, 7, 111, 112, 177, 250, 254, 263, 266, 294, 326, 336, 367, 369, 380, 384], "4": [1, 4, 97, 127, 145, 180, 181, 200, 244, 252, 253, 254, 264, 268, 269, 293, 304, 305, 307, 308, 309, 323, 380, 382, 385, 387], "5": [1, 3, 4, 7, 145, 167, 182, 252, 254, 257, 258, 259, 264, 268, 302, 305, 306, 309, 310, 335, 346, 350, 367, 369, 370, 380, 381, 382], "x_stride": 1, "6": [1, 4, 145, 200, 304, 308, 316, 317, 319, 326, 336, 340, 367, 380, 382, 385], "y_stride": 1, "7": [1, 4, 145, 180, 382], "ndim": [1, 127, 145, 305], "8": [1, 4, 7, 145, 180, 244, 253, 264, 269, 304, 324, 356, 357, 358, 359, 360, 361, 367, 380, 382, 385, 387], "uint": 1, "index": [1, 6, 8, 25, 35, 109, 110, 131, 178, 220, 221, 231, 242], "thread_position_in_grid": 1, "convert": [1, 73, 77, 78, 79, 127, 293, 383, 384, 385], "instanti": [1, 5, 383], "uniqu": [1, 377], "host": 1, "name": [1, 148, 180, 181, 198, 199, 200, 201, 250, 263, 275, 278, 280, 382, 386], "identifi": [1, 239, 379], "instantiate_axpbi": 1, "type_nam": 1, "host_nam": 1, "axpby_general_": 1, "compil": [1, 2, 6, 7, 100, 103, 381, 383], "mlx_ext": 1, "metallib": [1, 7], "see": [1, 4, 5, 7, 9, 10, 29, 30, 31, 32, 33, 36, 37, 38, 39, 40, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 74, 75, 145, 166, 198, 199, 244, 250, 254, 258, 261, 274, 292, 293, 296, 297, 298, 300, 301, 302, 305, 307, 308, 309, 310, 315, 316, 317, 341, 380, 381, 382, 385, 387], "later": [1, 2, 7], "co": [1, 301, 381], "locat": [1, 289, 290, 387], "share": [1, 6, 97, 180, 181], "register_librari": 1, "potenti": [1, 167], "path": [1, 2, 7, 200, 201, 278], "tri": 1, "load": [1, 5, 6, 278], "hasn": 1, "alreadi": [1, 4], "static": [1, 7], "object": [1, 2, 9, 27, 46, 73, 83, 141, 200, 234, 239, 240, 244, 258, 304, 379], "why": [1, 4], "packag": [1, 3, 5, 350], "process": [1, 4, 87, 88, 240, 259, 260, 304, 379], "logic": [1, 154, 155, 156], "grid": 1, "shown": 1, "below": [1, 7, 145, 228, 230, 244, 305, 383], "prepar": [1, 4], "carri": 1, "should": [1, 3, 4, 5, 7, 99, 111, 112, 114, 142, 180, 221, 231, 233, 239, 250, 255, 256, 258, 259, 285, 291, 299, 325, 327, 332, 353, 379, 380, 381, 383, 384, 388], "d": [1, 4, 98, 99, 135, 145, 158, 176, 220, 228, 229, 230, 241, 259, 262, 265, 295, 356, 359, 361, 387], "ostringstream": 1, "kname": 1, "axpby_": 1, "general_": 1, "type_to_nam": 1, "make": [1, 4, 5, 7, 158, 173, 203, 250, 369, 370, 372, 373, 380, 383, 385, 387], "sure": [1, 4, 7, 250, 380], "look": [1, 4], "folder": 1, "get_colocated_mtllib_path": 1, "get_kernel": 1, "str": [1, 88, 131, 145, 148, 197, 198, 199, 200, 201, 231, 239, 241, 271, 272, 275, 276, 278, 280, 282, 288, 305, 309, 310, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336], "encod": [1, 113, 297, 301, 304, 325], "compute_encod": 1, "get_command_encod": 1, "setcomputepipelinest": 1, "those": [1, 4, 250], "nelem": 1, "set_array_buff": 1, "setbyt": 1, "sizeof": 1, "threadgroup": 1, "higher": [1, 135, 332, 381], "than": [1, 4, 73, 88, 99, 102, 113, 132, 133, 143, 144, 158, 166, 240, 297, 303, 305, 332, 335, 347, 357, 362, 380, 381, 387], "max": [1, 145, 160, 268, 269, 292, 319, 324, 326, 327, 332, 336, 338, 340, 357, 361, 380, 381, 387], "allow": [1, 141, 250, 290, 353, 375, 382, 385], "tgp_size": 1, "min": [1, 145, 169, 292, 319, 338, 340], "maxtotalthreadsperthreadgroup": 1, "3d": [1, 254, 259, 305], "mtl": 1, "group_dim": 1, "grid_dim": 1, "divid": [1, 35, 129, 180], "among": 1, "dispatchthread": 1, "few": [1, 4, 5, 6, 383, 385], "thing": [1, 4], "note": [1, 4, 7, 14, 83, 85, 86, 114, 122, 123, 136, 145, 162, 180, 183, 250, 294, 305, 384, 386], "befor": [1, 4, 7, 25, 178, 275, 304, 364, 382, 383], "move": [1, 170, 387], "track": [1, 250, 254], "activ": [1, 7, 162, 258, 303, 304, 337, 346, 347, 349, 380], "u": [1, 267, 290, 375, 383], "command": [1, 2, 7], "instead": [1, 7, 250, 290, 301, 381, 383], "end_encod": 1, "end": [1, 99, 165, 180, 253, 262, 265, 269, 303, 328, 335, 341, 346, 347, 372], "until": [1, 383, 385], "limit": [1, 82, 166, 167, 382], "flush": 1, "enqueu": 1, "commit": 1, "associ": [1, 200, 201, 383], "suggest": 1, "deeper": 1, "dive": 1, "studi": 1, "come": [1, 4, 381], "far": [1, 355], "built": [1, 7, 383], "includ": [1, 91, 92, 93, 94, 162, 163, 167, 266, 272, 284, 293, 326, 380, 381, 382, 385, 386, 388], "forward": [1, 231, 380, 383], "diff": 1, "push": 1, "along": [1, 23, 24, 83, 84, 91, 92, 93, 94, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 145, 193, 208, 210, 214, 220, 221, 224, 225, 226, 250, 295, 318], "similarli": [1, 7, 158, 381, 383], "scale_arr": 1, "contribut": 1, "tangent_x": 1, "tangent_i": 1, "revers": [1, 37, 38, 39, 40, 91, 92, 93, 94, 227, 301], "arg": [1, 4, 9, 10, 107, 200, 201], "push_back": 1, "fulli": [1, 6, 380, 384, 387], "overal": 1, "directori": [1, 4, 7], "extens": [1, 148, 282, 386], "h": [1, 85, 86, 145, 253, 254, 256, 258, 259, 262, 265, 269, 295, 381, 383], "mlx_sample_extens": 1, "__init__": [1, 4, 5, 8, 9, 10, 27, 242, 250, 353], "py": [1, 4, 7], "cmakelist": 1, "txt": 1, "setup": [1, 3, 5, 7, 380], "hold": [1, 4, 9, 10, 145, 380], "instal": 1, "pybind11": 1, "sinc": [1, 4, 5, 353, 362, 371, 384, 387], "compon": [1, 4], "etc": [1, 180, 250, 305], "pybind11_modul": 1, "m": [1, 4, 7, 110, 145, 228, 252, 253, 268, 269, 356, 380], "doc": [1, 5], "sampl": [1, 3, 4, 147, 182, 183, 184, 187, 190, 191, 307, 308, 309, 310, 312, 313, 326, 332, 336, 377, 380], "_a": 1, "pos_onli": 1, "kw_onli": 1, "none": [1, 4, 8, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 168, 169, 170, 171, 172, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 199, 200, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 234, 235, 236, 237, 239, 240, 242, 252, 253, 261, 268, 269, 271, 275, 276, 283, 288, 291, 295, 301, 304, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 357, 375, 382], "r": [1, 4, 146, 231, 258, 262], "pbdoc": 1, "most": [1, 183, 250, 366, 380, 381, 382, 383], "complex": [1, 122, 123, 124, 125, 126, 239, 244, 250, 290, 380, 381], "bell": 1, "whistl": 1, "liter": [1, 305, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336], "string": [1, 384, 386], "modul": [1, 4, 5, 238, 293, 299, 304, 350, 366, 379, 380, 383], "ensur": [1, 7, 331], "caster": 1, "find_packag": 1, "config": 1, "add_librari": 1, "sourc": [1, 2, 56, 170, 227], "target_sourc": 1, "cmake_current_list_dir": 1, "header": 1, "target_include_directori": 1, "target_link_librari": 1, "attach": 1, "conveni": [1, 5, 141], "mlx_build_metallib": 1, "target": [1, 231, 323, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 380], "destin": [1, 56, 170], "automat": [1, 6, 148, 385, 386, 387], "practic": [1, 380], "mlx_build_met": [1, 7], "mlx_ext_metallib": 1, "titl": 1, "include_dir": 1, "project_source_dir": 1, "mlx_include_dir": 1, "output_directori": 1, "cmake_library_output_directori": 1, "add_depend": 1, "endif": 1, "pybind11_add_modul": 1, "build_shared_lib": 1, "target_link_opt": 1, "wl": 1, "rpath": 1, "loader_path": 1, "onc": [1, 380], "describ": [1, 383], "util": [1, 4, 6, 7, 200, 250], "__name__": [1, 4], "__main__": [1, 4], "descript": [1, 4, 244], "ext_modul": 1, "cmakeextens": 1, "cmdclass": 1, "build_ext": 1, "cmakebuild": 1, "package_dir": 1, "package_data": 1, "dylib": 1, "zip_saf": 1, "fals": [1, 4, 13, 14, 15, 23, 24, 30, 31, 32, 33, 37, 38, 39, 40, 52, 53, 54, 55, 59, 71, 75, 76, 83, 87, 91, 92, 93, 94, 136, 141, 145, 148, 157, 159, 161, 167, 168, 179, 218, 232, 235, 239, 240, 244, 263, 264, 266, 267, 276, 278, 288, 291, 293, 297, 301, 304, 305, 323, 326, 357, 368, 384], "python_requir": 1, "even": [1, 4, 83, 380, 383, 384], "though": [1, 4, 380, 383, 384], "j8": 1, "libmlx_ext": 1, "cpython": 1, "3x": 1, "darwin": 1, "pip": [1, 7], "after": [1, 4, 5, 25, 127, 129, 178, 180, 254, 263, 266, 271, 272, 276, 278, 285, 288, 289, 290, 291, 304, 335, 380, 387], "plai": [1, 4], "ones": [1, 4, 175, 200, 228, 289, 290, 293, 382], "b": [1, 2, 4, 12, 14, 76, 101, 102, 104, 129, 132, 133, 135, 136, 143, 144, 145, 153, 154, 156, 158, 160, 169, 171, 176, 180, 217, 224, 231, 267, 295, 305, 318, 381, 382, 383, 384, 385, 386, 387], "f": [1, 2, 3, 5, 145, 250, 265, 360, 380, 384], "item": [1, 3, 4, 5, 240, 383, 384, 385], "true": [1, 3, 4, 14, 37, 38, 39, 40, 76, 83, 91, 92, 93, 94, 113, 136, 141, 145, 148, 167, 181, 208, 235, 239, 240, 244, 250, 254, 255, 256, 262, 263, 264, 265, 266, 267, 275, 276, 278, 285, 288, 293, 295, 297, 301, 304, 305, 323, 331, 357], "quick": [1, 6], "benchmark": [1, 380], "compar": [1, 76, 380], "time": [1, 4, 7, 167, 225, 250, 252, 253, 262, 265, 268, 269, 295, 380, 381, 383, 387], "set_default_devic": 1, "256": [1, 5], "512": [1, 4, 304, 387], "random": [1, 3, 4, 5, 6, 252, 253, 254, 264, 268, 269, 278, 285, 380, 381, 387, 388], "normal": [1, 3, 4, 111, 112, 190, 250, 252, 253, 254, 263, 264, 266, 268, 269, 294, 304, 307, 309, 384, 387], "bench": 1, "warm": [1, 380], "rang": [1, 3, 4, 5, 7, 16, 127, 147, 308, 310, 316, 317, 355, 369, 370, 371, 372, 373, 377, 380, 381, 383, 387], "100": [1, 3, 4, 372, 380, 381, 383, 387], "5000": 1, "simple_tim": 1, "custom_tim": 1, "3f": [1, 5, 380], "custom": [1, 304], "114": 1, "109": 1, "modest": 1, "improv": [1, 2, 4, 356, 357, 358, 359, 360, 361, 367, 380], "awai": [1, 4], "good": [1, 7, 380, 387], "nn": [1, 4, 5, 200, 240, 250, 350, 353, 355, 364, 366, 380, 383], "grad": [1, 3, 5, 231, 355, 363, 380, 381, 382, 383, 385], "full": [1, 5, 61, 74, 88, 208, 289, 290, 326, 380, 383], "profil": 2, "kei": [2, 4, 114, 182, 183, 184, 186, 187, 189, 190, 191, 239, 240, 275, 276, 288, 291, 364, 377, 379, 381], "build": [2, 4, 6, 309, 353, 380], "mlx_metal_debug": [2, 7], "option": [2, 4, 13, 15, 16, 23, 24, 25, 26, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 74, 75, 77, 78, 79, 83, 84, 85, 86, 87, 88, 91, 92, 93, 94, 97, 98, 99, 110, 111, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 130, 131, 134, 139, 140, 145, 146, 147, 148, 157, 159, 161, 167, 168, 174, 177, 178, 179, 180, 181, 182, 183, 184, 186, 187, 189, 190, 191, 193, 194, 208, 209, 210, 213, 214, 218, 220, 224, 226, 227, 228, 229, 230, 231, 232, 234, 236, 239, 240, 252, 253, 254, 255, 256, 262, 265, 267, 268, 269, 271, 275, 276, 278, 283, 288, 291, 293, 295, 297, 301, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 356, 357, 358, 359, 360, 361, 362, 364, 367, 368, 369, 377, 380, 386, 388], "debug": 2, "record": [2, 164, 383], "dure": [2, 83, 257, 258, 259, 305, 384], "inspect": [2, 380, 385], "label": [2, 3, 325, 332], "queue": 2, "readabl": 2, "start_captur": 2, "initi": [2, 3, 4, 250, 254, 263, 264, 266, 267, 292, 294, 306, 307, 308, 309, 310, 311, 312, 313, 353, 364, 369, 370, 372, 373, 380, 383], "gpu": [2, 6, 380, 382, 387], "main": [2, 6, 99, 110, 240, 250], "jane": 2, "develop": [2, 6, 7], "gputrac": 2, "arang": [2, 145, 244, 305, 382, 384], "10": [2, 4, 5, 150, 195, 200, 240, 250, 278, 350, 371, 373, 380, 382], "20": [2, 145], "30": [2, 357], "40": 2, "stop_captur": 2, "replai": 2, "trace": [2, 380], "view": [2, 384], "overview": 2, "oper": [2, 4, 6, 8, 34, 77, 78, 79, 87, 114, 208, 215, 221, 242, 250, 304, 362, 380, 381, 382, 383, 384, 385, 387, 388], "checkout": [2, 380], "document": [2, 6, 61, 74, 198, 199, 244, 380, 381, 382], "inform": [2, 4, 5, 7, 198, 199, 244, 250, 254, 261, 291, 381, 387], "skip": 2, "save": [2, 4, 6, 148, 180, 198, 199, 200, 201, 282, 383], "project": [2, 4, 291], "us": [2, 3, 4, 5, 6, 7, 16, 35, 97, 100, 102, 113, 127, 145, 146, 158, 162, 163, 164, 166, 180, 181, 193, 194, 239, 244, 250, 253, 258, 260, 261, 262, 265, 267, 269, 271, 275, 282, 289, 291, 293, 295, 297, 301, 304, 305, 309, 310, 316, 317, 324, 350, 353, 355, 356, 357, 359, 360, 361, 362, 363, 364, 377, 379, 380, 381, 382, 385, 387], "cmake": [2, 7], "mkdir": [2, 7], "cd": [2, 7], "dmlx_metal_debug": 2, "ON": [2, 7], "g": [2, 7, 145, 180, 265, 349, 367, 368, 383, 388], "xcodeproj": 2, "select": [2, 7, 226, 235, 271, 275, 283], "metal_captur": 2, "exampl": [2, 3, 4, 5, 16, 35, 127, 145, 146, 216, 220, 250, 252, 253, 254, 264, 268, 269, 276, 278, 285, 288, 305, 306, 307, 308, 309, 310, 311, 312, 313, 323, 325, 332, 350, 355, 364, 369, 370, 371, 372, 373, 377, 381, 382, 383, 384, 385, 386], "schema": 2, "implement": [3, 5, 113, 114, 145, 260, 275, 291, 297, 299, 301, 303, 304, 305, 347, 356, 357, 358, 359, 361, 362, 363, 375, 380, 381, 384], "basic": [3, 195, 381], "model": [3, 5, 6, 200, 238, 240, 250, 271, 274, 276, 278, 282, 285, 287, 288, 289, 291, 304, 350, 353, 355, 363, 364, 366, 380, 383], "problem": [3, 5, 250], "metadata": [3, 148, 198, 199], "num_featur": [3, 254], "num_exampl": 3, "1_000": 3, "num_it": 3, "10_000": 3, "iter": [3, 5, 240, 377, 380, 383], "sgd": [3, 5, 355, 362, 364, 369, 370, 373, 380], "lr": [3, 362], "01": [3, 320, 360], "rate": [3, 356, 357, 358, 359, 360, 361, 362, 367, 368], "ll": [3, 5, 328, 380, 381], "synthet": 3, "dataset": [3, 383], "matrix": [3, 41, 97, 98, 110, 134, 145, 146, 158, 180, 181, 293, 311, 350], "ground": [3, 4, 325, 335], "truth": [3, 325, 335], "w_star": 3, "valu": [3, 4, 11, 14, 16, 23, 24, 46, 73, 76, 82, 110, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 130, 136, 145, 147, 177, 182, 183, 184, 186, 187, 190, 191, 198, 220, 221, 231, 234, 238, 239, 240, 244, 253, 257, 258, 259, 264, 267, 269, 275, 291, 292, 302, 303, 304, 306, 323, 324, 325, 326, 327, 328, 330, 331, 332, 333, 334, 335, 347, 353, 357, 360, 369, 370, 372, 373, 381], "gaussian": [3, 261, 315, 316, 317, 326], "nois": 3, "noisi": 3, "ep": [3, 111, 112, 254, 263, 264, 266, 294, 324, 326, 336, 356, 357, 358, 359, 360, 361, 367], "1e": [3, 5, 14, 136, 254, 263, 264, 266, 294, 324, 326, 336, 356, 357, 358, 359, 360, 361, 364, 367, 369, 370, 371, 372, 373], "weight": [3, 85, 86, 87, 111, 112, 240, 250, 278, 282, 293, 323, 325, 353, 357, 360, 362, 364, 368, 381, 383], "squar": [3, 4, 112, 134, 196, 211, 231, 240, 250, 294, 333, 335, 356, 357, 359, 360, 361, 381, 384], "loss": [3, 5, 231, 250, 355, 380, 381, 383], "loss_fn": [3, 5, 355, 380, 381], "w": [3, 86, 97, 180, 181, 231, 253, 254, 256, 258, 259, 267, 269, 368, 381], "mean": [3, 4, 5, 112, 186, 231, 250, 254, 263, 276, 294, 312, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 380, 381, 384], "grad_fn": [3, 380, 381], "randomli": [3, 4, 257, 258, 259], "Then": [3, 7], "repeatedli": 3, "_": [3, 4, 250, 369, 370, 371, 372, 373, 377, 380, 383, 387], "verifi": [3, 7], "close": [3, 6, 7, 14, 136], "error_norm": 3, "5f": 3, "someth": [3, 4, 382], "00005": 3, "00364": 3, "complet": [3, 4, 7, 167, 289, 290, 381, 387], "logist": [3, 204, 316, 317, 343], "github": [3, 5, 7, 380], "repo": [3, 5, 7, 380], "enabl": [4, 7, 83, 103, 368], "larg": [4, 250, 291, 331, 380, 383], "ish": 4, "transform": [4, 6, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 238, 250, 254, 263, 266, 267, 275, 276, 288, 293, 297, 382], "compromis": 4, "eas": 4, "llama": 4, "famili": 4, "less": [4, 25, 144, 178, 297, 335], "200": [4, 371], "line": [4, 383, 384], "python": [4, 46, 64, 73, 107, 239, 240, 241, 353, 363, 364, 366, 379, 381, 384], "neural": [4, 6, 260, 307, 308, 337, 350, 353, 367], "network": [4, 6, 254, 258, 260, 307, 308, 350, 353, 367], "concis": 4, "architectur": [4, 7, 250, 290, 387], "notabl": [4, 6], "rope": [4, 250], "posit": [4, 25, 99, 113, 127, 131, 140, 170, 178, 231, 240, 250, 255, 256, 291, 297, 301, 326, 336], "cach": [4, 162, 163, 166, 380], "concaten": 4, "llamaattent": 4, "self": [4, 5, 8, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 73, 74, 75, 242, 250, 337, 353], "dim": [4, 113, 114, 260, 263, 264, 266, 291, 294, 297, 301, 304], "num_head": [4, 291, 304], "super": [4, 5, 250, 353], "tradit": [4, 113, 258, 259, 297], "query_proj": 4, "bia": [4, 97, 111, 180, 181, 240, 250, 255, 256, 262, 265, 266, 267, 276, 278, 288, 291, 293, 295, 359, 360, 361, 364, 381], "key_proj": 4, "value_proj": 4, "out_proj": [4, 353], "__call__": [4, 5, 250, 353], "queri": [4, 114, 291], "mask": [4, 114, 285, 291, 382], "extract": [4, 41, 98, 99, 250, 275, 353], "l": [4, 5, 250, 252, 254, 255, 262, 265, 268, 295, 335], "reshap": [4, 145, 305, 382], "combin": 4, "key_cach": 4, "value_cach": 4, "sqrt": [4, 105, 114, 254, 263, 264, 266, 267, 294, 301, 307, 308, 309, 310, 356, 358, 359, 360, 367, 380], "score": [4, 114, 332], "softmax": [4, 114, 250, 322, 325], "values_hat": 4, "rm": [4, 7, 112, 357], "swiglu": 4, "rmsnorm": [4, 250], "llamaencoderlay": 4, "mlp_dim": [4, 304], "norm1": 4, "norm2": 4, "linear1": 4, "linear2": 4, "linear3": 4, "sigmoid": [4, 250, 300, 316, 317, 321, 343], "instanc": [4, 35, 180, 241, 250, 264, 271, 272, 273, 276, 278, 279, 280, 285, 288, 289, 290, 299, 353, 384], "embed": [4, 250, 297, 301, 324], "emb": [4, 260, 301], "token": [4, 260], "num_lay": [4, 5, 355], "vocab_s": 4, "norm": [4, 112, 263, 336, 361, 362], "multiheadattent": [4, 250], "create_additive_causal_mask": 4, "list": [4, 9, 13, 15, 27, 67, 73, 77, 78, 79, 80, 83, 84, 87, 107, 116, 117, 119, 120, 122, 123, 125, 126, 130, 131, 142, 145, 157, 159, 161, 168, 174, 177, 179, 182, 183, 184, 186, 187, 190, 191, 198, 208, 210, 214, 218, 224, 225, 227, 231, 232, 233, 236, 239, 241, 250, 276, 278, 279, 280, 281, 286, 288, 289, 290, 353, 359, 360, 361, 362, 371, 379, 380, 381, 383], "still": [4, 7, 145, 380, 383], "consid": [4, 14, 76, 136, 239, 240, 263, 379], "train": [4, 5, 250, 254, 257, 258, 259, 274, 276, 288, 307, 308], "ignor": [4, 35, 82, 83, 107, 357], "whatsoev": 4, "rest": [4, 113, 240, 297], "subsect": 4, "prompt": 4, "autoregress": 4, "yield": [4, 5, 377], "temp": 4, "causal": 4, "append": [4, 158, 380, 383], "store": 4, "per": [4, 5, 97, 180, 181, 254, 263, 264, 266, 294, 375, 380, 383], "care": [4, 383], "last": [4, 26, 73, 111, 112, 117, 120, 122, 123, 125, 126, 127, 135, 146, 158, 183, 209, 224, 255, 256, 258, 259, 263, 305, 384], "logit": [4, 183, 323, 325, 380], "next": [4, 5, 166], "categor": 4, "lazili": [4, 250], "noth": [4, 250, 383], "yet": [4, 145, 250, 353, 364, 381, 382, 383, 385], "forc": [4, 5, 250, 385], "choos": [4, 113, 297], "pars": 4, "feed": 4, "loop": [4, 5, 380, 381, 383], "unsqueez": 4, "sequenc": [4, 13, 15, 30, 31, 52, 53, 54, 55, 59, 67, 70, 71, 75, 80, 87, 109, 116, 117, 119, 120, 122, 123, 125, 126, 130, 157, 159, 161, 168, 174, 179, 182, 183, 184, 186, 187, 190, 191, 194, 208, 210, 213, 218, 224, 225, 227, 232, 236, 254, 255, 262, 265, 295, 304, 377, 387], "length": [4, 213, 254, 255, 262, 265, 295, 371], "len": [4, 117, 120, 123, 126, 371], "overwrit": 4, "discard": [4, 239], "old": 4, "moment": [4, 87, 357, 359, 360, 361], "anymor": 4, "everyth": 4, "small": [4, 111, 112, 254, 263, 266, 294, 326, 331, 336, 380, 387], "12": [4, 371], "8192": 4, "1024": 4, "actual": [4, 16, 278, 353, 383], "materi": [4, 6], "could": [4, 250], "20_000": 4, "machin": [4, 6, 7, 367], "8gb": 4, "ram": 4, "32": [4, 5, 180, 181, 244, 253, 269, 294, 380], "44": 4, "doubl": 4, "bracket": 4, "becaus": [4, 162, 250, 383], "batch": [4, 158, 254, 255, 256, 258, 259, 262, 265, 291, 295, 305, 383], "zip": [4, 5], "haven": 4, "anyth": [4, 231, 383], "result": [4, 16, 35, 73, 83, 97, 111, 112, 135, 145, 148, 158, 176, 181, 193, 195, 214, 224, 225, 235, 240, 301, 380, 381, 384], "similar": [4, 141, 240, 289, 290, 291, 324, 384, 386], "runtim": [4, 380], "section": [4, 7, 210, 336, 380, 381], "access": [4, 46, 250, 353, 364, 383, 387], "origin": [4, 99, 254, 284, 307, 308, 309, 310, 356, 357, 358, 359, 361, 362, 384], "sentencepiec": 4, "pytorch": [4, 6, 263, 381], "compat": [4, 183, 386], "npz": [4, 148, 200, 201, 278, 282, 386], "file": [4, 7, 148, 197, 198, 199, 200, 201, 278, 282, 381, 386], "directli": 4, "argpars": 4, "itertool": [4, 240], "starmap": [4, 240], "np": [4, 5, 384, 385], "torch": [4, 384], "map_torch_to_mlx": 4, "tok_embed": 4, "elif": 4, "replac": [4, 289, 290, 304, 335], "attention_norm": 4, "ffn_norm": 4, "wq": 4, "wk": 4, "wv": 4, "wo": 4, "w1": 4, "w2": 4, "w3": 4, "ffn": 4, "separ": [4, 61, 74, 263, 332], "submodul": [4, 5, 250, 272, 276, 277, 288, 290], "feed_forward": 4, "parser": 4, "argumentpars": 4, "add_argu": 4, "torch_weight": 4, "output_fil": 4, "parse_arg": 4, "state": [4, 5, 250, 262, 265, 295, 355, 364, 377, 380], "savez": [4, 282, 386], "k": [4, 41, 98, 110, 114, 226, 228, 229, 230, 252, 267, 268, 276], "v": [4, 88, 114, 250, 276, 384], "left": [4, 113, 145, 180, 252, 253, 261, 268, 269, 297, 305, 316, 317, 326, 328, 336], "disk": 4, "text": [4, 252, 253, 262, 265, 268, 269, 270, 295, 303, 307, 308, 309, 310, 319, 326, 327, 328, 331, 332, 335, 337, 338, 341, 342, 346, 347, 357, 362], "format": [4, 148, 197, 198, 199, 200, 201, 384], "dictionari": [4, 83, 148, 198, 199, 239, 250, 275, 284, 289, 290, 365, 379, 386], "represent": [4, 180, 239, 241], "tree_unflatten": 4, "helper": [4, 380], "weight_fil": 4, "incur": 4, "sever": [4, 85, 86, 87, 200, 201, 380, 386], "futur": [4, 293, 382, 383], "pth": 4, "current": [4, 6, 7, 85, 86, 87, 163, 180, 250, 357, 383], "around": 4, "m1": [4, 380, 381, 387], "ultra": 4, "7b": 4, "me": 4, "ishmael": 4, "year": 4, "ago": 4, "never": [4, 383], "long": 4, "info": [4, 7], "247": 4, "press": [4, 145], "enter": 4, "littl": 4, "monei": 4, "my": [4, 7], "purs": 4, "greater": [4, 25, 133, 178, 303, 347], "consequ": 4, "walk": 4, "down": 4, "gower": 4, "street": 4, "afternoon": 4, "heavi": 4, "rain": 4, "saw": [4, 381], "off": [4, 7, 383], "man": 4, "rag": 4, "who": 4, "sat": 4, "upon": [4, 240], "hi": [4, 265], "bundl": 4, "hard": 4, "wet": 4, "he": [4, 309, 310], "were": [4, 387], "cry": 4, "watch": [4, 380], "him": 4, "observ": 4, "numer": [4, 111, 112, 145, 153, 157, 208, 254, 263, 264, 266, 294, 324, 326, 336, 356, 357, 358, 359, 360, 361, 367, 380, 383], "crowd": 4, "wa": [4, 383], "hurri": 4, "437": 4, "330": 4, "second": [4, 99, 154, 156, 158, 219, 231, 253, 269, 324, 332, 357, 359, 360, 361, 381, 387], "spent": 4, "amount": [4, 164, 252, 268], "39": 4, "By": [4, 283, 381, 384], "bigger": [4, 357], "remain": [4, 231, 257, 258, 259], "almost": 4, "nobodi": 4, "took": 4, "least": [4, 77, 78, 79, 82, 146, 180], "notic": [4, 381, 386], "distanc": [4, 336], "had": 4, "doubt": 4, "minut": 4, "straight": 4, "slowli": 4, "rais": [4, 145, 167, 210, 278], "ey": 4, "speak": [4, 145], "resum": 4, "postur": 4, "stood": 4, "feel": 4, "pain": 4, "heart": 4, "smile": 4, "face": 4, "am": 4, "someon": 4, "three": [4, 79], "quarter": 4, "hour": 4, "made": 4, "immedi": [4, 271], "repli": 4, "again": [4, 7, 250, 380], "hand": [4, 381, 383], "did": 4, "accustom": 4, "thu": [4, 250], "question": [4, 383], "reason": [4, 382], "tell": [4, 380, 384], "understand": [4, 307, 308], "579": 4, "690": 4, "num": [4, 147, 189], "500": [4, 387], "628": 4, "went": 4, "nervou": 4, "trembl": 4, "told": 4, "And": 4, "perhap": 4, "surpris": 4, "matter": [4, 250], "shall": 4, "anyhow": 4, "friend": 4, "ye": 4, "slight": [4, 383], "kind": 4, "longer": [4, 88, 381], "soon": 4, "unless": [4, 14, 136, 145, 353], "unlik": [4, 14, 136, 258, 259, 284], "strang": 4, "amus": 4, "That": 4, "secret": 4, "disappoint": 4, "mine": 4, "cannot": [4, 82, 382, 384], "happi": 4, "ask": 4, "shop": 4, "bui": 4, "food": 4, "633": 4, "21": [4, 373], "475": 4, "su": 4, "j": [4, 7, 145, 258, 358, 359, 361], "lu": 4, "pan": 4, "murtadha": 4, "wen": 4, "liu": 4, "2021": 4, "roform": [4, 297], "enhanc": [4, 297, 383], "rotari": [4, 113, 297], "arxiv": [4, 263, 264, 266, 270, 294, 317, 337, 356, 362], "preprint": [4, 356, 362], "2104": 4, "09864": 4, "zhang": 4, "sennrich": 4, "2019": [4, 360], "root": [4, 112, 196, 211, 294], "advanc": [4, 380], "system": [4, 7, 162, 163], "shazeer": 4, "2020": 4, "glu": [4, 250], "variant": [4, 335, 361], "2002": 4, "05202": 4, "classifi": 5, "mnist": 5, "As": [5, 35, 220, 250, 380], "mlp": [5, 250, 304, 355], "inherit": [5, 379], "standard": [5, 46, 73, 158, 184, 186, 304, 307, 309, 312, 385], "idiom": [5, 380], "input_dim": [5, 250, 267, 293], "hidden_dim": [5, 353, 355], "output_dim": [5, 250, 267, 293], "layer_s": 5, "idim": 5, "odim": 5, "maximum": [5, 23, 35, 82, 91, 164, 167, 250, 296, 301, 316, 317, 320, 339, 353, 383], "cross": [5, 87, 323, 325], "entropi": [5, 323, 325], "sub": [5, 99, 189], "commonli": [5, 289, 350, 380], "cross_entropi": [5, 250], "accuraci": 5, "valid": [5, 88, 127, 234, 239, 276, 288, 379], "eval_fn": 5, "argmax": 5, "loader": 5, "num_class": [5, 355], "batch_siz": [5, 355], "num_epoch": [5, 355], "learning_r": [5, 355, 356, 357, 358, 359, 360, 361, 362, 364, 367, 368, 369, 370, 371, 372, 373, 380], "train_imag": [5, 355], "train_label": [5, 355], "test_imag": 5, "test_label": 5, "shuffl": 5, "minibatch": 5, "batch_iter": [5, 355], "perm": 5, "permut": 5, "id": [5, 7], "put": [5, 380], "trainabl": [5, 238, 250, 353], "loss_and_grad_fn": [5, 355, 380, 381], "value_and_grad": [5, 250, 289, 353, 355, 366, 380, 381, 384, 385], "epoch": 5, "test": [5, 7], "confus": 5, "decent": 5, "95": 5, "brought": 6, "research": 6, "except": [6, 110, 121, 122, 124, 125, 126, 263, 278, 382, 384], "featur": [6, 85, 86, 87, 113, 254, 262, 263, 264, 265, 266, 267, 293, 294, 295, 297, 304, 305, 380, 383], "differ": [6, 141, 217, 335, 381], "lazi": [6, 353, 385], "multi": [6, 114, 255, 256, 382, 384], "cpu": [6, 146, 380, 387], "inspir": 6, "jax": [6, 377], "arrayfir": 6, "unifi": 6, "live": [6, 387], "guid": 6, "convers": 6, "regress": [6, 331], "layer": [6, 111, 250, 252, 253, 258, 259, 262, 263, 265, 266, 267, 268, 269, 285, 290, 293, 295, 299, 304, 349, 353], "perceptron": 6, "llm": 6, "infer": [6, 130, 148], "fft": 6, "algebra": 6, "tree": [6, 83, 107, 131, 231, 234, 239, 240, 241, 363, 364, 366, 375, 381], "debugg": 6, "pypi": 7, "meet": 7, "seri": 7, "chip": 7, "nativ": 7, "maco": 7, "13": 7, "recommend": [7, 167, 362], "14": 7, "sonoma": 7, "conda": 7, "forg": 7, "distribut": [7, 182, 183, 184, 186, 190, 191, 267, 307, 308, 309, 310, 312, 313, 326, 329, 334, 336, 350], "probabl": [7, 187, 257, 258, 259, 293, 323, 325, 329, 387], "platform": 7, "processor": 7, "arm": 7, "i386": 7, "switch": 7, "17": 7, "clang": 7, "24": 7, "xcode": 7, "15": [7, 145, 380], "sdk": 7, "environ": [7, 100, 103], "via": [7, 363, 366, 383, 384], "rosetta": 7, "unam": 7, "p": [7, 182, 250, 257, 258, 259, 336, 359, 361], "clone": 7, "git": 7, "com": 7, "ml": 7, "explor": 7, "nanobind": [7, 304], "http": [7, 263, 264, 266, 270, 294, 317, 337], "wjakob": 7, "env": 7, "cmake_build_parallel_level": 7, "edit": [7, 290], "unittest": 7, "discov": 7, "stub": 7, "dev": 7, "generate_stub": 7, "either": [7, 12, 61, 73, 74, 82, 101, 102, 104, 129, 132, 133, 143, 144, 145, 153, 158, 160, 169, 171, 217, 231, 253, 269, 299, 305, 309, 310], "libmlx": 7, "preprocessor": 7, "metal_path": 7, "mlx_build_test": 7, "mlx_build_exampl": 7, "mlx_build_benchmark": 7, "mlx_build_python_bind": 7, "multipl": [7, 111, 112, 158, 171, 180, 181, 291, 301, 370, 371, 373, 380, 383, 386], "wish": 7, "variabl": [7, 83, 100, 103, 131, 142, 231, 233, 234], "export": 7, "developer_dir": 7, "app": 7, "content": [7, 275, 380], "xcrun": 7, "macosx": 7, "show": [7, 244, 380], "unabl": 7, "tool": 7, "sudo": 7, "ouptut": 7, "finder": 7, "iterm": 7, "termin": 7, "click": 7, "uncheck": 7, "window": [7, 252, 253, 268, 269], "restart": 7, "grep": 7, "cmake_host_system_processor": 7, "arm64": 7, "x86_64": 7, "wipe": 7, "cahc": 7, "rf": 7, "devicetyp": 8, "attribut": [8, 9, 27, 242, 284, 353, 375], "kwarg": [9, 10, 200, 201, 388], "categori": [10, 244], "bool_": [10, 244], "integ": [10, 129, 141, 145, 177, 180, 181, 182, 187, 210, 224, 234, 244, 260, 283, 371, 382], "unsignedinteg": 10, "uint8": [10, 244], "uint16": [10, 244], "uint32": [10, 23, 24, 25, 26, 183, 244], "uint64": [10, 244], "signedinteg": [10, 141], "int8": [10, 244], "int32": [10, 16, 35, 127, 141, 145, 187, 244, 305, 382, 385], "int64": [10, 244], "inexact": [10, 141], "complexflo": 10, "complex128": 10, "issubdtyp": [10, 244], "absolut": [11, 14, 136, 316, 317, 335], "semant": [12, 80, 101, 102, 104, 132, 133, 143, 144, 153, 158, 160, 169, 171, 217, 387], "keepdim": [13, 15, 23, 24, 30, 31, 32, 33, 52, 53, 54, 55, 59, 71, 75, 145, 157, 159, 161, 168, 179, 208, 218, 232], "reduct": [13, 15, 157, 159, 168, 179, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336], "reduc": [13, 15, 23, 24, 157, 159, 161, 168, 179, 218, 232, 254, 304, 331], "unspecifi": [13, 15, 16, 23, 24, 25, 26, 84, 91, 92, 93, 94, 130, 157, 159, 161, 168, 174, 178, 179, 193, 208, 209, 218, 220, 226, 232, 236, 388], "entir": [13, 15, 23, 24, 157, 159, 161, 168, 179, 218, 232, 258, 259], "singleton": [13, 15, 23, 24, 157, 158, 159, 161, 168, 179, 218, 232], "rtol": [14, 136], "05": [14, 136, 254, 263, 264, 266, 294], "atol": [14, 136], "08": [14, 136, 324, 358, 359, 360, 361, 367], "equal_nan": [14, 76, 136], "approxim": [14, 261, 315, 316, 317], "comparison": [14, 104, 132, 133, 143, 144], "infinit": [14, 136], "equal": [14, 25, 76, 110, 133, 136, 144, 178, 187, 210, 264, 267], "sign": [14, 136, 244, 362], "nan": [14, 76, 136, 138], "ab": [14, 136, 145, 231, 263, 264, 266, 270, 294, 317, 337, 380], "array_equ": [14, 136], "rel": [14, 136, 357, 380], "toler": [14, 136], "boolean": [14, 76, 136, 137, 138, 139, 140, 154, 155, 156, 244, 287, 382], "interv": [16, 147, 187, 191], "increment": 16, "otherwis": [16, 87, 167, 239, 240, 276, 278, 288, 303, 304, 305, 323, 328, 335, 346, 347, 383, 384], "convent": [16, 88, 305, 360], "lead": [16, 380], "fraction": 16, "integr": [16, 220, 383], "invers": [17, 18, 19, 20, 21, 22, 106, 118, 119, 120, 121, 122, 123], "cosin": [17, 18, 89, 90, 324, 369, 371, 381], "hyperbol": [18, 20, 22, 90, 207, 223, 348], "sine": [19, 20, 206, 207, 381], "minimum": [24, 35, 82, 92, 301, 324, 369], "kth": [25, 178], "partit": 25, "order": [25, 87, 145, 178, 180, 226, 250, 263, 289, 299, 364, 380, 381], "undefin": [25, 178, 382], "sort": [25, 26, 178, 226], "flatten": [25, 26, 91, 92, 93, 94, 145, 176, 178, 193, 209, 220, 221, 226, 239], "dimension": [27, 111, 112, 115, 116, 117, 118, 119, 120, 124, 125, 126, 252, 253, 254, 255, 256, 260, 267, 268, 269, 293, 301, 382, 384], "val": [27, 130], "tupl": [27, 61, 64, 74, 84, 86, 87, 102, 107, 109, 142, 145, 146, 177, 180, 194, 213, 231, 233, 239, 240, 241, 252, 253, 256, 268, 269, 278, 280, 299, 305, 357, 359, 360, 361, 362, 379, 381], "ndarrai": [27, 382, 383, 385], "properti": [28, 35, 43, 47, 57, 58, 64, 66, 284, 287, 365, 381], "argument": [28, 61, 74, 83, 107, 131, 231, 240, 250, 305, 377, 381, 386, 387, 388], "union": [29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 41, 42, 44, 45, 48, 49, 50, 51, 52, 53, 54, 55, 56, 59, 60, 61, 62, 63, 65, 67, 68, 69, 70, 71, 72, 74, 75, 77, 78, 79, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 139, 140, 189, 190, 216], "appli": [35, 113, 114, 240, 250, 252, 253, 254, 255, 256, 258, 259, 261, 263, 264, 266, 267, 268, 269, 270, 272, 285, 292, 293, 294, 295, 296, 298, 300, 302, 303, 305, 314, 315, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 350, 363, 366, 372, 375, 380], "regular": [35, 258, 337, 360, 380, 382], "idx": [35, 382], "correctli": 35, "syntax": [35, 382], "subtract": 35, "inclus": [37, 38, 39, 40, 91, 92, 93, 94, 127], "diagon": [41, 98, 110, 228, 229, 230], "axis1": [42, 72, 99, 219], "axis2": [42, 72, 99, 219], "start_axi": [45, 127], "end_axi": [45, 127], "datatyp": 47, "byte": [47, 57, 162, 163, 164, 166, 167, 244], "decim": [62, 195], "indices_or_sect": [67, 210], "nest": [73, 83, 250, 353, 379, 381], "ddof": [75, 232], "ari": [77, 78, 79], "a_min": 82, "a_max": 82, "edg": [82, 177, 305, 380], "At": 82, "anoth": [82, 141, 158, 217, 235, 244, 250, 271, 380, 381, 382, 387], "fun": [83, 131, 142, 231, 233, 234, 380, 382, 383, 387], "callabl": [83, 131, 142, 231, 233, 234, 238, 239, 240, 271, 272, 275, 283, 295, 299, 304, 306, 307, 308, 309, 310, 311, 312, 313, 356, 357, 358, 359, 360, 361, 362, 367, 368, 369, 370, 371, 372, 373], "shapeless": 83, "dict": [83, 107, 148, 198, 199, 200, 281, 286, 289, 290, 353, 363, 364, 366, 379, 381, 386], "arbitrarili": [83, 250, 379, 381, 385], "leaf": [83, 239, 240, 275], "node": [83, 107, 234], "recompil": [83, 380], "chang": [83, 203, 289, 293, 305, 328, 335, 380, 384], "Not": [83, 380], "attempt": 83, "pad": [85, 86, 87, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 252, 253, 255, 256, 268, 269], "dilat": [85, 86, 87, 255, 256], "group": [85, 86, 87, 97, 114, 180, 181, 263, 293], "1d": [85, 87, 88, 198, 221], "convolut": [85, 86, 87, 88, 255, 256, 258, 259], "channel": [85, 86, 87, 254, 255, 256, 258, 259], "c_in": [85, 86, 87], "c_out": [85, 86, 87], "convolv": [85, 86, 87], "2d": [86, 87, 99, 180, 254, 258], "spatial": [86, 87, 252, 263, 268, 305], "symmetr": 86, "kernel_dil": 87, "input_dil": 87, "flip": [87, 88], "correl": [87, 258], "discret": [88, 115, 116, 117, 118, 119, 120, 124, 125, 126, 260], "swap": [88, 167, 219, 290, 293], "conv": 88, "filter": [88, 255, 256, 271, 275], "signal": [88, 305], "cumul": [91, 92, 93, 94], "th": [91, 92, 93, 94, 98, 110, 371], "bias": [97, 180, 181, 262, 265, 276, 288, 291], "group_siz": [97, 180, 181, 293], "64": [97, 180, 181, 244, 293], "configur": 97, "formal": [97, 180], "notat": [97, 239, 280], "quantiz": [97, 148, 181, 293], "w_i": [97, 180], "hat": [97, 180], "occupi": [97, 180, 181], "subarrai": [99, 210], "remov": [99, 158, 183, 213, 325], "insert": [99, 109, 387], "neg": [99, 127, 139, 268, 269, 291, 326, 334, 336, 382], "taken": [99, 220], "global": [100, 103, 188, 377, 380], "disabl": [100, 166, 380], "mlx_disable_compil": [100, 103, 380], "divis": [101, 129, 180], "quotient": [101, 102, 129], "remaind": 102, "fuction": 102, "faster": [102, 315, 380, 381], "mathrm": [105, 204, 264], "frac": [105, 180, 204, 252, 253, 254, 257, 258, 259, 263, 264, 266, 267, 268, 269, 294, 307, 308, 309, 310, 324, 326, 328, 331, 342, 344, 356, 358, 359, 360, 361, 367], "pi": [105, 301, 381], "int_0": 105, "dt": 105, "erf": [106, 380], "exponenti": [108, 298, 314, 341, 370], "ident": [110, 215, 250, 285], "zero": [110, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 228, 229, 230, 237, 250, 252, 253, 257, 258, 259, 278, 306, 307, 308, 309, 310, 311, 312, 313, 350, 357, 382], "whose": [110, 238], "translat": [111, 266], "stabil": [111, 112, 254, 263, 264, 266, 294, 324, 326, 356, 357, 358, 359, 360, 361, 367], "traditino": 113, "rotat": [113, 297], "larger": [113, 297, 362], "unchang": [113, 215, 297], "consecut": [113, 180, 297], "angular": [113, 297], "frequenc": [113, 297, 301], "q": [114, 146], "head": [114, 291, 304], "attent": [114, 276, 291, 301, 304], "regardless": 114, "pre": 114, "tile": 114, "typic": [114, 260, 355, 380, 383], "One": [115, 118, 124, 196, 380, 381], "fourier": [115, 116, 117, 118, 119, 120, 124, 125, 126], "truncat": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 190], "dft": [115, 116, 117, 118, 119, 120, 124, 125, 126], "rfft": 121, "real": [121, 122, 123, 124, 125, 126], "rfft2": 122, "rfftn": 123, "silent": [124, 125, 126], "outsid": 127, "clamp": 127, "floor": 129, "argnam": [131, 231], "neither": [131, 231], "keyword": [131, 200, 201, 231, 240, 250, 377, 386, 388], "strict": [132, 143, 276, 278, 288], "ordinari": 135, "inifn": 137, "infin": [137, 139, 140, 268, 269, 361], "dtypecategori": [141, 244], "subtyp": [141, 244], "subdtyp": 141, "float64": 141, "too": [141, 380, 383], "ord": 145, "tabl": [145, 244, 260], "frobeniu": 145, "matric": [145, 146], "strictli": 145, "mathemat": 145, "variou": 145, "purpos": 145, "calcul": [145, 326, 332, 357], "fro": 145, "inf": [145, 291], "largest": [145, 226], "sing": 145, "smallest": 145, "singular": 145, "nuclear": 145, "_f": 145, "sum_": [145, 252, 253, 331], "a_": 145, "valueerror": [145, 278, 381], "refer": [145, 264, 270, 284, 307, 308, 309, 310, 317, 337, 382], "golub": 145, "van": 145, "loan": 145, "baltimor": 145, "md": 145, "john": 145, "hopkin": 145, "univers": 145, "1985": 145, "pg": 145, "la": 145, "9": [145, 325, 356, 359, 360, 361, 362, 364, 370, 373, 384], "74597": 145, "84804": 145, "41421": 145, "23607": [145, 146], "74166": 145, "24264": 145, "11": 145, "225": 145, "894427": 146, "447214": 146, "57771": 146, "50": 147, "evenli": 147, "return_metadata": 148, "binari": [148, 197, 198, 199, 200, 201, 303, 323, 347, 380], "npy": [148, 197, 386], "safetensor": [148, 199, 278, 282, 383, 386], "gguf": [148, 198, 386], "matadata": 148, "unsupport": 148, "tensor": [148, 224, 252, 253, 268, 269, 336, 384], "natur": [149, 151, 383], "logarithm": [149, 150, 151, 152], "log": [151, 153, 157, 321, 322, 326, 329, 331, 334, 345], "plu": 151, "exp": [153, 157, 184, 208, 314, 329, 341, 342, 345, 380, 387], "stabl": [153, 157, 208, 331], "prepend": 158, "report": [162, 167], "peak": 164, "begin": [164, 180, 253, 262, 265, 269, 303, 328, 335, 341, 346, 347], "program": 164, "free": 166, "reclaim": 166, "set_memory_limit": 166, "previou": [166, 167], "relax": 167, "task": [167, 331], "exceed": 167, "negat": 172, "beforehand": 176, "pad_with": 177, "constant_valu": 177, "pad_width": 177, "before_1": 177, "after_1": 177, "before_2": 177, "after_2": 177, "before_n": 177, "after_n": 177, "before_i": 177, "after_i": 177, "extend": 177, "side": [177, 252, 253, 268, 269, 380], "smaller": [178, 362, 380], "everi": [180, 240, 373, 381], "particular": [180, 263], "w_1": 180, "w_g": 180, "align": [180, 253, 262, 265, 269], "max_i": 180, "min_i": 180, "textrm": [180, 261, 315, 318], "round": 180, "pack": [180, 181], "unsign": [180, 181, 244], "lower": [180, 187, 190, 191, 228, 313], "upper": [180, 187, 190, 191, 313], "1st": 180, "signific": 180, "2nd": 180, "dequant": 180, "w_q": 180, "whether": [181, 262, 265, 275, 291, 295, 323, 326, 332], "prng": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 377], "num_sampl": 183, "unnorm": [183, 323, 325], "draw": 183, "cdf": [184, 261, 315], "accord": [184, 235, 291, 307, 308, 309, 310], "seed": 185, "loc": 186, "deviat": [186, 307, 309, 312], "low": [187, 191, 313, 350], "high": [187, 191, 250, 260, 313, 350], "bound": [187, 190, 191, 261, 313, 380, 382, 387], "roadcast": 187, "domain": 190, "uniformli": 191, "repetit": 193, "preserv": [194, 381], "reciproc": 196, "arr": [197, 382], "obj": 198, "uncompress": 200, "my_path": 200, "tree_flatten": [200, 240, 241, 250], "transformerencod": 200, "128": [200, 250], "flat_param": 200, "compress": 201, "possibl": [210, 260, 380, 382, 387], "being": [215, 250], "prevent": [215, 336, 384], "flow": [215, 383], "streamcontext": 216, "context": 216, "manag": [216, 377, 387], "prior": [220, 221], "exclud": 221, "dot": [224, 239, 280, 291], "rep": 225, "repeat": 225, "necessarili": 226, "elsewher": [228, 382], "col": 228, "triangl": 228, "mse": 231, "param": [231, 250, 350, 381], "lvalu": 231, "dlvalu": 231, "dparam": 231, "lasso": 231, "l1": [231, 328, 330, 331, 335], "varianc": [232, 254, 263, 326], "divisor": 232, "cotang": 233, "in_ax": [234, 381], "out_ax": [234, 381], "prefix": [234, 239], "fn": [238, 240, 385], "wrt": 238, "is_leaf": [239, 240], "arbitrari": [239, 353], "depth": [239, 259, 381], "hello": [239, 241], "charact": 239, "flat": [239, 241], "superset": [240, 363], "extra": 240, "closer": 240, "constitut": 240, "dict_kei": [240, 364], "lambda": [240, 250, 271, 276, 283, 302, 341, 346, 356, 357, 358, 359, 360, 361, 362, 367, 368, 380, 381], "recreat": 241, "world": 241, "42": 241, "16": [244, 252, 264, 268, 271, 353], "int16": 244, "brain": 244, "e8": 244, "m7": 244, "ieee": 244, "e5": 244, "m10": 244, "hierarchi": 244, "done": [250, 257, 294, 380, 383, 384], "manual": 250, "explicitli": [250, 377], "solv": 250, "intuit": 250, "freez": [250, 288, 353], "finetun": 250, "in_dim": [250, 353], "out_dim": [250, 353], "enumer": 250, "caus": [250, 380, 383], "local": [250, 258], "scope": 250, "l2_loss": 250, "y_hat": 250, "trainable_paramet": [250, 275, 364], "loss_and_grad": 250, "workhors": 250, "Its": 250, "recurs": [250, 275, 276, 281, 286, 288, 353], "frozen": [250, 276, 286, 288, 293, 353], "individu": [250, 258, 259], "subset": [250, 275], "action": 250, "displai": 250, "tree_map": 250, "count": [250, 371], "num_param": 250, "preclud": 250, "pure": [250, 355], "pattern": [250, 383], "achiev": 250, "other_input": 250, "necessari": 250, "wrap": 250, "apply_to_modul": [250, 276], "children": 250, "filter_and_map": 250, "leaf_modul": 250, "load_weight": [250, 383], "named_modul": 250, "save_weight": 250, "set_dtyp": 250, "unfreez": [250, 276], "update_modul": 250, "alibi": 250, "avgpool1d": 250, "avgpool2d": 250, "batchnorm": 250, "conv1d": 250, "conv2d": 250, "dropout": [250, 258, 259, 285, 304, 380], "dropout2d": 250, "dropout3d": 250, "gelu": [250, 316, 317, 380], "groupnorm": 250, "gru": 250, "instancenorm": 250, "layernorm": 250, "lstm": 250, "maxpool1d": 250, "maxpool2d": [250, 253], "mish": 250, "prelu": 250, "quantizedlinear": 250, "relu": [250, 292, 304, 338, 350], "rnn": [250, 262], "selu": 250, "sequenti": [250, 350], "silu": 250, "sinusoidalpositionalencod": 250, "softshrink": 250, "upsampl": 250, "elu": [250, 341], "gelu_approx": [250, 261, 315], "gelu_fast_approx": [250, 261, 315], "hardswish": 250, "leaky_relu": 250, "log_sigmoid": 250, "log_softmax": 250, "relu6": 250, "softplu": [250, 270, 337], "tanh": [250, 262, 265, 270, 295, 337], "binary_cross_entropi": [250, 380], "cosine_similarity_loss": 250, "gaussian_nll_loss": 250, "hinge_loss": 250, "huber_loss": 250, "kl_div_loss": 250, "l1_loss": 250, "log_cosh_loss": 250, "margin_ranking_loss": 250, "mse_loss": 250, "nll_loss": 250, "smooth_l1_loss": 250, "triplet_loss": 250, "init": [250, 292, 350, 355, 369, 370, 372, 373], "uniform": [250, 267, 278, 308, 310, 350, 377, 380, 381, 387], "glorot_norm": 250, "glorot_uniform": 250, "he_norm": 250, "he_uniform": 250, "kernel_s": [252, 253, 255, 256, 268, 269], "averag": [252, 253, 356, 357, 359, 360, 361], "pool": [252, 253, 268, 269, 387], "l_": [252, 268, 328], "n_i": [252, 253, 268, 269], "c_j": [252, 253, 268, 269], "ldot": [252, 253, 268, 269], "lfloor": [252, 253, 268, 269], "_size": [252, 253, 268, 269], "rfloor": [252, 253, 268, 269], "k_h": [253, 269], "k_w": [253, 269], "h_": [253, 262, 265, 269, 295], "w_": [253, 262, 265, 269, 295, 356, 357, 358, 359, 360, 361, 362, 367, 368], "height": [253, 254, 256, 258, 259, 269], "width": [253, 254, 256, 258, 259, 269, 293], "momentum": [254, 362, 364, 368, 380], "affin": [254, 263, 264, 266, 267, 293], "track_running_stat": 254, "var": [254, 263, 264, 266, 326], "epsilon": [254, 263, 264, 266, 294, 324, 326, 356, 358, 359, 360, 361, 367], "gamma": [254, 263, 264, 266, 294, 307, 308, 309, 310], "nc": 254, "nlc": [254, 255], "four": 254, "nhwc": [254, 256], "paper": [254, 301, 356, 357, 358, 359, 361, 362], "deep": [254, 307, 308, 309, 310], "intern": 254, "covari": 254, "shift": 254, "bn": 254, "in_channel": [255, 256], "out_channel": [255, 256], "learnabl": [255, 256, 299], "portion": 257, "independ": [258, 259], "nwhc": 258, "whc": 258, "maintain": [258, 259, 362], "entri": [258, 259], "benefici": [258, 259, 383], "earli": 258, "adjac": 258, "pixel": 258, "thompson": 258, "goroshin": 258, "jain": 258, "lecun": 258, "bregler": 258, "2015": [258, 359, 361], "cvpr": 258, "ndhwc": 259, "dhwc": 259, "medic": 259, "video": 259, "num_embed": 260, "lookup": 260, "usual": [260, 379, 383], "vocabulari": 260, "approx": 261, "unit": [261, 262, 296, 298, 300, 307, 308, 309, 310, 314, 315, 316, 317, 318, 320, 339, 340, 341, 343], "phi": [261, 315], "geluapprox": 261, "sigma": [261, 262, 265, 307, 308, 309, 310, 316, 317, 318, 321, 342, 343], "60033": [261, 316], "0433603": [261, 316], "gelufast": 261, "773": 261, "regard": 261, "input_s": [262, 265, 295], "hidden_s": [262, 265, 295], "gate": [262, 318], "recurr": [262, 265, 295], "nld": [262, 265, 295], "ld": [262, 265, 295], "r_t": 262, "xr": 262, "x_t": [262, 265, 295], "hr": 262, "h_t": [262, 265, 295], "b_": [262, 265], "z_t": 262, "xz": 262, "hz": 262, "n_t": 262, "xn": 262, "odot": [262, 265], "hn": 262, "hidden": [262, 265, 295, 304], "nh": [262, 265, 295], "nlh": [262, 265, 295], "lh": [262, 265, 295], "num_group": 263, "pytorch_compat": 263, "split": [263, 318], "preced": 263, "org": [263, 264, 266, 270, 294, 317, 337], "1803": 263, "08494": 263, "denomin": [264, 324, 356, 358, 359, 360, 361, 367], "inorm": 264, "1607": [264, 266], "08022": 264, "i_t": 265, "xi": 265, "f_t": 265, "xf": 265, "hf": 265, "g_t": [265, 356, 358, 359, 360, 361, 362, 367, 368], "xg": 265, "hg": 265, "o_t": 265, "xo": 265, "ho": 265, "c_": [265, 362], "c_t": [265, 362], "cell": 265, "06450": 266, "mathcal": 267, "d_i": 267, "max_": [268, 269], "1908": [270, 337], "08681": [270, 337], "map_fn": [271, 275], "filter_fn": [271, 275], "valid_parameter_filt": 271, "apply_fn": 272, "descend": 273, "is_leaf_fn": 275, "found": 275, "drop": 275, "idempot": [276, 288], "endswith": 276, "file_or_weight": 278, "miss": [278, 386], "ok": [278, 381], "save_safetensor": [282, 386], "predic": 283, "reflect": [284, 380, 382, 384], "certain": [285, 380], "ie": 288, "noop": 288, "unfrozen": 288, "tracer": 289, "partial": [289, 290, 380, 383], "child": 290, "flexibli": 290, "programmat": 290, "query_input_dim": 291, "key_input_dim": 291, "value_input_dim": 291, "value_dim": 291, "value_output_dim": 291, "aggreg": 291, "linearli": 291, "attend": 291, "num_paramet": 292, "25": [292, 305], "parametr": [292, 338], "classmethod": 293, "from_linear": 293, "quantize_modul": 293, "accumul": 294, "1910": 294, "07467": 294, "nonlinear": [295, 380], "elman": 295, "ih": 295, "hh": 295, "func": 295, "rectifi": [296, 309, 310, 320, 339, 340], "10000": 297, "slightli": [297, 387], "plain": 299, "known": [300, 343], "swish": [300, 343], "min_freq": 301, "0001": 301, "max_freq": 301, "cos_first": 301, "full_turn": 301, "sinusoid": 301, "sin": [301, 381, 385], "lambd": [302, 346], "threshold": [303, 328, 335, 347], "geq": [303, 347], "num_encoder_lay": 304, "num_decoder_lay": 304, "nb_func": 304, "custom_encod": 304, "custom_decod": 304, "norm_first": 304, "checkpoint": 304, "decod": 304, "interact": 304, "mechan": 304, "chekpoint": 304, "usag": [304, 380], "expens": 304, "scale_factor": 305, "nearest": 305, "align_corn": 305, "audio": 305, "4d": 305, "forth": 305, "neighbor": 305, "interpol": 305, "bilinear": 305, "trilinear": 305, "corner": 305, "bottom": 305, "squeez": [305, 380], "75": 305, "33333": 305, "66667": 305, "init_fn": [306, 307, 308, 309, 310, 311, 312, 313, 350], "glorot": [307, 308], "fan_in": [307, 308, 309, 310], "fan_out": [307, 308, 309, 310], "fan": [307, 308, 309, 310], "_in": [307, 308], "_out": [307, 308], "difficulti": [307, 308], "feedforward": [307, 308], "191107": 307, "61278": 307, "150594": 307, "363207": 307, "gain": [307, 308, 309, 310], "89613": 307, "53947": 307, "48095": 307, "995016": 307, "223404": 308, "890597": 308, "379159": 308, "776856": 308, "90041": 308, "02264": 308, "912766": 308, "12451": 308, "delv": [309, 310], "surpass": [309, 310], "human": [309, 310], "level": [309, 310], "imagenet": [309, 310], "classif": [309, 310], "25211": 309, "458835": 309, "177208": 309, "0137595": 309, "6967": 309, "02765": 309, "15268": 309, "75787": 309, "kaim": 310, "0300242": 310, "0184009": 310, "793615": 310, "666329": 310, "64331": 310, "16506": 310, "08619": 310, "79854": 310, "982273": 312, "534422": 312, "380709": 312, "0645099": 312, "883935": 313, "863726": 313, "617261": 313, "417497": 313, "exact": [316, 317], "0003": 316, "cdot": [316, 317, 324, 327, 343], "015": 317, "702": 317, "hendryck": 317, "1606": 317, "08415": 317, "halv": 318, "negative_slop": 320, "leaki": 320, "sum_i": 322, "x_i": [322, 344], "with_logit": 323, "predict": [323, 326, 327, 328, 329, 330, 331, 333, 334, 335], "105361": 323, "223144": 323, "20397": 323, "916291": 323, "539245": 323, "prob": 323, "510826": 323, "x1": 324, "x2": 324, "x_1": [324, 332], "x_2": [324, 332], "label_smooth": 325, "hot": 325, "smooth": [325, 335, 367], "0485873": 325, "348587": 325, "06": [326, 336, 356], "likelihood": [326, 334], "nll": [326, 334], "hing": 327, "y_": [327, 331], "pred": [327, 331], "delta": [328, 356], "huber": 328, "leq": [328, 341], "l2": [328, 331, 368], "kullback": 329, "leibler": 329, "diverg": 329, "cosh": 331, "logcosh": 331, "sensit": 331, "outlier": 331, "dual": 331, "behavior": [331, 382, 383], "offer": 331, "balanc": 331, "robust": 331, "approach": [331, 381], "inputs1": 332, "inputs2": 332, "margin": [332, 336], "rank": 332, "573409": 332, "765166": 332, "0638": 332, "75596": 332, "225763": 332, "256995": 332, "773433": 332, "formula": 335, "anchor": 336, "triplet": 336, "_p": 336, "degre": 336, "pairwis": 336, "instabl": 336, "monoton": 337, "0507": 341, "67326": 341, "sum_j": 344, "x_j": 344, "subclass": 353, "concept": 353, "mymlp": 353, "in_proj": 353, "subsequ": 355, "apply_gradi": 355, "rmsprop": 355, "adagrad": 355, "adafactor": 355, "adadelta": 355, "adam": [355, 361, 362, 371, 372], "adamw": [355, 362], "adamax": 355, "lion": 355, "cosine_decai": [355, 371], "exponential_decai": 355, "join_schedul": 355, "linear_schedul": [355, 371], "step_decai": 355, "rho": 356, "zeiler": 356, "2012": [356, 367], "adapt": [356, 357, 358], "1212": 356, "5701": 356, "v_": [356, 358, 359, 360, 361, 367, 368], "v_t": [356, 358, 359, 360, 361, 367, 368], "u_t": 356, "u_": 356, "w_t": [356, 358, 359, 360, 361, 362, 367, 368], "001": 357, "clip_threshold": 357, "decay_r": [357, 370, 373], "beta_1": [357, 359, 360, 361, 362], "weight_decai": [357, 360, 362, 368], "scale_paramet": 357, "relative_step": 357, "warmup_init": 357, "sublinear": 357, "cost": [357, 383], "epsilon_1": 357, "epsilon_2": 357, "parameter_scal": 357, "clip": 357, "unscal": 357, "decai": [357, 360, 362, 368, 369, 370, 373], "duchi": 358, "hazan": 358, "singer": 358, "2011": 358, "subgradi": 358, "onlin": 358, "stochast": [358, 359, 361, 368, 383], "jmlr": 358, "999": [359, 360, 361], "omit": [359, 361], "estim": [359, 361], "kingma": [359, 361], "ba": [359, 361], "iclr": [359, 360, 361], "m_": [359, 360, 361, 362], "m_t": [359, 360, 361, 362], "beta_2": [359, 360, 361, 362], "contrast": 360, "loshchilov": 360, "hutter": 360, "decoupl": 360, "99": [362, 367], "tend": 362, "10x": 362, "strength": [362, 368], "wd": 362, "chen": 362, "symbol": 362, "discoveri": 362, "2302": 362, "06675": 362, "eta": 362, "opt": 363, "tieleman": 367, "hinton": 367, "lectur": 367, "coursera": 367, "dampen": 368, "nesterov": 368, "descent": [368, 380, 383], "mu": 368, "tau": 368, "penalti": 368, "decay_step": 369, "beyond": [369, 372], "minim": 369, "lr_schedul": [369, 370, 371, 373], "1000": [369, 380], "0999961": 369, "06561": 370, "boundari": 371, "join": 371, "receiv": [371, 384], "transit": 371, "warmup": [371, 372], "0999938": 371, "101": 372, "step_siz": 373, "081": 373, "basi": 375, "implicit": [377, 380, 381], "fine": [377, 383], "grain": 377, "control": [377, 383], "pseudo": 377, "altern": 377, "splittabl": 377, "threefri": 377, "counter": 377, "cycl": 379, "merg": 380, "fuse": 380, "big": 380, "awar": [380, 383], "36788": 380, "compiled_fun": 380, "code": [380, 383], "slow": 380, "stack": 380, "rerun": [380, 383], "frequent": [380, 383], "destroi": 380, "anonym": 380, "don": [380, 387], "unari": 380, "overhead": [380, 383, 387], "bandwidth": 380, "fusibl": 380, "consider": 380, "versu": 380, "timeit": [380, 381], "tic": 380, "perf_count": 380, "toc": 380, "tpi": 380, "1e3": 380, "4096": [380, 381, 387], "On": [380, 381, 383], "millisecond": [380, 387], "five": 380, "latest": 380, "won": 380, "placehold": 380, "insid": 380, "crash": 380, "disable_compil": 380, "okai": [380, 383], "intend": 380, "deal": 380, "pretti": [380, 383], "inconveni": 380, "functool": 380, "particularli": 380, "backward": [380, 381], "compiled_grad_fn": 380, "71828": 380, "outer": [380, 383], "opportun": 380, "idea": [381, 383], "behind": 381, "dfdx": [381, 382], "d2fdx2": 381, "zero_grad": 381, "detach": 381, "requires_grad": 381, "dloss_dw": 381, "dloss_dx": 381, "lot": 381, "redund": 381, "suppos": [381, 387], "nice": [381, 383], "propag": [381, 382], "stop_gradi": 381, "autom": 381, "contriv": [381, 387], "sake": 381, "clariti": 381, "quit": [381, 384], "power": [381, 384], "difficult": 381, "primit": 381, "issu": [381, 384], "priorit": 381, "naive_add": 381, "vmap_add": 381, "total": 381, "390": 381, "wherea": 381, "025": 381, "ten": [381, 383], "Of": 381, "better": [381, 387], "handi": 381, "slice": 382, "ellipsi": 382, "mix": 382, "take_along_axi": 382, "lack": 382, "extrem": [382, 383], "ineffici": [382, 383], "nonzero": 382, "dynam": 383, "easier": 383, "worri": 383, "fun1": 383, "expensive_fun": 383, "consum": 383, "eager": 383, "thank": 383, "weights_fp16": 383, "trade": 383, "bad": 383, "grow": 383, "computation": 383, "costli": 383, "wide": 383, "thousand": 383, "value_and_grad_fn": 383, "implicitli": 383, "anytim": 383, "memoryview": [383, 384], "perfectli": 383, "first_lay": 383, "second_layer_a": 383, "second_layer_b": 383, "protocol": 384, "pep": 384, "3118": 384, "a_view": 384, "owndata": 384, "extern": 384, "x_view": 384, "modifi": 384, "df": 384, "x\u00b2": 384, "2x": 384, "indirectli": 384, "modif": 384, "seen": 384, "occur": 384, "incorpor": 384, "incorrect": 384, "experiment": 384, "break": 384, "advis": 384, "intermedi": 384, "jnp": 384, "tf": 384, "page": 385, "composit": 385, "archiv": 386, "savez_compress": 386, "save_gguf": 386, "arr_0": 386, "advantag": 387, "parallel": 387, "race": 387, "interest": 387, "albeit": 387, "d1": 387, "d2": 387, "matmul": 387, "dens": 387, "twice": 387, "measur": 387, "default_stream": 388, "default_devic": 388, "my_devic": 388}, "objects": {"mlx.core": [[8, 0, 1, "", "Device"], [9, 0, 1, "", "Dtype"], [10, 0, 1, "", "DtypeCategory"], [242, 0, 1, "", "Stream"], [11, 2, 1, "", "abs"], [12, 2, 1, "", "add"], [13, 2, 1, "", "all"], [14, 2, 1, "", "allclose"], [15, 2, 1, "", "any"], [16, 2, 1, "", "arange"], [17, 2, 1, "", "arccos"], [18, 2, 1, "", "arccosh"], [19, 2, 1, "", "arcsin"], [20, 2, 1, "", "arcsinh"], [21, 2, 1, "", "arctan"], [22, 2, 1, "", "arctanh"], [23, 2, 1, "", "argmax"], [24, 2, 1, "", "argmin"], [25, 2, 1, "", "argpartition"], [26, 2, 1, "", "argsort"], [27, 0, 1, "", "array"], [76, 2, 1, "", "array_equal"], [77, 2, 1, "", "atleast_1d"], [78, 2, 1, "", "atleast_2d"], [79, 2, 1, "", "atleast_3d"], [80, 2, 1, "", "broadcast_to"], [81, 2, 1, "", "ceil"], [82, 2, 1, "", "clip"], [83, 2, 1, "", "compile"], [84, 2, 1, "", "concatenate"], [85, 2, 1, "", "conv1d"], [86, 2, 1, "", "conv2d"], [87, 2, 1, "", "conv_general"], [88, 2, 1, "", "convolve"], [89, 2, 1, "", "cos"], [90, 2, 1, "", "cosh"], [91, 2, 1, "", "cummax"], [92, 2, 1, "", "cummin"], [93, 2, 1, "", "cumprod"], [94, 2, 1, "", "cumsum"], [95, 2, 1, "", "default_device"], [96, 2, 1, "", "default_stream"], [97, 2, 1, "", "dequantize"], [98, 2, 1, "", "diag"], [99, 2, 1, "", "diagonal"], [100, 2, 1, "", "disable_compile"], [101, 2, 1, "", "divide"], [102, 2, 1, "", "divmod"], [103, 2, 1, "", "enable_compile"], [104, 2, 1, "", "equal"], [105, 2, 1, "", "erf"], [106, 2, 1, "", "erfinv"], [107, 2, 1, "", "eval"], [108, 2, 1, "", "exp"], [109, 2, 1, "", "expand_dims"], [110, 2, 1, "", "eye"], [127, 2, 1, "", "flatten"], [128, 2, 1, "", "floor"], [129, 2, 1, "", "floor_divide"], [130, 2, 1, "", "full"], [131, 2, 1, "", "grad"], [132, 2, 1, "", "greater"], [133, 2, 1, "", "greater_equal"], [134, 2, 1, "", "identity"], [135, 2, 1, "", "inner"], [136, 2, 1, "", "isclose"], [137, 2, 1, "", "isinf"], [138, 2, 1, "", "isnan"], [139, 2, 1, "", "isneginf"], [140, 2, 1, "", "isposinf"], [141, 2, 1, "", "issubdtype"], [142, 2, 1, "", "jvp"], [143, 2, 1, "", "less"], [144, 2, 1, "", "less_equal"], [147, 2, 1, "", "linspace"], [148, 2, 1, "", "load"], [149, 2, 1, "", "log"], [150, 2, 1, "", "log10"], [151, 2, 1, "", "log1p"], [152, 2, 1, "", "log2"], [153, 2, 1, "", "logaddexp"], [154, 2, 1, "", "logical_and"], [155, 2, 1, "", "logical_not"], [156, 2, 1, "", "logical_or"], [157, 2, 1, "", "logsumexp"], [158, 2, 1, "", "matmul"], [159, 2, 1, "", "max"], [160, 2, 1, "", "maximum"], [161, 2, 1, "", "mean"], [168, 2, 1, "", "min"], [169, 2, 1, "", "minimum"], [170, 2, 1, "", "moveaxis"], [171, 2, 1, "", "multiply"], [172, 2, 1, "", "negative"], [173, 2, 1, "", "new_stream"], [174, 2, 1, "", "ones"], [175, 2, 1, "", "ones_like"], [176, 2, 1, "", "outer"], [177, 2, 1, "", "pad"], [178, 2, 1, "", "partition"], [179, 2, 1, "", "prod"], [180, 2, 1, "", "quantize"], [181, 2, 1, "", "quantized_matmul"], [192, 2, 1, "", "reciprocal"], [193, 2, 1, "", "repeat"], [194, 2, 1, "", "reshape"], [195, 2, 1, "", "round"], [196, 2, 1, "", "rsqrt"], [197, 2, 1, "", "save"], [198, 2, 1, "", "save_gguf"], [199, 2, 1, "", "save_safetensors"], [200, 2, 1, "", "savez"], [201, 2, 1, "", "savez_compressed"], [202, 2, 1, "", "set_default_device"], [203, 2, 1, "", "set_default_stream"], [204, 2, 1, "", "sigmoid"], [205, 2, 1, "", "sign"], [206, 2, 1, "", "sin"], [207, 2, 1, "", "sinh"], [208, 2, 1, "", "softmax"], [209, 2, 1, "", "sort"], [210, 2, 1, "", "split"], [211, 2, 1, "", "sqrt"], [212, 2, 1, "", "square"], [213, 2, 1, "", "squeeze"], [214, 2, 1, "", "stack"], [215, 2, 1, "", "stop_gradient"], [216, 2, 1, "", "stream"], [217, 2, 1, "", "subtract"], [218, 2, 1, "", "sum"], [219, 2, 1, "", "swapaxes"], [220, 2, 1, "", "take"], [221, 2, 1, "", "take_along_axis"], [222, 2, 1, "", "tan"], [223, 2, 1, "", "tanh"], [224, 2, 1, "", "tensordot"], [225, 2, 1, "", "tile"], [226, 2, 1, "", "topk"], [227, 2, 1, "", "transpose"], [228, 2, 1, "", "tri"], [229, 2, 1, "", "tril"], [230, 2, 1, "", "triu"], [231, 2, 1, "", "value_and_grad"], [232, 2, 1, "", "var"], [233, 2, 1, "", "vjp"], [234, 2, 1, "", "vmap"], [235, 2, 1, "", "where"], [236, 2, 1, "", "zeros"], [237, 2, 1, "", "zeros_like"]], "mlx.core.Device": [[8, 1, 1, "", "__init__"]], "mlx.core.Dtype": [[9, 1, 1, "", "__init__"]], "mlx.core.DtypeCategory": [[10, 1, 1, "", "__init__"]], "mlx.core.Stream": [[242, 1, 1, "", "__init__"]], "mlx.core.array": [[28, 3, 1, "", "T"], [27, 1, 1, "", "__init__"], [29, 1, 1, "", "abs"], [30, 1, 1, "", "all"], [31, 1, 1, "", "any"], [32, 1, 1, "", "argmax"], [33, 1, 1, "", "argmin"], [34, 1, 1, "", "astype"], [35, 3, 1, "", "at"], [36, 1, 1, "", "cos"], [37, 1, 1, "", "cummax"], [38, 1, 1, "", "cummin"], [39, 1, 1, "", "cumprod"], [40, 1, 1, "", "cumsum"], [41, 1, 1, "", "diag"], [42, 1, 1, "", "diagonal"], [43, 3, 1, "", "dtype"], [44, 1, 1, "", "exp"], [45, 1, 1, "", "flatten"], [46, 1, 1, "", "item"], [47, 3, 1, "", "itemsize"], [48, 1, 1, "", "log"], [49, 1, 1, "", "log10"], [50, 1, 1, "", "log1p"], [51, 1, 1, "", "log2"], [52, 1, 1, "", "logsumexp"], [53, 1, 1, "", "max"], [54, 1, 1, "", "mean"], [55, 1, 1, "", "min"], [56, 1, 1, "", "moveaxis"], [57, 3, 1, "", "nbytes"], [58, 3, 1, "", "ndim"], [59, 1, 1, "", "prod"], [60, 1, 1, "", "reciprocal"], [61, 1, 1, "", "reshape"], [62, 1, 1, "", "round"], [63, 1, 1, "", "rsqrt"], [64, 3, 1, "", "shape"], [65, 1, 1, "", "sin"], [66, 3, 1, "", "size"], [67, 1, 1, "", "split"], [68, 1, 1, "", "sqrt"], [69, 1, 1, "", "square"], [70, 1, 1, "", "squeeze"], [71, 1, 1, "", "sum"], [72, 1, 1, "", "swapaxes"], [73, 1, 1, "", "tolist"], [74, 1, 1, "", "transpose"], [75, 1, 1, "", "var"]], "mlx.core.fast": [[111, 2, 1, "", "layer_norm"], [112, 2, 1, "", "rms_norm"], [113, 2, 1, "", "rope"], [114, 2, 1, "", "scaled_dot_product_attention"]], "mlx.core.fft": [[115, 2, 1, "", "fft"], [116, 2, 1, "", "fft2"], [117, 2, 1, "", "fftn"], [118, 2, 1, "", "ifft"], [119, 2, 1, "", "ifft2"], [120, 2, 1, "", "ifftn"], [121, 2, 1, "", "irfft"], [122, 2, 1, "", "irfft2"], [123, 2, 1, "", "irfftn"], [124, 2, 1, "", "rfft"], [125, 2, 1, "", "rfft2"], [126, 2, 1, "", "rfftn"]], "mlx.core.linalg": [[145, 2, 1, "", "norm"], [146, 2, 1, "", "qr"]], "mlx.core.metal": [[162, 2, 1, "", "get_active_memory"], [163, 2, 1, "", "get_cache_memory"], [164, 2, 1, "", "get_peak_memory"], [165, 2, 1, "", "is_available"], [166, 2, 1, "", "set_cache_limit"], [167, 2, 1, "", "set_memory_limit"]], "mlx.core.random": [[182, 2, 1, "", "bernoulli"], [183, 2, 1, "", "categorical"], [184, 2, 1, "", "gumbel"], [185, 2, 1, "", "key"], [186, 2, 1, "", "normal"], [187, 2, 1, "", "randint"], [188, 2, 1, "", "seed"], [189, 2, 1, "", "split"], [190, 2, 1, "", "truncated_normal"], [191, 2, 1, "", "uniform"]], "mlx.nn": [[251, 0, 1, "", "ALiBi"], [252, 0, 1, "", "AvgPool1d"], [253, 0, 1, "", "AvgPool2d"], [254, 0, 1, "", "BatchNorm"], [255, 0, 1, "", "Conv1d"], [256, 0, 1, "", "Conv2d"], [257, 0, 1, "", "Dropout"], [258, 0, 1, "", "Dropout2d"], [259, 0, 1, "", "Dropout3d"], [260, 0, 1, "", "Embedding"], [261, 0, 1, "", "GELU"], [262, 0, 1, "", "GRU"], [263, 0, 1, "", "GroupNorm"], [264, 0, 1, "", "InstanceNorm"], [265, 0, 1, "", "LSTM"], [266, 0, 1, "", "LayerNorm"], [267, 0, 1, "", "Linear"], [268, 0, 1, "", "MaxPool1d"], [269, 0, 1, "", "MaxPool2d"], [270, 0, 1, "", "Mish"], [353, 0, 1, "", "Module"], [291, 0, 1, "", "MultiHeadAttention"], [292, 0, 1, "", "PReLU"], [293, 0, 1, "", "QuantizedLinear"], [294, 0, 1, "", "RMSNorm"], [295, 0, 1, "", "RNN"], [296, 0, 1, "", "ReLU"], [297, 0, 1, "", "RoPE"], [298, 0, 1, "", "SELU"], [299, 0, 1, "", "Sequential"], [300, 0, 1, "", "SiLU"], [301, 0, 1, "", "SinusoidalPositionalEncoding"], [302, 0, 1, "", "Softshrink"], [303, 0, 1, "", "Step"], [304, 0, 1, "", "Transformer"], [305, 0, 1, "", "Upsample"], [314, 2, 1, "", "elu"], [315, 2, 1, "", "gelu"], [316, 2, 1, "", "gelu_approx"], [317, 2, 1, "", "gelu_fast_approx"], [318, 2, 1, "", "glu"], [319, 2, 1, "", "hardswish"], [320, 2, 1, "", "leaky_relu"], [321, 2, 1, "", "log_sigmoid"], [322, 2, 1, "", "log_softmax"], [337, 2, 1, "", "mish"], [338, 2, 1, "", "prelu"], [339, 2, 1, "", "relu"], [340, 2, 1, "", "relu6"], [341, 2, 1, "", "selu"], [342, 2, 1, "", "sigmoid"], [343, 2, 1, "", "silu"], [344, 2, 1, "", "softmax"], [345, 2, 1, "", "softplus"], [346, 2, 1, "", "softshrink"], [347, 2, 1, "", "step"], [348, 2, 1, "", "tanh"], [238, 2, 1, "", "value_and_grad"]], "mlx.nn.Module": [[271, 1, 1, "", "apply"], [272, 1, 1, "", "apply_to_modules"], [273, 1, 1, "", "children"], [274, 1, 1, "", "eval"], [275, 1, 1, "", "filter_and_map"], [276, 1, 1, "", "freeze"], [277, 1, 1, "", "leaf_modules"], [278, 1, 1, "", "load_weights"], [279, 1, 1, "", "modules"], [280, 1, 1, "", "named_modules"], [281, 1, 1, "", "parameters"], [282, 1, 1, "", "save_weights"], [283, 1, 1, "", "set_dtype"], [284, 3, 1, "", "state"], [285, 1, 1, "", "train"], [286, 1, 1, "", "trainable_parameters"], [287, 3, 1, "", "training"], [288, 1, 1, "", "unfreeze"], [289, 1, 1, "", "update"], [290, 1, 1, "", "update_modules"]], "mlx.nn.init": [[306, 2, 1, "", "constant"], [307, 2, 1, "", "glorot_normal"], [308, 2, 1, "", "glorot_uniform"], [309, 2, 1, "", "he_normal"], [310, 2, 1, "", "he_uniform"], [311, 2, 1, "", "identity"], [312, 2, 1, "", "normal"], [313, 2, 1, "", "uniform"]], "mlx.nn.losses": [[323, 2, 1, "", "binary_cross_entropy"], [324, 2, 1, "", "cosine_similarity_loss"], [325, 2, 1, "", "cross_entropy"], [326, 2, 1, "", "gaussian_nll_loss"], [327, 2, 1, "", "hinge_loss"], [328, 2, 1, "", "huber_loss"], [329, 2, 1, "", "kl_div_loss"], [330, 2, 1, "", "l1_loss"], [331, 2, 1, "", "log_cosh_loss"], [332, 2, 1, "", "margin_ranking_loss"], [333, 2, 1, "", "mse_loss"], [334, 2, 1, "", "nll_loss"], [335, 2, 1, "", "smooth_l1_loss"], [336, 2, 1, "", "triplet_loss"]], "mlx.optimizers": [[356, 0, 1, "", "AdaDelta"], [357, 0, 1, "", "Adafactor"], [358, 0, 1, "", "Adagrad"], [359, 0, 1, "", "Adam"], [360, 0, 1, "", "AdamW"], [361, 0, 1, "", "Adamax"], [362, 0, 1, "", "Lion"], [375, 0, 1, "", "Optimizer"], [367, 0, 1, "", "RMSprop"], [368, 0, 1, "", "SGD"], [369, 2, 1, "", "cosine_decay"], [370, 2, 1, "", "exponential_decay"], [371, 2, 1, "", "join_schedules"], [372, 2, 1, "", "linear_schedule"], [373, 2, 1, "", "step_decay"]], "mlx.optimizers.Optimizer": [[363, 1, 1, "", "apply_gradients"], [364, 1, 1, "", "init"], [365, 3, 1, "", "state"], [366, 1, 1, "", "update"]], "mlx.utils": [[239, 2, 1, "", "tree_flatten"], [240, 2, 1, "", "tree_map"], [241, 2, 1, "", "tree_unflatten"]]}, "objtypes": {"0": "py:class", "1": "py:method", "2": "py:function", "3": "py:property"}, "objnames": {"0": ["py", "class", "Python class"], "1": ["py", "method", "Python method"], "2": ["py", "function", "Python function"], "3": ["py", "property", "Python property"]}, "titleterms": {"oper": [0, 1, 354], "develop": 1, "document": 1, "introduc": 1, "exampl": [1, 6, 380, 387], "primit": 1, "us": [1, 383, 388], "implement": [1, 4], "cpu": 1, "backend": 1, "gpu": 1, "transform": [1, 304, 378, 380, 381, 383, 385], "build": [1, 7], "bind": 1, "python": [1, 6, 7], "cmake": 1, "setuptool": 1, "usag": [1, 6], "result": 1, "script": [1, 4], "download": [1, 4], "code": [1, 4], "metal": [2, 7, 162, 163, 164, 165, 166, 167, 249], "debugg": 2, "xcode": 2, "workflow": 2, "linear": [3, 248, 267], "regress": 3, "llm": 4, "infer": 4, "model": 4, "attent": 4, "layer": [4, 5, 351], "encod": 4, "full": [4, 130], "gener": 4, "put": 4, "all": [4, 13, 30], "togeth": 4, "convert": 4, "weight": 4, "load": [4, 148, 386], "benchmark": 4, "multi": 5, "perceptron": 5, "mlx": [6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373], "instal": [6, 7], "api": [6, 7], "refer": 6, "c": [6, 7], "further": 6, "read": 6, "troubleshoot": 7, "from": [7, 382], "sourc": 7, "requir": 7, "option": 7, "found": 7, "x86": 7, "shell": 7, "core": [8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 242], "devic": [8, 245], "dtype": [9, 43], "dtypecategori": 10, "ab": [11, 29], "add": 12, "allclos": 14, "ani": [15, 31], "arang": 16, "arcco": 17, "arccosh": 18, "arcsin": 19, "arcsinh": 20, "arctan": 21, "arctanh": 22, "argmax": [23, 32], "argmin": [24, 33], "argpartit": 25, "argsort": 26, "arrai": [27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 243, 382, 386], "t": 28, "astyp": 34, "co": [36, 89], "cummax": [37, 91], "cummin": [38, 92], "cumprod": [39, 93], "cumsum": [40, 94], "diag": [41, 98], "diagon": [42, 99], "exp": [44, 108], "flatten": [45, 127], "item": 46, "items": 47, "log": [48, 149], "log10": [49, 150], "log1p": [50, 151], "log2": [51, 152], "logsumexp": [52, 157], "max": [53, 159], "mean": [54, 161], "min": [55, 168], "moveaxi": [56, 170], "nbyte": 57, "ndim": 58, "prod": [59, 179], "reciproc": [60, 192], "reshap": [61, 194], "round": [62, 195], "rsqrt": [63, 196], "shape": 64, "sin": [65, 206], "size": 66, "split": [67, 189, 210], "sqrt": [68, 211], "squar": [69, 212], "squeez": [70, 213], "sum": [71, 218], "swapax": [72, 219], "tolist": 73, "transpos": [74, 227], "var": [75, 232], "array_equ": 76, "atleast_1d": 77, "atleast_2d": 78, "atleast_3d": 79, "broadcast_to": 80, "ceil": 81, "clip": 82, "compil": [83, 380], "concaten": 84, "conv1d": [85, 255], "conv2d": [86, 256], "conv_gener": 87, "convolv": 88, "cosh": 90, "default_devic": 95, "default_stream": 96, "dequant": 97, "disable_compil": 100, "divid": 101, "divmod": 102, "enable_compil": 103, "equal": 104, "erf": 105, "erfinv": 106, "eval": [107, 274], "expand_dim": 109, "ey": 110, "fast": [111, 112, 113, 114, 246], "layer_norm": 111, "rms_norm": 112, "rope": [113, 297], "scaled_dot_product_attent": 114, "fft": [115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 247], "fft2": 116, "fftn": 117, "ifft": 118, "ifft2": 119, "ifftn": 120, "irfft": 121, "irfft2": 122, "irfftn": 123, "rfft": 124, "rfft2": 125, "rfftn": 126, "floor": 128, "floor_divid": 129, "grad": [131, 250], "greater": 132, "greater_equ": 133, "ident": [134, 311], "inner": 135, "isclos": 136, "isinf": 137, "isnan": 138, "isneginf": 139, "isposinf": 140, "issubdtyp": 141, "jvp": 142, "less": 143, "less_equ": 144, "linalg": [145, 146], "norm": 145, "qr": 146, "linspac": 147, "logaddexp": 153, "logical_and": 154, "logical_not": 155, "logical_or": 156, "matmul": 158, "maximum": 160, "get_active_memori": 162, "get_cache_memori": 163, "get_peak_memori": 164, "is_avail": 165, "set_cache_limit": 166, "set_memory_limit": 167, "minimum": 169, "multipli": 171, "neg": 172, "new_stream": 173, "ones": 174, "ones_lik": 175, "outer": 176, "pad": 177, "partit": 178, "quantiz": 180, "quantized_matmul": 181, "random": [182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 377], "bernoulli": 182, "categor": 183, "gumbel": 184, "kei": 185, "normal": [186, 312], "randint": 187, "seed": 188, "truncated_norm": 190, "uniform": [191, 313], "repeat": 193, "save": [197, 386], "save_gguf": 198, "save_safetensor": 199, "savez": 200, "savez_compress": 201, "set_default_devic": 202, "set_default_stream": 203, "sigmoid": [204, 342], "sign": 205, "sinh": 207, "softmax": [208, 344], "sort": 209, "stack": 214, "stop_gradi": 215, "stream": [216, 242, 245, 388], "subtract": 217, "take": 220, "take_along_axi": 221, "tan": 222, "tanh": [223, 348], "tensordot": 224, "tile": 225, "topk": 226, "tri": 228, "tril": 229, "triu": 230, "value_and_grad": [231, 238], "vjp": 233, "vmap": 234, "where": 235, "zero": 236, "zeros_lik": 237, "nn": [238, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348], "util": [239, 240, 241, 379], "tree_flatten": 239, "tree_map": 240, "tree_unflatten": 241, "data": 244, "type": 244, "support": 244, "algebra": 248, "neural": 250, "network": 250, "quick": [250, 385], "start": [250, 385], "The": 250, "modul": [250, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 353], "class": 250, "paramet": [250, 281], "updat": [250, 289, 366, 382], "inspect": 250, "valu": 250, "alibi": 251, "avgpool1d": 252, "avgpool2d": 253, "batchnorm": 254, "dropout": 257, "dropout2d": 258, "dropout3d": 259, "embed": 260, "gelu": [261, 315], "gru": 262, "groupnorm": 263, "instancenorm": 264, "lstm": 265, "layernorm": 266, "maxpool1d": 268, "maxpool2d": 269, "mish": [270, 337], "appli": 271, "apply_to_modul": 272, "children": 273, "filter_and_map": 275, "freez": 276, "leaf_modul": 277, "load_weight": 278, "named_modul": 280, "save_weight": 282, "set_dtyp": 283, "state": [284, 365], "train": [285, 287, 380], "trainable_paramet": 286, "unfreez": 288, "update_modul": 290, "multiheadattent": 291, "prelu": [292, 338], "quantizedlinear": 293, "rmsnorm": 294, "rnn": 295, "relu": [296, 339], "selu": [298, 341], "sequenti": 299, "silu": [300, 343], "sinusoidalpositionalencod": 301, "softshrink": [302, 346], "step": [303, 347], "upsampl": 305, "init": [306, 307, 308, 309, 310, 311, 312, 313, 364], "constant": 306, "glorot_norm": 307, "glorot_uniform": 308, "he_norm": 309, "he_uniform": 310, "elu": 314, "gelu_approx": 316, "gelu_fast_approx": 317, "glu": 318, "hardswish": 319, "leaky_relu": 320, "log_sigmoid": 321, "log_softmax": 322, "loss": [323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 352], "binary_cross_entropi": 323, "cosine_similarity_loss": 324, "cross_entropi": 325, "gaussian_nll_loss": 326, "hinge_loss": 327, "huber_loss": 328, "kl_div_loss": 329, "l1_loss": 330, "log_cosh_loss": 331, "margin_ranking_loss": 332, "mse_loss": 333, "nll_loss": 334, "smooth_l1_loss": 335, "triplet_loss": 336, "relu6": 340, "softplu": 345, "function": [349, 352, 380, 381, 385], "initi": 350, "optim": [355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375], "adadelta": 356, "adafactor": 357, "adagrad": 358, "adam": 359, "adamw": 360, "adamax": 361, "lion": 362, "apply_gradi": 363, "rmsprop": 367, "sgd": 368, "cosine_decai": 369, "exponential_decai": 370, "join_schedul": 371, "linear_schedul": 372, "step_decai": 373, "common": 374, "schedul": 376, "tree": 379, "basic": [380, 385], "speedup": 380, "debug": 380, "pure": 380, "graph": [380, 383, 385], "automat": 381, "differenti": 381, "vector": 381, "index": 382, "differ": 382, "numpi": [382, 384], "In": 382, "place": 382, "lazi": 383, "evalu": 383, "why": 383, "comput": 383, "onli": 383, "what": 383, "you": 383, "when": 383, "convers": 384, "other": 384, "framework": 384, "pytorch": 384, "jax": 384, "tensorflow": 384, "guid": 385, "serial": 386, "format": 386, "unifi": 387, "memori": 387, "A": 387, "simpl": 387, "specifi": 388}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.intersphinx": 1, "sphinx": 60}, "alltitles": {"Operations": [[0, "operations"], [1, "operations"], [354, "operations"]], "Developer Documentation": [[1, "developer-documentation"]], "Introducing the Example": [[1, "introducing-the-example"]], "Operations and Primitives": [[1, "operations-and-primitives"]], "Primitives": [[1, "primitives"]], "Using the Primitives": [[1, "using-the-primitives"]], "Implementing the Primitive": [[1, "implementing-the-primitive"]], "Implementing the CPU Backend": [[1, "implementing-the-cpu-backend"]], "Implementing the GPU Backend": [[1, "implementing-the-gpu-backend"]], "Primitive Transforms": [[1, "primitive-transforms"]], "Building and Binding": [[1, "building-and-binding"]], "Binding to Python": [[1, "binding-to-python"]], "Building with CMake": [[1, "building-with-cmake"]], "Building with setuptools": [[1, "building-with-setuptools"]], "Usage": [[1, "usage"], [6, null]], "Results": [[1, "results"]], "Scripts": [[1, "scripts"], [4, "scripts"]], "Download the code": [[1, null], [4, null]], "Metal Debugger": [[2, "metal-debugger"]], "Xcode Workflow": [[2, "xcode-workflow"]], "Linear Regression": [[3, "linear-regression"]], "LLM inference": [[4, "llm-inference"]], "Implementing the model": [[4, "implementing-the-model"]], "Attention layer": [[4, "attention-layer"]], "Encoder layer": [[4, "encoder-layer"]], "Full model": [[4, "full-model"]], "Generation": [[4, "generation"]], "Putting it all together": [[4, "putting-it-all-together"]], "Converting the weights": [[4, "converting-the-weights"]], "Weight loading and benchmarking": [[4, "weight-loading-and-benchmarking"]], "Multi-Layer Perceptron": [[5, "multi-layer-perceptron"]], "MLX": [[6, "mlx"]], "Install": [[6, null]], "Examples": [[6, null]], "Python API Reference": [[6, null]], "C++ API Reference": [[6, null]], "Further Reading": [[6, null]], "Build and Install": [[7, "build-and-install"]], "Python Installation": [[7, "python-installation"]], "Troubleshooting": [[7, "troubleshooting"], [7, "id2"]], "Build from source": [[7, "build-from-source"]], "Build Requirements": [[7, "build-requirements"]], "Python API": [[7, "python-api"]], "C++ API": [[7, "c-api"]], "Build Options": [[7, "id3"]], "Metal not found": [[7, "metal-not-found"]], "x86 Shell": [[7, "x86-shell"]], "mlx.core.Device": [[8, "mlx-core-device"]], "mlx.core.Dtype": [[9, "mlx-core-dtype"]], "mlx.core.DtypeCategory": [[10, "mlx-core-dtypecategory"]], "mlx.core.abs": [[11, "mlx-core-abs"]], "mlx.core.add": [[12, "mlx-core-add"]], "mlx.core.all": [[13, "mlx-core-all"]], "mlx.core.allclose": [[14, "mlx-core-allclose"]], "mlx.core.any": [[15, "mlx-core-any"]], "mlx.core.arange": [[16, "mlx-core-arange"]], "mlx.core.arccos": [[17, "mlx-core-arccos"]], "mlx.core.arccosh": [[18, "mlx-core-arccosh"]], "mlx.core.arcsin": [[19, "mlx-core-arcsin"]], "mlx.core.arcsinh": [[20, "mlx-core-arcsinh"]], "mlx.core.arctan": [[21, "mlx-core-arctan"]], "mlx.core.arctanh": [[22, "mlx-core-arctanh"]], "mlx.core.argmax": [[23, "mlx-core-argmax"]], "mlx.core.argmin": [[24, "mlx-core-argmin"]], "mlx.core.argpartition": [[25, "mlx-core-argpartition"]], "mlx.core.argsort": [[26, "mlx-core-argsort"]], "mlx.core.array": [[27, "mlx-core-array"]], "mlx.core.array.T": [[28, "mlx-core-array-t"]], "mlx.core.array.abs": [[29, "mlx-core-array-abs"]], "mlx.core.array.all": [[30, "mlx-core-array-all"]], "mlx.core.array.any": [[31, "mlx-core-array-any"]], "mlx.core.array.argmax": [[32, "mlx-core-array-argmax"]], "mlx.core.array.argmin": [[33, "mlx-core-array-argmin"]], "mlx.core.array.astype": [[34, "mlx-core-array-astype"]], "mlx.core.array.at": [[35, "mlx-core-array-at"]], "mlx.core.array.cos": [[36, "mlx-core-array-cos"]], "mlx.core.array.cummax": [[37, "mlx-core-array-cummax"]], "mlx.core.array.cummin": [[38, "mlx-core-array-cummin"]], "mlx.core.array.cumprod": [[39, "mlx-core-array-cumprod"]], "mlx.core.array.cumsum": [[40, "mlx-core-array-cumsum"]], "mlx.core.array.diag": [[41, "mlx-core-array-diag"]], "mlx.core.array.diagonal": [[42, "mlx-core-array-diagonal"]], "mlx.core.array.dtype": [[43, "mlx-core-array-dtype"]], "mlx.core.array.exp": [[44, "mlx-core-array-exp"]], "mlx.core.array.flatten": [[45, "mlx-core-array-flatten"]], "mlx.core.array.item": [[46, "mlx-core-array-item"]], "mlx.core.array.itemsize": [[47, "mlx-core-array-itemsize"]], "mlx.core.array.log": [[48, "mlx-core-array-log"]], "mlx.core.array.log10": [[49, "mlx-core-array-log10"]], "mlx.core.array.log1p": [[50, "mlx-core-array-log1p"]], "mlx.core.array.log2": [[51, "mlx-core-array-log2"]], "mlx.core.array.logsumexp": [[52, "mlx-core-array-logsumexp"]], "mlx.core.array.max": [[53, "mlx-core-array-max"]], "mlx.core.array.mean": [[54, "mlx-core-array-mean"]], "mlx.core.array.min": [[55, "mlx-core-array-min"]], "mlx.core.array.moveaxis": [[56, "mlx-core-array-moveaxis"]], "mlx.core.array.nbytes": [[57, "mlx-core-array-nbytes"]], "mlx.core.array.ndim": [[58, "mlx-core-array-ndim"]], "mlx.core.array.prod": [[59, "mlx-core-array-prod"]], "mlx.core.array.reciprocal": [[60, "mlx-core-array-reciprocal"]], "mlx.core.array.reshape": [[61, "mlx-core-array-reshape"]], "mlx.core.array.round": [[62, "mlx-core-array-round"]], "mlx.core.array.rsqrt": [[63, "mlx-core-array-rsqrt"]], "mlx.core.array.shape": [[64, "mlx-core-array-shape"]], "mlx.core.array.sin": [[65, "mlx-core-array-sin"]], "mlx.core.array.size": [[66, "mlx-core-array-size"]], "mlx.core.array.split": [[67, "mlx-core-array-split"]], "mlx.core.array.sqrt": [[68, "mlx-core-array-sqrt"]], "mlx.core.array.square": [[69, "mlx-core-array-square"]], "mlx.core.array.squeeze": [[70, "mlx-core-array-squeeze"]], "mlx.core.array.sum": [[71, "mlx-core-array-sum"]], "mlx.core.array.swapaxes": [[72, "mlx-core-array-swapaxes"]], "mlx.core.array.tolist": [[73, "mlx-core-array-tolist"]], "mlx.core.array.transpose": [[74, "mlx-core-array-transpose"]], "mlx.core.array.var": [[75, "mlx-core-array-var"]], "mlx.core.array_equal": [[76, "mlx-core-array-equal"]], "mlx.core.atleast_1d": [[77, "mlx-core-atleast-1d"]], "mlx.core.atleast_2d": [[78, "mlx-core-atleast-2d"]], "mlx.core.atleast_3d": [[79, "mlx-core-atleast-3d"]], "mlx.core.broadcast_to": [[80, "mlx-core-broadcast-to"]], "mlx.core.ceil": [[81, "mlx-core-ceil"]], "mlx.core.clip": [[82, "mlx-core-clip"]], "mlx.core.compile": [[83, "mlx-core-compile"]], "mlx.core.concatenate": [[84, "mlx-core-concatenate"]], "mlx.core.conv1d": [[85, "mlx-core-conv1d"]], "mlx.core.conv2d": [[86, "mlx-core-conv2d"]], "mlx.core.conv_general": [[87, "mlx-core-conv-general"]], "mlx.core.convolve": [[88, "mlx-core-convolve"]], "mlx.core.cos": [[89, "mlx-core-cos"]], "mlx.core.cosh": [[90, "mlx-core-cosh"]], "mlx.core.cummax": [[91, "mlx-core-cummax"]], "mlx.core.cummin": [[92, "mlx-core-cummin"]], "mlx.core.cumprod": [[93, "mlx-core-cumprod"]], "mlx.core.cumsum": [[94, "mlx-core-cumsum"]], "mlx.core.default_device": [[95, "mlx-core-default-device"]], "mlx.core.default_stream": [[96, "mlx-core-default-stream"]], "mlx.core.dequantize": [[97, "mlx-core-dequantize"]], "mlx.core.diag": [[98, "mlx-core-diag"]], "mlx.core.diagonal": [[99, "mlx-core-diagonal"]], "mlx.core.disable_compile": [[100, "mlx-core-disable-compile"]], "mlx.core.divide": [[101, "mlx-core-divide"]], "mlx.core.divmod": [[102, "mlx-core-divmod"]], "mlx.core.enable_compile": [[103, "mlx-core-enable-compile"]], "mlx.core.equal": [[104, "mlx-core-equal"]], "mlx.core.erf": [[105, "mlx-core-erf"]], "mlx.core.erfinv": [[106, "mlx-core-erfinv"]], "mlx.core.eval": [[107, "mlx-core-eval"]], "mlx.core.exp": [[108, "mlx-core-exp"]], "mlx.core.expand_dims": [[109, "mlx-core-expand-dims"]], "mlx.core.eye": [[110, "mlx-core-eye"]], "mlx.core.fast.layer_norm": [[111, "mlx-core-fast-layer-norm"]], "mlx.core.fast.rms_norm": [[112, "mlx-core-fast-rms-norm"]], "mlx.core.fast.rope": [[113, "mlx-core-fast-rope"]], "mlx.core.fast.scaled_dot_product_attention": [[114, "mlx-core-fast-scaled-dot-product-attention"]], "mlx.core.fft.fft": [[115, "mlx-core-fft-fft"]], "mlx.core.fft.fft2": [[116, "mlx-core-fft-fft2"]], "mlx.core.fft.fftn": [[117, "mlx-core-fft-fftn"]], "mlx.core.fft.ifft": [[118, "mlx-core-fft-ifft"]], "mlx.core.fft.ifft2": [[119, "mlx-core-fft-ifft2"]], "mlx.core.fft.ifftn": [[120, "mlx-core-fft-ifftn"]], "mlx.core.fft.irfft": [[121, "mlx-core-fft-irfft"]], "mlx.core.fft.irfft2": [[122, "mlx-core-fft-irfft2"]], "mlx.core.fft.irfftn": [[123, "mlx-core-fft-irfftn"]], "mlx.core.fft.rfft": [[124, "mlx-core-fft-rfft"]], "mlx.core.fft.rfft2": [[125, "mlx-core-fft-rfft2"]], "mlx.core.fft.rfftn": [[126, "mlx-core-fft-rfftn"]], "mlx.core.flatten": [[127, "mlx-core-flatten"]], "mlx.core.floor": [[128, "mlx-core-floor"]], "mlx.core.floor_divide": [[129, "mlx-core-floor-divide"]], "mlx.core.full": [[130, "mlx-core-full"]], "mlx.core.grad": [[131, "mlx-core-grad"]], "mlx.core.greater": [[132, "mlx-core-greater"]], "mlx.core.greater_equal": [[133, "mlx-core-greater-equal"]], "mlx.core.identity": [[134, "mlx-core-identity"]], "mlx.core.inner": [[135, "mlx-core-inner"]], "mlx.core.isclose": [[136, "mlx-core-isclose"]], "mlx.core.isinf": [[137, "mlx-core-isinf"]], "mlx.core.isnan": [[138, "mlx-core-isnan"]], "mlx.core.isneginf": [[139, "mlx-core-isneginf"]], "mlx.core.isposinf": [[140, "mlx-core-isposinf"]], "mlx.core.issubdtype": [[141, "mlx-core-issubdtype"]], "mlx.core.jvp": [[142, "mlx-core-jvp"]], "mlx.core.less": [[143, "mlx-core-less"]], "mlx.core.less_equal": [[144, "mlx-core-less-equal"]], "mlx.core.linalg.norm": [[145, "mlx-core-linalg-norm"]], "mlx.core.linalg.qr": [[146, "mlx-core-linalg-qr"]], "mlx.core.linspace": [[147, "mlx-core-linspace"]], "mlx.core.load": [[148, "mlx-core-load"]], "mlx.core.log": [[149, "mlx-core-log"]], "mlx.core.log10": [[150, "mlx-core-log10"]], "mlx.core.log1p": [[151, "mlx-core-log1p"]], "mlx.core.log2": [[152, "mlx-core-log2"]], "mlx.core.logaddexp": [[153, "mlx-core-logaddexp"]], "mlx.core.logical_and": [[154, "mlx-core-logical-and"]], "mlx.core.logical_not": [[155, "mlx-core-logical-not"]], "mlx.core.logical_or": [[156, "mlx-core-logical-or"]], "mlx.core.logsumexp": [[157, "mlx-core-logsumexp"]], "mlx.core.matmul": [[158, "mlx-core-matmul"]], "mlx.core.max": [[159, "mlx-core-max"]], "mlx.core.maximum": [[160, "mlx-core-maximum"]], "mlx.core.mean": [[161, "mlx-core-mean"]], "mlx.core.metal.get_active_memory": [[162, "mlx-core-metal-get-active-memory"]], "mlx.core.metal.get_cache_memory": [[163, "mlx-core-metal-get-cache-memory"]], "mlx.core.metal.get_peak_memory": [[164, "mlx-core-metal-get-peak-memory"]], "mlx.core.metal.is_available": [[165, "mlx-core-metal-is-available"]], "mlx.core.metal.set_cache_limit": [[166, "mlx-core-metal-set-cache-limit"]], "mlx.core.metal.set_memory_limit": [[167, "mlx-core-metal-set-memory-limit"]], "mlx.core.min": [[168, "mlx-core-min"]], "mlx.core.minimum": [[169, "mlx-core-minimum"]], "mlx.core.moveaxis": [[170, "mlx-core-moveaxis"]], "mlx.core.multiply": [[171, "mlx-core-multiply"]], "mlx.core.negative": [[172, "mlx-core-negative"]], "mlx.core.new_stream": [[173, "mlx-core-new-stream"]], "mlx.core.ones": [[174, "mlx-core-ones"]], "mlx.core.ones_like": [[175, "mlx-core-ones-like"]], "mlx.core.outer": [[176, "mlx-core-outer"]], "mlx.core.pad": [[177, "mlx-core-pad"]], "mlx.core.partition": [[178, "mlx-core-partition"]], "mlx.core.prod": [[179, "mlx-core-prod"]], "mlx.core.quantize": [[180, "mlx-core-quantize"]], "mlx.core.quantized_matmul": [[181, "mlx-core-quantized-matmul"]], "mlx.core.random.bernoulli": [[182, "mlx-core-random-bernoulli"]], "mlx.core.random.categorical": [[183, "mlx-core-random-categorical"]], "mlx.core.random.gumbel": [[184, "mlx-core-random-gumbel"]], "mlx.core.random.key": [[185, "mlx-core-random-key"]], "mlx.core.random.normal": [[186, "mlx-core-random-normal"]], "mlx.core.random.randint": [[187, "mlx-core-random-randint"]], "mlx.core.random.seed": [[188, "mlx-core-random-seed"]], "mlx.core.random.split": [[189, "mlx-core-random-split"]], "mlx.core.random.truncated_normal": [[190, "mlx-core-random-truncated-normal"]], "mlx.core.random.uniform": [[191, "mlx-core-random-uniform"]], "mlx.core.reciprocal": [[192, "mlx-core-reciprocal"]], "mlx.core.repeat": [[193, "mlx-core-repeat"]], "mlx.core.reshape": [[194, "mlx-core-reshape"]], "mlx.core.round": [[195, "mlx-core-round"]], "mlx.core.rsqrt": [[196, "mlx-core-rsqrt"]], "mlx.core.save": [[197, "mlx-core-save"]], "mlx.core.save_gguf": [[198, "mlx-core-save-gguf"]], "mlx.core.save_safetensors": [[199, "mlx-core-save-safetensors"]], "mlx.core.savez": [[200, "mlx-core-savez"]], "mlx.core.savez_compressed": [[201, "mlx-core-savez-compressed"]], "mlx.core.set_default_device": [[202, "mlx-core-set-default-device"]], "mlx.core.set_default_stream": [[203, "mlx-core-set-default-stream"]], "mlx.core.sigmoid": [[204, "mlx-core-sigmoid"]], "mlx.core.sign": [[205, "mlx-core-sign"]], "mlx.core.sin": [[206, "mlx-core-sin"]], "mlx.core.sinh": [[207, "mlx-core-sinh"]], "mlx.core.softmax": [[208, "mlx-core-softmax"]], "mlx.core.sort": [[209, "mlx-core-sort"]], "mlx.core.split": [[210, "mlx-core-split"]], "mlx.core.sqrt": [[211, "mlx-core-sqrt"]], "mlx.core.square": [[212, "mlx-core-square"]], "mlx.core.squeeze": [[213, "mlx-core-squeeze"]], "mlx.core.stack": [[214, "mlx-core-stack"]], "mlx.core.stop_gradient": [[215, "mlx-core-stop-gradient"]], "mlx.core.stream": [[216, "mlx-core-stream"]], "mlx.core.subtract": [[217, "mlx-core-subtract"]], "mlx.core.sum": [[218, "mlx-core-sum"]], "mlx.core.swapaxes": [[219, "mlx-core-swapaxes"]], "mlx.core.take": [[220, "mlx-core-take"]], "mlx.core.take_along_axis": [[221, "mlx-core-take-along-axis"]], "mlx.core.tan": [[222, "mlx-core-tan"]], "mlx.core.tanh": [[223, "mlx-core-tanh"]], "mlx.core.tensordot": [[224, "mlx-core-tensordot"]], "mlx.core.tile": [[225, "mlx-core-tile"]], "mlx.core.topk": [[226, "mlx-core-topk"]], "mlx.core.transpose": [[227, "mlx-core-transpose"]], "mlx.core.tri": [[228, "mlx-core-tri"]], "mlx.core.tril": [[229, "mlx-core-tril"]], "mlx.core.triu": [[230, "mlx-core-triu"]], "mlx.core.value_and_grad": [[231, "mlx-core-value-and-grad"]], "mlx.core.var": [[232, "mlx-core-var"]], "mlx.core.vjp": [[233, "mlx-core-vjp"]], "mlx.core.vmap": [[234, "mlx-core-vmap"]], "mlx.core.where": [[235, "mlx-core-where"]], "mlx.core.zeros": [[236, "mlx-core-zeros"]], "mlx.core.zeros_like": [[237, "mlx-core-zeros-like"]], "mlx.nn.value_and_grad": [[238, "mlx-nn-value-and-grad"]], "mlx.utils.tree_flatten": [[239, "mlx-utils-tree-flatten"]], "mlx.utils.tree_map": [[240, "mlx-utils-tree-map"]], "mlx.utils.tree_unflatten": [[241, "mlx-utils-tree-unflatten"]], "mlx.core.Stream": [[242, "mlx-core-stream"]], "Array": [[243, "array"]], "Data Types": [[244, "data-types"]], "Supported Data Types": [[244, "id2"]], "Devices and Streams": [[245, "devices-and-streams"]], "Fast": [[246, "fast"]], "FFT": [[247, "fft"]], "Linear Algebra": [[248, "linear-algebra"]], "Metal": [[249, "metal"]], "Neural Networks": [[250, "neural-networks"]], "Quick Start with Neural Networks": [[250, "quick-start-with-neural-networks"]], "The Module Class": [[250, "the-module-class"]], "Parameters": [[250, "parameters"]], "Updating the Parameters": [[250, "updating-the-parameters"]], "Inspecting Modules": [[250, "inspecting-modules"]], "Value and Grad": [[250, "value-and-grad"]], "mlx.nn.ALiBi": [[251, "mlx-nn-alibi"]], "mlx.nn.AvgPool1d": [[252, "mlx-nn-avgpool1d"]], "mlx.nn.AvgPool2d": [[253, "mlx-nn-avgpool2d"]], "mlx.nn.BatchNorm": [[254, "mlx-nn-batchnorm"]], "mlx.nn.Conv1d": [[255, "mlx-nn-conv1d"]], "mlx.nn.Conv2d": [[256, "mlx-nn-conv2d"]], "mlx.nn.Dropout": [[257, "mlx-nn-dropout"]], "mlx.nn.Dropout2d": [[258, "mlx-nn-dropout2d"]], "mlx.nn.Dropout3d": [[259, "mlx-nn-dropout3d"]], "mlx.nn.Embedding": [[260, "mlx-nn-embedding"]], "mlx.nn.GELU": [[261, "mlx-nn-gelu"]], "mlx.nn.GRU": [[262, "mlx-nn-gru"]], "mlx.nn.GroupNorm": [[263, "mlx-nn-groupnorm"]], "mlx.nn.InstanceNorm": [[264, "mlx-nn-instancenorm"]], "mlx.nn.LSTM": [[265, "mlx-nn-lstm"]], "mlx.nn.LayerNorm": [[266, "mlx-nn-layernorm"]], "mlx.nn.Linear": [[267, "mlx-nn-linear"]], "mlx.nn.MaxPool1d": [[268, "mlx-nn-maxpool1d"]], "mlx.nn.MaxPool2d": [[269, "mlx-nn-maxpool2d"]], "mlx.nn.Mish": [[270, "mlx-nn-mish"]], "mlx.nn.Module.apply": [[271, "mlx-nn-module-apply"]], "mlx.nn.Module.apply_to_modules": [[272, "mlx-nn-module-apply-to-modules"]], "mlx.nn.Module.children": [[273, "mlx-nn-module-children"]], "mlx.nn.Module.eval": [[274, "mlx-nn-module-eval"]], "mlx.nn.Module.filter_and_map": [[275, "mlx-nn-module-filter-and-map"]], "mlx.nn.Module.freeze": [[276, "mlx-nn-module-freeze"]], "mlx.nn.Module.leaf_modules": [[277, "mlx-nn-module-leaf-modules"]], "mlx.nn.Module.load_weights": [[278, "mlx-nn-module-load-weights"]], "mlx.nn.Module.modules": [[279, "mlx-nn-module-modules"]], "mlx.nn.Module.named_modules": [[280, "mlx-nn-module-named-modules"]], "mlx.nn.Module.parameters": [[281, "mlx-nn-module-parameters"]], "mlx.nn.Module.save_weights": [[282, "mlx-nn-module-save-weights"]], "mlx.nn.Module.set_dtype": [[283, "mlx-nn-module-set-dtype"]], "mlx.nn.Module.state": [[284, "mlx-nn-module-state"]], "mlx.nn.Module.train": [[285, "mlx-nn-module-train"]], "mlx.nn.Module.trainable_parameters": [[286, "mlx-nn-module-trainable-parameters"]], "mlx.nn.Module.training": [[287, "mlx-nn-module-training"]], "mlx.nn.Module.unfreeze": [[288, "mlx-nn-module-unfreeze"]], "mlx.nn.Module.update": [[289, "mlx-nn-module-update"]], "mlx.nn.Module.update_modules": [[290, "mlx-nn-module-update-modules"]], "mlx.nn.MultiHeadAttention": [[291, "mlx-nn-multiheadattention"]], "mlx.nn.PReLU": [[292, "mlx-nn-prelu"]], "mlx.nn.QuantizedLinear": [[293, "mlx-nn-quantizedlinear"]], "mlx.nn.RMSNorm": [[294, "mlx-nn-rmsnorm"]], "mlx.nn.RNN": [[295, "mlx-nn-rnn"]], "mlx.nn.ReLU": [[296, "mlx-nn-relu"]], "mlx.nn.RoPE": [[297, "mlx-nn-rope"]], "mlx.nn.SELU": [[298, "mlx-nn-selu"]], "mlx.nn.Sequential": [[299, "mlx-nn-sequential"]], "mlx.nn.SiLU": [[300, "mlx-nn-silu"]], "mlx.nn.SinusoidalPositionalEncoding": [[301, "mlx-nn-sinusoidalpositionalencoding"]], "mlx.nn.Softshrink": [[302, "mlx-nn-softshrink"]], "mlx.nn.Step": [[303, "mlx-nn-step"]], "mlx.nn.Transformer": [[304, "mlx-nn-transformer"]], "mlx.nn.Upsample": [[305, "mlx-nn-upsample"]], "mlx.nn.init.constant": [[306, "mlx-nn-init-constant"]], "mlx.nn.init.glorot_normal": [[307, "mlx-nn-init-glorot-normal"]], "mlx.nn.init.glorot_uniform": [[308, "mlx-nn-init-glorot-uniform"]], "mlx.nn.init.he_normal": [[309, "mlx-nn-init-he-normal"]], "mlx.nn.init.he_uniform": [[310, "mlx-nn-init-he-uniform"]], "mlx.nn.init.identity": [[311, "mlx-nn-init-identity"]], "mlx.nn.init.normal": [[312, "mlx-nn-init-normal"]], "mlx.nn.init.uniform": [[313, "mlx-nn-init-uniform"]], "mlx.nn.elu": [[314, "mlx-nn-elu"]], "mlx.nn.gelu": [[315, "mlx-nn-gelu"]], "mlx.nn.gelu_approx": [[316, "mlx-nn-gelu-approx"]], "mlx.nn.gelu_fast_approx": [[317, "mlx-nn-gelu-fast-approx"]], "mlx.nn.glu": [[318, "mlx-nn-glu"]], "mlx.nn.hardswish": [[319, "mlx-nn-hardswish"]], "mlx.nn.leaky_relu": [[320, "mlx-nn-leaky-relu"]], "mlx.nn.log_sigmoid": [[321, "mlx-nn-log-sigmoid"]], "mlx.nn.log_softmax": [[322, "mlx-nn-log-softmax"]], "mlx.nn.losses.binary_cross_entropy": [[323, "mlx-nn-losses-binary-cross-entropy"]], "mlx.nn.losses.cosine_similarity_loss": [[324, "mlx-nn-losses-cosine-similarity-loss"]], "mlx.nn.losses.cross_entropy": [[325, "mlx-nn-losses-cross-entropy"]], "mlx.nn.losses.gaussian_nll_loss": [[326, "mlx-nn-losses-gaussian-nll-loss"]], "mlx.nn.losses.hinge_loss": [[327, "mlx-nn-losses-hinge-loss"]], "mlx.nn.losses.huber_loss": [[328, "mlx-nn-losses-huber-loss"]], "mlx.nn.losses.kl_div_loss": [[329, "mlx-nn-losses-kl-div-loss"]], "mlx.nn.losses.l1_loss": [[330, "mlx-nn-losses-l1-loss"]], "mlx.nn.losses.log_cosh_loss": [[331, "mlx-nn-losses-log-cosh-loss"]], "mlx.nn.losses.margin_ranking_loss": [[332, "mlx-nn-losses-margin-ranking-loss"]], "mlx.nn.losses.mse_loss": [[333, "mlx-nn-losses-mse-loss"]], "mlx.nn.losses.nll_loss": [[334, "mlx-nn-losses-nll-loss"]], "mlx.nn.losses.smooth_l1_loss": [[335, "mlx-nn-losses-smooth-l1-loss"]], "mlx.nn.losses.triplet_loss": [[336, "mlx-nn-losses-triplet-loss"]], "mlx.nn.mish": [[337, "mlx-nn-mish"]], "mlx.nn.prelu": [[338, "mlx-nn-prelu"]], "mlx.nn.relu": [[339, "mlx-nn-relu"]], "mlx.nn.relu6": [[340, "mlx-nn-relu6"]], "mlx.nn.selu": [[341, "mlx-nn-selu"]], "mlx.nn.sigmoid": [[342, "mlx-nn-sigmoid"]], "mlx.nn.silu": [[343, "mlx-nn-silu"]], "mlx.nn.softmax": [[344, "mlx-nn-softmax"]], "mlx.nn.softplus": [[345, "mlx-nn-softplus"]], "mlx.nn.softshrink": [[346, "mlx-nn-softshrink"]], "mlx.nn.step": [[347, "mlx-nn-step"]], "mlx.nn.tanh": [[348, "mlx-nn-tanh"]], "Functions": [[349, "functions"]], "Initializers": [[350, "initializers"]], "Layers": [[351, "layers"]], "Loss Functions": [[352, "loss-functions"]], "Module": [[353, "module"]], "Optimizers": [[355, "optimizers"]], "mlx.optimizers.AdaDelta": [[356, "mlx-optimizers-adadelta"]], "mlx.optimizers.Adafactor": [[357, "mlx-optimizers-adafactor"]], "mlx.optimizers.Adagrad": [[358, "mlx-optimizers-adagrad"]], "mlx.optimizers.Adam": [[359, "mlx-optimizers-adam"]], "mlx.optimizers.AdamW": [[360, "mlx-optimizers-adamw"]], "mlx.optimizers.Adamax": [[361, "mlx-optimizers-adamax"]], "mlx.optimizers.Lion": [[362, "mlx-optimizers-lion"]], "mlx.optimizers.Optimizer.apply_gradients": [[363, "mlx-optimizers-optimizer-apply-gradients"]], "mlx.optimizers.Optimizer.init": [[364, "mlx-optimizers-optimizer-init"]], "mlx.optimizers.Optimizer.state": [[365, "mlx-optimizers-optimizer-state"]], "mlx.optimizers.Optimizer.update": [[366, "mlx-optimizers-optimizer-update"]], "mlx.optimizers.RMSprop": [[367, "mlx-optimizers-rmsprop"]], "mlx.optimizers.SGD": [[368, "mlx-optimizers-sgd"]], "mlx.optimizers.cosine_decay": [[369, "mlx-optimizers-cosine-decay"]], "mlx.optimizers.exponential_decay": [[370, "mlx-optimizers-exponential-decay"]], "mlx.optimizers.join_schedules": [[371, "mlx-optimizers-join-schedules"]], "mlx.optimizers.linear_schedule": [[372, "mlx-optimizers-linear-schedule"]], "mlx.optimizers.step_decay": [[373, "mlx-optimizers-step-decay"]], "Common Optimizers": [[374, "common-optimizers"]], "Optimizer": [[375, "optimizer"]], "Schedulers": [[376, "schedulers"]], "Random": [[377, "random"]], "Transforms": [[378, "transforms"]], "Tree Utils": [[379, "tree-utils"]], "Compilation": [[380, "compilation"]], "Basics of Compile": [[380, "basics-of-compile"]], "Example Speedup": [[380, "example-speedup"]], "Debugging": [[380, "debugging"]], "Pure Functions": [[380, "pure-functions"]], "Compiling Training Graphs": [[380, "compiling-training-graphs"]], "Transformations with Compile": [[380, "transformations-with-compile"]], "Function Transforms": [[381, "function-transforms"]], "Automatic Differentiation": [[381, "automatic-differentiation"]], "Automatic Vectorization": [[381, "automatic-vectorization"]], "Indexing Arrays": [[382, "indexing-arrays"]], "Differences from NumPy": [[382, "differences-from-numpy"]], "In Place Updates": [[382, "in-place-updates"]], "Lazy Evaluation": [[383, "lazy-evaluation"]], "Why Lazy Evaluation": [[383, "why-lazy-evaluation"]], "Transforming Compute Graphs": [[383, "transforming-compute-graphs"]], "Only Compute What You Use": [[383, "only-compute-what-you-use"]], "When to Evaluate": [[383, "when-to-evaluate"]], "Conversion to NumPy and Other Frameworks": [[384, "conversion-to-numpy-and-other-frameworks"]], "PyTorch": [[384, "pytorch"]], "JAX": [[384, "jax"]], "TensorFlow": [[384, "tensorflow"]], "Quick Start Guide": [[385, "quick-start-guide"]], "Basics": [[385, "basics"]], "Function and Graph Transformations": [[385, "function-and-graph-transformations"]], "Saving and Loading Arrays": [[386, "saving-and-loading-arrays"]], "Serialization Formats": [[386, "id1"]], "Unified Memory": [[387, "unified-memory"]], "A Simple Example": [[387, "a-simple-example"]], "Using Streams": [[388, "using-streams"]], "Specifying the Stream": [[388, "specifying-the-stream"]]}, "indexentries": {"device (class in mlx.core)": [[8, "mlx.core.Device"]], "__init__() (device method)": [[8, "mlx.core.Device.__init__"]], "dtype (class in mlx.core)": [[9, "mlx.core.Dtype"]], "__init__() (dtype method)": [[9, "mlx.core.Dtype.__init__"]], "dtypecategory (class in mlx.core)": [[10, "mlx.core.DtypeCategory"]], "__init__() (dtypecategory method)": [[10, "mlx.core.DtypeCategory.__init__"]], "abs() (in module mlx.core)": [[11, "mlx.core.abs"]], "add() (in module mlx.core)": [[12, "mlx.core.add"]], "all() (in module mlx.core)": [[13, "mlx.core.all"]], "allclose() (in module mlx.core)": [[14, "mlx.core.allclose"]], "any() (in module mlx.core)": [[15, "mlx.core.any"]], "arange() (in module mlx.core)": [[16, "mlx.core.arange"]], "arccos() (in module mlx.core)": [[17, "mlx.core.arccos"]], "arccosh() (in module mlx.core)": [[18, "mlx.core.arccosh"]], "arcsin() (in module mlx.core)": [[19, "mlx.core.arcsin"]], "arcsinh() (in module mlx.core)": [[20, "mlx.core.arcsinh"]], "arctan() (in module mlx.core)": [[21, "mlx.core.arctan"]], "arctanh() (in module mlx.core)": [[22, "mlx.core.arctanh"]], "argmax() (in module mlx.core)": [[23, "mlx.core.argmax"]], "argmin() (in module mlx.core)": [[24, "mlx.core.argmin"]], "argpartition() (in module mlx.core)": [[25, "mlx.core.argpartition"]], "argsort() (in module mlx.core)": [[26, "mlx.core.argsort"]], "__init__() (array method)": [[27, "mlx.core.array.__init__"]], "array (class in mlx.core)": [[27, "mlx.core.array"]], "t (array property)": [[28, "mlx.core.array.T"]], "abs() (array method)": [[29, "mlx.core.array.abs"]], "all() (array method)": [[30, "mlx.core.array.all"]], "any() (array method)": [[31, "mlx.core.array.any"]], "argmax() (array method)": [[32, "mlx.core.array.argmax"]], "argmin() (array method)": [[33, "mlx.core.array.argmin"]], "astype() (array method)": [[34, "mlx.core.array.astype"]], "at (array property)": [[35, "mlx.core.array.at"]], "cos() (array method)": [[36, "mlx.core.array.cos"]], "cummax() (array method)": [[37, "mlx.core.array.cummax"]], "cummin() (array method)": [[38, "mlx.core.array.cummin"]], "cumprod() (array method)": [[39, "mlx.core.array.cumprod"]], "cumsum() (array method)": [[40, "mlx.core.array.cumsum"]], "diag() (array method)": [[41, "mlx.core.array.diag"]], "diagonal() (array method)": [[42, "mlx.core.array.diagonal"]], "dtype (array property)": [[43, "mlx.core.array.dtype"]], "exp() (array method)": [[44, "mlx.core.array.exp"]], "flatten() (array method)": [[45, "mlx.core.array.flatten"]], "item() (array method)": [[46, "mlx.core.array.item"]], "itemsize (array property)": [[47, "mlx.core.array.itemsize"]], "log() (array method)": [[48, "mlx.core.array.log"]], "log10() (array method)": [[49, "mlx.core.array.log10"]], "log1p() (array method)": [[50, "mlx.core.array.log1p"]], "log2() (array method)": [[51, "mlx.core.array.log2"]], "logsumexp() (array method)": [[52, "mlx.core.array.logsumexp"]], "max() (array method)": [[53, "mlx.core.array.max"]], "mean() (array method)": [[54, "mlx.core.array.mean"]], "min() (array method)": [[55, "mlx.core.array.min"]], "moveaxis() (array method)": [[56, "mlx.core.array.moveaxis"]], "nbytes (array property)": [[57, "mlx.core.array.nbytes"]], "ndim (array property)": [[58, "mlx.core.array.ndim"]], "prod() (array method)": [[59, "mlx.core.array.prod"]], "reciprocal() (array method)": [[60, "mlx.core.array.reciprocal"]], "reshape() (array method)": [[61, "mlx.core.array.reshape"]], "round() (array method)": [[62, "mlx.core.array.round"]], "rsqrt() (array method)": [[63, "mlx.core.array.rsqrt"]], "shape (array property)": [[64, "mlx.core.array.shape"]], "sin() (array method)": [[65, "mlx.core.array.sin"]], "size (array property)": [[66, "mlx.core.array.size"]], "split() (array method)": [[67, "mlx.core.array.split"]], "sqrt() (array method)": [[68, "mlx.core.array.sqrt"]], "square() (array method)": [[69, "mlx.core.array.square"]], "squeeze() (array method)": [[70, "mlx.core.array.squeeze"]], "sum() (array method)": [[71, "mlx.core.array.sum"]], "swapaxes() (array method)": [[72, "mlx.core.array.swapaxes"]], "tolist() (array method)": [[73, "mlx.core.array.tolist"]], "transpose() (array method)": [[74, "mlx.core.array.transpose"]], "var() (array method)": [[75, "mlx.core.array.var"]], "array_equal() (in module mlx.core)": [[76, "mlx.core.array_equal"]], "atleast_1d() (in module mlx.core)": [[77, "mlx.core.atleast_1d"]], "atleast_2d() (in module mlx.core)": [[78, "mlx.core.atleast_2d"]], "atleast_3d() (in module mlx.core)": [[79, "mlx.core.atleast_3d"]], "broadcast_to() (in module mlx.core)": [[80, "mlx.core.broadcast_to"]], "ceil() (in module mlx.core)": [[81, "mlx.core.ceil"]], "clip() (in module mlx.core)": [[82, "mlx.core.clip"]], "compile() (in module mlx.core)": [[83, "mlx.core.compile"]], "concatenate() (in module mlx.core)": [[84, "mlx.core.concatenate"]], "conv1d() (in module mlx.core)": [[85, "mlx.core.conv1d"]], "conv2d() (in module mlx.core)": [[86, "mlx.core.conv2d"]], "conv_general() (in module mlx.core)": [[87, "mlx.core.conv_general"]], "convolve() (in module mlx.core)": [[88, "mlx.core.convolve"]], "cos() (in module mlx.core)": [[89, "mlx.core.cos"]], "cosh() (in module mlx.core)": [[90, "mlx.core.cosh"]], "cummax() (in module mlx.core)": [[91, "mlx.core.cummax"]], "cummin() (in module mlx.core)": [[92, "mlx.core.cummin"]], "cumprod() (in module mlx.core)": [[93, "mlx.core.cumprod"]], "cumsum() (in module mlx.core)": [[94, "mlx.core.cumsum"]], "default_device() (in module mlx.core)": [[95, "mlx.core.default_device"]], "default_stream() (in module mlx.core)": [[96, "mlx.core.default_stream"]], "dequantize() (in module mlx.core)": [[97, "mlx.core.dequantize"]], "diag() (in module mlx.core)": [[98, "mlx.core.diag"]], "diagonal() (in module mlx.core)": [[99, "mlx.core.diagonal"]], "disable_compile() (in module mlx.core)": [[100, "mlx.core.disable_compile"]], "divide() (in module mlx.core)": [[101, "mlx.core.divide"]], "divmod() (in module mlx.core)": [[102, "mlx.core.divmod"]], "enable_compile() (in module mlx.core)": [[103, "mlx.core.enable_compile"]], "equal() (in module mlx.core)": [[104, "mlx.core.equal"]], "erf() (in module mlx.core)": [[105, "mlx.core.erf"]], "erfinv() (in module mlx.core)": [[106, "mlx.core.erfinv"]], "eval() (in module mlx.core)": [[107, "mlx.core.eval"]], "exp() (in module mlx.core)": [[108, "mlx.core.exp"]], "expand_dims() (in module mlx.core)": [[109, "mlx.core.expand_dims"]], "eye() (in module mlx.core)": [[110, "mlx.core.eye"]], "layer_norm() (in module mlx.core.fast)": [[111, "mlx.core.fast.layer_norm"]], "rms_norm() (in module mlx.core.fast)": [[112, "mlx.core.fast.rms_norm"]], "rope() (in module mlx.core.fast)": [[113, "mlx.core.fast.rope"]], "scaled_dot_product_attention() (in module mlx.core.fast)": [[114, "mlx.core.fast.scaled_dot_product_attention"]], "fft() (in module mlx.core.fft)": [[115, "mlx.core.fft.fft"]], "fft2() (in module mlx.core.fft)": [[116, "mlx.core.fft.fft2"]], "fftn() (in module mlx.core.fft)": [[117, "mlx.core.fft.fftn"]], "ifft() (in module mlx.core.fft)": [[118, "mlx.core.fft.ifft"]], "ifft2() (in module mlx.core.fft)": [[119, "mlx.core.fft.ifft2"]], "ifftn() (in module mlx.core.fft)": [[120, "mlx.core.fft.ifftn"]], "irfft() (in module mlx.core.fft)": [[121, "mlx.core.fft.irfft"]], "irfft2() (in module mlx.core.fft)": [[122, "mlx.core.fft.irfft2"]], "irfftn() (in module mlx.core.fft)": [[123, "mlx.core.fft.irfftn"]], "rfft() (in module mlx.core.fft)": [[124, "mlx.core.fft.rfft"]], "rfft2() (in module mlx.core.fft)": [[125, "mlx.core.fft.rfft2"]], "rfftn() (in module mlx.core.fft)": [[126, "mlx.core.fft.rfftn"]], "flatten() (in module mlx.core)": [[127, "mlx.core.flatten"]], "floor() (in module mlx.core)": [[128, "mlx.core.floor"]], "floor_divide() (in module mlx.core)": [[129, "mlx.core.floor_divide"]], "full() (in module mlx.core)": [[130, "mlx.core.full"]], "grad() (in module mlx.core)": [[131, "mlx.core.grad"]], "greater() (in module mlx.core)": [[132, "mlx.core.greater"]], "greater_equal() (in module mlx.core)": [[133, "mlx.core.greater_equal"]], "identity() (in module mlx.core)": [[134, "mlx.core.identity"]], "inner() (in module mlx.core)": [[135, "mlx.core.inner"]], "isclose() (in module mlx.core)": [[136, "mlx.core.isclose"]], "isinf() (in module mlx.core)": [[137, "mlx.core.isinf"]], "isnan() (in module mlx.core)": [[138, "mlx.core.isnan"]], "isneginf() (in module mlx.core)": [[139, "mlx.core.isneginf"]], "isposinf() (in module mlx.core)": [[140, "mlx.core.isposinf"]], "issubdtype() (in module mlx.core)": [[141, "mlx.core.issubdtype"]], "jvp() (in module mlx.core)": [[142, "mlx.core.jvp"]], "less() (in module mlx.core)": [[143, "mlx.core.less"]], "less_equal() (in module mlx.core)": [[144, "mlx.core.less_equal"]], "norm() (in module mlx.core.linalg)": [[145, "mlx.core.linalg.norm"]], "qr() (in module mlx.core.linalg)": [[146, "mlx.core.linalg.qr"]], "linspace() (in module mlx.core)": [[147, "mlx.core.linspace"]], "load() (in module mlx.core)": [[148, "mlx.core.load"]], "log() (in module mlx.core)": [[149, "mlx.core.log"]], "log10() (in module mlx.core)": [[150, "mlx.core.log10"]], "log1p() (in module mlx.core)": [[151, "mlx.core.log1p"]], "log2() (in module mlx.core)": [[152, "mlx.core.log2"]], "logaddexp() (in module mlx.core)": [[153, "mlx.core.logaddexp"]], "logical_and() (in module mlx.core)": [[154, "mlx.core.logical_and"]], "logical_not() (in module mlx.core)": [[155, "mlx.core.logical_not"]], "logical_or() (in module mlx.core)": [[156, "mlx.core.logical_or"]], "logsumexp() (in module mlx.core)": [[157, "mlx.core.logsumexp"]], "matmul() (in module mlx.core)": [[158, "mlx.core.matmul"]], "max() (in module mlx.core)": [[159, "mlx.core.max"]], "maximum() (in module mlx.core)": [[160, "mlx.core.maximum"]], "mean() (in module mlx.core)": [[161, "mlx.core.mean"]], "get_active_memory() (in module mlx.core.metal)": [[162, "mlx.core.metal.get_active_memory"]], "get_cache_memory() (in module mlx.core.metal)": [[163, "mlx.core.metal.get_cache_memory"]], "get_peak_memory() (in module mlx.core.metal)": [[164, "mlx.core.metal.get_peak_memory"]], "is_available() (in module mlx.core.metal)": [[165, "mlx.core.metal.is_available"]], "set_cache_limit() (in module mlx.core.metal)": [[166, "mlx.core.metal.set_cache_limit"]], "set_memory_limit() (in module mlx.core.metal)": [[167, "mlx.core.metal.set_memory_limit"]], "min() (in module mlx.core)": [[168, "mlx.core.min"]], "minimum() (in module mlx.core)": [[169, "mlx.core.minimum"]], "moveaxis() (in module mlx.core)": [[170, "mlx.core.moveaxis"]], "multiply() (in module mlx.core)": [[171, "mlx.core.multiply"]], "negative() (in module mlx.core)": [[172, "mlx.core.negative"]], "new_stream() (in module mlx.core)": [[173, "mlx.core.new_stream"]], "ones() (in module mlx.core)": [[174, "mlx.core.ones"]], "ones_like() (in module mlx.core)": [[175, "mlx.core.ones_like"]], "outer() (in module mlx.core)": [[176, "mlx.core.outer"]], "pad() (in module mlx.core)": [[177, "mlx.core.pad"]], "partition() (in module mlx.core)": [[178, "mlx.core.partition"]], "prod() (in module mlx.core)": [[179, "mlx.core.prod"]], "quantize() (in module mlx.core)": [[180, "mlx.core.quantize"]], "quantized_matmul() (in module mlx.core)": [[181, "mlx.core.quantized_matmul"]], "bernoulli() (in module mlx.core.random)": [[182, "mlx.core.random.bernoulli"]], "categorical() (in module mlx.core.random)": [[183, "mlx.core.random.categorical"]], "gumbel() (in module mlx.core.random)": [[184, "mlx.core.random.gumbel"]], "key() (in module mlx.core.random)": [[185, "mlx.core.random.key"]], "normal() (in module mlx.core.random)": [[186, "mlx.core.random.normal"]], "randint() (in module mlx.core.random)": [[187, "mlx.core.random.randint"]], "seed() (in module mlx.core.random)": [[188, "mlx.core.random.seed"]], "split() (in module mlx.core.random)": [[189, "mlx.core.random.split"]], "truncated_normal() (in module mlx.core.random)": [[190, "mlx.core.random.truncated_normal"]], "uniform() (in module mlx.core.random)": [[191, "mlx.core.random.uniform"]], "reciprocal() (in module mlx.core)": [[192, "mlx.core.reciprocal"]], "repeat() (in module mlx.core)": [[193, "mlx.core.repeat"]], "reshape() (in module mlx.core)": [[194, "mlx.core.reshape"]], "round() (in module mlx.core)": [[195, "mlx.core.round"]], "rsqrt() (in module mlx.core)": [[196, "mlx.core.rsqrt"]], "save() (in module mlx.core)": [[197, "mlx.core.save"]], "save_gguf() (in module mlx.core)": [[198, "mlx.core.save_gguf"]], "save_safetensors() (in module mlx.core)": [[199, "mlx.core.save_safetensors"]], "savez() (in module mlx.core)": [[200, "mlx.core.savez"]], "savez_compressed() (in module mlx.core)": [[201, "mlx.core.savez_compressed"]], "set_default_device() (in module mlx.core)": [[202, "mlx.core.set_default_device"]], "set_default_stream() (in module mlx.core)": [[203, "mlx.core.set_default_stream"]], "sigmoid() (in module mlx.core)": [[204, "mlx.core.sigmoid"]], "sign() (in module mlx.core)": [[205, "mlx.core.sign"]], "sin() (in module mlx.core)": [[206, "mlx.core.sin"]], "sinh() (in module mlx.core)": [[207, "mlx.core.sinh"]], "softmax() (in module mlx.core)": [[208, "mlx.core.softmax"]], "sort() (in module mlx.core)": [[209, "mlx.core.sort"]], "split() (in module mlx.core)": [[210, "mlx.core.split"]], "sqrt() (in module mlx.core)": [[211, "mlx.core.sqrt"]], "square() (in module mlx.core)": [[212, "mlx.core.square"]], "squeeze() (in module mlx.core)": [[213, "mlx.core.squeeze"]], "stack() (in module mlx.core)": [[214, "mlx.core.stack"]], "stop_gradient() (in module mlx.core)": [[215, "mlx.core.stop_gradient"]], "stream() (in module mlx.core)": [[216, "mlx.core.stream"]], "subtract() (in module mlx.core)": [[217, "mlx.core.subtract"]], "sum() (in module mlx.core)": [[218, "mlx.core.sum"]], "swapaxes() (in module mlx.core)": [[219, "mlx.core.swapaxes"]], "take() (in module mlx.core)": [[220, "mlx.core.take"]], "take_along_axis() (in module mlx.core)": [[221, "mlx.core.take_along_axis"]], "tan() (in module mlx.core)": [[222, "mlx.core.tan"]], "tanh() (in module mlx.core)": [[223, "mlx.core.tanh"]], "tensordot() (in module mlx.core)": [[224, "mlx.core.tensordot"]], "tile() (in module mlx.core)": [[225, "mlx.core.tile"]], "topk() (in module mlx.core)": [[226, "mlx.core.topk"]], "transpose() (in module mlx.core)": [[227, "mlx.core.transpose"]], "tri() (in module mlx.core)": [[228, "mlx.core.tri"]], "tril() (in module mlx.core)": [[229, "mlx.core.tril"]], "triu() (in module mlx.core)": [[230, "mlx.core.triu"]], "value_and_grad() (in module mlx.core)": [[231, "mlx.core.value_and_grad"]], "var() (in module mlx.core)": [[232, "mlx.core.var"]], "vjp() (in module mlx.core)": [[233, "mlx.core.vjp"]], "vmap() (in module mlx.core)": [[234, "mlx.core.vmap"]], "where() (in module mlx.core)": [[235, "mlx.core.where"]], "zeros() (in module mlx.core)": [[236, "mlx.core.zeros"]], "zeros_like() (in module mlx.core)": [[237, "mlx.core.zeros_like"]], "value_and_grad() (in module mlx.nn)": [[238, "mlx.nn.value_and_grad"]], "tree_flatten() (in module mlx.utils)": [[239, "mlx.utils.tree_flatten"]], "tree_map() (in module mlx.utils)": [[240, "mlx.utils.tree_map"]], "tree_unflatten() (in module mlx.utils)": [[241, "mlx.utils.tree_unflatten"]], "stream (class in mlx.core)": [[242, "mlx.core.Stream"]], "__init__() (stream method)": [[242, "mlx.core.Stream.__init__"]], "alibi (class in mlx.nn)": [[251, "mlx.nn.ALiBi"]], "avgpool1d (class in mlx.nn)": [[252, "mlx.nn.AvgPool1d"]], "avgpool2d (class in mlx.nn)": [[253, "mlx.nn.AvgPool2d"]], "batchnorm (class in mlx.nn)": [[254, "mlx.nn.BatchNorm"]], "conv1d (class in mlx.nn)": [[255, "mlx.nn.Conv1d"]], "conv2d (class in mlx.nn)": [[256, "mlx.nn.Conv2d"]], "dropout (class in mlx.nn)": [[257, "mlx.nn.Dropout"]], "dropout2d (class in mlx.nn)": [[258, "mlx.nn.Dropout2d"]], "dropout3d (class in mlx.nn)": [[259, "mlx.nn.Dropout3d"]], "embedding (class in mlx.nn)": [[260, "mlx.nn.Embedding"]], "gelu (class in mlx.nn)": [[261, "mlx.nn.GELU"]], "gru (class in mlx.nn)": [[262, "mlx.nn.GRU"]], "groupnorm (class in mlx.nn)": [[263, "mlx.nn.GroupNorm"]], "instancenorm (class in mlx.nn)": [[264, "mlx.nn.InstanceNorm"]], "lstm (class in mlx.nn)": [[265, "mlx.nn.LSTM"]], "layernorm (class in mlx.nn)": [[266, "mlx.nn.LayerNorm"]], "linear (class in mlx.nn)": [[267, "mlx.nn.Linear"]], "maxpool1d (class in mlx.nn)": [[268, "mlx.nn.MaxPool1d"]], "maxpool2d (class in mlx.nn)": [[269, "mlx.nn.MaxPool2d"]], "mish (class in mlx.nn)": [[270, "mlx.nn.Mish"]], "apply() (module method)": [[271, "mlx.nn.Module.apply"]], "apply_to_modules() (module method)": [[272, "mlx.nn.Module.apply_to_modules"]], "children() (module method)": [[273, "mlx.nn.Module.children"]], "eval() (module method)": [[274, "mlx.nn.Module.eval"]], "filter_and_map() (module method)": [[275, "mlx.nn.Module.filter_and_map"]], "freeze() (module method)": [[276, "mlx.nn.Module.freeze"]], "leaf_modules() (module method)": [[277, "mlx.nn.Module.leaf_modules"]], "load_weights() (module method)": [[278, "mlx.nn.Module.load_weights"]], "modules() (module method)": [[279, "mlx.nn.Module.modules"]], "named_modules() (module method)": [[280, "mlx.nn.Module.named_modules"]], "parameters() (module method)": [[281, "mlx.nn.Module.parameters"]], "save_weights() (module method)": [[282, "mlx.nn.Module.save_weights"]], "set_dtype() (module method)": [[283, "mlx.nn.Module.set_dtype"]], "state (module property)": [[284, "mlx.nn.Module.state"]], "train() (module method)": [[285, "mlx.nn.Module.train"]], "trainable_parameters() (module method)": [[286, "mlx.nn.Module.trainable_parameters"]], "training (module property)": [[287, "mlx.nn.Module.training"]], "unfreeze() (module method)": [[288, "mlx.nn.Module.unfreeze"]], "update() (module method)": [[289, "mlx.nn.Module.update"]], "update_modules() (module method)": [[290, "mlx.nn.Module.update_modules"]], "multiheadattention (class in mlx.nn)": [[291, "mlx.nn.MultiHeadAttention"]], "prelu (class in mlx.nn)": [[292, "mlx.nn.PReLU"]], "quantizedlinear (class in mlx.nn)": [[293, "mlx.nn.QuantizedLinear"]], "rmsnorm (class in mlx.nn)": [[294, "mlx.nn.RMSNorm"]], "rnn (class in mlx.nn)": [[295, "mlx.nn.RNN"]], "relu (class in mlx.nn)": [[296, "mlx.nn.ReLU"]], "rope (class in mlx.nn)": [[297, "mlx.nn.RoPE"]], "selu (class in mlx.nn)": [[298, "mlx.nn.SELU"]], "sequential (class in mlx.nn)": [[299, "mlx.nn.Sequential"]], "silu (class in mlx.nn)": [[300, "mlx.nn.SiLU"]], "sinusoidalpositionalencoding (class in mlx.nn)": [[301, "mlx.nn.SinusoidalPositionalEncoding"]], "softshrink (class in mlx.nn)": [[302, "mlx.nn.Softshrink"]], "step (class in mlx.nn)": [[303, "mlx.nn.Step"]], "transformer (class in mlx.nn)": [[304, "mlx.nn.Transformer"]], "upsample (class in mlx.nn)": [[305, "mlx.nn.Upsample"]], "constant() (in module mlx.nn.init)": [[306, "mlx.nn.init.constant"]], "glorot_normal() (in module mlx.nn.init)": [[307, "mlx.nn.init.glorot_normal"]], "glorot_uniform() (in module mlx.nn.init)": [[308, "mlx.nn.init.glorot_uniform"]], "he_normal() (in module mlx.nn.init)": [[309, "mlx.nn.init.he_normal"]], "he_uniform() (in module mlx.nn.init)": [[310, "mlx.nn.init.he_uniform"]], "identity() (in module mlx.nn.init)": [[311, "mlx.nn.init.identity"]], "normal() (in module mlx.nn.init)": [[312, "mlx.nn.init.normal"]], "uniform() (in module mlx.nn.init)": [[313, "mlx.nn.init.uniform"]], "elu() (in module mlx.nn)": [[314, "mlx.nn.elu"]], "gelu() (in module mlx.nn)": [[315, "mlx.nn.gelu"]], "gelu_approx() (in module mlx.nn)": [[316, "mlx.nn.gelu_approx"]], "gelu_fast_approx() (in module mlx.nn)": [[317, "mlx.nn.gelu_fast_approx"]], "glu() (in module mlx.nn)": [[318, "mlx.nn.glu"]], "hardswish() (in module mlx.nn)": [[319, "mlx.nn.hardswish"]], "leaky_relu() (in module mlx.nn)": [[320, "mlx.nn.leaky_relu"]], "log_sigmoid() (in module mlx.nn)": [[321, "mlx.nn.log_sigmoid"]], "log_softmax() (in module mlx.nn)": [[322, "mlx.nn.log_softmax"]], "binary_cross_entropy() (in module mlx.nn.losses)": [[323, "mlx.nn.losses.binary_cross_entropy"]], "cosine_similarity_loss() (in module mlx.nn.losses)": [[324, "mlx.nn.losses.cosine_similarity_loss"]], "cross_entropy() (in module mlx.nn.losses)": [[325, "mlx.nn.losses.cross_entropy"]], "gaussian_nll_loss() (in module mlx.nn.losses)": [[326, "mlx.nn.losses.gaussian_nll_loss"]], "hinge_loss() (in module mlx.nn.losses)": [[327, "mlx.nn.losses.hinge_loss"]], "huber_loss() (in module mlx.nn.losses)": [[328, "mlx.nn.losses.huber_loss"]], "kl_div_loss() (in module mlx.nn.losses)": [[329, "mlx.nn.losses.kl_div_loss"]], "l1_loss() (in module mlx.nn.losses)": [[330, "mlx.nn.losses.l1_loss"]], "log_cosh_loss() (in module mlx.nn.losses)": [[331, "mlx.nn.losses.log_cosh_loss"]], "margin_ranking_loss() (in module mlx.nn.losses)": [[332, "mlx.nn.losses.margin_ranking_loss"]], "mse_loss() (in module mlx.nn.losses)": [[333, "mlx.nn.losses.mse_loss"]], "nll_loss() (in module mlx.nn.losses)": [[334, "mlx.nn.losses.nll_loss"]], "smooth_l1_loss() (in module mlx.nn.losses)": [[335, "mlx.nn.losses.smooth_l1_loss"]], "triplet_loss() (in module mlx.nn.losses)": [[336, "mlx.nn.losses.triplet_loss"]], "mish() (in module mlx.nn)": [[337, "mlx.nn.mish"]], "prelu() (in module mlx.nn)": [[338, "mlx.nn.prelu"]], "relu() (in module mlx.nn)": [[339, "mlx.nn.relu"]], "relu6() (in module mlx.nn)": [[340, "mlx.nn.relu6"]], "selu() (in module mlx.nn)": [[341, "mlx.nn.selu"]], "sigmoid() (in module mlx.nn)": [[342, "mlx.nn.sigmoid"]], "silu() (in module mlx.nn)": [[343, "mlx.nn.silu"]], "softmax() (in module mlx.nn)": [[344, "mlx.nn.softmax"]], "softplus() (in module mlx.nn)": [[345, "mlx.nn.softplus"]], "softshrink() (in module mlx.nn)": [[346, "mlx.nn.softshrink"]], "step() (in module mlx.nn)": [[347, "mlx.nn.step"]], "tanh() (in module mlx.nn)": [[348, "mlx.nn.tanh"]], "module (class in mlx.nn)": [[353, "mlx.nn.Module"]], "adadelta (class in mlx.optimizers)": [[356, "mlx.optimizers.AdaDelta"]], "adafactor (class in mlx.optimizers)": [[357, "mlx.optimizers.Adafactor"]], "adagrad (class in mlx.optimizers)": [[358, "mlx.optimizers.Adagrad"]], "adam (class in mlx.optimizers)": [[359, "mlx.optimizers.Adam"]], "adamw (class in mlx.optimizers)": [[360, "mlx.optimizers.AdamW"]], "adamax (class in mlx.optimizers)": [[361, "mlx.optimizers.Adamax"]], "lion (class in mlx.optimizers)": [[362, "mlx.optimizers.Lion"]], "apply_gradients() (optimizer method)": [[363, "mlx.optimizers.Optimizer.apply_gradients"]], "init() (optimizer method)": [[364, "mlx.optimizers.Optimizer.init"]], "state (optimizer property)": [[365, "mlx.optimizers.Optimizer.state"]], "update() (optimizer method)": [[366, "mlx.optimizers.Optimizer.update"]], "rmsprop (class in mlx.optimizers)": [[367, "mlx.optimizers.RMSprop"]], "sgd (class in mlx.optimizers)": [[368, "mlx.optimizers.SGD"]], "cosine_decay() (in module mlx.optimizers)": [[369, "mlx.optimizers.cosine_decay"]], "exponential_decay() (in module mlx.optimizers)": [[370, "mlx.optimizers.exponential_decay"]], "join_schedules() (in module mlx.optimizers)": [[371, "mlx.optimizers.join_schedules"]], "linear_schedule() (in module mlx.optimizers)": [[372, "mlx.optimizers.linear_schedule"]], "step_decay() (in module mlx.optimizers)": [[373, "mlx.optimizers.step_decay"]], "optimizer (class in mlx.optimizers)": [[375, "mlx.optimizers.Optimizer"]]}})