Pure Forth GPT experiments with a TypeScript CLI runner.
gforth(tested with0.7.3)
models/forth/gpt.fth- main Forth GPT implementationmodels/forth/gpt.4th- alternate Forth implementationmodels/forth/hello.fth- tiny Forth examplesrc/cli.ts- TypeScript CLI (forth-infer) for running inference on Forth modelstraining_data/- local corpus files (ignored by git)input.txt- local generated/training input (ignored by git)
make runDirectly:
gforth models/forth/gpt.fthBuild:
npm install
npm run buildRun inference through a selected Forth model:
node dist/cli.js --model models/forth/gpt.fth
node dist/cli.js --model models/forth/gpt.4th --timeoutSec 60JSON output:
node dist/cli.js --model models/forth/gpt.fth --json- The program executes
mainat file end and starts training immediately. - Keep
training_data/andinput.txtlocal; they are excluded from repository tracking.