# migrations

dir: embeddings_queue
filename: 00001-embeddings.sqlite.sql
hash: d3755dfd232be8e8301f4d7fcfb3a486
sql:
CREATE TABLE embeddings_queue (
    seq_id INTEGER PRIMARY KEY,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    operation INTEGER NOT NULL,
    topic TEXT NOT NULL,
    id TEXT NOT NULL,
    vector BLOB,
    encoding TEXT,
    metadata TEXT
);


dir: sysdb
filename: 00001-collections.sqlite.sql
hash: 38352d725ad1c16074fac420b22b4633
sql:
CREATE TABLE collections (
    id TEXT PRIMARY KEY,
    name TEXT NOT NULL,
    topic TEXT NOT NULL,
    UNIQUE (name)
);

CREATE TABLE collection_metadata (
    collection_id TEXT REFERENCES collections(id) ON DELETE CASCADE,
    key TEXT NOT NULL,
    str_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (collection_id, key)
);


dir: sysdb
filename: 00002-segments.sqlite.sql
hash: 2913cb6a503055a95f625448037e8912
sql:
CREATE TABLE segments (
    id TEXT PRIMARY KEY,
    type TEXT NOT NULL,
    scope TEXT NOT NULL,
    topic TEXT,
    collection TEXT REFERENCES collection(id)
);

CREATE TABLE segment_metadata (
    segment_id TEXT  REFERENCES segments(id) ON DELETE CASCADE,
    key TEXT NOT NULL,
    str_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (segment_id, key)
);


dir: sysdb
filename: 00004-tenants-databases.sqlite.sql
hash: 048867ce8fcdefe4023c7110e4433591
sql:
CREATE TABLE IF NOT EXISTS tenants (
    id TEXT PRIMARY KEY,
    UNIQUE (id)
);

CREATE TABLE IF NOT EXISTS databases (
    id TEXT PRIMARY KEY, -- unique globally
    name TEXT NOT NULL, -- unique per tenant
    tenant_id TEXT NOT NULL REFERENCES tenants(id) ON DELETE CASCADE,
    UNIQUE (tenant_id, name) -- Ensure that a tenant has only one database with a given name
);

CREATE TABLE IF NOT EXISTS collections_tmp (
    id TEXT PRIMARY KEY, -- unique globally
    name TEXT NOT NULL, -- unique per database
    topic TEXT NOT NULL,
    dimension INTEGER,
    database_id TEXT NOT NULL REFERENCES databases(id) ON DELETE CASCADE,
    UNIQUE (name, database_id)
);

-- Create default tenant and database
INSERT OR REPLACE INTO tenants (id) VALUES ('default_tenant'); -- The default tenant id is 'default_tenant' others are UUIDs
INSERT OR REPLACE INTO databases (id, name, tenant_id) VALUES ('00000000-0000-0000-0000-000000000000', 'default_database', 'default_tenant');

INSERT OR REPLACE INTO collections_tmp (id, name, topic, dimension, database_id)
    SELECT id, name, topic, dimension, '00000000-0000-0000-0000-000000000000' FROM collections;
DROP TABLE collections;
ALTER TABLE collections_tmp RENAME TO collections;


dir: metadb
filename: 00001-embedding-metadata.sqlite.sql
hash: 2b4cf52c4bb2676e21d6860a4409f856
sql:
CREATE TABLE embeddings (
    id INTEGER PRIMARY KEY,
    segment_id TEXT NOT NULL,
    embedding_id TEXT NOT NULL,
    seq_id BLOB NOT NULL,
    created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UNIQUE (segment_id, embedding_id)
);

CREATE TABLE embedding_metadata (
    id INTEGER REFERENCES embeddings(id),
    key TEXT NOT NULL,
    string_value TEXT,
    int_value INTEGER,
    float_value REAL,
    PRIMARY KEY (id, key)
);

CREATE TABLE max_seq_id (
    segment_id TEXT PRIMARY KEY,
    seq_id BLOB NOT NULL
);

CREATE VIRTUAL TABLE embedding_fulltext USING fts5(id, string_value);


dir: metadb
filename: 00002-embedding-metadata.sqlite.sql
hash: 12a570f7121b3a8ce750a2a7c36da20f
sql:
-- SQLite does not support adding check with alter table, as a result, adding a check
-- involve creating a new table and copying the data over. It is over kill with adding
-- a boolean type column. The application write to the table needs to ensure the data
-- integrity.
ALTER TABLE embedding_metadata ADD COLUMN bool_value INTEGER


