Python class
TaylorSeer
TaylorSeerβ
class max.pipelines.modeling.base.TaylorSeer(max_order, dtype, device)
Bases: object
Standalone TaylorSeer caching module.
Compiles predict and update graphs at construction time and
provides methods for the full TaylorSeer lifecycle: scheduling,
prediction, factor updates, and state allocation.
compiled_predict()β
compiled_predict(factor_0, factor_1, factor_2, step_offset, max_order)
Run the compiled Taylor predict graph on eager tensors.
compiled_update()β
compiled_update(new_output, old_factor_0, old_factor_1, delta_step, max_order)
Run the compiled Taylor update graph on eager tensors.
create_state()β
create_state(batch_size, seq_len, output_dim)
Allocate fresh per-request TaylorSeer state tensors.
-
Parameters:
-
Return type:
should_skip()β
static should_skip(step, warmup_steps, cache_interval)
Return True when the full transformer pass can be skipped at step.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!