Skip to content

Instantly share code, notes, and snippets.

View gorgodev88's full-sized avatar

GorgoDev88 gorgodev88

View GitHub Profile
@gorgodev88
gorgodev88 / armory-marketer-gpu.py
Last active July 4, 2026 18:11
armory-marketer copywriting QLoRA (T4/L4)
#!/usr/bin/env python
"""
armory-marketer on GPUcopywriting QLoRA on Qwen2.5-3B-Instruct. Runs on a free T4/L4
(Lightning / Colab / Kaggle). SELF-CONTAINED: builds an instruction->copy blend from PUBLIC
datasets in-notebookpaste-and-run, no pre-upload.
Base unsloth/Qwen2.5-3B-Instruct (Apache-2.0) — a chat model, so we train with its chat
template (train == inference format). v1 uses the proven 3B; Qwen3-4B/7B are the research
target for the next rung (full-ladder policy).
@gorgodev88
gorgodev88 / armory-analyst-gpu.py
Created July 4, 2026 17:22
armory-analyst SQL QLoRA (T4)
#!/usr/bin/env python
"""
armory-analyst on GPU — text-to-SQL QLoRA on SQLCoder-7B. Runs on a free T4 (Kaggle/Colab/
Lightning). SELF-CONTAINED: builds a SQL training blend from PUBLIC datasets in-notebook —
paste-and-run, no pre-upload.
⚠️ LICENSE: base defog/sqlcoder-7b-2 is CC-BY-SA-4.0 -> the trained adapter/merged are
share-alike derivatives. Pushed PRIVATE; keep CC-BY-SA if ever published.
SQLCoder is a COMPLETION model (CodeLlama base, NO chat template). We render the canonical
@gorgodev88
gorgodev88 / armory-coder-qlora.py
Last active July 4, 2026 17:07
armory-coder QLoRA + BUILD_ONLY blend builder
#!/usr/bin/env python
"""
armory-coder QLoRA — run this in a Kaggle notebook (Settings: Accelerator = GPU T4 x2,
Internet = ON). See EXECUTION-SPEC.md §4.1 and §9. This encodes the sharp edges Opus 4.8
tends to miss so the run is correct, not just runnable.
Deliberate choices (do not "fix" without a logged reason):
- fp16 NOT bf16 -> T4 has no bf169 hardware traps)
- LoRA on ALL linear proj -> q,k,v,o,gate,up,down, not just q/v9 underpowered default)
- Qwen ChatML template via tokenizer.apply_chat_template -> train == inference format9 #1)
@gorgodev88
gorgodev88 / armory-contracts-gpu.py
Last active July 4, 2026 17:07
armory-contracts GPU trainer (T4)
#!/usr/bin/env python
"""
armory-contracts on GPUBERT clause-risk classifier. Runs in ~MINUTES on a free T4
(vs ~22h on ARM CPU). PORTABLE across every free provider (Kaggle / Colab / Lightning /
Paperspace / Saturn) — the only requirement is a GPU + internet.
- DATA is PRIVATE: pulls gorgodev88/armory-contracts-datarun login() first (the training
subprocess reads the cached token). Underlying sources are LEDGAR + CUAD (CC-BY).
- MODEL push is optional: set env HF_TOKEN to push the trained weights to HF-private.
- Base nlpaueb/bert-base-uncased-contracts (CC-BY-SAkeep derivatives open).