Mila
Deep Neural Network Library
Loading...
Searching...
No Matches
Encoder.ixx File Reference

Implementation of the Encoder module for token and positional embeddings in transformer models. More...

#include <memory>
#include <vector>
#include <string>
#include <iostream>
#include <sstream>
#include <type_traits>
#include <cuda_fp16.h>
import Compute.CpuMemoryResource;
import Dnn.TensorHelpers;
import Compute.OperationRegistry;
import Dnn.Module;
import Dnn.Tensor;
import Compute.UnaryOperation;
import Dnn.TensorTraits;
import Compute.CudaMemoryResource;
import Compute.CudaDevice;
import Compute.OperationBase;
import Dnn.Modules.Encoder:Config;
import Compute.DeviceType;
import Serialization.ModelArchive;
import Compute.DeviceContext;
import Compute.OperationAttributes;
import Compute.MemoryResource;
import Compute.CpuDevice;

Classes

class  Mila::Dnn::Encoder< TDeviceType, TInput, TOutput >
 An encoder module that provides token and positional embeddings. More...
 

Namespaces

namespace  Mila
 
namespace  Mila::Dnn
 

Typedefs

template<typename TInput = int, typename TOutput = float>
using Mila::Dnn::CpuEncoder = Encoder< DeviceType::Cpu, TInput, TOutput >
 Type alias for CPU-based encoder module with customizable tensor types.
 
template<typename TInput = int, typename TOutput = float>
using Mila::Dnn::CudaEncoder = Encoder< DeviceType::Cuda, TInput, TOutput >
 Type alias for CUDA-based encoder module with customizable tensor types.
 

Detailed Description

Implementation of the Encoder module for token and positional embeddings in transformer models.