Soup: One-command fine-tune and post-train workflow for LLMs
Soup delivers a one-command, locally runnable LLM fine-tuning and evaluation pipeline that emphasizes layer streaming and automated configuration, suited for rapid iteration and validation on constrained GPUs.
GitHub MakazhanAlpamys/Soup Updated 2026-08-16 Branch main Stars 1.7K Forks 263
Python CLI Model Fine-tuning Layer Streaming Local GPU Training

💡 Deep Analysis

6
What core problem does Soup address, and what is its end-to-end value proposition?

Core Analysis

Project Positioning: Soup consolidates the dispersed engineering around LLM fine-tuning into a reproducible, low-VRAM-friendly, and auditable toolchain. It targets engineers and MLOps teams who need to fine-tune models locally or on constrained hardware.

Technical Features

  • Single-command, declarative config: soup train with a single soup.yaml centralizes training, quantization, and streaming settings to reduce environment/config overhead.
  • VRAM-friendly approach: Layer streaming (streaming the base model per decoder layer) combined with 4bit NF4 quantization and QLoRA + adapter-only training allows 8B models to be trained on 4 GB GPUs (example: RTX 3050 peak 3.32 GB).
  • Auditable release gating: Built-in soup ship suites (MCQ, tool-calling, JSON validation, safety/refusal rates, etc.) with evidence binding and --noise-floor re-run support help detect functional regressions beyond raw task score changes.
  • Automation and modularity: Auto GPU detection, batch tuning, stream_source selection (RAM/NVMe), and separate commands for training/data/ship/reward synth allow swapping components.

Usage Recommendations

  1. Start with official templates (e.g., soup init --template chat) and run a small end-to-end job to validate bit-identical behavior and calibration reports.
  2. On low-VRAM devices enable stream_layers: true and quantization: 4bit, and use adapter-only training to avoid modifying base weights.
  3. Before shipping, run soup ship --noise-floor N multiple times to quantify random variation and emit evidence (e.g., --emit-evidence) for replayable verdicts.

Important Notice: Layer streaming is still Beta and introduces compatibility risks and performance trade-offs (higher I/O and slower training). Validate thoroughly on production tasks.

Summary: Soup can substantially reduce infra and engineering effort in low-resource, reproducible, and auditable LLM workflows, but users must accept streaming-related time/I/O costs and validate critical paths carefully.

90.0%
In which scenarios is Soup best suited, and what are its clear limitations or alternatives that might be better?

Core Analysis

Key Question: Evaluate Soup by weighing its strengths—low-VRAM training and auditable release gating—against its limitations for your intended workload.

Best-fit Scenarios

  • Local or low-cost hardware fine-tuning: Individuals or small teams needing to run 8B-class models on ~4 GB GPUs.
  • Audit-focused MLOps: Teams that must bind training, evaluation, evidence, and release decisions into CI/CD pipelines.
  • Privacy-sensitive environments: Situations where data cannot leave local machines and replayable evidence is required.
  • Rapid prototyping/research: Small-scale experiments, reward synthesis, and preference learning like DPO.
  • Large-scale / high-throughput training: Streaming’s I/O and time costs make large datasets and high-throughput scenarios inefficient.
  • Complex RLHF/PPO pipelines: PPO/grpo are excluded or not recommended; full RLHF pipelines likely need specialized tooling.
  • Enterprise license constraints: Missing repository license raises legal adoption issues for enterprises.
  • Tasks requiring strict formatting or safety fidelity: Quantization-induced regressions can break tool-calling or structured outputs unless heavily validated.

Alternatives & When to pick them

  1. For large-scale or low-latency training, use distributed frameworks (Transformers + DeepSpeed / Accelerate / FSDP).
  2. For PPO / RLHF workflows, pick platforms with mature RL support and engineering hardening.
  3. If you just need a training library, combine Transformers/TRL + PEFT and integrate your own CI/testing rather than a full integrated pipeline.

Important Notice: Before adopting Soup in production, run end-to-end validation on your task and confirm licensing/third-party dependency compliance.

Summary: Soup excels for low-resource, auditable, local fine-tuning workflows. For large-scale training, complex RLHF, or enterprise-production uses, consider specialized alternatives or additional validation steps.

