Module neuralops.tests
Sub-modules
neuralops.tests.analysisneuralops.tests.configneuralops.tests.conftest-
Shared pytest fixtures for neuralops test suite.
neuralops.tests.dataneuralops.tests.test_aasvd_exhaustive-
Exhaustive Verification Suite for AASVD (Activation-Aware SVD) Compressor. Validates structural factorizations, streaming covariance estimation, …
neuralops.tests.test_adaptive_ranks_extra-
Comprehensive tests for AdaptiveRanksCompressor. Verifies: 1. Conv1D and LoRALinear wrapper detection, weight transposition, and base layer handling. …
neuralops.tests.test_adaptive_ranks_jg-
Unit tests for Adaptive Ranks Compressor with Jacobian-Gated SVD (JG-SVD). Tests all 9 core properties: 1. GELU derivative squared at y=0 is 0.25 …
neuralops.tests.test_adaptive_span-
Unit tests for AdaptiveSpanAttention module. Verifies all 8 core properties: 1. Module instantiates with correct span initialization (span_logits = …
neuralops.tests.test_adaptive_span_comprehensiveneuralops.tests.test_adaptive_sparse_attentionneuralops.tests.test_adaptive_sparse_comprehensiveneuralops.tests.test_adaptive_svd_attention-
Hardening test suite for adaptive_svd_attention.py (AdaptiveSVDAttention).
neuralops.tests.test_adaptive_svd_attention_comprehensiveneuralops.tests.test_adaptive_svd_verification-
Verification test script for AdaptiveSVDAttention and AdaptiveRanksCompressor. Validates: 1. Dynamic cumulative singular value energy thresholding: …
neuralops.tests.test_adasplash_attention-
Hardening tests for AdaSplashAttention (adasplash_attention.py) …
neuralops.tests.test_adasplash_attention_comprehensiveneuralops.tests.test_adasvd_hardenedneuralops.tests.test_admm_hardenedneuralops.tests.test_admm_pruner_distillneuralops.tests.test_aegis_hybrid-
Hardening test suite for aegis_hybrid.py (AegisHybridAttention).
neuralops.tests.test_aegis_hybrid_comprehensiveneuralops.tests.test_aegis_spectron_fp8-
Hardening test suite for aegis_spectron_fp8.py (AegisSpectronFP8Attention).
neuralops.tests.test_aegis_spectron_fp8_comprehensiveneuralops.tests.test_aegis_v6_comprehensiveneuralops.tests.test_alibi-
Unit tests for ALiBi attention.
neuralops.tests.test_all_203_models_comprehensive-
Comprehensive Master Test Suite for All Attention Mechanisms and Compression Engines. Tests instantiation, mock forward pass, cross-entropy / loss …
neuralops.tests.test_all_attention_modules-
Smoke tests for ALL registered attention modules.
neuralops.tests.test_all_compression_engines-
Master Test Suite for All Compression Engine Modules Tests initialization, compression, shape preservation, and forward pass across all 70 registered …
neuralops.tests.test_all_compressor_modules-
Smoke tests for ALL registered compressor modules.
neuralops.tests.test_analysis_stats-
Unit tests for statistical correction and hypothesis testing utilities.
neuralops.tests.test_architecture-
Unit tests for core architecture discovery, leaf extraction, and attention injection.
neuralops.tests.test_armor_hardenedneuralops.tests.test_armor_pruner_hardened-
Comprehensive Unit Test Suite for Production-Hardened ARMOR Pruner. Covers: 1. Factory config safety (None, dict, missing parameters) 2. Conv1D …
neuralops.tests.test_astro_hardened-
Unit tests for hardened AstroQuantizer with Fisher-Adaptive Bit Allocation. Verifies: 1. allocate_fisher_bits solves the integer knapsack budget and …
neuralops.tests.test_asvd_attention_comprehensiveneuralops.tests.test_attention_injection-
Tests for the attention injection utilities.
neuralops.tests.test_attention_linear_family-
Subagent 2: Linear Attention & Kernelization Family Test Suite.
neuralops.tests.test_attention_modules_compat-
Unit tests for attention module family compatibility and declared capabilities.
neuralops.tests.test_attention_profiler-
Tests for AttentionProfiler.
neuralops.tests.test_attention_ssm_family-
Subagent 3: Recurrent / SSM / Mamba Family Test Suite.
neuralops.tests.test_attention_standard_family-
Subagent 4: Standard / Hybrid / GQA Family Test Suite.
neuralops.tests.test_attention_svd_family-
Subagent 1: SVD-based & Factorization Attention Family Test Suite.
neuralops.tests.test_attention_utilsneuralops.tests.test_attentionsneuralops.tests.test_autograd_flash-
Tests for FlashAttentionFunction autograd.
neuralops.tests.test_autotuner-
Tests for kernel autotuner.
neuralops.tests.test_awq_real-
Tests for production AWQ quantizer.
neuralops.tests.test_bam_umoe_comprehensiveneuralops.tests.test_benchmark_datasets-
Unit tests for BenchmarkDatasetRegistry and load_benchmark_dataset. Tests offline synthetic fallback, registered benchmarks, and data formats.
neuralops.tests.test_block_sparse-
Unit tests for block-sparse attention.
neuralops.tests.test_block_transformer_hiba_comprehensiveneuralops.tests.test_cachenotes_hardened-
Unit tests for hardened CacheNotes compressor. Verifies: 1. LoRA wrapper and Conv1D detection and transposition. 2. If layer is already LoRALinear, …
neuralops.tests.test_checkpointing-
Tests for selective gradient checkpointing.
neuralops.tests.test_chela_slay-
Tests for CHELA-SLAY Attention Module.
neuralops.tests.test_chela_slay_comprehensiveneuralops.tests.test_chunked_recurrent_scans-
Exhaustive test suite for chunked recurrent scans and low-accuracy module fixes. Validates chunked associative scan accuracy against token-level …
neuralops.tests.test_cluster_comprehensiveneuralops.tests.test_compat-
Unit tests for neuralops.utils.compat package.
neuralops.tests.test_compressed_attention_comprehensiveneuralops.tests.test_compressed_mha_attention_comprehensiveneuralops.tests.test_compression_enhancements-
Tests for compression engine enhancements (GPTQ, AWQ, SmoothQuant, Wanda, LoRA/QLoRA/DoRA).
neuralops.tests.test_compressors_all-
Subagent 5: All Registered Compressors Verification Suite.
neuralops.tests.test_config-
Unit tests for neuralops.config dataclasses and utilities.
neuralops.tests.test_cosformer-
Comprehensive test suite for Cosformer Attention (cosformer.py).
neuralops.tests.test_cosformer_comprehensiveneuralops.tests.test_cross_architecture_injection-
Exhaustive cross-architecture injection tests across DistilBERT, RoBERTa, GPT-2, and Qwen. Verifies forward pass shape, finite outputs, LoRA parameter …
neuralops.tests.test_cross_attention-
Tests for CrossAttention.
neuralops.tests.test_cuda_graph-
Tests for CUDAGraphRunner.
neuralops.tests.test_cur_compressor_comprehensiveneuralops.tests.test_data_utils-
Unit tests for neuralops.data utilities and loaders.
neuralops.tests.test_datasets-
Unit tests for benchmark dataset registry, loaders, and synthetic generation.
neuralops.tests.test_decay_linear_attention-
Comprehensive test suite for Decay Linear Attention (decay_linear_attention.py).
neuralops.tests.test_decay_linear_attention_comprehensiveneuralops.tests.test_deterministic-
Tests for deterministic attention mode.
neuralops.tests.test_dobi_svd_comprehensiveneuralops.tests.test_eat-
Comprehensive test suite for EAT (Efficient Attention Transformer).
neuralops.tests.test_eat_comprehensiveneuralops.tests.test_elementwise_kernels-
Tests for elementwise kernels.
neuralops.tests.test_enlighten-
Comprehensive test suite for ENLighten compressor …
neuralops.tests.test_eval_data-
Tests for eval_data module.
neuralops.tests.test_eval_importsneuralops.tests.test_eval_patcher-
Tests for eval_patcher module.
neuralops.tests.test_eval_pipeline-
Unit tests for neuralops.evaluation.eval_pipeline.
neuralops.tests.test_eval_suite-
Tests for Phase 8 evaluation suite.
neuralops.tests.test_eval_types-
Tests for eval_types module.
neuralops.tests.test_eval_utils-
Tests for eval_utils module.
neuralops.tests.test_expert_choice_moe_comprehensiveneuralops.tests.test_factorised_matrix_state_comprehensiveneuralops.tests.test_file_structure-
Unit tests for framework directory integrity, python compilation, and clean workspace.
neuralops.tests.test_flash3_fp8-
Tests for FlashAttention-3 FP8 attention module …
neuralops.tests.test_flash_attention3_comprehensiveneuralops.tests.test_flash_attention3_fp8_comprehensiveneuralops.tests.test_flash_decoding-
Tests for flash decoding attention.
neuralops.tests.test_fms-
Comprehensive test suite for Factorised Matrix State Attention …
neuralops.tests.test_full_attention_comprehensiveneuralops.tests.test_full_framework_end_to_end-
Master End-to-End Test Suite for All Framework Features and Subsystems …
neuralops.tests.test_fused_backward-
Tests for fused attention backward.
neuralops.tests.test_fused_norm_attn-
Tests for FusedNormAttention.
neuralops.tests.test_fused_rope-
Tests for fused RoPE embedding.
neuralops.tests.test_fused_svd_kernel-
Unit tests for Fused SVD-Linear Layer with in-SRAM RMSNorm, Autograd backward pass, and integration into SVDLinear and SVDLinearAttention modules.
neuralops.tests.test_fused_svd_kernel_comprehensiveneuralops.tests.test_fusion_attn_comprehensiveneuralops.tests.test_galerkin_attention_comprehensiveneuralops.tests.test_gated_delta_net_comprehensiveneuralops.tests.test_gated_deltanet_block_comprehensiveneuralops.tests.test_gated_linear_attention_comprehensiveneuralops.tests.test_generalization_hardcoded_scan-
Verification: Hardcoded String / Shape Scan.
neuralops.tests.test_goldfinch_ahn_comprehensiveneuralops.tests.test_gptq_real-
Numerical verification tests for production GPTQ.
neuralops.tests.test_gqa_comprehensiveneuralops.tests.test_gqa_utils-
Tests for repeat_kv_optimized.
neuralops.tests.test_granite_hybrid_comprehensiveneuralops.tests.test_griffin_ssd_comprehensiveneuralops.tests.test_halo_regla_comprehensiveneuralops.tests.test_hamming_comprehensiveneuralops.tests.test_hgrn2_comprehensiveneuralops.tests.test_hgrn2_gated_deltanet_comprehensiveneuralops.tests.test_hgrn2_layer_comprehensiveneuralops.tests.test_hgrn2_outer_comprehensiveneuralops.tests.test_hla_attention_comprehensiveneuralops.tests.test_huffman_coder-
Comprehensive Test Suite for Vectorized Huffman Coder & Huffman Compressor. Tests roundtrip correctness, compression metrics, fallback LoRA freezing, …
neuralops.tests.test_hybrid_attentionneuralops.tests.test_hybrid_freeze-
Unit tests for strict parameter freezing on hybrid recurrent attention modules and trainable parameter count thresholds.
neuralops.tests.test_hymba_transx_comprehensiveneuralops.tests.test_imports-
Basic tests for the trainer module …
neuralops.tests.test_inference_engine-
Tests for Phase 6 Inference engine features.
neuralops.tests.test_inference_real-
Tests for production inference engine features.
neuralops.tests.test_integration_all_families-
Integration Matrix: All Families x Representative Modules (including Qwen3.5).
neuralops.tests.test_integration_end_to_end-
End-to-end integration tests for neuralops modules and pipelines.
neuralops.tests.test_integration_pipeline-
End-to-end integration tests for the full pipeline.
neuralops.tests.test_integration_regression-
End-to-end integration and regression tests.
neuralops.tests.test_integration_smoke-
Integration smoke tests verifying end-to-end injection and forward passes per model family.
neuralops.tests.test_integrations-
Tests for ecosystem and integration modules.
neuralops.tests.test_integrations_real-
Tests for real ecosystem integrations (patch_model_attention, vLLM, DeepSpeed, FSDP).
neuralops.tests.test_jamba_comprehensiveneuralops.tests.test_jamba_info_comprehensiveneuralops.tests.test_kda_comprehensiveneuralops.tests.test_kernel_benchmarks-
Tests for kernel benchmark harness.
neuralops.tests.test_kernel_edge_cases-
Edge case tests: seq_len=1, seq_len > window, empty batch, non-power-of-2 dims.
neuralops.tests.test_kernel_quantization_comprehensiveneuralops.tests.test_kvtc_hardened-
Comprehensive unit test suite for hardened KVTC (KV Cache Transform Coding / PCA-Quant) compressor …
neuralops.tests.test_legacy_ensembleneuralops.tests.test_linformer_attention_comprehensiveneuralops.tests.test_lola_attention_comprehensiveneuralops.tests.test_lora-
Comprehensive unit tests for native LoRA module.
neuralops.tests.test_lora_attention_comprehensiveneuralops.tests.test_lora_qlora_dora_real-
Tests for production LoRA merge/extraction, QLoRA, and DoRA.
neuralops.tests.test_losses-
Smoke tests for loss functions in neuralops.trainer.losses.
neuralops.tests.test_low_accuracy_modules_fixes-
Unit tests validating fixes for low-accuracy modules: - GPT-2 fused c_attn splitting prior to SVD - Aegis family positive gate bias and residual …
neuralops.tests.test_lsh_attention_comprehensiveneuralops.tests.test_mamba_chunked_scanneuralops.tests.test_mamba_svd_flash_comprehensiveneuralops.tests.test_master_suite_all_203_modelsneuralops.tests.test_minimal_nova_comprehensiveneuralops.tests.test_minimal_svd_comprehensiveneuralops.tests.test_mixattention_moska_comprehensiveneuralops.tests.test_mixed_precision_epoch-
Tests for complete mixed precision trainer with gradient accumulation.
neuralops.tests.test_mla_attention_comprehensiveneuralops.tests.test_moba_attention_comprehensiveneuralops.tests.test_model_family_compatneuralops.tests.test_models_and_datasets_matrix-
Comprehensive Matrix Test Suite: Small Models (BERT, RoBERTa, DistilBERT, GPT-2) across all Datasets (GLUE tasks, WikiText-2, C4, Multi-Choice) and …
neuralops.tests.test_moe_deltakv_paged_comprehensiveneuralops.tests.test_moe_hybrid_comprehensiveneuralops.tests.test_monitor_server-
Unit tests for neuralops.runners.monitor package.
neuralops.tests.test_mqa-
Tests for MultiQueryAttention.
neuralops.tests.test_multi_mode-
Unit tests for MultiModeBenchmarkRunner across diverse inference modes.
neuralops.tests.test_multiarch_modules-
Small, dependency-light tests for the multi-architecture contract.
neuralops.tests.test_muon_optimizerneuralops.tests.test_nasc_attention_comprehensiveneuralops.tests.test_nexus_comprehensiveneuralops.tests.test_nha_comprehensiveneuralops.tests.test_nsa_attention_comprehensiveneuralops.tests.test_numerical_correctness_gradcheck-
Comprehensive numerical correctness and autograd gradient tests.
neuralops.tests.test_numerical_stability-
Tests for safe_softmax and safe_log numerical stability.
neuralops.tests.test_nystrom_attention_comprehensiveneuralops.tests.test_optimized_hybrid_attention_comprehensiveneuralops.tests.test_optimizers-
Unit tests for neuralops.trainer.optimizers package.
neuralops.tests.test_orion_comprehensiveneuralops.tests.test_paged_attention_kernel-
Tests for Paged Attention kernel.
neuralops.tests.test_paged_cache-
Tests for PagedKVCache.
neuralops.tests.test_parquet_and_storage-
Unit Tests for ResultsSaver, Parquet Exporter & Isolated Storage.
neuralops.tests.test_part10_registry_and_consolidation-
Part 10 Verification: Registry Health & Duplicate Consolidation.
neuralops.tests.test_part11_baseline_resolution-
Part 11 Verification: Checkpoint Resolution & CLI Override.
neuralops.tests.test_part1_hierarchical_dedup-
Part 1 Verification: Hierarchical Prefix Deduplication (RCA-1).
neuralops.tests.test_part2_weight_layout-
Part 2 Verification: Shape-Based Weight Layout Detection (RCA-2).
neuralops.tests.test_part3_leaf_parameter_isinstance-
Part 3 Verification: isinstance-based Parameter Targeting (RCA-3).
neuralops.tests.test_part4_dynamic_lora_alias-
Part 4 Verification: Dynamic LoRA Target Discovery & Canonical Aliases (RCA-4, RCA-10).
neuralops.tests.test_part5_compressor_lora_unmerged-
Part 5 Verification: Preserving Unmerged LoRA Adapters for Compressor Recovery (RCA-5).
neuralops.tests.test_part6_capability_declarations-
Part 6 Verification: Capability Declarations & Early Incompatibility Skipping (RCA-6).
neuralops.tests.test_part7_numerical_safety-
Part 7 Verification: Project-Wide Numerical Safety (RCA-7, RCA-8, RCA-9).
neuralops.tests.test_part8_recovery_targets-
Part 8 Verification: Precise Recovery Trainable Parameter Selection.
neuralops.tests.test_part9_output_tuple-
Part 9 Verification: Output Tuple Standardization in UniversalAttentionWrapper.
neuralops.tests.test_performance_baselines-
Performance baseline tests (sanity timing benchmarks).
neuralops.tests.test_performer_comprehensiveneuralops.tests.test_phantom_comprehensiveneuralops.tests.test_primal_attention_comprehensiveneuralops.tests.test_production_dataset_shapes-
Production Dataset Shapes & Collation Verification Test Suite …
neuralops.tests.test_progressive_token_pruning_comprehensiveneuralops.tests.test_projection_factorized_attn_comprehensiveneuralops.tests.test_public_api-
Smoke tests for newly-exported public API functions.
neuralops.tests.test_qcqa_attention_comprehensiveneuralops.tests.test_quantized_attention-
Tests for FP8 and INT8 attention.
neuralops.tests.test_qwen3_5_comprehensive-
Subagent 6: Qwen3.5-0.8B Dedicated Test Suite (DeltaNet, GQA Attention, MoE).
neuralops.tests.test_qwen3_5_compressor_awareness-
Comprehensive test suite verifying architecture-aware compression, dynamic rank selection, recovery parameter selection, and LoRA preservation on …
neuralops.tests.test_rala_attention_comprehensiveneuralops.tests.test_reap_moe_comprehensiveneuralops.tests.test_recurrent_ssm_attentions-
Unit tests for all 16 Recurrent, State Space & Linear DeltaNet Attention modules …
neuralops.tests.test_registry-
Unit tests for central registry, module registration, and helper module filtering.
neuralops.tests.test_regla_attention_comprehensiveneuralops.tests.test_regression_suite-
Regression tests for known bugs and fixes.
neuralops.tests.test_replace_comprehensiveneuralops.tests.test_res_svd_comprehensiveneuralops.tests.test_results_saver-
Unit tests for ResultsSaver, metric exports, configuration archiving, and checkpoints.
neuralops.tests.test_routing_attention_comprehensiveneuralops.tests.test_rpc_comprehensiveneuralops.tests.test_runners-
Unit tests for neuralops.runners module.
neuralops.tests.test_runners_importsneuralops.tests.test_salt_attention_comprehensiveneuralops.tests.test_salt_fneuralops.tests.test_samba_m3_comprehensiveneuralops.tests.test_samba_moe_comprehensiveneuralops.tests.test_sink_attention-
Unit tests for sink attention.
neuralops.tests.test_sliding_window-
Unit tests for sliding window attention.
neuralops.tests.test_sliding_window_triton-
Tests for Sliding Window Triton kernel and fallback.
neuralops.tests.test_smoothquant_real-
Tests for production SmoothQuant.
neuralops.tests.test_soa_attn_comprehensiveneuralops.tests.test_softcap-
Unit tests for softcap function.
neuralops.tests.test_sota_compression-
Unit Tests for State-of-the-Art (SOTA) Compression Engines: 1. Dynamic Entropy SVD Compressor & Dynamic Rank Allocator (dynamic_rank.py). 2. Spectral …
neuralops.tests.test_span_expanded_attention_comprehensiveneuralops.tests.test_ssm_spectral_comprehensiveneuralops.tests.test_suite_runner-
Tests for benchmark runner suite.
neuralops.tests.test_svd_audit_suite-
Comprehensive Audit & Evaluation Suite for SVD and Low-Rank Attention Mechanisms & Compression Engines …
neuralops.tests.test_svd_linear_attentionneuralops.tests.test_svd_linear_attention_comprehensiveneuralops.tests.test_svd_linear_decay_comprehensiveneuralops.tests.test_svd_lowrank_comprehensiveneuralops.tests.test_svd_mamba_comprehensiveneuralops.tests.test_sweep_orchestration-
Unit tests for sweep orchestration, checkpoint resolution, plateau detection, and resumption.
neuralops.tests.test_t5_all_attention_compat-
Unit tests for all 27 attention replacement modules adapted for T5. Verifies: 1. Forward pass is finite (no NaN/Inf). 2. Shapes are correct [B, …
neuralops.tests.test_t5_attention_compatneuralops.tests.test_template_attention_comprehensiveneuralops.tests.test_threadsafe_rank_logging-
Unit tests for thread-safe QueueHandler logging and isolated rank-specific log files.
neuralops.tests.test_token_compressed_comprehensiveneuralops.tests.test_tpa_comprehensiveneuralops.tests.test_track2_spectral_ssm_audit-
Track 2 Comprehensive Audit & Dynamic Validation Suite. Audits all Spectral, SSM, and Recurrent Attention modules: - Forward pass correctness (output …
neuralops.tests.test_training_optimizations-
Tests for Phase 7 training optimizations.
neuralops.tests.test_triton_all_kernels-
Integration and registry test suite for all Triton kernels in neuralops …
neuralops.tests.test_triton_cosformer_comprehensiveneuralops.tests.test_triton_fms_scan-
Comprehensive test suite for neuralops.core.triton_kernels.fms_scan …
neuralops.tests.test_triton_gdn_scan-
Comprehensive test suite for neuralops.core.triton_kernels.gdn_scan …
neuralops.tests.test_triton_gla_scan-
Comprehensive test suite for neuralops.core.triton_kernels.gla_scan …
neuralops.tests.test_triton_gqa-
Comprehensive test suite for neuralops.core.triton_kernels.gqa …
neuralops.tests.test_triton_hgrn2_scan-
Comprehensive test suite for neuralops.core.triton_kernels.hgrn2_scan …
neuralops.tests.test_triton_kernels_suite-
Comprehensive Unit Test Suite for Shared Triton Kernels & Unified Dispatcher …
neuralops.tests.test_triton_linear_attn-
Comprehensive test suite for neuralops.core.triton_kernels.linear_attn …
neuralops.tests.test_triton_low_rank-
Comprehensive test suite for neuralops.core.triton_kernels.low_rank …
neuralops.tests.test_triton_selective_scan-
Comprehensive test suite for neuralops.core.triton_kernels.selective_scan …
neuralops.tests.test_triton_softplus-
Comprehensive test suite for neuralops.core.triton_kernels.softplus …
neuralops.tests.test_triton_sparse_attn-
Comprehensive test suite for neuralops.core.triton_kernels.sparse_attn …
neuralops.tests.test_triton_state_update-
Comprehensive test suite for neuralops.core.triton_kernels.state_update …
neuralops.tests.test_triton_svd_linear_attention_comprehensiveneuralops.tests.test_unified_rope_comprehensiveneuralops.tests.test_upi_mamba_comprehensiveneuralops.tests.test_varlen_attention-
Unit tests for variable-length attention.
neuralops.tests.test_vig_comprehensiveneuralops.tests.test_vspec_comprehensiveneuralops.tests.test_wanda_real-
Tests for production Wanda pruning.
neuralops.tests.test_weight_copy-
Unit tests for weight copying, QKV slicing, and projection detection.
neuralops.tests.test_wgqa_comprehensiveneuralops.tests.test_xattention_comprehensiveneuralops.tests.test_zeros_attention_comprehensiveneuralops.tests.testing_utils