Skip to main content

FLASHNN : A Triton-Powered Kernel Library for LLM Serving

FLASHNN is a pioneering kernel library for Large Language Models (LLMs), providing a high-performance implementation of GPU kernels optimized for LLM serving and inference, involving in comprehensive support for attention kernels and versatile quantization methods.

By harnessing the power of Triton, FLASHNN is engineered to seamlessly integrate with multiple of hardware platforms, ensuring smooth operability and maximizing the utilization of hardware resources.

Features

  • Comprehensive Support for Attention Kernels: FLASHNN offers extensive support for various types of attention mechanisms, enabling it to handle a wide array of LLM architectures with ease.
  • Multiple Quantization Methods: FLASHNN incorporates multiple quantization techniques (int8, int4) aimed at optimizing both the computational overhead and the memory footprint of LLMs, making it easier to deploy LLMs in resource-constrained environments.
  • Low Runtime Overhead:The primary contributor to the performance discrepancy observed with Triton kernels is the runtime overhead. To address this, we have implemented an ahead-of-time kernel cache for Triton kernels, which significantly mitigates this overhead.
  • Production-Ready Performance: FLASHNN is meticulously optimized for production scenarios, which delivers state-of-art performance that meets the demanding requirements of real-world applications.
  • Smooth Portability on Multiple Hardware: Facilitated by the inherent design of the Triton language, FLASHNN simplifying the process of adapting LLM serving solutions to diverse computing environments.

Compatibility

Supported Operators

Type Operators
Gemm A8W8, A16W4, A16W8
Attention PagedAttention V1, PagedAttention V2, FlashAttention V2
Norm LayerNorm, RMSNorm
Quantization DynamicQuant, LayerNormDequant, RMSNormDequant
Embedding RotaryEmbedding

Supported Platforms

FlashNN is tested to work in Nvidia and AMD GPUs(e.g. A100, A10, H20, MI210, ...).

Platforms float16 float32 bfloat16
NVIDIA A100
NVIDIA A10
NVIDIA H20
AMD MI210

Get Started

Requirements

FlashNN requires Pytorch and Triton.

Installation

FlashNN operators can be customized to each function-equivalent PyTorch operators by simply replace the corresponding torch function.

The binary wheel distribution(whl) will be available soon.

Benchmarks

License

The FLASHNN project is based on Apache 2.0.

Release files for flashnn 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for flashnn 0.1.1
File Interpreter ABI Platform
flashnn-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / flashnn-0.1.1-py3-none-any.whl

Download URL flashnn-0.1.1-py3-none-any.whl
Size 60.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
926b068a851e0d2585b2b09b0a41d8c83c21a4ba1ea4492c3e5f6f40e3f02096
BLAKE2b-256 checksum
How to use checksums
ad5703c0601034a6790760e1631a5c928c6c88f451f9d6bdcaff5cdebdadc7ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page