aimet_onnx.adascaleΒΆ
Top level APIs
Model topology
AdaScale optimizes one decoder block at a time and takes those block boundaries from an
LlmTopology, which describes the structure of the decoder stack. Analyze the float model
before creating the sim, then pass the result as topology:
topology = analyze_llm_topology(onnx_model, model_type="llama")
sim = QuantizationSimModel(onnx_model, ...)
apply_adascale(sim, inputs, adascale_model_config, topology=topology)