onnx_diagnostic.torch_export_patches.serialization.transformers_impl¶
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_dynamic_cache(dynamic_cache: DynamicCache) Tuple[List[Any], Any][source][source]¶
Serializes a
transformers.cache_utils.DynamicCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_encoder_decoder_cache(ec_cache: EncoderDecoderCache) Tuple[List[Any], Any][source][source]¶
Serializes a
transformers.cache_utils.EncoderDecoderCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_hybrid_cache(cache: HybridCache) Tuple[List[Any], Any][source][source]¶
Serializes a
transformers.cache_utils.HybridCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_mamba_cache(mamba_cache: MambaCache) Tuple[List[Any], Any][source][source]¶
Serializes a
transformers.cache_utils.MambaCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_sliding_window_cache(cache: SlidingWindowCache) Tuple[List[Any], Any][source][source]¶
Serializes a
transformers.cache_utils.SlidingWindowCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_static_cache(cache: StaticCache) Tuple[List[Any], Any][source][source]¶
Serializes a
transformers.cache_utils.StaticCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_with_keys_dynamic_cache(dynamic_cache: DynamicCache) Tuple[List[Tuple[KeyEntry, Any]], Any][source][source]¶
Serializes a
transformers.cache_utils.DynamicCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_with_keys_encoder_decoder_cache(ec_cache: EncoderDecoderCache) Tuple[List[Tuple[KeyEntry, Any]], Any][source][source]¶
Serializes a
transformers.cache_utils.EncoderDecoderCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_with_keys_hybrid_cache(cache: HybridCache) Tuple[List[Tuple[KeyEntry, Any]], Any][source][source]¶
Serializes a
transformers.cache_utils.HybridCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_with_keys_mamba_cache(cache: MambaCache) Tuple[List[Tuple[KeyEntry, Any]], Any][source][source]¶
Serializes a
transformers.cache_utils.MambaCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_with_keys_sliding_window_cache(cache: SlidingWindowCache) Tuple[List[Tuple[KeyEntry, Any]], Any][source][source]¶
Serializes a
transformers.cache_utils.SlidingWindowCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.flatten_with_keys_static_cache(cache: StaticCache) Tuple[List[Tuple[KeyEntry, Any]], Any][source][source]¶
Serializes a
transformers.cache_utils.StaticCachewith python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.unflatten_dynamic_cache(values: List[Any], context: Any, output_type=None) DynamicCache[source][source]¶
Restores a
transformers.cache_utils.DynamicCachefrom python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.unflatten_encoder_decoder_cache(values: List[Any], context: Any, output_type=None) EncoderDecoderCache[source][source]¶
Restores a
transformers.cache_utils.EncoderDecoderCachefrom python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.unflatten_hybrid_cache(values: List[Any], context: Any, output_type=None) HybridCache[source][source]¶
Restores a
transformers.cache_utils.HybridCachefrom python objects.
- onnx_diagnostic.torch_export_patches.serialization.transformers_impl.unflatten_mamba_cache(values: List[Any], context: Any, output_type=None) MambaCache[source][source]¶
Restores a
transformers.cache_utils.MambaCachefrom python objects.