back to home

flagos-ai / FlagGems

FlagGems is an operator library for large language models implemented in the Triton Language.

View on GitHub
926 stars
293 forks
408 issues

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing flagos-ai/FlagGems in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Source files are only loaded when you start an analysis to optimize performance.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind.in/repo/flagos-ai/FlagGems)
Preview:Analyzed by RepoMind

Repository Overview (README excerpt)

Crawler view

中文版 | English About FlagGems is part of FlagOS, a fully open-source system software stack designed to unify the model–system–chip layers and foster an open and collaborative ecosystem. It enables a "develop once, run anywhere" workflow across diverse AI accelerators, unlocking hardware performance, eliminating fragmentation among AI chipset-specific software stacks, and substantially lowering the cost of porting and maintaining AI workloads. 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 • 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: License The FlagGems project is licensed under the Apache License (Version 2.0).