88.0%
How to build a reproducible low-resource fine-tuning workflow with Soup (from config to evidence to release)?

Core Analysis

Key Question: Building a reproducible low-resource fine-tuning workflow with Soup requires versioning environment, config, artifacts, and evaluation evidence so the entire pipeline is replayable and auditable.

Technical Analysis (Key components)

  • Declarative config: Store all training/eval parameters in soup.yaml for reproducibility and audit.
  • Low-resource stack: Enable stream_layers: true, quantization: 4bit, and use adapter-only saved as safetensors to run on ~4 GB GPUs.
  • Evidence & release gating: Use soup ship suites with --emit-evidence to archive verdicts and raw inputs/outputs.
  • Noise quantification: Use soup ship --noise-floor N in CI to estimate generator randomness and avoid false positives.
  • Reward synth: Generate/review reward functions from reference jsonl and include calibration reports as part of the evaluation artifact set.

Practical pipeline steps (example)

  1. Lock environment & deps: Pin Python (3.10–3.12) and PyTorch/CUDA wheel; include install scripts in repo.
  2. Version config & data: Commit soup.yaml, datasets, test suites, and baseline model IDs or store them as artifacts.
  3. Local smoke tests: Run official templates on small samples to check adapter persistence and behavior.
  4. CI baseline noise measurement: Run soup ship --noise-floor N multiple times in CI to derive noise ranges for gating.
  5. Train & produce artifacts: Run soup train and archive adapter safetensors, logs, eval outputs, reward synth report, and ship evidence.
  6. Automated gating + human review: CI uses ship verdicts to gate releases; borderline or safety-impacting changes trigger manual review with full evidence.

Important Notice: Ensure your test suites cover critical failure modes, maintain scoring implementations, and re-run key experiments after major upgrades.

Summary: Combining Soup’s declarative config, streaming+4bit training, and built-in ship/reward synth lets you build a reproducible, auditable low-resource training-to-release pipeline—provided you also invest in environment pinning, artifact capture, and test-suite maintenance.

88.0%
What are the implications of Soup's NF4/4-bit quantization + QLoRA and adapter-only approach for model accuracy and engineering safety?

Core Analysis

Key Question: Soup combines NF4/4-bit quantization, QLoRA, and adapter-only training to reduce VRAM footprint while avoiding modifications to base weights. Understanding the accuracy and engineering implications is critical before adoption.

Technical Analysis

  • Quantization (NF4/4-bit) + QLoRA: Stores weights in a 4-bit format, significantly reducing VRAM/storage, allowing 8B models on very small GPUs when paired with QLoRA.
  • Adapter-only (LoRA): Trains only low-rank adapter parameters, leaving base weights untouched. Benefits include fewer trained parameters, faster save/load, small file sizes, and prevention of accidental base-weight overwrites.
  • Accuracy implications: For many general tasks, 4-bit + LoRA is acceptable empirically. However, tasks requiring strict fidelity (e.g., exact JSON outputs, tool-calling grammar, safety/refusal rates) can be sensitive to small regressions; extra validation is required.

Practical Recommendations

  1. Run AB tests locally: baseline model vs quantized+adapter model, focusing on tool-calling and structured output correctness using soup ship suites.
  2. Save adapters with safetensors and include adapter files in version control and evidence binding (e.g., --emit-evidence) for rollback and auditability.
  3. For critical paths, use soup ship offline checks and enable --noise-floor to quantify generator randomness before accepting deltas as significant.

Important Notice: Quantization and adapter-only training are not zero-cost substitutes for full precision; validate thoroughly for tasks sensitive to minor behavior changes.

Summary: NF4/4-bit + QLoRA + adapter-only offers strong engineering benefits (VRAM and safety) for low-cost fine-tuning, but requires systematic validation and evidence recording to mitigate potential accuracy and compatibility risks.

87.0%
How does layer streaming (streaming by decoder layer) work, and what are its advantages and trade-offs?

Core Analysis

Key Question: Layer streaming aims to remove the base model from VRAM and stream decoder layers into the GPU on demand, enabling large-model training on low-VRAM hardware. This yields VRAM savings but introduces performance and engineering trade-offs.

