Feat/pr2 ports nanogpt minimind - #22
Merged
Merged
Conversation
Add examples/nanoGPT/ and examples/MiniMind/ — end-to-end lighttrain ports of two well-known training repos. nanoGPT (Karpathy): model.py: @register("model","nano_gpt") — identical arch (optional-bias LayerNorm, c_attn/c_proj naming, Flash Attn, from_pretrained for GPT-2 weights, estimate_mfu, weight-decay split optimizer) components.py: @register BinaryMemmapDataset("memmap_bin") + StackCollator configs/: train_shakespeare_char / train_gpt2 / finetune_shakespeare data/: shakespeare_char + shakespeare (BPE) + openwebtext prepare scripts sample.py: standalone generation from lighttrain checkpoint or gpt2* MiniMind (jingyaogong): model/: model_minimind.py (verbatim) + model_adapter.py (@register "minimind" + @register("tokenizer","hf_auto")) + model_lora.py tokenizer: vocab_size=6400 custom tokenizer dataset/lm_dataset.py: @register minimind_pretrain/sft/dpo/rlaif datasets + minimind_pad collator trainer/trainer_utils.py + rollout_engine.py (adapted/verbatim) configs/: pretrain / sft / lora / dpo / grpo / ppo / distillation (7 total) scripts/: chat_api / web_demo / serve_openai_api / eval_toolcall / convert_model (verbatim + sys.path adapted) All gates green: ruff clean, mypy 575 files 0 errors, pytest 4491 passed. Verbatim copies (model_minimind, model_lora, rollout_engine, prepare.py) carry # ruff: noqa to preserve upstream style. CanGeng
…OWN_ISSUES CanGeng
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.