Skip to content

Repository files navigation

StackBridge

StackBridge is an SSH-first scaffold for building datasets, launching remote LoRA/SFT training runs, exporting GGUFs, and pulling artifacts back from GPU machines you control.

It is intentionally small: plain shell, plain SSH, JSON config files, and a focused Python package for dataset ETL and training. The current included dataset path targets Redstack Vault, but the scaffolding is reusable for any ChatML-style training set.

What It Gives You

  • Remote GPU orchestration over SSH with rsync, tmux, and repeatable bootstrap scripts.
  • Config-driven LoRA/SFT training for CUDA/NVIDIA hosts.
  • Dataset ingestion and sanitization tooling for Redstack Vault.
  • GGUF export helpers for Ollama, LM Studio, and llama.cpp workflows.
  • Git LFS tracking for large datasets and model artifacts.

Repository Layout

.
├── bin/
│   ├── stackbridge-*          Local dataset, training, inspection, and export commands
│   └── ssh/                   Remote sync, bootstrap, run, pull, and export wrappers
├── config/
│   ├── datasets/              Dataset builder config templates
│   ├── providers/             Lambda and generic SSH host env templates
│   └── training/              LoRA/SFT training config templates
├── data/
│   └── redstack-vault/        Included Redstack Vault dataset builds
├── docs/
│   ├── architecture.md        System map and naming conventions
│   ├── git-lfs.md             Large-file workflow
│   ├── providers/             Provider-specific notes
│   └── runbooks/              Operational command references
├── examples/                  Minimal adapter and ChatML examples
├── prompts/                   System prompt templates
├── scripts/                   Repository maintenance scripts
└── src/stackbridge/           Python package for ETL, sanitizers, adapters, and training

Quick Start

Set up Git LFS before committing datasets or model artifacts:

scripts/setup-git-lfs.sh

Create or refresh the local Python environment:

python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt

Build the Redstack Vault dataset:

bin/stackbridge-redstack-dataset \
  --vault-root /path/to/redstack-vault \
  --run-id full-build

Create a provider env file:

cp config/providers/ssh-host/ssh-host.env.example \
  config/providers/ssh-host/ssh-host.local.env

Preflight a remote CUDA host:

bin/ssh/check-remote-stack.sh \
  --env-file config/providers/ssh-host/ssh-host.local.env \
  --refresh-venv

Launch a remote training run:

bin/ssh/run-ssh-workflow.sh \
  --env-file config/providers/ssh-host/ssh-host.local.env \
  --config config/training/gemma4-e2b-3080-stacktest.json \
  --session stackbridge-test

Pull finished artifacts:

bin/ssh/pull-artifacts.sh \
  --env-file config/providers/ssh-host/ssh-host.local.env \
  --config config/training/gemma4-e2b-3080-stacktest.json \
  --quant q4_k_m

Operating Model

StackBridge syncs this repository to the remote host, creates a remote .venv, installs requirements.txt, and starts the training entrypoint inside tmux. Generated model outputs and logs go under artifacts/; retained datasets live under data/.

Provider env files use STACKBRIDGE_* variables. The scripts still accept the older REMOTE_GPU_* variable names as a compatibility fallback.

More Docs

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages