How gen-verse/reasonflux works
Project Type and Purpose
• This is a multi‐module open-source framework for training, evaluating, and deploying “ReasonFlux” LLMs.
• It includes:
• ReasonFlux-v1: template-augmented SFT/RLHF training pipelines (with LLaMA-Factory)
• ReasonFlux-F1: evaluation harness built on lm-evaluation-harness (task definitions, metrics, logging)
• ReasonFlux-Coder: coding LLM inference scripts and template tools
• ReasonFlux-v2: template‐guided inference & dataset evaluation
Top-Level Components
• Data & Templates (ReasonFlux_v1/data, template_library.json; ReasonFlux_v2/eval/dataset)
• Training Pipeline (ReasonFlux_v1 directory):
• Template Extractor & Library
• LLaMA-Factory SFT / RLHF workflows (in train/LLaMA-Factory)
• Model Artifacts (huggingface model repos)
• Evaluation Harness (ReasonFlux_F1/eval/lm-evaluation-harness):
• CLI entrypoint for running tasks
• Task definitions (lm_eval/tasks/…)
• Cache, decontamination, loggers (wandb)
• Inference & Deployment
• ReasonFlux-Coder scripts & figures
• ReasonFlux-v2 inference.py & eval.py for JSONL datasets
Relationships & Data Flow
• Template Library → SFT/RLHF Trainer → Model Weights
↘ Template Proposer & Reasoner modules internalize templates
• Model Weights → Inference scripts (ReasonFlux-v2, Coder) → Predictions
• Predictions + Ground truth → Evaluation Harness → Metrics & Logging (W&B)
• CI/CD (GitHub workflows) & Docker ensure reproducible builds and tests
Architectural Patterns & Principles
• Modular separation of concerns: training vs evaluation vs inference
• Plugin architecture in lm-evaluation-harness for tasks/metrics
• Hierarchical reinforcement learning for template evolution
• Use of standard tools: Docker, pre-commit, GitHub Actions
Essential Elements
• Component names and versions (v1, F1, v2, Coder)
• Data sources (datasets JSONL, template_library.json)
• External APIs (Huggingface, OpenAI, W&B)
• CI/CD flows (GitHub Actions), Docker boundaries