Spaces:
Sleeping
Sleeping
File size: 5,203 Bytes
67ded87 7975a75 84642ca 7975a75 cf48e62 1df59a8 67ded87 7975a75 84642ca cf48e62 1df59a8 67ded87 | 1 2 3 4 5 6 7 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 | """
Q-TensorFormer: Closed-Loop Information-to-Resource Adaptive Transformer.
Dynamically allocates model capacity, computation depth, attention complexity,
tensor rank, KV-cache precision, and memory residency according to the
information value of each token under real deployment constraints.
"""
from .config import (
ModelConfig, TrainingConfig, BudgetConfig, ExperimentConfig,
PRESETS, tiny_config, small_config, medium_config, production_config,
validate_model_config,
)
from .information_state import TokenInformationState
from .resource_allocator import (
InformationValueAllocator, AllocationBudget, AllocatorAction, PIDDualSubgradientController,
ConstrainedDecisionEngine, MarginalValueModel,
)
from .kv_cache import (
AdaptiveKVCache, KVPrecision, QuantizedKVTensor,
HierarchicalAdaptiveKVCache, KVResidencyTier, KVTransferStats,
)
from .counterfactual_learning import (
CounterfactualDatasetGenerator, PolicyBenchmarkEvaluator, CounterfactualRecord,
)
from .phase_aware_profiler import (
PhaseAwareProfiler, PhaseProfileResult,
)
from .matched_budget_analyzer import (
MatchedBudgetAnalyzer, MatchedBudgetComparison, ConstraintSatisfactionResult, ParetoHypervolumeResult,
)
from .quantum_backend import (
QuantumBackend, BackendType, compute_meyer_wallach_entanglement, compute_quantum_expressibility,
)
from .tensor_layers import TTLinear, TTFeedForward, factorize_dim
from .attention import MultiHeadAttention
from .blocks import HybridBlock
from .hardware_cost_model import (
HardwareCostModel, HardwareMeasurement, HardwareRooflineAnalyzer, RooflinePoint, KernelBreakdownProfiler,
)
from .models import QTensorFormer, DenseBaseline, create_model
from .validator import ScientificClaimValidator
from .tokenizer import QTensorFormerTokenizer
from .checkpoint import (
save_canonical_checkpoint,
load_canonical_checkpoint,
inspect_checkpoint_compatibility,
)
from .metrics import evaluate_model
from .training import LanguageModelTrainer, DistillationTrainer
# Frontier Research Extensions
from .speculative_decoding import ZeroSVDSpeculativeDecoder
from .semantic_kv_cache import SemanticAnchorKVCache
from .bandit_allocator import ContextualBanditAllocator
from .adaptive_vision import AdaptiveVisionProjector
from .dynamic_grid import DynamicGridController
from .theory import TheoreticalAnalyzer
# Systems & Enterprise Serving Extensions (NVIDIA Hopper/Blackwell/vLLM/TRT-LLM)
from .vllm_adapter import VLLMContinuousBatchingAdapter, QTensorFormerPagedAttentionMetadata
from .trt_llm_plugin import QTensorFormerTRTPlugin
from .roofline_analyzer import EnterpriseRooflineAnalyzer, DecodingRooflineProfile, HardwareRooflineSpec
# Real-World Production & Physical Hardware Governance Extensions
from .realworld_llm_converter import RealWorldLLMConverter
from .hardware_telemetry import LiveHardwareTelemetrySensor, HardwareTelemetrySnapshot
from .reasoning_benchmark import ReasoningComplexityAnalyzer, ReasoningBenchmarkResult, TokenComplexityRecord
# Hugging Face Integration
from .hf_model import QTensorFormerConfig, QTensorFormerForCausalLM
__version__ = "4.0.0"
__all__ = [
"QTensorFormer",
"DenseBaseline",
"create_model",
"ZeroSVDSpeculativeDecoder",
"SemanticAnchorKVCache",
"ContextualBanditAllocator",
"AdaptiveVisionProjector",
"DynamicGridController",
"TheoreticalAnalyzer",
"VLLMContinuousBatchingAdapter",
"QTensorFormerPagedAttentionMetadata",
"QTensorFormerTRTPlugin",
"EnterpriseRooflineAnalyzer",
"DecodingRooflineProfile",
"HardwareRooflineSpec",
"RealWorldLLMConverter",
"LiveHardwareTelemetrySensor",
"HardwareTelemetrySnapshot",
"ReasoningComplexityAnalyzer",
"ReasoningBenchmarkResult",
"TokenComplexityRecord",
"ModelConfig",
"TrainingConfig",
"BudgetConfig",
"ExperimentConfig",
"validate_model_config",
"TokenInformationState",
"InformationValueAllocator",
"AllocationBudget",
"AllocatorAction",
"PIDDualSubgradientController",
"ConstrainedDecisionEngine",
"MarginalValueModel",
"AdaptiveKVCache",
"HierarchicalAdaptiveKVCache",
"KVPrecision",
"KVResidencyTier",
"KVTransferStats",
"QuantizedKVTensor",
"CounterfactualDatasetGenerator",
"PolicyBenchmarkEvaluator",
"PhaseAwareProfiler",
"PhaseProfileResult",
"MatchedBudgetAnalyzer",
"MatchedBudgetComparison",
"ConstraintSatisfactionResult",
"ParetoHypervolumeResult",
"QuantumBackend",
"BackendType",
"compute_meyer_wallach_entanglement",
"compute_quantum_expressibility",
"TTLinear",
"TTFeedForward",
"factorize_dim",
"MultiHeadAttention",
"HybridBlock",
"HardwareCostModel",
"HardwareMeasurement",
"HardwareRooflineAnalyzer",
"RooflinePoint",
"KernelBreakdownProfiler",
"QTensorFormerConfig",
"QTensorFormerForCausalLM",
"ScientificClaimValidator",
"QTensorFormerTokenizer",
"save_canonical_checkpoint",
"load_canonical_checkpoint",
"inspect_checkpoint_compatibility",
"evaluate_model",
"LanguageModelTrainer",
"DistillationTrainer",
"__version__",
]
|