BlockEdge

Technology and digital life

SageMaker’s FLOPs Meter tracks LLM fine-tuning compute for EU AI Act reviews

Teams that fine-tune a large language model on Amazon SageMaker AI can use the open-source Fine-Tuning FLOPs Meter to estimate the compute a training run used and save the result for review. Compute matters because the European Commission uses it as one indicator of whether a team that modifies a general-purpose AI model may become the provider of the modified model. The meter flags runs for review; it does not determine legal status.

What the meter records

The toolkit is part of the Amazon SageMaker Generative AI recipes repository. In the supported Hugging Face workflow, setting compute_flops: true in the training recipe enables a callback that counts non-padding tokens across GPUs. It uses that count and the numbers of total and trainable parameters to estimate floating-point operations (FLOPs). This distinction matters for methods such as Low-Rank Adaptation (LoRA): frozen layers still require computation, even though their weights are not updated.

AWS recommends using the architecture-based estimate, Flops_architecture, as the primary figure. A second estimate, Flops_hardware, assumes the GPUs ran at 100% utilization throughout training. It is an upper bound, not a measurement of actual GPU utilization.

At the end of the run, the callback writes both estimates, the token count, the selected threshold and the comparison result to flops_meter.json. The SageMaker pipeline can retain the file in Amazon S3 and store metrics in DynamoDB for comparison across runs.

How to interpret the threshold

The EU AI Act’s obligations for general-purpose AI model providers have applied since August 2, 2025, with Commission enforcement powers, including fines, effective August 2, 2026. Providers of models placed on the market before August 2, 2025, have until August 2, 2027, to comply.

The Act itself does not set a compute cutoff for fine-tuning. The Commission’s July 2025 guidelines describe spending more than one-third of the original training compute on a modification as an indicative criterion. The guidelines are not legally binding, although the Commission says it will base enforcement on them.

The distinction between the guidance and the software matters when reading the result. The sample code uses 30%, not exactly one-third, when the supplied pretraining figure is at least 10²³ FLOPs. If that figure is unknown or below 10²³ FLOPs, the code uses a default of 3.3 × 10²² FLOPs. AWS also discusses a separate 3.3 × 10²⁴ FLOPs threshold for systemic-risk models, but the code excerpt does not show a separate branch for that case.

In AWS’s Llama-3.2-3B-Instruct walkthrough, the pretraining figure was left unset because Meta had not published an exact value. The sample record reports 2,150 tokens processed and an architecture-based estimate of 1.45 × 10¹³ FLOPs, below the default threshold. That result describes the example run, not every fine-tune of the model.

For a team reviewing a flagged run, the underlying question is whether the modification significantly changed the model’s generality, capabilities or systemic risk. The Commission’s guidance calls for a case-by-case assessment. The JSON record documents the compute estimate and the threshold used; the flag alone cannot answer that broader question.