@@ -16,6 +16,12 @@ creating tokenizers, training small GPT-style language models, benchmarking
1616checkpoints, exporting model artifacts, and testing local GGUF models in a
1717streamed Markdown chat interface.
1818
19+ The source is split into the non-Qt ` engine/ ` package and the Qt desktop
20+ ` interface/ ` package. Historical ` llm_trainer/ ` import paths remain available
21+ for compatibility; new application and test code should use the canonical
22+ packages. The dependency direction is one-way: ` engine/ ` never imports
23+ ` interface/ ` , and ` interface/ ` never imports ` llm_trainer/ ` .
24+
1925
2026For development, use Python 3.12 or newer. Distribution builds include a
2127private Python runtime and do not require Python on the user's machine.
@@ -74,22 +80,29 @@ license data, logs, and machine identifier under the user's
7480
7581## First backend commands
7682
77- Prepare text/PDF/JSONL files:
83+ The non-Qt command-line engine is available directly:
84+
85+ ``` powershell
86+ python -m engine.cli --help
87+ ```
88+
89+ ` python -m llm_trainer.cli ` remains a compatibility alias for existing
90+ automation. Prepare text/PDF/JSONL files:
7891
7992``` powershell
80- python -m llm_trainer .cli prepare --input_dir .\examples\tiny_corpus --output_dir .\runs\tiny_data --context_length 16
93+ python -m engine .cli prepare --input_dir .\examples\tiny_corpus --output_dir .\runs\tiny_data --context_length 16
8194```
8295
8396Prepare programming PDFs plus source files in code-aware mode:
8497
8598``` powershell
86- python -m llm_trainer .cli prepare --input_dir .\examples\tiny_corpus --output_dir .\runs\code_data --context_length 128 --code_training_mode
99+ python -m engine .cli prepare --input_dir .\examples\tiny_corpus --output_dir .\runs\code_data --context_length 128 --code_training_mode
87100```
88101
89102For large corpora, enable faster preview/build scanning:
90103
91104``` powershell
92- python -m llm_trainer .cli prepare --input_dir .\my_big_data --output_dir .\runs\big_data --fast_scan_mode
105+ python -m engine .cli prepare --input_dir .\my_big_data --output_dir .\runs\big_data --fast_scan_mode
93106```
94107
95108` --fast_scan_mode ` uses cheaper file fingerprints and cached preview statistics,
@@ -98,7 +111,7 @@ which is significantly faster on very large datasets.
98111To reduce false duplicate matches in fast mode, add strict verification:
99112
100113``` powershell
101- python -m llm_trainer .cli prepare --input_dir .\my_big_data --output_dir .\runs\big_data --fast_scan_mode --strict_duplicate_verification --fast_scan_sample_bytes 65536
114+ python -m engine .cli prepare --input_dir .\my_big_data --output_dir .\runs\big_data --fast_scan_mode --strict_duplicate_verification --fast_scan_sample_bytes 65536
102115```
103116
104117` --strict_duplicate_verification ` only runs full SHA-256 hashing on suspected
@@ -111,7 +124,7 @@ tries to extract code-like blocks from PDFs/text.
111124Train a very small smoke-test model:
112125
113126``` powershell
114- python -m llm_trainer .cli train --data_dir .\runs\tiny_data --output_dir .\runs\tiny_model --epochs 1 --batch_size 2 --context_length 16 --embedding_size 32 --head_count 4 --layer_count 2 --device cpu --no_resume
127+ python -m engine .cli train --data_dir .\runs\tiny_data --output_dir .\runs\tiny_model --epochs 1 --batch_size 2 --context_length 16 --embedding_size 32 --head_count 4 --layer_count 2 --device cpu --no_resume
115128```
116129
117130Training saves checkpoints in the model folder and can resume from the latest
@@ -163,13 +176,19 @@ contains a real Hugging Face-compatible `hf_model` directory.
163176For MicroGPT checkpoints, use the HF-style package export first:
164177
165178``` bash
166- python -m llm_trainer .cli export-hf --model_dir runs/model
179+ python -m engine .cli export-hf --model_dir runs/model
167180```
168181
169182That creates ` runs/model/hf_model ` with config, weights, tokenizer metadata,
170183lineage, and a README. It is portable MicroGPT packaging, not a claim that the
171184checkpoint is already a llama.cpp-supported Llama/Mistral/Gemma model.
172185
186+ Before submitting changes, run the package-boundary check:
187+
188+ ``` powershell
189+ python tools/check_dependency_boundaries.py
190+ ```
191+
173192## Current IDE Features
174193
175194- Dataset Blueprint with dynamic bundled corpus discovery.
0 commit comments