整理一些 AI入门知识,本文源自于以下内容做的整理。
Generative AI learning path

AI
Artificial Intelligence
ML
Machine Learning,A subfield of AI.ML gives computers the ability to learn without explicit programming.
the two main class models of ML :unsupervised ML models(非监督学习模型)and supervised ML Models(监督学习模型)
the key difference is supervised models has labels
supervised model


unsupervised model


Deep Learning
deep learning is a type of machine learning,that uses artificial netural networks,allowing them to process more complex patterns than traditional machine learning.
artificial netural networks
inspired by human brain, they are made up of many interconnected nodes or neurons that can learn to perform tasks by processing data and making predictions.
semi-supervised learning(半监督学习)
neural networks can both use labeled and unlabeled data.
in semi-supervised learning, a neural network is trained by a small amount of labeled data and a large amount of unlabeled data.
- the labeled data helps the neural network to learn the basic concepts of the task.
- the unlabeled data helps the neural network to generalize to new examples.
deep learning models typically have many layers of neurons
Generative AI

It’s a type of Artificial Intelligence(AI) that can produce various type of content.
It’s a subset of Deep Learning, which means it uses artificial neural networks, can process both labeled and unlabeled data using supervised, unsupervised, and semi-supervised methods.
Large Language Models
Large language model refers to large, general-purpose language models that can be pre-trained and then fine-tuned for special purposes.
It’s also a subset of Deep Learning. LLM also intersects with Generative AI.
- Large
- Large training dataset
- Large number of parameters
- General-purpose
it means that the model is sufficient to solve common problems.- The commonality of human language.
- The resource restriction, only certain organizations have the capability to train such large language models with huge datasets and tremendors number of parameters.
- Pre-trained and fine-tuned
It means to pre-train a large language model for a general purpose with a large dataset and then fine tune it for specific aims with a much smaller dataset.
There are 3 main kinds of LLM, each needs prompting in a different way.
Generic LLM
To predict the next word (technically token) based on the language in the training data.
We can think this type as an autocomplete in search.
Introduction Tuned
To predict a response to the instructions given in the input.
Dialog Tuned
The model is trained to have a dialog by the next response.
Dialog tuning is a specialization of instruction tuning that is expected to be in the context of a longer back and forth conversation, and typically works better with natural questions- like phrasings.
Generative and Discriminative model
deep learning models or machine learning models in general can be divided into two types: generative and discriminative(判别)
discriminative model

- A discriminative model is a type of model that is used to classify or predict labels for data points.
- Typically trained on a dataset of labeled data.
- Learn the relationship between the features of the data points and the labels
- Can be used to predict the label for new data points.
generative model

A generative model generates new data instances based on a learned probability distribution of existing data.
- Generates new data that is similar to data it was trained on.
- Understanding distribution of data and how likely a given example is.
- Predicts next word in a sequence.
Tuning
The process of adapting a model to a new domain or set of custom use cases by training the model on new data.
For example, we may collecting training data and tune the llm specifically for the legal or medical domain.
Fine tuning
Bring your own dataset and retrain the model by tuning every weight in the LLM.
Fine tuning is expensive and not realistic in many cases.
Parameter-Efficient Training Methods(PETM)
Methods for tuning an LLM on your own custom data without duplicate the model. The base model itself is not altered.Instead a small number of add-on layers are tuned, which can be swapped in and out at inference time.
Prompt Tuning
One of the easiest Parameter-Efficient Training Methods.
Transformer
The power of generative AI comes from the use of transformers.
At a high level a transformer model consists of an encoder and decoder.
Hallucination(幻觉)
In transformers hallucinations are words and phases that are generated by the model that are often nonsensical or grammatically incorrect.
Prompt
A prompt is a short piece of text that is given to the llm as input and it can be used to control the output of the model
Embeddings
Embeddings are a way to represent the meaning of text as a list of numbers. This is useful because once text is in this form, it can be compared to other text for similarity. Using a simple comparison function, we can calculate a similarity score for two embeddings to figure out whether two texts are talking about similar things.
扫描二维码,分享此文章