{"data":{"slug":"tatsu-lab-stanford-alpaca","name":"stanford_alpaca","tagline":"Code and documentation to train Stanford's Alpaca models, and generate the data","github_url":"https://github.com/tatsu-lab/stanford_alpaca","owner":"tatsu-lab","repo":"stanford_alpaca","owner_avatar_url":"https://avatars.githubusercontent.com/u/61893194?v=4","primary_language":"Python","stars":30236,"forks":3972,"topics":["deep-learning","instruction-following","language-model"],"archived":false,"github_pushed_at":"2024-07-17T09:43:05+00:00","maintenance_label":"Dormant","stars_delta_30d":-8,"url":"https://www.graphcanon.com/tools/tatsu-lab-stanford-alpaca","markdown_url":"https://www.graphcanon.com/tools/tatsu-lab-stanford-alpaca.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/tatsu-lab-stanford-alpaca","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=tatsu-lab-stanford-alpaca","description":"Code and documentation to train Stanford's Alpaca models, and generate the data.","homepage_url":"https://crfm.stanford.edu/2023/03/13/alpaca.html","license":"Apache-2.0","open_issues":186,"watchers":343,"ai_summary":"Repository for the Stanford Alpaca project, which focuses on building and sharing an instruction-following LLaMA model. Includes data for fine-tuning, data generation code, and fine-tuning code.","readme_excerpt":"<p align=\"center\" width=\"100%\">\n<img src=\"assets/logo.png\" alt=\"Stanford-Alpaca\" style=\"width: 50%; min-width: 300px; display: block; margin: auto;\">\n</p>\n\n# Stanford Alpaca: An Instruction-following LLaMA Model\n\n\n\n\n\n\n\nThis is the repo for the Stanford Alpaca project, which aims to build and share an instruction-following LLaMA model. The repo contains:\n\n- The [52K data](#data-release) used for fine-tuning the model.\n- The code for [generating the data](#data-generation-process).\n- The code for [fine-tuning the model](#fine-tuning).\n- The code for [recovering Alpaca-7B weights from our released weight diff](#recovering-alpaca-weights).\n\nNote: We thank the community for feedback on Stanford-Alpaca and supporting our research. Our live demo is suspended until further notice.\n\n**Usage and License Notices**: Alpaca is intended and licensed for research use only. The dataset is CC BY NC 4.0 (allowing only non-commercial use) and models trained using the dataset should not be used outside of research purposes. \nThe weight diff is also CC BY NC 4.0 (allowing only non-commercial use).\n\n## Overview\n\nThe current Alpaca model is fine-tuned from a 7B LLaMA model [1] on 52K instruction-following data generated by the techniques in the Self-Instruct [2] paper, with some modifications that we discuss in the next section.\nIn a preliminary human evaluation, we found that the Alpaca 7B model behaves similarly to the `text-davinci-003` model on the Self-Instruct instruction-following evaluation suite [2].\n\nAlpaca is still under development, and there are many limitations that have to be addressed.\nImportantly, we have not yet fine-tuned the Alpaca model to be safe and harmless.\nWe thus encourage users to be cautious when interacting with Alpaca, and to report any concerning behavior to help improve the safety and ethical considerations of the model.\n\nOur initial release contains the data generation procedure, dataset, and training recipe. We intend to release the model weights if we are given permission to do so by the creators of LLaMA. For now, we have chosen to host a live demo to help readers better understand the capabilities and limits of Alpaca, as well as a way to help us better evaluate Alpaca's performance on a broader audience.\n\n**Please read our release [blog post](https://crfm.stanford.edu/2023/03/13/alpaca.html) for more details about the model, our discussion of the potential harm and limitations of Alpaca models, and our thought process for releasing a reproducible model.**\n\n[1]: LLaMA: Open and Efficient Foundation Language Models. Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, Guillaume Lample. https://arxiv.org/abs/2302.13971v1\n\n[2]: Self-Instruct: Aligning Language Model with Self Generated Instructions. Yizhong Wang, Yeganeh Kordi, Swaroop Mishra, Alisa Liu, Noah A. Smith, Daniel Khashabi, Hannaneh Hajishirzi. https://arxiv.org/abs/2212.10560\n\n## Data Release\n\n[`alpaca_data.json`](./alpaca_data.json) contains 52K instruction-following data we used for fine-tuning the Alpaca model.\nThis JSON file is a list of dictionaries, each dictionary contains the following fields:\n\n- `instruction`: `str`, describes the task the model should perform. Each of the 52K instructions is unique.\n- `input`: `str`, optional context or input for the task. For example, when the instruction is \"Summarize the following article\", the input is the article. Around 40% of the examples have an input.\n- `output`: `str`, the answer to the instruction as generated by `text-davinci-003`.\n\nWe used the following prompts for fine-tuning the Alpaca model:\n\n- for examples with a non-empty input field:\n\n ```\n Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n \n ### Instruction:\n {instruction}\n \n ###","github_created_at":"2023-03-10T23:33:09+00:00","created_at":"2026-07-11T23:08:09.5513+00:00","updated_at":"2026-09-20T04:29:14.101935+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":"deep-learning","name":"deep-learning"},{"slug":"instruction-following","name":"instruction-following"},{"slug":"language-model","name":"language-model"}],"trust":{"provenance":{"is_fork":false,"github_id":612427246,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-09-18T08:13:58.101Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":792,"last_release_at":null,"stars_delta_30d":-8,"open_issues_delta_30d":-1},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":52,"high_count":0,"last_scan_at":"2026-09-18T08:13:59.748Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-09-18T08:13:57.005Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-09-18T08:13:57.005Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-09-18T08:13:57.005Z"}},"decision_facts":{"hosting":null,"pricing":null,"requirements":{"notes":["The model training process may require significant computational resources, including GPUs."],"min_ram_gb":8,"requires_docker":false},"constraints":{"min_ram_gb":8,"requires_docker":false},"when_to_use":["When you need to train an instruction-following model using the LLaMA architecture and have access to non-commercial use cases.","If you are conducting research in the field of deep learning and instruction-following models and require reproducible results.","For educational purposes to understand the process of fine-tuning large language models with specific instruction-following datasets."],"when_not_to_use":["If your project requires commercial use, as the dataset and model weights are licensed under CC BY NC 4.0, allowing only non-commercial use.","When you need a fully safety-tested model, as Alpaca has not been fine-tuned to be safe and harmless.","If you require immediate access to model weights, as they are not currently available and depend on permission from the creators of LLaMA."],"source":"enrich:decision_facts","observed_at":"2026-09-18T09:42:30.334Z"},"constraint_facets":{"min_ram_gb":8,"requires_docker":false},"decision_summary":[{"label":"Requirements","value":"Min 8 GB RAM; The model training process may require significant computational resources, including GPUs."},{"label":"Adopt for","value":"Stanford Alpaca is a repository for training and sharing an instruction-following LLaMA model, including data for fine-tuning, data generation code, and fine-tuning code."},{"label":"License detail","value":"The repository is licensed under Apache-2.0, but the dataset and model weights are under CC BY NC 4.0, restricting use to non-commercial research purposes."}]}}