Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[feat] FP8 training

Aperta
#63 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
8/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python, pytorch

Direzione di ricerca

This is an open design question spanning matmul kernels and attention integration, with no linked pull request and no assignee. The payload names no concrete file or test to start from, so a newcomer would first need to read the training stack and the FlashAttention 3 FP8 discussion it links. Done would mean a recorded decision on FP8 attention plus a BF16-versus-FP8 loss comparison, which is maintainer-level scope.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement need update

🧐 Problem Description

FP8 training can significantly improve training throughput by reducing memory requirements and improving computational efficiency. However, challenges remain in integrating FP8 across all components of the training stack, such as FlashAttention, while maintaining model performance and stability. For example, the FP8 implementation in FlashAttention 3 raises questions about quantization accuracy and latency between operations.

💡 Proposed Solution

Introduce FP8 training in Fast-LLM with the following steps:

  1. Matmul Operations: Implement FP8-compatible matrix multiplication using Transformer Engine or Triton kernels.
  2. FlashAttention Compatibility:
    • Evaluate the feasibility of integrating FlashAttention 3, which supports FP8.
    • Address concerns about quantization accuracy and potential pipeline latency.
    • Explore alternatives like FlexAttention if FlashAttention 3 proves unsuitable.
  3. Validation:
    • Compare loss curves and convergence behavior between FP8 and BF16 to ensure model stability and performance.

🔄 Alternatives Considered

  1. Continue with BF16/FP16 Precision:
    • Pros: Stable and widely supported.
    • Cons: Misses throughput and memory benefits of FP8.
  2. Partial FP8 Integration:
    • Pros: Focuses on high-impact components like matrix multiplications.
    • Cons: Could complicate debugging due to mixed precision across components.
  3. FlexAttention:
    • Pros: Potentially better support for FP8.
    • Cons: May require more development and testing for integration. May be slower than FlashAttention 3.

📈 Potential Benefits

  1. Increased Throughput: FP8 training has demonstrated up to 1.5x speedup compared to BF16 on NVIDIA H100 GPUs.
  2. Enhanced Efficiency: Reducing memory overhead enables larger batch sizes and improves GPU utilization.
  3. Scalability: Lower precision facilitates training on larger clusters without hitting memory limits.
  4. Comparable Convergence: Loss curves for FP8 have been shown to closely track those for BF16, ensuring minimal compromise in training stability.

📝 Additional Context

  1. Key Findings from Databricks:
    • FP8 training achieves ~1.5x throughput improvement.
    • Integrated with PyTorch FSDP and activation checkpointing for memory efficiency.
    • Loss curves for FP8 closely match BF16 during training.
    • Databricks Blog: Turbocharged Training with FP8.
  2. FlashAttention 3 Insights:
  3. Known Challenges:
    • Managing FP8 weight storage and quantization scaling.
    • Addressing pipeline latency issues in FP8 operations.
    • Ensuring alignment between different FP8-compatible components.
Lingua principale
Python
Stelle
337
Fork
52
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di ServiceNow/Fast-LLM

Tutte le issue di ServiceNow/Fast-LLM

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.