Skip to main content

Crate eredu_runtime

Crate eredu_runtime 

Source
Expand description

Backend-neutral model execution contracts and algorithms.

This crate orchestrates opaque backend-native values. It deliberately has no dependency on an architecture implementation or execution backend.

Re-exports§

pub use backend::CollectiveBackend;
pub use backend::ParameterBackend;
pub use backend::SubmissionBackend;
pub use backend::TransferBackend;
pub use cache::finalize_prompt_cache_shard;
pub use cache::hash_prompt_cache_shard_payload;
pub use cache::inspect_prompt_cache;
pub use cache::resolve_prompt_cache_root;
pub use cache::safe_prompt_cache_shard_path;
pub use cache::validate_prompt_cache_manifest;
pub use cache::CacheBlockLifecycle;
pub use cache::CacheBlockStorage;
pub use cache::CacheHostDemotionOperation;
pub use cache::CacheHostPromotion;
pub use cache::CacheIoAdmission;
pub use cache::CacheIoCompletionDisposition;
pub use cache::CacheIoExecutionState;
pub use cache::CacheIoExecutionStateError;
pub use cache::CacheIoOperation;
pub use cache::CacheIoOperationKey;
pub use cache::CacheIoOperationKind;
pub use cache::CacheIoPreparation;
pub use cache::CacheIoStartDisposition;
pub use cache::CacheIoSubmission;
pub use cache::CacheIoSubmissionOutcome;
pub use cache::CacheIoTicket;
pub use cache::CacheIoWorker;
pub use cache::CacheIoWorkerError;
pub use cache::CacheLayerResidencyReport;
pub use cache::CacheLayerResidencyStats;
pub use cache::CacheLifecycleError;
pub use cache::CachePoolError;
pub use cache::CachePoolLimits;
pub use cache::CachePoolMembership;
pub use cache::CachePoolReport;
pub use cache::CachePoolReservation;
pub use cache::CachePoolResource;
pub use cache::CachePoolUsage;
pub use cache::CacheResidencyConfigurationError;
pub use cache::CacheResidencyPolicy;
pub use cache::CacheResidencyPool;
pub use cache::CacheResidencyReport;
pub use cache::CacheResidencyTelemetry;
pub use cache::CacheStorageError;
pub use cache::CacheStoragePhase;
pub use cache::LiveCacheBlockPublication;
pub use cache::LiveCacheDiskPolicy;
pub use cache::LiveCachePublicationError;
pub use cache::MutableCacheTail;
pub use cache::PagedCacheOptions;
pub use cache::PromptCachePersistenceError;
pub use cache::PromptCachePublication;
pub use cache::CACHE_RESIDENCY_LAYER_REPORT_LIMIT;
pub use cache::MAX_PROMPT_CACHE_SHARD_HEADER_BYTES;
pub use cache::PROMPT_CACHE_CURRENT_FILE;
pub use cache::PROMPT_CACHE_GENERATIONS_DIRECTORY;
pub use component::ComponentDomain;
pub use component::ComponentGraph;
pub use component::ComponentGraphError;
pub use component::ComponentKind;
pub use component::ComponentResidencyClass;
pub use component::ComponentSpec;
pub use decision::FullyForcedTailDecision;
pub use decision::PredictionDirective;
pub use decision::SequentialDecision;
pub use decision::SequentialDecisionBoundary;
pub use decision::SequentialDecisionDiagnostic;
pub use decision::SequentialDecisionDriver;
pub use decision::SequentialDecisionError;
pub use decision::SequentialDecisionMode;
pub use decision::SequentialDecisionPlan;
pub use decision::SequentialDecisionPlanError;
pub use decision::SequentialDecisionSource;
pub use decision::SequentialDecisionTraversal;
pub use decision::SequentialSamplingState;
pub use dense::DenseCacheMetrics;
pub use dense::DenseDiskStreamReport;
pub use dense::DenseExecutionGroupReport;
pub use dense::DensePassCounterSnapshot;
pub use dense::DensePassReport;
pub use dense::DenseStreamTelemetry;
pub use dense::DenseStreamTelemetryError;
pub use dense::DenseTierResidencyReport;
pub use draft::execute_draft_group;
pub use draft::DraftGroupExecutionError;
pub use draft::DraftStateTransaction;
pub use execution::ExecutionGraph;
pub use execution::ExecutionGraphError;
pub use execution::ExecutionGroupId;
pub use execution::ExecutionGroupSchedule;
pub use execution::ExecutionGroupSpec;
pub use execution::ExecutionScheduleError;
pub use execution::ExecutionUnitAddress;
pub use execution::ExecutionUnitLayout;
pub use execution::ExecutionUnitLayoutError;
pub use execution::ReadyGroupState;
pub use expert::combine_routed_expert_tensor_parallel;
pub use expert::combine_tensor_parallel_expert_outputs;
pub use expert::reduce_routed_expert_tensor_parallel;
pub use expert::reduce_tensor_parallel_expert_output;
pub use expert::AddressableGatedProductBank;
pub use expert::ObservedExpertProvider;
pub use expert::ObservedExpertProviderError;
pub use expert::ResidentExpertProvider;
pub use expert::RoutedExpertProvider;
pub use expert::RoutedExpertRequest;
pub use expert::RoutedExpertTensorParallelOutput;
pub use expert::RoutedObservationPoint;
pub use expert::TensorParallelRoutedExpertProvider;
pub use generation::CausalModel;
pub use generation::ConstrainedSampler;
pub use generation::DefaultSampler;
pub use generation::GenerationSampler;
pub use generation::MirostatV2Sampler;
pub use generation::PenaltyConfig;
pub use generation::Sampler;
pub use generation::SamplingBackend;
pub use generation::SamplingConfigurationError;
pub use generation::SpeculativeSampler;
pub use generation::TokenDomain;
pub use input::PreparedInputPart;
pub use input::PreparedInputPayload;
pub use input::PreparedModelInput;
pub use inspection::observe_and_intervene;
pub use inspection::observe_model_logits;
pub use inspection::ActivationObserver;
pub use inspection::NoopObserver;
pub use inspection::RoutingObservation;
pub use inspection::TargetStateCapture;
pub use inspection::TargetStateCaptureError;
pub use inspection::TargetStateTap;
pub use layered::ArchitectureGroupKind;
pub use layered::ArchitectureGroupPlacement;
pub use layered::ArchitectureGroupTransport;
pub use layered::ArchitectureMergeDestination;
pub use layered::ArchitectureParallelSubgroup;
pub use layered::ArchitectureParameters;
pub use layered::CompositeLayeredTraversalHook;
pub use layered::LayeredArchitecture;
pub use layered::LayeredForwardState;
pub use layered::LayeredPartitionInput;
pub use layered::LayeredPartitionOutput;
pub use layered::LayeredPipelineSchedule;
pub use layered::LayeredPipelineScheduleError;
pub use layered::LayeredTraversalHook;
pub use layered::LayeredTraversalPoint;
pub use layered::LayeredUnitAction;
pub use layered::LayerwiseAcquireError;
pub use layered::LayerwisePolicy;
pub use layered::LayerwiseRuntime;
pub use layered::LayerwiseRuntimeError;
pub use layered::ParallelLayeredArchitecture;
pub use layered::ParallelRoutedLayeredArchitecture;
pub use layered::PartitionedLayeredArchitecture;
pub use layered::ResidentRuntime;
pub use layered::ResidentUnitWindow;
pub use layered::ResidentUnitWindowError;
pub use layered::RoutedLayeredArchitecture;
pub use layered::StaticParameterVisitor;
pub use layered::StaticParameterVisitorMut;
pub use parallel::aligned_partition_units;
pub use parallel::expand_linear_format_parameter_groups;
pub use parallel::module_parameter_group;
pub use parallel::partitioned_module_parameter_group;
pub use parallel::partitioned_projection_group;
pub use parallel::projection_parameter_group;
pub use parallel::segmented_projection_group;
pub use parallel::LocalModelLayout;
pub use parallel::LocalTensorLayout;
pub use parallel::MemberSharding;
pub use parallel::ParallelModelInfo;
pub use parallel::ParallelPlanError;
pub use parallel::ParameterGroupSpec;
pub use parallel::ParameterMemberSpec;
pub use parallel::ParameterRole;
pub use parallel::ProjectionSharding;
pub use parallel::ShardingPolicy;
pub use parallel::TensorPlacement;
pub use parameter::bind_materialized_unit;
pub use parameter::bindings_from_recipe_set;
pub use parameter::materialize_bindings;
pub use parameter::MaterializedUnit;
pub use parameter::ParameterOrchestrationError;
pub use parameter::RecipeBindingError;
pub use partition::validate_boundary_tensor_count;
pub use partition::ArchitectureBoundary;
pub use partition::ArchitectureBoundaryError;
pub use partition::ArchitectureParameterDescription;
pub use partition::ArchitectureParameterError;
pub use partition::ArchitecturePartition;
pub use partition::ArchitecturePartitionError;
pub use partition::BoundaryTensorDimension;
pub use partition::BoundaryTensorDtype;
pub use partition::BoundaryTensorSpec;
pub use partition::BoundaryWireSchema;
pub use partition::LayeredPartitionDriver;
pub use partition::LayeredPartitionError;
pub use partition::NoAuxiliaryBoundary;
pub use partition::NoAuxiliaryBoundarySchema;
pub use partition::OwnedParameterGroupSpec;
pub use partition::ParameterGroupOwner;
pub use partition::PartitionGroup;
pub use partition::PartitionOwnership;
pub use partition::PartitionState;
pub use partition::PipelineActivationDtype;
pub use partition::PipelineWireContract;
pub use partition::ResolvedBoundaryTensorSpec;
pub use partition::ResolvedBoundaryWireSchema;
pub use prefetch::BackgroundPrefetchWorker;
pub use prefetch::BackgroundPrefetchWorkerError;
pub use realtime::RealtimeCompletionAttachmentError;
pub use realtime::RealtimeFrameExecutionError;
pub use realtime::RealtimeFrameTransition;
pub use realtime::RealtimeGenerationBranch;
pub use realtime::RealtimeGenerationState;
pub use realtime::RealtimeGenerationTransactionError;
pub use replicated_text::select_replicated_text_realization;
pub use replicated_text::BackendMechanismCapabilities;
pub use replicated_text::GroupedOperationRequirement;
pub use replicated_text::ParameterTransformConstraint;
pub use replicated_text::ParameterTransformTarget;
pub use replicated_text::ReplicatedTextArchitecture;
pub use replicated_text::ReplicatedTextContractError;
pub use replicated_text::ReplicatedTextParameterOwner;
pub use replicated_text::ReplicatedTextParameterPresence;
pub use replicated_text::ReplicatedTextParameterRequirement;
pub use replicated_text::ReplicatedTextParameterRole;
pub use replicated_text::ReplicatedTextPhysicalSource;
pub use replicated_text::ReplicatedTextRequirements;
pub use replicated_text::ReplicatedTextSelectionError;
pub use replicated_text::ReplicatedTextSelectionRequest;
pub use replicated_text::SelectedParameterRealization;
pub use replicated_text::SelectedReplicatedTextRealization;
pub use replicated_text::StateResidencyMechanism;
pub use replicated_text::WeightLoweringCapability;
pub use replicated_text::WeightLoweringDescriptor;
pub use replicated_text::WeightLoweringKind;
pub use replicated_text::WeightResidencyMechanism;
pub use residency::DeviceLayerWindow;
pub use residency::OffloadUnit;
pub use residency::ResidencyAcquisition;
pub use residency::ResidencyController;
pub use residency::ResidencyControllerError;
pub use residency::ResidencyDeclarationError;
pub use residency::ResidencyLease;
pub use residency::ResidencyLeaseOwner;
pub use residency::ResidencyLeaseStorage;
pub use residency::ResidencyReport;
pub use residency::ResidencyTransfer;
pub use residency::ResidencyTransferOwner;
pub use residency::ResidencyWindowError;
pub use residency::ResidencyWindowManager;
pub use residency::ResidentLayerGroup;
pub use residency::ResidentLayerGroupReport;
pub use residency::WeightBinding;
pub use residency::WeightBindingPlan;
pub use residency::WeightBindingSelectionError;
pub use residency::WeightMaterializationReport;
pub use speculative::RunSpeculativeGeneration;
pub use speculative::SpeculativeScheduler;
pub use state::realize_architecture_state;
pub use state::ArchitectureStateFactory;
pub use state::ArchitectureStatePartitionError;
pub use state::ArchitectureStatePartitionPlan;
pub use state::ArchitectureStatePartitionRule;
pub use state::ArchitectureStatePlacement;
pub use state::ArchitectureStateRealizationError;
pub use state::DeviceState;
pub use state::LayerRuntimeState;
pub use state::ModelStateIdentity;
pub use state::ResettableRuntimeLayerState;
pub use state::ResettableRuntimeState;
pub use state::RuntimeLayerState;
pub use state::RuntimeState;
pub use state::RuntimeStateComponents;
pub use state::StateError;
pub use state::StateLayout;
pub use state::StateSegmentId;
pub use state::StateSegmentLifetime;
pub use state::StateSegmentSpec;
pub use state::DEFAULT_STATE_SEGMENT_ID;

