Date: 2026-10-20 (Asia/Shanghai).
- Windows; Python 3.12.14; PyTorch 2.11.0+cu128; Transformers 5.19.0.
- NVIDIA GeForce RTX 3060; CUDA available.
- Reused
E:/Code/microduck-qwen/.venv/Scripts/python.exe; no dependencies were installed or changed. - Set
PYTHONPATH=E:/Code/nano-posttrain,HF_HUB_OFFLINE=1, andWANDB_DISABLED=1for CLI training. - Used cached
Qwen/Qwen2.5-0.5Bsnapshot060db6499f32faf8b98477b0a26969ef7d8b9987. - The default Anaconda interpreter has no torch. The reused torch environment has no pytest, so tests used the existing pure-Python pytest installation from
D:/anaconda3/Lib/site-packages, appended after the environment's existing import paths.
The README training commands specify the actual data, outputs, and flags. Retained logs: SFT, DPO. Checkpoints are local under output/readme_sft/step_latest and output/readme_dpo/latest; binary model artifacts are not part of this documentation change.
Default invocation through pytest's Python API:
import sys
sys.path.append("D:/anaconda3/Lib/site-packages")
import pytest
raise SystemExit(pytest.main(["tests", "-q", "-p", "no:cacheprovider"]))Result: 13 passed, 1 failed, 3 skipped in 2.44 seconds. Failure: test_sample_sft_json_loads expects the obsolete top-level sample-data path. No tests were weakened, skipped beyond their existing markers, or changed.
Final smoke invocation used offline cached model access:
from transformers import AutoModelForCausalLM, AutoTokenizer
import sys
sys.path.append("D:/anaconda3/Lib/site-packages")
import pytest
raise SystemExit(pytest.main([
"tests/test_smoke.py", "-q", "--run-smoke",
"-p", "no:cacheprovider", "--basetemp=output/pytest-readme-smoke"
]))Result: 3 passed, 2 pytest plugin rewrite warnings in 1.94 seconds. An earlier attempt encountered a temporary-directory permission error and incompatible optional scikit-learn discovery from the Anaconda path. Preloading Transformers before adding that path and using a workspace temporary directory resolved the harness issues. No model test failure remains in the final smoke invocation.
Both CLI runs completed two optimizer steps and wrote adapter checkpoints. SFT losses: 2.7812 and 1.4688, on different batches. DPO losses: 0.7027 and 0.7157, with logged preference accuracy 0.00. First-step learning rate was zero during warm-up. DPO gamma was its CLI default, zero; reference device was CPU.
These results establish execution, not generalization or training benefit. No scored generation, TRL comparison, quantization, serving, full convergence, or peak GPU-memory test was performed.
The README figure is generated by python docs/generate_readme_charts.py using Matplotlib (rendered here with 3.7.2). It reads the retained SFT/DPO log points and parameter counts directly; test_summary.json transcribes the test results recorded above. No smoothing, interpolation, aggregation of losses, or uncertainty interval is applied. Default and smoke outcomes represent separate invocations.
The 1920 x 1520 PNG was visually inspected. Figure generation, malformed-input rejection, English documentation, relative Markdown links, code fences, and git diff --check were checked. No new GPU training was needed to render existing results. See the software engineering review for the source-based findings and proposed checks.