Concepts Flashcards

(27 cards)

1
Q

Concepts

What’s an n-gram?

A

1-gram is 1 word. 5-gram is 5 words, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Concepts

What is Tokenization?

A

Convert raw text into sequence of tokens

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Concepts

What happens to punctuation in Tokenization?

A

Kept. Likely each is a token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Concepts

Is a word just a token?

A

Not necessarily – some words can split into mulitple Tokens

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Concepts

Example of a single word split into multiple tokens?

A

Richard might be “Rich” + “ard” because Rich and Richard are semantically close

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Concepts

What is a Context Window?

A

Max tokens the model can consider at once.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Concepts

How does Context Window affect chatbots and prompting?

A

Limits how much context and question can be input to the model.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Concepts

How does Context Window affect image or video input?

A

Size of the image or video along with any text context or prompts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Concepts

What’s the relation between tokens and vectors in a vector DB?

A

A single token (like “cat”) corresponds to a single vector of many float values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Concepts

Why does a single token have a vector with many values?

A

Captures many types of semantic meaning, sentiment, syntactic role, …

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Concepts

Example of how a vector is useful for searching a RAG?

A

Find similar tokens by looking for similar vectors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Concepts

What’s the techncial name for this similarity search between vectors?

A

k-nearest neighbor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Hyperparameters

What are hyperparameters?

A

Settings that define the model structure, algorithm and process

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Hyperparameters

When do you set hyperparameters?

A

Have to be set before you tune – hyperparameters define how it learns

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Hyperparameters

Example hyperparameters?

A

Learning rate, batch size, number of epochs

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Hyperparameters

What do you get by tuning hyperparameters?

A

Reduce overfitting, improve accuracy

17
Q

Hyperparameters

What is Learning Rate?

A

How large or small the steps are when updating weights during training

18
Q

Hyperparameters

What happens if you set a small learning rate?

A

Takes a long time to converge, get accurate weights

19
Q

Hyperparameters

What happens if you set a high learning rate?

A

Quicker to converge, but could over-shoot the right weights and not be accurate enough

20
Q

Hyperparameters

What is Batch Size?

A

Number of examples used to update a model weight in one iteration

21
Q

Hyperparameters

What happens with small batch sizes?

A

More stable learning, but takes more time to compute

22
Q

Hyperparameters

What happens with large batch sizes?

A

Faster, but unstable – too much info can swing weights violently.

23
Q

Hyperparameters

What is Number of Epochs?

A

How many times the model will iterate over the entire training set

24
Q

Hyperparameters

What happens with too few Epochs?

25
# *Hyperparameters* What happens with too many Epochs?
Overfitting
26
# *Hyperparameters* What happens with training data set is too small?
Overfitting: no outlyers, no noise, so everything fits (too) well
27
# *Hyperparameters* How do you prevent overfitting?
Large training data set size, fewer epochs