Modules§

backend
Backend execution, parameter, transfer, and collective capabilities. Narrow capability contracts implemented by execution backends.
cache
Backend-neutral mutable-cache ownership, storage, and admission algorithms. Backend-neutral ownership and admission algorithms for live model caches.
component
Typed multimodal component graphs and residency accounting. Typed multimodal component graphs and residency classes.
decision
Backend-neutral sequential prediction decisions and layered handoff. Backend-neutral sequential prediction decisions and layered traversal handoff.
dense
Backend-neutral dense-stream residency telemetry. Backend-neutral dense-stream residency telemetry.
draft
Backend-neutral speculative-state fork, commit, and rollback ownership. Transactional ownership for embedded draft mutable state.
execution
Portable execution-group topology and scheduling state. Validated execution-group dependency graphs and ready-set scheduling.
expert
Runtime ownership boundary for routed expert acquisition and residency.
generation
Backend-neutral causal-model and token-sampling contracts. Backend-neutral causal-model and token-sampling contracts.
input
Backend-neutral ownership of prepared multimodal tensors. Backend-neutral ownership of prepared multimodal tensors.
inspection
Backend-neutral activation, target-state, and routed-expert observation contracts.
layered
Statically dispatched layered architecture lifecycle and resident policy. Statically dispatched layered-architecture lifecycle and resident execution.
parallel
Architecture-declared parallel parameter semantics and local layouts. Backend-neutral semantic parameter sharding and rank-local layouts.
parameter
Neutral checkpoint materialization and stable parameter binding. Backend-neutral checkpoint materialization and parameter binding.
partition
Backend-neutral rank-local architecture ownership. Backend-neutral ownership of one rank-local architecture partition.
prefetch
Backend-neutral bounded background weight-prefetch execution. Backend-neutral bounded background weight prefetch execution.
realtime
Atomic realtime model, schedule, sampler, and random-state transactions. Atomic runtime ownership for one realtime model-generation transition.
replicated_text
Selection contracts for replicated text architectures. Selection contracts for replicated text architectures.
residency
Backend-neutral immutable-weight residency declarations and orchestration. Backend-neutral immutable-weight residency declarations and control state.
speculative
Backend-neutral speculative request lifecycle and fair scheduling. Backend-neutral speculative request lifecycle and fair scheduling.
state
Architecture-declared mutable state and concrete runtime realizations. Backend-neutral mutable model-state contracts.

