code wiki / (root) / nx_aitrain_research.nx

nx_aitrain_research.nx source

↩ module page · 37 lines · 2729 B

1// nx_aitrain_research.nx -- THIN structured AI-TRAINING research source organ: how to train a small model + how to 2// do it without thousands of $. COMPOSES nx_research_engine; sources under SECTIONS, NO copy-pasted loop. Supersedes 3// BOTH nx_smalltrain_research_fetch (st_*) and nx_cheaptrain_research_fetch (ct_*). expect_exit: 0 license_tier: ORIGINAL 4import "nx_research_engine.nx" 5const K_MAGIC_8388608: i64 = 8388608 6 7func main() -> i64 { 8 let store: *TrustStore = rf_init() 9 if (store as i64) == 0 { rf_puts("aitrain: trust store load failed\n" as *u8); return 1 } 10 rf_puts("CA roots="); rf_putn(trust_store_count(store)); rf_puts(" -- AI-TRAINING research -> Library\n" as *u8) 11 let cap: i64 = K_MAGIC_8388608 12 let out: *u8 = sys_mmap(cap) 13 var ok: i64 = 0 14 15 rf_section("the canonical small-model trainers (READMEs document real train-time + cost)" as *u8) 16 ok = ok + rf_fetch_bank("https://raw.githubusercontent.com/karpathy/nanoGPT/master/README.md" as *u8, "st_nanogpt" as *u8, store, out, cap) 17 ok = ok + rf_fetch_bank("https://raw.githubusercontent.com/karpathy/llm.c/master/README.md" as *u8, "st_llmc" as *u8, store, out, cap) 18 19 rf_section("the model + scaling references" as *u8) 20 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/GPT-2" as *u8, "st_gpt2" as *u8, store, out, cap) 21 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Language_model" as *u8, "st_lm" as *u8, store, out, cap) 22 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Neural_scaling_law" as *u8, "st_scaling" as *u8, store, out, cap) 23 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Llama_(language_model)" as *u8, "st_llama" as *u8, store, out, cap) 24 25 rf_section("train without thousands of $: reuse + adapt (don't pretrain from scratch)" as *u8) 26 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Fine-tuning_(deep_learning)" as *u8, "ct_finetune" as *u8, store, out, cap) 27 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Transfer_learning" as *u8, "ct_transfer" as *u8, store, out, cap) 28 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Knowledge_distillation" as *u8, "ct_distill" as *u8, store, out, cap) 29 30 rf_section("free / cheap compute + free models" as *u8) 31 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Hugging_Face" as *u8, "ct_hf" as *u8, store, out, cap) 32 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Kaggle" as *u8, "ct_kaggle" as *u8, store, out, cap) 33 ok = ok + rf_fetch_bank("https://en.wikipedia.org/wiki/Cloud_computing" as *u8, "ct_cloud" as *u8, store, out, cap) 34 35 rf_puts("AITRAIN BANKED: "); rf_putn(ok); rf_puts(" / 12 (run nx_library_harvest_v2 to index)\n" as *u8) 36 return 0 37}