{"id":24790455,"url":"https://github.com/ahxt/mini-llm-pretraining","last_synced_at":"2025-10-12T14:31:00.281Z","repository":{"id":274755099,"uuid":"923960070","full_name":"ahxt/mini-llm-pretraining","owner":"ahxt","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-17T04:33:15.000Z","size":128,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T13:51:23.566Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahxt.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-29T06:28:53.000Z","updated_at":"2025-03-26T04:16:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"00101570-b8bd-4a9c-96bc-c3422bfd565b","html_url":"https://github.com/ahxt/mini-llm-pretraining","commit_stats":null,"previous_names":["ahxt/speed_llama3","ahxt/mini-llm-pretraining"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahxt/mini-llm-pretraining","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahxt%2Fmini-llm-pretraining","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahxt%2Fmini-llm-pretraining/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahxt%2Fmini-llm-pretraining/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahxt%2Fmini-llm-pretraining/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahxt","download_url":"https://codeload.github.com/ahxt/mini-llm-pretraining/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahxt%2Fmini-llm-pretraining/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279011599,"owners_count":26084964,"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-10-12T02:00:06.719Z","response_time":53,"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":[],"created_at":"2025-01-29T18:16:09.425Z","updated_at":"2025-10-12T14:31:00.261Z","avatar_url":"https://github.com/ahxt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to speed up LLaMA 3 training?\n\nA clean and efficient implementation for training LLaMA 3 models, focused on simplicity and performance. This codebase provides a streamlined version of LLaMA 3 pretraining based on Hugging Face's implementation and uses FSDP for distributed training.\n\n\n\n## Files\n\n- `modeling_llama.py`: minimal LLaMA 3 model implementation\n- `train_fsdp.py`: FSDP distributed training script\n- `preprocess_findweb.py`: data preprocessing and cache\n\n\n\n\n\n## How to run\n\n1. Recommend to use Docker to run the code\n```\ndocker pull xiaotian99/llm_pt25:v0.3\n```\nor use the [sglang official image](https://hub.docker.com/r/lmsysorg/sglang/tags).\n\n\n\n2. Prepare the dataset:\n```bash\n./run_prepare_datasets.sh\n```\n\n3. Start training:\n```bash\n./run_pretraining_fsdp.sh\n```\n\n\n\n## Key Features\n- Minimal codebase with clear structure\n- Optimized for modern GPU architectures\n- Support for multiple attention implementations\n- Clean and easy to use code\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahxt%2Fmini-llm-pretraining","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahxt%2Fmini-llm-pretraining","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahxt%2Fmini-llm-pretraining/lists"}