dir: metadb
filename: 00003-full-text-tokenize.sqlite.sql
hash: f97ad6334aeaa8f419f01110b648b97a
sql:
CREATE VIRTUAL TABLE embedding_fulltext_search USING fts5(string_value, tokenize='trigram');
INSERT INTO embedding_fulltext_search (rowid, string_value) SELECT rowid, string_value FROM embedding_metadata;
DROP TABLE embedding_fulltext;


# embeddings_queue

created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__0
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__0", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=0.187s", "chroma:document": "GPT, or Generative Pre-trained Transformer, is a large language model, or an LLM, that can generate human-like text. And I've been using GPT in its various forms for years. In this video we are going to number 1,"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__3
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__3", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=10.783s", "chroma:document": "And I've been using GPT in its various forms for years. In this video we are going to number 1, ask \"what is an LLM?\" Number 2, we are going to describe how they work. And then number 3,"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__6
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__6", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=22.544s", "chroma:document": "Number 2, we are going to describe how they work. And then number 3, we're going to ask, \"what are the business applications of LLMs?\" So let's start with number 1, \"what is a large language model?\" Well, a large language model"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__9
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__9", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=32.313s", "chroma:document": "So let's start with number 1, \"what is a large language model?\" Well, a large language model is an instance of something else called a foundation model. Now foundation models are pre-trained on large amounts of unlabeled and self-supervised data, meaning the model learns from patterns in the data in a way that produces generalizable and adaptable output."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__12
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__12", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=49.201s", "chroma:document": "Now foundation models are pre-trained on large amounts of unlabeled and self-supervised data, meaning the model learns from patterns in the data in a way that produces generalizable and adaptable output. And large language models are instances of foundation models applied specifically to text and text-like things. I'm talking about things like code. Now, large language models are trained on large datasets of text, such as books, articles and conversations."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__15
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__15", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=69.377s", "chroma:document": "I'm talking about things like code. Now, large language models are trained on large datasets of text, such as books, articles and conversations. And look, when we say \"large\", these models can be tens of gigabytes in size and trained on enormous amounts of text data."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__18
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__18", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=81.604s", "chroma:document": "these models can be tens of gigabytes in size and trained on enormous amounts of text data. We're talking potentially petabytes of data here. So to put that into perspective, a text file that is, let's say, one gigabyte in size,"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__21
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__21", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=91.165s", "chroma:document": "So to put that into perspective, a text file that is, let's say, one gigabyte in size, that can store about 178 million words. A lot of words just in one Gb. And how many gigabytes are in a petabyte?"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__24
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__24", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=104.849s", "chroma:document": "A lot of words just in one Gb. And how many gigabytes are in a petabyte? Well, it's about 1 million. Yeah, that's truly a lot of text. And LLMs are also among the biggest models when it comes to parameter count."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__27
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__27", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=117.572s", "chroma:document": "Yeah, that's truly a lot of text. And LLMs are also among the biggest models when it comes to parameter count. A parameter is a value the model can change independently as it learns, and the more parameters a model has, the more complex it can be. GPT-3, for example, is pre-trained on a corpus of actually 45 terabytes of data,"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__30
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__30", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=128.346s", "chroma:document": "and the more parameters a model has, the more complex it can be. GPT-3, for example, is pre-trained on a corpus of actually 45 terabytes of data, and it uses 175 billion ML parameters. All right, so how do they work? Well, we can think of it like this."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__33
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__33", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=145.328s", "chroma:document": "All right, so how do they work? Well, we can think of it like this. LLM equals three things: data, architecture, and lastly, we can think of it as training. Those three things are really the components of an LLM."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__36
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__36", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=154.367s", "chroma:document": "data, architecture, and lastly, we can think of it as training. Those three things are really the components of an LLM. Now, we've already discussed the enormous amounts of text data that goes into these things. As for the architecture, this is a neural network and for GPT that is a transformer."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__39
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__39", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=173.849s", "chroma:document": "As for the architecture, this is a neural network and for GPT that is a transformer. And the transformer architecture enables the model to handle sequences of data like sentences or lines of code. And transformers are designed to understand the context of each word in a sentence"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__42
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__42", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=187.756s", "chroma:document": "like sentences or lines of code. And transformers are designed to understand the context of each word in a sentence by considering it in relation to every other word. This allows the model to build a comprehensive understanding of the sentence structure and the meaning of the words within it."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__45
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__45", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=197.68s", "chroma:document": "This allows the model to build a comprehensive understanding of the sentence structure and the meaning of the words within it. And then this architecture is trained on all of this large amount of data. Now, during training, the model learns to predict the next word in a sentence."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__48
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__48", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=205.84s", "chroma:document": "on all of this large amount of data. Now, during training, the model learns to predict the next word in a sentence. So, \"the sky is...\" it starts off with a with a random guess, \"the sky is bug\". But with each iteration, the model adjusts its internal parameters to reduce the difference between its predictions and the actual outcomes."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__51
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__51", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=221.54s", "chroma:document": "But with each iteration, the model adjusts its internal parameters to reduce the difference between its predictions and the actual outcomes. And the model keeps doing this gradually improving its word predictions until it can reliably generate coherent sentences. Forget about \"bug\", it can figure out it's \"blue\"."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__54
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__54", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=233.871s", "chroma:document": "until it can reliably generate coherent sentences. Forget about \"bug\", it can figure out it's \"blue\". Now, the model can be fine tuned on a smaller, more specific dataset  Here the model refines its understanding to be able to perform this specific task more accurately. Fine tuning is what allows a general language model"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__57
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__57", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=247.486s", "chroma:document": "Here the model refines its understanding to be able to perform this specific task more accurately. Fine tuning is what allows a general language model to become an expert at a specific task. OK, so how does this all fit into number 3, business applications? Well, for customer service applications,"}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__60
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__60", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=258.935s", "chroma:document": "OK, so how does this all fit into number 3, business applications? Well, for customer service applications, businesses can use LLMs to create intelligent chatbots that can handle a variety of customer queries, freeing up human agents for more complex issues. Another good field, content creation."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__63
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__63", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=273.0s", "chroma:document": "freeing up human agents for more complex issues. Another good field, content creation. That can benefit from LLMs which can help generate articles, emails, social media posts, and even YouTube video scripts. Hmm, there's an idea."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__66
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__66", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=284.673s", "chroma:document": "emails, social media posts, and even YouTube video scripts. Hmm, there's an idea. Now, LLMs can even contribute to software development. And they can do that by helping to generate and review code. And look, that's just scratching the surface."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__69
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__69", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=297.099s", "chroma:document": "And they can do that by helping to generate and review code. And look, that's just scratching the surface. As large language models continue to evolve, we're bound to discover more innovative applications. And that's why I'm so enamored with large language models."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__72
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__72", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=305.179s", "chroma:document": "we're bound to discover more innovative applications. And that's why I'm so enamored with large language models. If you have any questions, please drop us a line below. And if you want to see more videos like this in the future, please like and subscribe."}


