base
torch_to_nnef.llm_tract.models.base
BaseCausalWithDynCacheAndTriu
TorchToNNEFWrappedLLM
Bases: Module
Base module class for all LLM wrapping.
These wrapper are needed to ensure deterministic inputs/outputs graph signature and allow some modeling optimization of few architecture.
ctx_dtype_dyn_cache
Context Manager to handle inconsistent device type in KV-cache update.
This may be due for example to the use of accelerate 'meta' tensors device.
This manager is stackable in such case only largest context will be applied.
update_forward_signature
Trickery to help torch > 2.0 new export API tracing.