Technical Analysis

  • How it works: The base model is stored in quantized form (e.g., NF4) on RAM or NVMe. When a decoder layer is needed, that layer’s weights are read into GPU memory for forward/backward passes and then released.
  • Advantages:
  • Substantial VRAM reduction: Real example shows Llama-3.1-8B using ~3.32 GB peak on an RTX 3050 (4 GB).
  • Enables local training of larger models without multi-GPU or cloud resources.
  • Can be bit-level equivalent to resident runs after correctness fixes.
  • Trade-offs:
  • Increased I/O and latency: Frequent reads from RAM/NVMe can be a bottleneck, especially with NVMe random access.
  • Lower training throughput: Algorithms that read layers more often (e.g., DPO) will see bigger slowdowns.
  • Implementation and compatibility overhead: Beta status has caused adapter key bugs historically; careful validation and version pinning are needed.

Practical Recommendations

  1. Enable stream_layers: true when VRAM is the limiting factor and ensure stream_source is a fast RAM or NVMe medium.
  2. For DPO or other frequent-layer-access losses, measure time cost; consider higher VRAM or distributed options if training time is critical.
  3. Validate adapter keynames and bit-equivalence on target tasks, and use --noise-floor to quantify variability before shipping.

Important Notice: Layer streaming shifts the bottleneck from VRAM to I/O and time. For throughput-sensitive or large-scale training, it may not be cost-effective.

Summary: Layer streaming is a practical engineering trade-off that enables low-VRAM training at the expense of I/O and training time; validate extensively before using it in production workflows.

86.0%
How reliable is `soup ship` for preventing regressions, and how should it be integrated into CI/CD?

Core Analysis

Key Question: soup ship is designed to bind functional tests and evidence to release decisions rather than rely solely on raw scores. Its reliability depends on test coverage, handling of randomness, and correctness of test implementations.

Technical Analysis

  • Coverage: Built-in suites cover MCQ/mini_mmlu, tool-calling, JSON validation, safety/refusal rates, etc., which detect functional regressions (tooling and format regressions), not merely score changes.
  • Randomness control: The --noise-floor option re-runs the baseline multiple times to estimate generator noise, preventing small deltas from being declared significant.
  • Implementation risk: Past release fixes (incorrect ranking directions and missing detectors) demonstrate the need for continuous maintenance and review of suites.

How to integrate soup ship into CI/CD

  1. Pin baselines & config: In CI, lock baseline models, soup.yaml, test datasets, and evaluation configs and store them as replayable artifacts.
  2. Noise assessment: Run soup ship --noise-floor N to obtain baseline noise; use that noise range when evaluating deltas in CI.
  3. Persist evidence & replays: Enable --emit-evidence and archive verdicts + evidence as build artifacts for auditability.
  4. Customize suites & thresholds: Extend suites for your failure modes (e.g., tool-calling success, JSON conformance) and calibrate thresholds accordingly; use mirrored tests for safety/refusal.
  5. Human-in-the-loop: Auto-failures near thresholds or safety-impacting changes should trigger manual review with full evidence attached.

Important Notice: Do not treat soup ship as a sole oracle. It is a powerful gate when combined with high-quality test cases, noise quantification, and ongoing maintenance.

Summary: Using soup ship as a CI gate can greatly reduce functional regressions, but requires noise-aware thresholds, preserved evidence, customized suites for critical checks, and human review for edge cases.

84.0%

✨ Highlights

  • Layer streaming enables training 8B models on 4GB VRAM
  • One-command CLI with automated config and batch tuning
  • License is unknown; users must verify compliance
  • Repository shows very low contributor and commit activity

🔧 Engineering

  • Supports QLoRA and layer streaming to lower VRAM requirements
  • Integrates train/eval/release workflows, includes reward synth and ship
  • Automated detection (GPU, batch size, quantization) reduces config burden

⚠️ Risks

  • Sparse maintainers/contributors pose risks for long-term support and security fixes
  • No declared license or dependency constraints; commercial/compliance use is restricted
  • Some features are labeled BETA; production deployment requires careful validation

👥 For who?

  • Researchers and small R&D teams needing to iterate models on local GPUs
  • Engineers with constrained hardware who want to fine-tune large models on low-VRAM devices
  • ML engineers and product teams seeking to simplify training and release workflows