created_at: 2024-02-07 16:54:02
topic: persistent://default/default/aa34e1fa-54af-464e-bc6f-85c94a2edf9c
id: 5sLYAQS9sWQ__75
encoding: FLOAT32
metadata:
{"video_id": "5sLYAQS9sWQ", "segment_id": "5sLYAQS9sWQ__75", "title": "How Large Language Models Work", "source": "https://www.youtube.com/watch?v=5sLYAQS9sWQ&t=317.254s", "chroma:document": "And if you want to see more videos like this in the future, please like and subscribe. Thanks for watching."}


# embedding_metadata

key: chroma:document
string_value:
GPT, or Generative Pre-trained Transformer, is a large language model, or an LLM, that can generate human-like text. And I've been using GPT in its various forms for years. In this video we are going to number 1,


key: chroma:document
string_value:
And I've been using GPT in its various forms for years. In this video we are going to number 1, ask "what is an LLM?" Number 2, we are going to describe how they work. And then number 3,


key: chroma:document
string_value:
Number 2, we are going to describe how they work. And then number 3, we're going to ask, "what are the business applications of LLMs?" So let's start with number 1, "what is a large language model?" Well, a large language model


key: chroma:document
string_value:
So let's start with number 1, "what is a large language model?" Well, a large language model is an instance of something else called a foundation model. Now foundation models are pre-trained on large amounts of unlabeled and self-supervised data, meaning the model learns from patterns in the data in a way that produces generalizable and adaptable output.


key: chroma:document
string_value:
Now foundation models are pre-trained on large amounts of unlabeled and self-supervised data, meaning the model learns from patterns in the data in a way that produces generalizable and adaptable output. And large language models are instances of foundation models applied specifically to text and text-like things. I'm talking about things like code. Now, large language models are trained on large datasets of text, such as books, articles and conversations.


key: chroma:document
string_value:
I'm talking about things like code. Now, large language models are trained on large datasets of text, such as books, articles and conversations. And look, when we say "large", these models can be tens of gigabytes in size and trained on enormous amounts of text data.


