fix: respect HF_ENDPOINT env var for dataset downloads#272
Open
ycjcl868 wants to merge 1 commit intokarpathy:masterfrom
Open
fix: respect HF_ENDPOINT env var for dataset downloads#272ycjcl868 wants to merge 1 commit intokarpathy:masterfrom
ycjcl868 wants to merge 1 commit intokarpathy:masterfrom
Conversation
IgorTavcar
added a commit
to IgorTavcar/autoresearch
that referenced
this pull request
Mar 17, 2026
…e, HF proxy, agent confinement PR karpathy#244 — Discussion karpathy#43 best hyperparameters (baseline/train.py) Applies the community's validated best config from Discussion karpathy#43 (val_bpb 0.997→0.977 on H100). Code changes: parameterized init scale, x0 init, RoPE base, short window divider, weight decay for embeddings. Transferred hyperparams: EMBEDDING_LR 0.6→0.9, UNEMBEDDING_LR 0.004→0.005, WARMDOWN_RATIO 0.5→0.75, FINAL_LR_FRAC 0.0→0.05, INIT_SCALE=0.68, X0_INIT=0.05, momentum warmup 300→200 steps, weight decay for lm_head/ embeddings/value_embeddings. Kept Jetson-specific DEPTH=6, BATCH_SIZE. PR karpathy#204 — Early structural triage at 60s (baseline/train.py) Computes effective rank (spectral entropy of weight SVDs) at init and at 60s. Kills experiments where rank collapses below 50% of initial. Reports eff_rank_init/final/rank_retention in final summary. ~50ms one-shot cost. Set TRIAGE_TIME=0 to disable. PR karpathy#272 — Respect HF_ENDPOINT env var (all 7 prepare.py files) Reads HF_ENDPOINT env var with https://huggingface.co as fallback. Allows users behind proxies to download data without rate limiting: HF_ENDPOINT=http://hf-mirror.com uv run prepare.py PR karpathy#154 — Confine agent to project directory (.claude/hooks/cage.sh) PreToolUse hook that blocks file access outside the project directory and prevents cd/pushd/popd. Registered in .claude/settings.json for Bash, Read, Write, Edit, Glob, and Grep tools. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
BASE_URLinprepare.pywas hardcoded tohttps://huggingface.co, ignoring theHF_ENDPOINTenvironment variableHF_ENDPOINTenv var withhttps://huggingface.coas default fallbackThis allows users behind proxies (e.g.
HF_ENDPOINT=http://hf-mirror.com) to download datasets without being rate-limited.Test plan
HF_ENDPOINTand runprepare.py— requests go through the proxyHF_ENDPOINTset — behavior unchanged