{"data":{"slug":"rasbt-llms-from-scratch","name":"LLMs-from-scratch","tagline":"Implement a ChatGPT-like LLM in PyTorch from scratch, step by step","github_url":"https://github.com/rasbt/LLMs-from-scratch","owner":"rasbt","repo":"LLMs-from-scratch","owner_avatar_url":"https://avatars.githubusercontent.com/u/5618407?v=4","primary_language":"Jupyter Notebook","stars":105176,"forks":16121,"topics":["ai","artificial-intelligence","attention-mechanism","deep-learning","finetuning","from-scratch","generative-ai","gpt","instruction-tuning","language-model","large-language-models","llm","machine-learning","natural-language-processing","pretraining","python","pytorch","tokenizer","transformers"],"archived":false,"github_pushed_at":"2026-09-17T14:08:55+00:00","maintenance_label":"Very active","stars_delta_30d":2443,"url":"https://www.graphcanon.com/tools/rasbt-llms-from-scratch","markdown_url":"https://www.graphcanon.com/tools/rasbt-llms-from-scratch.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/rasbt-llms-from-scratch","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=rasbt-llms-from-scratch","description":"Implement a ChatGPT-like LLM in PyTorch from scratch, step by step","homepage_url":"https://amzn.to/4fqvn0D","license":"Other","open_issues":2,"watchers":855,"ai_summary":"A guide to building a large language model similar to ChatGPT using PyTorch, designed for educational purposes and accessible hardware requirements.","readme_excerpt":"## Hardware Requirements\n\nThe code in the main chapters of this book is designed to run on conventional laptops within a reasonable timeframe and does not require specialized hardware. This approach ensures that a wide audience can engage with the material. Additionally, the code automatically utilizes GPUs if they are available. (Please see the [setup](https://github.com/rasbt/LLMs-from-scratch/blob/main/setup/README.md) doc for additional recommendations.)\n\n\n&nbsp;","github_created_at":"2023-07-23T18:15:57+00:00","created_at":"2026-07-07T17:30:31.144588+00:00","updated_at":"2026-09-20T04:32:01.21495+00:00","categories":[{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"},{"slug":"model-training","name":"Model Training","url":"https://www.graphcanon.com/categories/model-training","markdown_url":"https://www.graphcanon.com/categories/model-training.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/model-training"}],"tags":[{"slug":"ai","name":"ai"},{"slug":"artificial-intelligence","name":"artificial-intelligence"},{"slug":"attention-mechanism","name":"attention-mechanism"},{"slug":"deep-learning","name":"deep-learning"},{"slug":"finetuning","name":"finetuning"},{"slug":"generative-ai","name":"generative-ai"},{"slug":"gpt","name":"gpt"},{"slug":"instruction-tuning","name":"instruction-tuning"}],"trust":{"provenance":{"is_fork":false,"github_id":669879380,"owner_type":"User","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-18T08:36:11.662Z","maintenance":{"label":"Very active","score":96,"methodology":"github_public_v1","releases_90d":0,"days_since_push":0,"last_release_at":null,"stars_delta_30d":2443,"open_issues_delta_30d":0},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":46,"high_count":0,"last_scan_at":"2026-09-18T08:36:13.301Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-18T08:36:10.571Z"},"languages":{"value":["jupyter notebook","python"],"source":"github.language+pyproject.toml","observed_at":"2026-09-18T08:36:10.571Z"},"license_spdx":{"value":"Other","source":"github.license","observed_at":"2026-09-18T08:36:10.571Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":{"notes":["The code automatically utilizes GPUs if they are available, but it is designed to run on conventional laptops without specialized hardware."],"min_ram_gb":8,"requires_docker":false},"constraints":{"min_ram_gb":8,"requires_docker":false},"when_to_use":["When you are interested in understanding the inner workings of large language models and want to build one from scratch using PyTorch.","If you have limited access to specialized hardware and still want to experiment with building a language model, as the tool is designed to run on conventional laptops."],"when_not_to_use":["If you are looking for a quick and efficient way to deploy a pre-trained language model without delving into the implementation details.","When you require a production-ready solution, as LLMs-from-scratch is primarily designed for educational purposes and may not be optimized for industrial use."],"source":"enrich:decision_facts","observed_at":"2026-09-18T12:01:07.406Z"},"constraint_facets":{"min_ram_gb":8,"requires_docker":false},"decision_summary":[{"label":"Requirements","value":"Min 8 GB RAM; The code automatically utilizes GPUs if they are available, but it is designed to run on conventional laptops without specialized hardware."},{"label":"Adopt for","value":"LLMs-from-scratch is a guide for building a ChatGPT-like language model using PyTorch, aimed at educational purposes and designed for use with accessible hardware."},{"label":"License detail","value":"The license is not specified as a standard open-source license, indicating that users should review the license terms carefully before use."}]}}