{"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":30250,"forks":3985,"topics":["deep-learning","instruction-following","language-model"],"archived":false,"github_pushed_at":"2024-07-17T09:43:05+00:00","maintenance_label":"Dormant","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":188,"watchers":337,"ai_summary":null,"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-07-11T23:08:20.798054+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"},{"slug":"vector-databases","name":"Vector Databases","url":"https://www.graphcanon.com/categories/vector-databases","markdown_url":"https://www.graphcanon.com/categories/vector-databases.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/vector-databases"}],"tags":[{"slug":"deep-learning","name":"deep-learning"},{"slug":"instruction-following","name":"instruction-following"},{"slug":"language-model","name":"language-model"},{"slug":"python","name":"python"}],"trust":{"provenance":{"is_fork":false,"github_id":612427246,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-11T23:08:17.670Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":724,"last_release_at":null},"security_summary":{"status":"findings","scanner":"osv@v1","low_count":46,"high_count":0,"last_scan_at":"2026-07-11T23:08:18.016Z","medium_count":0,"scan_profile":"deps","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-11T23:08:17.416Z"},"languages":{"value":["python"],"source":"github.language","observed_at":"2026-07-11T23:08:17.416Z"},"license_spdx":{"value":"Apache-2.0","source":"github.license","observed_at":"2026-07-11T23:08:17.416Z"}}}}