antidoom  by Liquid4All

Tool for reducing LLM repetition loops

Created 2 weeks ago

New!

326 stars

Top 83.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Summary

Antidoom addresses "doom loops"—repetitive text generation in LLMs—by generating targeted preference data and training LoRA adapters. It's a specialized tool for improving LLM output coherence and reducing undesirable repetition, particularly during reasoning tasks.

How It Works

The project employs Final Token Preference Optimization (FTPO) to combat repetition. It generates completions, detects repetitive spans, marks the first loop-starting token as rejected, and selects coherent alternatives. This local preference data trains a LoRA adapter, teaching the model to avoid initiating repetition loops. This approach uniquely targets the precise token where repetition begins, adapting Antislop's methodology.

Quick Start & Requirements

  • Installation: Clone repo (git clone https://github.com/Liquid4All/antidoom), cd antidoom, uv sync.
  • Prerequisites: Supported GPU (NVIDIA/CUDA default; AMD/ROCm requires separate ROCm venv with ROCm 6.3+/7.0+ and Python 3.12). PyTorch and vLLM are necessary.
  • Configuration: Edit configs/default.yaml for model_name. Default pipeline reads prompts from LiquidAI/antidoom-mix-v1.0, generates FTPO pairs, trains LoRA, and merges.
  • Run Command: uv run antidoom -c configs/default.yaml -r runs/antidoom1 --temp 0.01 --model-name LiquidAI/LFM2.5-1.2B-Base.
  • Links: Repo, Dataset.

Highlighted Details

  • FTPO trains on local token preferences, targeting the first token of a repetition loop.
  • Default dataset LiquidAI/antidoom-mix-v1.0 is a prompt-only ShareGPT mixture.
  • Detailed AMD/ROCm support includes specific configurations (attention_backend: TRITON_ATTN, optim: adamw_torch) and environment setup.
  • Extensive hyperparameter guidance for tuning max_train_examples, learning_rate, and early_stopping_chosen_win to prevent overtraining and ensure regularization.

Maintenance & Community

  • Maintained by "Liquid AI".
  • No community channels (Discord, Slack) or social media links provided.
  • No roadmap detailed.

Licensing & Compatibility

  • License type is not explicitly stated.
  • Commercial use compatibility is not specified.

Limitations & Caveats

  • Targets a "narrow failure mode" (model repetition loops); may not address other generation issues.
  • AMD/ROCm setup is complex, requiring specific environment management and configuration overrides.
  • Effective use requires careful hyperparameter tuning to avoid model degradation or insufficient loop reduction.
  • Absence of a stated license is a significant adoption blocker.
Health Check
Last Commit

2 weeks ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
328 stars in the last 20 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
12 more.

Liger-Kernel by linkedin

0.1%
7k
Triton kernels for efficient LLM training
Created 2 years ago
Updated 4 days ago
Starred by Eric Zhang Eric Zhang(Founding Engineer at Modal), Mehdi Amini Mehdi Amini(Author of MLIR; Distinguished Engineer at NVIDIA), and
16 more.

flashinfer by flashinfer-ai

0.1%
6k
Kernel library for LLM serving
Created 3 years ago
Updated 23 hours ago
Feedback? Help us improve.