|
Mila
Deep Neural Network Library
|
| Mila | |
| Src | |
| Data | |
| Core | |
| FileHeader.ixx | Common file header structure for Mila data files |
| TokenizerTrainer.ixx | Abstract trainer interface for building tokenizers' vocabularies |
| TrainerFactory.ixx | Factory helpers to construct tokenizer trainers and load vocabularies |
| Loaders | |
| DataLoader.ixx | Device-agnostic data loader interface using abstract tensor data types |
| Tokenizers | |
| Bpe | |
| BpePreTokenizationMode.ixx | Pre-tokenization mode enumeration for GPT-4 style BPE tokenizers |
| BpeTokenizer.ixx | Unified BPE tokenizer for GPT-2, Llama 3.x, Mistral, and Gemma model families |
| BpeTrainer.ixx | BPE vocabulary trainer with incremental corpus accumulation |
| BpeVocabulary.ixx | BPE vocabulary for GPT-2, Llama 3.x, and Mistral model families |
| BpeVocabularyConfig.ixx | Unified configuration for BPE vocabulary construction and runtime properties |
| Char | |
| CharTokenizer.ixx | Character-level tokenizer implementing the Tokenizer API |
| CharTrainer.ixx | Character-level tokenizer trainer for corpus accumulation and vocabulary building |
| CharVocabulary.ixx | Character vocabulary with factory-based construction |
| CharVocabularyConfig.ixx | Configuration for Character-level tokenizer training |
| SpecialTokens.ixx | Configuration for special tokens used across all tokenizer types |
| TokenizerVocabulary.ixx | Abstract interface for tokenizer vocabularies used by data pipelines |
| Distribution | |
| CurlHttpTransport.ixx | Libcurl as an IHttpTransport: one request, exactly the headers given |
| Environment.ixx | Reading an environment variable, once, safely |
| HttpClient.ixx | How to ask, and how to read the answer: redirects, the token rule, resume, status |
| HttpTransport.ixx | One HTTP request, moved |
| HttpTransportBackend.Curl.ixx | The HTTP transport this build has: libcurl |
| HttpTransportBackend.Null.ixx | The transport for a build with no HTTP client of its own: one that refuses, by name |
| HuggingFaceHub.ixx | The HuggingFace implementation of IModelHub, and its token discovery |
| ModelCoordinate.ixx | How a hub repository is addressed: [hf:]<owner>/<repository>[@<revision>] |
| ModelHub.ixx | The abstraction over a non-local model hub |
| ModelManifest.ixx | The mila.json schema: what files compose a model, and for which Mila |
| ModelPackage.ixx | A package directory: the manifest, the files it declares, and whether they agree |
| ModelResolver.ixx | Pulls a published model into the store: manifest, variant selection, blobs, record |
| ModelStore.ixx | The local store of installed models: content-addressed blobs plus the records that name them |
| Sha256.ixx | Streaming SHA-256, for verifying downloaded model blobs against their digests |
| Dnn | |
| Components | |
| Activations | |
| Activation | |
| Activation.Config.ixx | Configuration for the unified elementwise Activation component |
| Activation.ixx | Unified elementwise activation component |
| Gelu | |
| Gelu.Config.ixx | Configuration for the GELU activation module |
| Gelu.ixx | GELU activation component implementation |
| ActivationType.ixx | Definition of activation function types used throughout the Mila library |
| ApproximationMethod.ixx | Shared approximation method enum for activation functions |
| Attention | |
| GQA | |
| GroupedQueryAttention.Config.ixx | Configuration interface for the Grouped-Query Attention component |
| GroupedQueryAttention.ixx | Grouped-Query Attention module (concatenated QKV input) |
| MHA | |
| MultiHeadAttention.Config.ixx | Configuration interface for the Attention module |
| MultiHeadAttention.ixx | Multi-Head Attention module (concatenated QKV input) |
| AttentionType.ixx | Defines attention mechanism types used by transformer components |
| Connections | |
| ConnectionType.ixx | Definition of connection function types used by the Mila DNN library |
| Residual.ixx | Device-templated Residual connection component |
| ResidualConfig.ixx | Configuration for the Residual component |
| Embeddings | |
| TokenEmbedding.Config.ixx | Configuration for the TokenEmbedding component |
| TokenEmbedding.ixx | Device-templated TokenEmbedding component |
| Encodings | |
| Lpe | |
| Lpe.Config.ixx | Configuration interface for the Encoder module in the Mila DNN framework |
| Lpe.ixx | Device-templated Encoder module for token and positional embeddings |
| Rope | |
| Rope.Config.ixx | Configuration for Rotary Position Embedding (RoPE) component |
| Rope.ixx | Rotary positional embedding (RoPE) component |
| EncodingType.ixx | Positional encoding strategy selection used by Transformer components |
| FFN | |
| GatedMLP | |
| GatedMLP.Config.ixx | Configuration for the gated feed-forward (GatedMLP) block |
| GatedMLP.ixx | Gated feed-forward (GatedMLP) block: fused gate+up -> Swiglu gate -> down |
| MLP | |
| MLP.Config.ixx | Configuration for the MLP block |
| MLP.Dispatch.ixx | Activation dispatch helpers for MLP |
| MLP.ixx | Dense feed-forward (MLP) block: Linear -> GELU -> Linear |
| Swiglu | |
| Swiglu.Config.ixx | Configuration for the SwiGLU activation component |
| Swiglu.ixx | SwiGLU activation component implementation |
| Linear | |
| Linear.ixx | Device-templated Linear (fully connected) component |
| LinearConfig.ixx | Configuration for the Linear (fully connected) layer |
| Losses | |
| CrossEntropyConfig.ixx | Configuration for the fused SoftmaxCrossEntropy loss module |
| SoftmaxCrossEntropy.ixx | Device-templated fused SoftmaxCrossEntropy loss module |
| Normalization | |
| LayerNorm | |
| LayerNorm.Config.ixx | Configuration for Layer Normalization component |
| LayerNorm.ixx | Layer Normalization component |
| RmsNorm | |
| RmsNorm.Config.ixx | Configuration for RMS Normalization component |
| RmsNorm.ixx | RMS Normalization component |
| NormType.ixx | Normalization layer type enumeration used by Transformer components |
| Softmax.ixx | Device-templated Softmax activation module |
| SoftmaxConfig.ixx | Configuration interface for the Softmax module in the Mila DNN framework |
| Transformers | |
| Gemma | |
| Gemma.Block.ixx | Gemma 4 decoder block (inference: prefill + decode), one type per attention kind |
| Gemma.Config.ixx | Network-level configuration for Gemma 4 transformer networks |
| Gemma.ixx | Gemma 4 decoder-only transformer network (inference: prefill + decode) |
| Gemma.Protocol.ixx | Canonical Gemma 4 native token grammar: parse/format for the model's registered turn / channel / tool-call / tool-response vocabulary |
| IDecoderLayer.ixx | Virtual inference interface for a heterogeneous decoder layer list |
| Gpt | |
| Gpt.Config.ixx | Network-level configuration for GPT-style transformer networks |
| GptBlock.Config.ixx | Configuration for GPT-style transformer block (block-level) |
| GptBlock.ixx | Transformer encoder block implementation |
| GptTransformer.ixx | GPT-2 style transformer network (decoder-only) for autoregressive language modeling |
| LlaMa | |
| Llama.Block.ixx | LLaMA transformer block – module partition of LlamaTransformer |
| Llama.Config.ixx | LLaMA network-level configuration |
| Llama.ixx | LLaMA-style decoder-only transformer network |
| GenerateParams.ixx | Per-call generation request: loop control plus the sampling shape |
| SamplingParams.ixx | Per-call sampling parameters – the "sampling shape" |
| MilaComponents.ixx | Aggregate module that re-exports Mila built-in DNN components |
| Compute | |
| Devices | |
| Cpu | |
| Tensors | |
| CpuTensorDataTypeTraits.ixx | CPU-specific tensor trait specializations |
| CpuDevice.ixx | Implementation of CPU-based compute device for the Mila framework |
| CpuDeviceTypeTraits.ixx | DeviceTypeTraits specialization for the CPU device |
| CpuExecutionContext.ixx | CPU-specific execution context specialization |
| CpuMemoryResourceTraits.ixx | CPU-specific memory resource traits and specializations |
| Cuda | |
| Profiling | |
| CudaTimer.ixx | GPU-accurate interval timer using a CUDA event pair |
| Tensors | |
| CudaTensorDataType-Maps.ixx | CUDA-specific mappings between abstract TensorDataType and concrete CUDA native types |
| CudaTensorDataType-Specializations.ixx | CUDA concrete type trait specializations |
| CudaTensorDataType.ixx | CUDA-specific tensor data type trait system - Primary module interface |
| CudaTensorDataTypes-CublasLtTypes.ixx | Compile-time mapping from abstract TensorDataType to cuBLASLt runtime cudaDataType_t enums |
| CudaDevice.ixx | Implementation of CUDA-based compute device for the Mila framework |
| CudaDeviceProps.ixx | CUDA device properties wrapper with caching and convenience methods |
| CudaDeviceTypeTraits.ixx | DeviceTypeTraits specialization for CUDA devices |
| CudaExecutionContext.ixx | CUDA-specific execution context specialization |
| CudaMemoryResourceTraits.ixx | CUDA-specific memory resource traits and specializations |
| Metal | |
| Tensors | |
| MetalTensorTraits.ixx | Metal-specific tensor trait specializations |
| MetalDevice.ixx | Implementation of Metal-based compute device for the Mila framework |
| MetalDevicePlugin.ixx | Metal device plugin for device-agnostic registration and discovery |
| MetalExecutionContext.ixx | Metal-specific execution context specialization |
| MetalMemoryResource.ixx | Metal-specific memory resource implementation for Apple GPU compute |
| Rocm | |
| Tensors | |
| RocmTensorTraits.ixx | Vulkan-specific tensor trait specializations for explicit graphics compute |
| RocmDevice.ixx | Minimal Vulkan-based compute device for the Mila framework |
| RocmExecutionContext.ixx | Vulkan-specific execution context specialization |
| RocmMemoryResource.ixx | Vulkan memory resource implementation for cross-platform GPU compute |
| Operations | |
| GqaState.ixx | Non-owning transient scratch state for CudaGqaOp inference paths |
| IKVCacheLifecycle.ixx | Interface for operations that own and manage a KV cache |
| IKvInference.ixx | KV-cache compute interface for modern attention backends (GQA and beyond) |
| IPackedKvInference.ixx | KV-cache inference interface for GPT-style packed-QKV MHA backends |
| IPositionalDecode.ixx | Interface for unary operations whose output depends on absolute token position |
| IPositionalPairedOp.ixx | Interface for paired operations whose output depends on absolute token position |
| OperationBase.ixx | Core abstraction for neural network operations in the Mila framework |
| OperationTraits.ixx | Aggregator for the unified operation traits dispatch table |
| OperationTraits.Template.ixx | Unified compile-time dispatch template mapping (OperationType, DeviceType, TPrecision, TPolicy) to a concrete operation type |
| OperationType.ixx | Defines the operation types supported by the compute framework |
| Registry | |
| DeviceRegistrar.ixx | Device-agnostic registrar for automatic device discovery and registration |
| DeviceRegistry.ixx | Central registry for discovered compute devices |
| DeviceRegistryHelpers.ixx | Utility functions for compute device discovery and management |
| Device.ixx | Abstract compute device interface and device identifier factory |
| DeviceId.ixx | Lightweight device identifier value type |
| DeviceType.ixx | Device type definitions and conversion utilities for compute devices |
| ExecutionContext.ixx | Templated execution context framework for compute operations and stream management |
| IExecutionContext.ixx | Minimal type-erased execution context interface |
| MemoryResource.ixx | Defines a clean memory resource abstraction focused on allocation responsibilities |
| MemoryResourceTraits.ixx | Compute backend memory resource traits for dispatch optimization |
| Core | |
| Component.BuildContext.ixx | Build-time context passed to Component::build() |
| Component.ixx | Base component interface for Mila DNN components |
| Component.MemoryStats.ixx | Memory allocation statistics for component inspection |
| Component.TrainingMode.ixx | Runtime behavioral mode for training-built Components |
| ComponentConfig.ixx | Base configuration interface for DNN components |
| ComponentFactory.ixx | Factory helpers for reconstructing built-in components from archives |
| ComponentType.ixx | Enumeration of built-in component types supported by the deserializer |
| CompositeComponent.ixx | Abstract container for managing child components |
| Decoder.ixx | Base interface for Mila decoders |
| LanguageModel.ixx | Abstract base for Mila autoregressive language models |
| LanguageModelConfig.ixx | CRTP base configuration for all deployable Mila language models |
| LanguageNetwork.ixx | Abstract base for language model networks |
| LearningRateScheduler.ixx | Learning-rate scheduler base and common concrete schedules |
| Model.ixx | Abstract base class for all Mila models |
| Model.RuntimeMode.ixx | Build-time execution mode for component buffer allocation policy |
| ModelConfig.ixx | Base configuration for all deployable Mila models |
| ModelType.ixx | Architecture identity for top-level model networks |
| Network.ixx | Root composite network container |
| OptimizerBase.ixx | Base interface for neural network parameter optimizers |
| SamplerBase.ixx | Base interface for Mila token samplers |
| TokenStreamer.ixx | Token streaming abstractions for autoregressive generation |
| Models | |
| GemmaModel.ixx | Gemma 4 inference model |
| GemmaModelConfig.ixx | Deployment configuration for Gemma language models |
| GptModel.ixx | GPT inference model |
| GptModelConfig.ixx | Deployment configuration for Gpt2 language models |
| LlamaModel.ixx | LLaMA inference model |
| LlamaModelConfig.ixx | Deployment configuration for Llama language models |
| QuantizationDispatch.ixx | The one place a runtime quantization setting becomes a compile-time policy |
| Optimizers | |
| AdamW.ixx | AdamW optimizer wrapper using fluent AdamWConfig |
| AdamWConfig.ixx | AdamW optimizer configuration |
| Quantization | |
| KvCache | |
| Policy.ixx | KV cache compression policy concept and identity struct |
| QuantPolicy.ixx | Quantization-specific KV cache compression policies |
| Quantization.ixx | Umbrella module for the Mila quantization subsystem |
| Samplers | |
| SamplingConfig.ixx | Construction-time configuration for the token sampler |
| TokenSampler.ixx | Device-agnostic token sampler facade |
| Serialization | |
| ArchiveSerializer.ixx | Interface for hierarchical archive formats (ZIP, tar, etc.) |
| ModelArchive.ixx | Structured archive helper used by component save/load implementations |
| OpenMode.ixx | Archive open mode for model serializers |
| PretrainedReader.ixx | Reader for Mila pretrained binary format |
| SafeTensors.ixx | Safetensors container support: dtype naming and a two-phase writer |
| SerializationMetadata.ixx | Type-safe metadata container for component serialization |
| Serializer.ixx | Minimal base interface for all serialization backends |
| ZipSerializer.ixx | ZIP-based ModelSerializer implementation using miniz |
| Tensors | |
| Operations | |
| TensorOps-Base.ixx | Base declaration for device-specific TensorOps specializations |
| TensorOps.Fill.ixx | High-level initializer helpers (device-dispatching) for tensors |
| TensorOps.Math.ixx | Device-dispatching math helpers for tensor arithmetic operations |
| TensorOps.Random.ixx | Device-dispatching random initialization for tensors |
| TensorOps.Structural.ixx | Device-dispatched structural operations for tensors |
| TensorOps.Transfer.ixx | Tensor transfer utilities – copy/dispatch helpers for tensor data movement |
| TensorOps.Zero.ixx | Device-dispatched fast zero operation for tensor buffers |
| ITensor.ixx | Interface providing minimal representation for tensor data across different implementations |
| Tensor.ixx | Device-aware tensor type with scalar support |
| Tensor.Serialization.ixx | Tensor-specific serialization helpers and metadata |
| Tensor.Types.ixx | Core shape, stride, and index types for the Mila tensor API |
| TensorBuffer.ixx | Device-agnostic memory management layer for tensor data using abstract data types |
| TensorDataType.ixx | Abstract tensor data type enumeration and traits system for device-agnostic tensor operations |
| TensorDataTypeMap.ixx | Concrete C++ type to abstract TensorDataType mapping utilities |
| TensorDataTypeTraits.ixx | Compile-time traits for the abstract TensorDataType enumeration |
| TensorHostTypeMap.ixx | Device-agnostic host type mapping for abstract TensorDataType enumeration |
| Logging | |
| ConsoleSink.ixx | Console-based logging sink for the Mila logging infrastructure |
| FileSink.ixx | File-based logging sink for the Mila logging infrastructure |
| Logger.ixx | Abstract logging interface and static facade for the Mila logging infrastructure |
| NullSink.ixx | No-op logging sink for the Mila logging infrastructure |
| Utils | |
| RandomGenerator.ixx | Provides a centralized random number generator for the Mila library |
| Mila.ixx | Mila public API umbrella module - the single supported entry point (import Mila;) |
| Version.ixx | Semantic version type and Mila library version constants |