This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| armory-marketer on GPU — copywriting 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-notebook — paste-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). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 bf16 (§9 hardware traps) | |
| - LoRA on ALL linear proj -> q,k,v,o,gate,up,down, not just q/v (§9 underpowered default) | |
| - Qwen ChatML template via tokenizer.apply_chat_template -> train == inference format (§9 #1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| armory-contracts on GPU — BERT 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-data — run 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-SA — keep derivatives open). |