319
Reproducible Latency Measurements: Ensures consistent and verifiable performance metrics for the Laya decision model.
Cross-Backend Comparison: Times measurements on your machine and verifies that all backends provide identical answers.
Detailed Phase Analysis: Breaks down the latency of a single call into its constituent steps (prepare, tokenize, collate, copy in, dispatch, encoder, head, copy out, decode) to pinpoint bottlenecks.
GPU Kernel Insights: On CUDA, it counts the number of GPU kernels launched and their execution time, identifying host-wait times.
Workload Measurement: Calculates useful floating-point operations based on the checkpoint's configuration, considering only real tokens.
Answer Verification: Compares backend probabilities against FP32 PyTorch on the CPU, reporting the largest difference and the count of identical answers.
Broad Backend Support: Covers thirteen backends including PyTorch on CPU, TensorRT, ONNX Runtime, and Apple Metal, with clear reporting for any backend failures.
Data Integrity: Downloads checkpoints at pinned commits and refuses weights with mismatched SHA-256 hashes.
This tool provides a comprehensive approach to understanding and validating the performance of decision models like Laya. By offering detailed insights into latency, phase execution, and kernel performance, it empowers developers to optimize their systems. The ability to cross-verify results across different backends and ensure data integrity makes it an invaluable asset for benchmarking and performance analysis.
Built with