Structs§

DenseDiskStreamLoadOptions
Controls for bounded dense-unit streaming from checkpoint storage.
DenseTransferSchedule
Ordered bounded transfer cursor used by dense streamed execution.
LayerwiseLoadOptions
Loader controls for a host-backed layerwise execution engine.
LayerwiseModelMetadata
Inspectable backend-neutral parameter-residency metadata for a layered model.
ParameterBankKey
Stable mechanism identity for one member of an independently addressable bank.
ParameterBankLoadOptions
Backend-neutral controls for independently addressable parameter-bank residency.
StaticUnitBindings
One pinned static module and its checkpoint bindings.

Enums§

DenseTransferScheduleError
Invalid transition in a bounded dense transfer schedule.
ExecutionResidency
Static-parameter placement used by the generalized execution engine.
ExpertPass
Execution-path classification for routed-expert telemetry and chunking.
LayerWeightResidency
Placement policy for ordinary architecture execution units.
OrdinaryWeightResidency
Placement of ordinary parameters beside independently addressable banks.
ParameterBankResidency
Independently addressable bank placement relative to ordinary execution units.
WeightResidency
Composable ordinary-unit and independently addressable bank placement.
WeightResidencyPolicyError
Invalid backend-neutral immutable-weight residency policy.

Constants§

DENSE_TRANSFER_WINDOW
Current plus next unit retained by dense streamed execution.