FlagGems is a function library written in Triton.
Project description
About
FlagGems is part of FlagOS, a unified, open-source AI system software stack that aims to foster an open technology ecosystem by seamlessly integrating various models, systems and chips. By "develop once, migrate across various chips", FlagOS aims to unlock the full computational potential of hardware, break down the barriers between different chip software stacks, and effectively reduce migration costs.
FlagGems is a high-performance, generic operator library implemented in Triton language. It is built on a collection of backend-neutral kernels that aims to accelerate LLM (Large-Language Models) training and inference across diverse hardware platforms.
By registering with the ATen backend of PyTorch, FlagGems facilitates a seamless transition, allowing model developers to switch to Triton without changing the low level APIs. Users can continue using their familiar Pytorch APIs while at the same time benefit from new hardware acceleration technologies. For kernel developers, the Triton language offers readability, user-friendliness and performance comparable to CUDA. This convenience allows developers to engage in the development of FlagGems with minimal learning investment.
Features
FlagGems provides the following technical features.
- A large collection of PyTorch compatible operators
- Hand-optimized performance for selective operators
- Eager-mode ready, independent of
torch.compile - Automatic pointwise operator codegen supporting arbitrary input types and layout
- Fast per-function runtime kernel dispatching
- Multi-backend interface enabling support of diverse hardware platforms
- Over 10 supported backends
- C++ Triton function dispatcher (working in progress)
Check the features documentation for more details.
Getting Started
- Refer to the Getting Started for a quick start.
- Refer to the usage documentation for some details on using the software.
- Refer to the how-to-use documentation for some details on configuration options.
Sample models for testing
- Bert-base-uncased
- Llama-2-7b
- Llava-1.5-7b
Contribution
-
If you are interested in contributing to the FlagGems project, please refer to CONTRIBUTING.md. Any contributions would be highly appreciated.
-
Please file an issue for feature requests or bug reports.
-
Drop us an email at contact@flagos.io when you have questions or suggestions to share.
-
Join the FlagGems WeChat group by scanning the QR code below. You will receive first-hand messages about updates and new releases. Let the team know your questions or ideas!
Citation
If you find our work useful, please consider citing our project:
@misc{flaggems2024,
title={FlagOS/FlagGems: An operator library for large language models implemented in the Triton language.},
url={https://github.com/flagos-ai/FlagGems},
journal={GitHub},
author={The FlagOS contributors},
year={2024}
}
License
The FlagGems project is licensed under the Apache License (Version 2.0).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flag_gems-4.2.0-py3-none-any.whl.
File metadata
- Download URL: flag_gems-4.2.0-py3-none-any.whl
- Upload date:
- Size: 1.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1f30eb914e6814d32ed05f871e38ec4d6887d6825fcb4735b7afd1e066da8e2
|
|
| MD5 |
9f6b82ec40df09405f35d4f267befe0a
|
|
| BLAKE2b-256 |
8eef53ffa6cbcf35c82974769578f1baeb9f68bd5898c84693e6b9bd130df828
|
Provenance
The following attestation bundles were made for flag_gems-4.2.0-py3-none-any.whl:
Publisher:
release.yaml on flagos-ai/FlagGems
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flag_gems-4.2.0-py3-none-any.whl -
Subject digest:
d1f30eb914e6814d32ed05f871e38ec4d6887d6825fcb4735b7afd1e066da8e2 - Sigstore transparency entry: 790558364
- Sigstore integration time:
-
Permalink:
flagos-ai/FlagGems@583c365165d08e3bb872606ec14d693d32a45e78 -
Branch / Tag:
refs/tags/v4.2.0 - Owner: https://github.com/flagos-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yaml@583c365165d08e3bb872606ec14d693d32a45e78 -
Trigger Event:
push
-
Statement type: