feat(training): LoRA fine-tune pipeline for Nemotron 3 Nano 4B on Modal
NANInithin+1: Claude Opus 4.8
7bb583b
Adds training/ — an end-to-end pipeline to fine-tune nvidia/NVIDIA-Nemotron-3-Nano-4B
on the CityQuest game dataset and ship it as a GGUF:
- prepare_dataset.py + convert_to_game_schema.py: build serve-matched SFT prompts
(build_generation_prompt + leave-one-out retrieval) with targets converted to the
app's game_schema.json contract; cached Wikipedia city context.
- train_modal.py: transformers + PEFT LoRA on a Modal A100 (native nemotron_h with
compiled mamba-ssm/causal-conv1d kernels), checkpoint/resume across preemption,
merge, GGUF Q4_K_M convert (forced dense path), upload to HF; plus finalize /
convert_from_merged / evaluate resume + eval entrypoints.
- eval_gguf.py: schema-pass evaluation harness.
- README.md: run instructions.
Uploaded model: NANI-Nithin/CityQuest-Nemotron-3-Nano-4B-GGUF
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>