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

Device-agnostic token sampler facade. More...

#include <memory>
#include <random>
#include <cstdint>
#include <stdexcept>
import Compute.CpuMemoryResource;
import Compute.DeviceTypeTraits;
import Compute.SamplerBase;
import Dnn.TensorDataType;
import Compute.IExecutionContext;
import Dnn.SamplingParams;
import Compute.OperationTraits;
import Compute.OperationType;
import Dnn.TensorOps;
import Dnn.Tensor;
import Dnn.ITensor;
import Dnn.TensorTypes;
import Dnn.TensorDataTypeTraits;
import Compute.Device;
import Dnn.Samplers.SamplingConfig;
import Compute.DeviceType;

Classes

class  Mila::Dnn::TokenSampler< TDeviceType, TPrecision >
 The standard token sampler: temperature / top-k / top-p multinomial. More...

Namespaces

namespace  Mila
 Mila main API namespace.

Detailed Description

Device-agnostic token sampler facade.

Model-owned orchestrator tool (sibling of the Optimizer facade). Resolves the device SamplingOp through OperationTraits, owns the host RNG, and performs the 4-byte device->host token readback. See Specifications/TokenSampling.md.