HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
tatsu-lab
stanford_alpaca
Python2023–2023
tatsu-lab / stanford_alpaca

stanford_alpaca

Code and documentation to train Stanford's Alpaca models, and generate the data.

13Distinct people
14Mentions
0Explicit recommenders
30.2KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Code and documentation to train Stanford's Alpaca models, and generate the data.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week14 dated mentions

Observed mentions: 2023-03-13 17:29:21 UTC to 2023-04-19 22:32:35 UTC. Weeks start Monday, UTC.

02468102023-03-13 00:00:00 UTC to 2023-03-20 00:00:00 UTC (exclusive): 9 mentions; 1 submissions, 8 commentsMar 132023-03-20 00:00:00 UTC to 2023-03-27 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2023-03-27 00:00:00 UTC to 2023-04-03 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 commentsMar 272023-04-03 00:00:00 UTC to 2023-04-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-10 00:00:00 UTC to 2023-04-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-17 00:00:00 UTC to 2023-04-24 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsApr 17

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 132023-03-13 00:00:00 UTC2023-03-20 00:00:00 UTC918
Mar 202023-03-20 00:00:00 UTC2023-03-27 00:00:00 UTC202
Mar 272023-03-27 00:00:00 UTC2023-04-03 00:00:00 UTC202
Apr 32023-04-03 00:00:00 UTC2023-04-10 00:00:00 UTC000
Apr 102023-04-10 00:00:00 UTC2023-04-17 00:00:00 UTC000
Apr 172023-04-17 00:00:00 UTC2023-04-24 00:00:00 UTC101

What Hacker News says

14 sources
I feel like there is an emerging consensus that [Chat]GPT 3.5/4 is not just 1 big model. A large part of the magic in the final product appears to be many intermediate layers of classification that select the appropriate LLM/method to query. The cheaper models (e.g. Ada/Babbage) could be used for this purpose. Think about why offensive ChatGPT prompts are rejected so quickly compared to legitimate asks for code. Imagine the architectural advantage of a big switch statement over models trained in different domains or initial vectors. Cross-domain queries could be managed mostly across turns of conversation w/ summarization. Think about the Stanford Alpaca parse analysis diagram [0]. You could have an instruction-following model per initial keyword. All of "Write..." might fit into a much smaller model if isolated. This stuff could be parti
Read the rest
tioned in ways that turn out to be mildly intuitive to a layman. Retraining 7B parameters vs 175B is a big delta. The economics of this must have forced a more modular architecture at scale. Consider why ChatGPT is so cheap. Surely, they figured out a way to break down one big box into smaller ones. [0]: https://github.com/tatsu-lab/stanford_alpaca/blob/main/assets/parse_analysis.png
In What we still don’t know about how A.I. is trained
Thanks! - Training code is https://github.com/tatsu-lab/stanford_alpaca - Params were mostly default (as in stanford_alpaca README), except for: per_device_train_batch_size=1, per_device_eval_batch_size=1 - Fine-tuning dataset was based on https://github.com/tloen/alpaca-lora/raw/81eb72f707b0505a03b... with minor improvements; I'm going to publish my version soon - The training itself took about 3 hours on 8x Nvidia A100 80GB
In Show HN: Web demo of 13B Alpaca-LLaMA trained on improved Stanford dataset
Creating prompts to get good results is a skill. - For text prompting, a good starting point is reading the whitepapers in this repo [0]. - For AI art generation, a good starting point are AI prompt libraries to see results of good prompts. Fine-tuning (and creating the examples for fine-tuning) is also an interesting challenge. - The Stanford Alpaca repo [1] made it really easy to fine-tune LLaMa based on your custom dataset. [0] - https://github.com/promptslab/Awesome-Prompt-Engineering [1] - https://github.com/tatsu-lab/stanford_alpaca
In Not by AI
If they don't release the model, recreating it doesn't look too hard. $100 worth of compute time to run the fine-tuning, and the training data they used is here: https://github.com/tatsu-lab/stanford_alpaca/blob/main/alpac... That would have the same licensing problems that they have though: that alpaca_data.json file was created using GPT3. But creating a "clean" training set of 52,000 examples doesn't feel impossible to me for the right group.
In LLaMa running at 5 tokens/second on a Pixel 6

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.