Repository navigation
Examples/py edu gemma moe - #219
Open
aaishwarymishra wants to merge 23 commits into
Open
aaishwarymishra wants to merge 23 commits into
aaishwarymishra wants to merge 23 commits into
Conversation
Extraction is CPU-bound, so Dataset.from_generator now runs one process per shard. dataset_size caps the output for smoke runs and joins the cache fingerprint so capped and full builds never share an entry.
Drop the one-off benchmarks module and share generation between the sample and benchmark paths.
main.py now defaults to configs/moe.yaml; dense stays a control run.
Single RTX4090 spot instance runs main.py directly; CONFIG selects moe or dense.
A plain string pattern is a literal in tokenizers, so the Split never matched and BPE trained on whole documents, which OOMed the corpus fit. Keep the -code cache key: the failed fit never wrote a file.
The "code" arm uses Qwen2.5-Coder's pre-tokenizer, which needs 3.4% fewer tokens per function than GPT-2's regex on this corpus; "gpt2" keeps the ByteLevel baseline earlier runs used. Both arms share vocab size, corpus, and trainer, and keep the reference special-token layout (<eos> trained in, <pad> appended), so cells differ by a single factor. Also log to ClearML every 1000 steps for the remote runs and pin skypilot>=0.14.2, whose API server no longer needs FastAPI's removed app-level `prefix`.
Fitted on the full corpus, Qwen2.5-Coder's pre-tokenizer needs 1.72% fewer
tokens per function than GPT-2's regex (146.9 vs 149.4 on the same 2,007
functions). That is not worth two runs: the corpus and the 512-token filter
admit the same examples either way, so fixed epochs see the same data, and
164 HumanEval problems cannot resolve a 1-2 task delta.
So the loader has one pre-tokenizer again, configs/{moe,dense}_gpt2.yaml are
gone, and the two cells are MoE vs dense on the same tokenizer.
The fitted JSON is 525 KB (over the repo hook's 500 KB limit), so it stays
untracked; outputs/tokenizers/...-code.json is the full-corpus artifact.
The code-aware pre-tokenizer was only 1.72% cheaper (146.9 vs 149.4 tokens per function), which is not worth an arm, and it is not the recipe behind the earlier 19/164 run. Keep the single recipe functionally identical to `moe-training:py-edu-gemma-moe/preprocessors/python_bpe.py`: GPT-2 ByteLevel, no post-processor, <eos> trained in and <pad> appended. The cache file ends in `-gpt2.json` so the old split-every-space `...-8192-2.json` is never reused. Two full-corpus fits give the same sha256 (38ccfb7c...).
Task names were bare timestamps, so two runs in different projects were indistinguishable in the ClearML UI. Prefix the run name, which is the parent directory of the timestamped run dir.
SkyPilot lists Vast instances through /api/v0/instances, which Vast retired with 410 Gone, so `sky` can create a machine but can neither see nor destroy it. The launcher pins 1x RTX 3090, checks the GPU that was actually allocated, and tears the instance down when training ends or when setup fails. - register the SSH key through the API; onstart writes are ignored here - detach the job with braces, else launch() blocks until training ends - stream train.log to disk as it arrives instead of copying at the end - upload the fitted tokenizer to skip a 10-25 min refit per instance - price offers with the rented disk, not the 5 GB search default uv.lock bypasses check-added-large-files: it pins torch 2.15 against CUDA 13 wheels, and the repo already tracks a 1.17 MB root uv.lock.
Show the dataset, collator, both architectures, and inference using the weights and tokenizer published on the Hub, so no ClearML credentials are needed. Capped dataset loads now stream instead of pulling the full 6 GB corpus.
✅ Deploy Preview for trainite canceled.
|
aaishwarymishra
marked this pull request as draft
November 18, 2026 10:59
SkyPilot's Vast backend could not list or destroy instances and attached the wrong SSH keys, so the reported runs used a private vastai script that does not belong in a provider-agnostic example. sky.yaml is now unpinned from Vast and the README and notebook say how the runs were actually produced.
Nothing in the example uses the Vast driver any more; sky check picks the provider matching the user's credentials. Drops vastai, vastai-sdk and the receipt-generation dependencies from the lock.
…examples Lead with the task, the two configs, the metrics and the results instead of the generated project boilerplate. Launcher details live in the cloud section, so the walkthrough notebook points at the README instead of carrying SkyPilot notes of its own.
…ache name The file is a corpus-fitted byte-level BPE, not the GPT-2 tokenizer; only the regex pre-tokenizer matches GPT-2. The cache key is already unique on dataset, split, vocab size and min frequency, so the suffix adds nothing. Existing -gpt2.json caches stop being picked up and the tokenizer is refit once.
…se vs. MoE The question is how much Python a 15M Gemma 4 model learns; the dense and MoE arms are one comparison inside it. Explain the function-level corpus from the HumanEval task shape, and drop the "storage, not capacity" verdict: both arms only did four epochs of next-token pretraining, so post-training could still make the experts useful.
…uted Give the binomial formula and its range, and note that the paired McNemar test cannot reject a one-task gap for any per-problem pairing. Say plainly that only sampling noise is covered: one seed per arm leaves training variance unmeasured.
aaishwarymishra
marked this pull request as ready for review
November 18, 2026 12:48
This branch has not been deployed
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.
Summary
Adds new example
AI usage
Tool(s) and usage:
Human Submission Confirmation
Testing