Explore the research collection
3 entries · Follow this search
- Paper
FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precision
FlashAttention-3 redesigns FA2 for Hopper: warp-specialized TMA/WGMMA producer-consumer, pingpong scheduling so softmax hides under GEMM, and FP8 with in-kernel V transpose, block quantization, and Hadamard incoherent processing. H100 FP16 is 1.5-2.0× FA2 (up to 740 TFLOPs/s, 75% util) and 1.5-1.75× backward; FP8 reaches ~1.2 PFLOPs/s with 2.6× lower RMSE vs per-tensor FP8 on outlier-injected QKV. Competitive with or faster than cuDNN FA2 at seq≥1k. Code https://github.com/Dao-AILab/flash-attention.
- Paper
Continual Learning via Sparse Memory Finetuning
Replaces one mid-stack FFN with a 1M-slot memory layer (k=32, 4 heads) and finetunes only the top-t slots that are highly accessed on the current batch relative to DCLM pretraining (TF-IDF). On a 1.3B model, TriviaQA 1K fact stream: NaturalQuestions F1 drops 11% vs 89% full finetuning and 71% LoRA at matched target learning; document-stream SimpleQA shows the same Pareto pattern. Naive memory FT and TF-only ranking forget more. No official code on abs.
- Paper
RLCD: Reinforcement Learning from Contrastive Distillation for Language Model Alignment
Canonical Meta/FAIR RLCD (≠ TypeSafe). For each prompt p, build p+ (encourage desired attribute) and p− (encourage opposite); sample o+/o− from the same unaligned LLM; auto-label o+ preferred (no post-hoc judge). Train preference/reward model on those pairs, then PPO-align the base LM as in RLHF. Contrastive generation differentiates outputs more than i.i.d. sampling, yielding cleaner synthetic prefs. Beats RLAIF and context distillation on harmlessness, helpfulness, and story outlining at 7B and 30B preference-sim scales (LLaMA). Code: facebookresearch/RLCD.