key: chroma:document
string_value:
these models can be tens of gigabytes in size and trained on enormous amounts of text data. We're talking potentially petabytes of data here. So to put that into perspective, a text file that is, let's say, one gigabyte in size,


key: chroma:document
string_value:
So to put that into perspective, a text file that is, let's say, one gigabyte in size, that can store about 178 million words. A lot of words just in one Gb. And how many gigabytes are in a petabyte?


key: chroma:document
string_value:
A lot of words just in one Gb. And how many gigabytes are in a petabyte? Well, it's about 1 million. Yeah, that's truly a lot of text. And LLMs are also among the biggest models when it comes to parameter count.


key: chroma:document
string_value:
Yeah, that's truly a lot of text. And LLMs are also among the biggest models when it comes to parameter count. A parameter is a value the model can change independently as it learns, and the more parameters a model has, the more complex it can be. GPT-3, for example, is pre-trained on a corpus of actually 45 terabytes of data,


key: chroma:document
string_value:
and the more parameters a model has, the more complex it can be. GPT-3, for example, is pre-trained on a corpus of actually 45 terabytes of data, and it uses 175 billion ML parameters. All right, so how do they work? Well, we can think of it like this.


key: chroma:document
string_value:
All right, so how do they work? Well, we can think of it like this. LLM equals three things: data, architecture, and lastly, we can think of it as training. Those three things are really the components of an LLM.


key: chroma:document
string_value:
data, architecture, and lastly, we can think of it as training. Those three things are really the components of an LLM. Now, we've already discussed the enormous amounts of text data that goes into these things. As for the architecture, this is a neural network and for GPT that is a transformer.


key: chroma:document
string_value:
As for the architecture, this is a neural network and for GPT that is a transformer. And the transformer architecture enables the model to handle sequences of data like sentences or lines of code. And transformers are designed to understand the context of each word in a sentence


key: chroma:document
string_value:
like sentences or lines of code. And transformers are designed to understand the context of each word in a sentence by considering it in relation to every other word. This allows the model to build a comprehensive understanding of the sentence structure and the meaning of the words within it.


key: chroma:document
string_value:
This allows the model to build a comprehensive understanding of the sentence structure and the meaning of the words within it. And then this architecture is trained on all of this large amount of data. Now, during training, the model learns to predict the next word in a sentence.


key: chroma:document
string_value:
on all of this large amount of data. Now, during training, the model learns to predict the next word in a sentence. So, "the sky is..." it starts off with a with a random guess, "the sky is bug". But with each iteration, the model adjusts its internal parameters to reduce the difference between its predictions and the actual outcomes.


key: chroma:document
string_value:
But with each iteration, the model adjusts its internal parameters to reduce the difference between its predictions and the actual outcomes. And the model keeps doing this gradually improving its word predictions until it can reliably generate coherent sentences. Forget about "bug", it can figure out it's "blue".


key: chroma:document
string_value:
until it can reliably generate coherent sentences. Forget about "bug", it can figure out it's "blue". Now, the model can be fine tuned on a smaller, more specific dataset  Here the model refines its understanding to be able to perform this specific task more accurately. Fine tuning is what allows a general language model


key: chroma:document
string_value:
Here the model refines its understanding to be able to perform this specific task more accurately. Fine tuning is what allows a general language model to become an expert at a specific task. OK, so how does this all fit into number 3, business applications? Well, for customer service applications,


key: chroma:document
string_value:
OK, so how does this all fit into number 3, business applications? Well, for customer service applications, businesses can use LLMs to create intelligent chatbots that can handle a variety of customer queries, freeing up human agents for more complex issues. Another good field, content creation.


key: chroma:document
string_value:
freeing up human agents for more complex issues. Another good field, content creation. That can benefit from LLMs which can help generate articles, emails, social media posts, and even YouTube video scripts. Hmm, there's an idea.


key: chroma:document
string_value:
emails, social media posts, and even YouTube video scripts. Hmm, there's an idea. Now, LLMs can even contribute to software development. And they can do that by helping to generate and review code. And look, that's just scratching the surface.


key: chroma:document
string_value:
And they can do that by helping to generate and review code. And look, that's just scratching the surface. As large language models continue to evolve, we're bound to discover more innovative applications. And that's why I'm so enamored with large language models.


key: chroma:document
string_value:
we're bound to discover more innovative applications. And that's why I'm so enamored with large language models. If you have any questions, please drop us a line below. And if you want to see more videos like this in the future, please like and subscribe.


key: chroma:document
string_value:
And if you want to see more videos like this in the future, please like and subscribe. Thanks for watching.


