{"id":22418956,"url":"https://github.com/en10/babyllama","last_synced_at":"2025-08-18T09:14:31.646Z","repository":{"id":211786120,"uuid":"729944993","full_name":"EN10/BabyLlama","owner":"EN10","description":"Train and run a small Llama 2 model from scratch on the TinyStories dataset.","archived":false,"fork":false,"pushed_at":"2024-08-01T16:04:28.000Z","size":20767,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-11T06:45:01.449Z","etag":null,"topics":["gpt","llama2","llm","tinystories"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EN10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-10T20:34:05.000Z","updated_at":"2024-08-03T11:58:55.000Z","dependencies_parsed_at":"2024-08-09T22:14:29.590Z","dependency_job_id":null,"html_url":"https://github.com/EN10/BabyLlama","commit_stats":{"total_commits":99,"total_committers":2,"mean_commits":49.5,"dds":0.3232323232323232,"last_synced_commit":"ec1655f41ca91bcef8df443f44ba5fc183ebef7e"},"previous_names":["en10/babyllama"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EN10/BabyLlama","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FBabyLlama","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FBabyLlama/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FBabyLlama/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FBabyLlama/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EN10","download_url":"https://codeload.github.com/EN10/BabyLlama/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EN10%2FBabyLlama/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270969275,"owners_count":24677288,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gpt","llama2","llm","tinystories"],"created_at":"2024-12-05T16:13:35.063Z","updated_at":"2025-08-18T09:14:31.624Z","avatar_url":"https://github.com/EN10.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Baby Llama\n\nTrain and run a small [Llama 2](https://ai.meta.com/llama/) model from scratch on the [TinyStories](https://huggingface.co/datasets/roneneldan/TinyStories) dataset.\n* [Based on karpathy/llama2.c](https://github.com/karpathy/llama2.c)\n* [Based on eniompw/DisneyGPT](https://github.com/eniompw/DisneyGPT)\n\n## Baby Llama Code Example:\n\n### [Baby Llama 105 Tokens on Colab](https://github.com/EN10/BabyLlama/blob/main/Baby_Llama_105.ipynb)   \n* [Iters vs Val Loss](https://github.com/EN10/BabyLlama/blob/main/tok105/iters-vs-val-loss.md)  Learning Words and Grammar Visualised  \n* [105 Token Vocab](https://github.com/EN10/BabyLlama/blob/main/tok105/tok105.vocab)\n\n```\n!cd llama2.c \u0026\u0026 python tinystories.py train_vocab --vocab_size=256\ntrainer_interface.cc(558) LOG(INFO) Alphabet size=102\nVocabulary size is smaller than required_chars. 256 vs 361.\n```\n\n### [More Tokens \u0026 Larger Models](https://github.com/EN10/BabyLlama/blob/main/Model-Sizes.md)\n\n### Ref:\n* [Training](https://github.com/karpathy/llama2.c#training)\n* [Models](https://github.com/karpathy/llama2.c#models)\n* [Pretokenized TinyStories](https://huggingface.co/datasets/enio/TinyStories)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen10%2Fbabyllama","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fen10%2Fbabyllama","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen10%2Fbabyllama/lists"}