深入了解生成式AI模型的工作原理:能做什么和不能做什么

米言看科技 2024-04-21 00:29:55

生成式人工智能是人工智能的一个子集,已成为科技界的革命性力量。但究竟是什么?为什么它受到如此多的关注?本深入指南将深入探讨生成式 AI 模型的工作原理、它们能做什么和不能做什么,以及所有这些元素的含义。

什么是生成式 AI?

生成式 AI 或 genAI 是指可以生成新内容的系统,无论是文本、图像、音乐还是视频。传统上,AI/ML意味着三件事:有监督的、无监督的和强化学习。每个都根据聚类输出提供见解。非生成 AI 模型根据输入进行计算(例如对图像进行分类或翻译句子)。相比之下,生成模型产生“新”输出,例如写论文、作曲、设计图形,甚至创建现实世界中不存在的逼真的人脸。

生成式 AI 的含义

生成式人工智能的兴起具有重大意义。随着生成内容的能力,娱乐、设计和新闻等行业正在见证范式转变。例如,新闻机构可以使用人工智能来起草报告,而设计师可以获得人工智能辅助的图形建议。人工智能可以在几秒钟内生成数百个广告口号——这些选项是否好是另一回事。生成式 AI 可以为个人用户生成量身定制的内容。比如音乐应用,它根据你的心情创作一首独特的歌曲,或者一个新闻应用,就你感兴趣的主题起草文章。问题在于,随着人工智能在内容创作中扮演着越来越不可或缺的角色,关于真实性、版权和人类创造力价值的问题变得更加普遍。

生成式 AI 如何工作?

生成式人工智能的核心是预测序列中的下一段数据,无论是句子中的下一个单词还是图像中的下一个像素。让我们分解一下这是如何实现的。

统计模型

统计模型是大多数人工智能系统的支柱。他们使用数学方程来表示不同变量之间的关系。对于生成式 AI,模型经过训练以识别数据中的模式,然后使用这些模式生成新的类似数据。如果一个模型在英语句子上训练,它会学习一个单词跟随另一个单词的统计可能性,从而生成连贯的句子。

如何从LLM中选择文本的基本演示

数据收集

数据的质量和数量都至关重要。生成模型在庞大的数据集上进行训练,以了解模式。对于语言模型,这可能意味着从书籍、网站和其他文本中摄取数十亿个单词。对于图像模型,这可能意味着分析数百万张图像。训练数据越多样化和全面,模型生成多样化输出的效果就越好。

变压器和注意力如何工作

变形金刚是一种神经网络架构,在2017年由Vaswani等人撰写的题为“注意力是你所需要的一切”的论文中介绍。从那以后,它们已成为大多数最先进的语言模型的基础。没有变压器,ChatGPT将无法工作。“注意力”机制允许模型专注于输入数据的不同部分,就像人类在理解句子时如何关注特定单词一样。这种机制允许模型决定输入的哪些部分与给定任务相关,使其高度灵活和强大。

下面的代码是变压器机制的基本分解,用简单的英语解释了每个部分。

class Transformer: # Convert words to vectors # What this is: turns words into "vector embeddings" –basically numbers that represent the words and their relationships to each other. # Demo: "the pineapple is cool and tasty" -> [0.2, 0.5, 0.3, 0.8, 0.1, 0.9] self.embedding = Embedding(vocab_size, d_model) # Add position information to the vectors # What this is: Since words in a sentence have a specific order, we add information about each word's position in the sentence. # Demo: "the pineapple is cool and tasty" with position -> [0.2+0.01, 0.5+0.02, 0.3+0.03, 0.8+0.04, 0.1+0.05, 0.9+0.06] self.positional_encoding = PositionalEncoding(d_model) # Stack of transformer layers # What this is: Multiple layers of the Transformer model stacked on top of each other to process data in depth. # Why it does it: Each layer captures different patterns and relationships in the data. # Explained like I'm five: Imagine a multi-story building. Each floor (or layer) has people (or mechanisms) doing specific jobs. The more floors, the more jobs get done! self.transformer_layers = [TransformerLayer(d_model, nhead) for _ in range(num_layers)] # Convert the output vectors to word probabilities # What this is: A way to predict the next word in a sequence. # Why it does it: After processing the input, we want to guess what word comes next. # Explained like I'm five: After listening to a story, this tries to guess what happens next. self.output_layer = Linear(d_model, vocab_size) def forward(self, x): # Convert words to vectors, as above x = self.embedding(x) # Add position information, as above x = self.positional_encoding(x) # Pass through each transformer layer # What this is: Sending our data through each floor of our multi-story building. # Why it does it: To deeply process and understand the data. # Explained like I'm five: It's like passing a note in. Each person (or layer) adds something to the note before passing it on, which can end up with a coherent story – or a mess. for layer in self.transformer_layers: x = layer(x) # Get the output word probabilities # What this is: Our best guess for the next word in the sequence. return self.output_layer(x)

在代码中,你可能有一个转换器类和一个转换器层类。这就像有一个楼层与整个建筑物的蓝图。这段 TransformerLayer 代码向您展示了特定组件(如多头注意力和特定安排)的工作原理。

演示注意力如何使用不同的颜色工作

class TransformerLayer: # Multi-head attention mechanism # What this is: A mechanism that lets the model focus on different parts of the input data simultaneously. # Demo: "the pineapple is cool and tasty" might become "this PINEAPPLE is COOL and TASTY" as the model pays more attention to certain words. self.attention = MultiHeadAttention(d_model, nhead) # Simple feed-forward neural network # What this is: A basic neural network that processes the data after the attention mechanism. # Demo: "this PINEAPPLE is COOL and TASTY" -> [0.25, 0.55, 0.35, 0.85, 0.15, 0.95] (slight changes in numbers after processing) self.feed_forward = FeedForward(d_model) def forward(self, x): # Apply attention mechanism # What this is: The step where we focus on different parts of the sentence. # Explained like I'm five: It's like highlighting important parts of a book. attention_output = self.attention(x, x, x) # Pass the output through the feed-forward network # What this is: The step where we process the highlighted information. return self.feed_forward(attention_output)

前馈神经网络是最简单的人工神经网络类型之一。它由一个输入层、一个或多个隐藏层和一个输出层组成。数据沿一个方向流动 – 从输入层,通过隐藏层,再到输出层。网络中没有循环或循环。在变压器架构的上下文中,前馈神经网络在每一层的注意力机制之后使用。这是一个简单的两层线性变换,中间有一个ReLU激活。

# Scaled dot-product attention mechanismclass ScaledDotProductAttention: def __init__(self, d_model): # Scaling factor helps in stabilizing the gradients # it reduces the variance of the dot product. # What this is: A scaling factor based on the size of our model's embeddings. # What it does: Helps to make sure the dot products don't get too big. # Why it does it: Big dot products can make a model unstable and harder to train. # How it does it: By dividing the dot products by the square root of the embedding size. # It's used when calculating attention scores. # Explained like I'm five: Imagine you shouted something really loud. This scaling factor is like turning the volume down so it's not too loud. self.scaling_factor = d_model ** 0.5 def forward(self, query, key, value): # What this is: The function that calculates how much attention each word should get. # What it does: Determines how relevant each word in a sentence is to every other word. # Why it does it: So we can focus more on important words when trying to understand a sentence. # How it does it: By taking the dot product (the numeric product: a way to measure similarity) of the query and key, then scaling it, and finally using that to weigh our values. # How it fits into the rest of the code: This function is called whenever we want to calculate attention in our model. # Explained like I'm five: Imagine you have a toy and you want to see which of your friends likes it the most. This function is like asking each friend how much they like the toy, and then deciding who gets to play with it based on their answers. # Calculate attention scores by taking the dot product of the query and key. scores = dot_product(query, key) / self.scaling_factor # Convert the raw scores to probabilities using the softmax function. attention_weights = softmax(scores) # Weight the values using the attention probabilities. return dot_product(attention_weights, value)# Feed-forward neural network# This is an extremely basic example of a neural network.class FeedForward: def __init__(self, d_model): # First linear layer increases the dimensionality of the data. self.layer1 = Linear(d_model, d_model * 4) # Second linear layer brings the dimensionality back to d_model. self.layer2 = Linear(d_model * 4, d_model) def forward(self, x): # Pass the input through the first layer,#Pass the input through the first layer:# Input: This refers to the data you feed into the neural network. I#First layer: Neural networks consist of layers, and each layer has neurons. When we say "pass the input through the first layer," we mean that the input data is being processed by the neurons in this layer. Each neuron takes the input, multiplies it by its weights (which are learned during training), and produces an output.# apply ReLU activation to introduce non-linearity, # and then pass through the second layer.#ReLU activation: ReLU stands for Rectified Linear Unit. # It's a type of activation function, which is a mathematical function applied to the output of each neuron. In simpler terms, if the input is positive, it returns the input value; if the input is negative or zero, it returns zero.# Neural networks can model complex relationships in data by introducing non-linearities. # Without non-linear activation functions, no matter how many layers you stack in a neural network, it would behave just like a single-layer perceptron because summing these layers would give you another linear model. # Non-linearities allow the network to capture complex patterns and make better predictions. return self.layer2(relu(self.layer1(x)))# Positional encoding adds information about the position of each word in the sequence.class PositionalEncoding: def __init__(self, d_model): # What this is: A setup to add information about where each word is in a sentence. # What it does: Prepares to add a unique "position" value to each word. # Why it does it: Words in a sentence have an order, and this helps the model remember that order. # How it does it: By creating a special pattern of numbers for each position in a sentence. # How it fits into the rest of the code: Before processing words, we add their position info. # Explained like I'm five: Imagine you're in a line with your friends. This gives everyone a number to remember their place in line. pass def forward(self, x): # What this is: The main function that adds position info to our words. # What it does: Combines the word's original value with its position value. # Why it does it: So the model knows the order of words in a sentence. # How it does it: By adding the position values we prepared earlier to the word values. # How it fits into the rest of the code: This function is called whenever we want to add position info to our words. # Explained like I'm five: It's like giving each of your toys a tag that says if it's the 1st, 2nd, 3rd toy, and so on. return x# Helper functionsdef dot_product(a, b): # Calculate the dot product of two matrices. # What this is: A mathematical operation to see how similar two lists of numbers are. # What it does: Multiplies matching items in the lists and then adds them up. # Why it does it: To measure similarity or relevance between two sets of data. # How it does it: By multiplying and summing up. # How it fits into the rest of the code: Used in attention to see how relevant words are to each other. # Explained like I'm five: Imagine you and your friend have bags of candies. You both pour them out and match each candy type. Then, you count how many matching pairs you have. return a @ b.transpose(-2, -1)def softmax(x): # Convert raw scores to probabilities ensuring they sum up to 1. # What this is: A way to turn any list of numbers into probabilities. # What it does: Makes the numbers between 0 and 1 and ensures they all add up to 1. # Why it does it: So we can understand the numbers as chances or probabilities. # How it does it: By using exponentiation and division. # How it fits into the rest of the code: Used to convert attention scores into probabilities. # Explained like I'm five: Lets go back to our toys. This makes sure that when you share them, everyone gets a fair share, and no toy is left behind. return exp(x) / sum(exp(x), axis=-1)def relu(x): # Activation function that introduces non-linearity. It sets negative values to 0. # What this is: A simple rule for numbers. # What it does: If a number is negative, it changes it to zero. Otherwise, it leaves it as it is. # Why it does it: To introduce some simplicity and non-linearity in our model's calculations. # How it does it: By checking each number and setting it to zero if it's negative. # How it fits into the rest of the code: Used in neural networks to make them more powerful and flexible. # Explained like I'm five: Imagine you have some stickers, some are shiny (positive numbers) and some are dull (negative numbers). This rule says to replace all dull stickers with blank ones. return max(0, x)生成式 AI 的工作原理——简单来说

将生成式 AI 视为掷加权骰子。训练数据确定权重(或概率)。如果骰子表示句子中的下一个单词,则训练数据中经常跟随当前单词的单词将具有更高的权重。因此,“天空”可能比“香蕉”更频繁地跟随“蓝色”。当人工智能“掷骰子”生成内容时,它更有可能根据其训练选择统计上更有可能的序列。那么,LLM如何生成“看似”原创的内容呢?

让我们拿一个假清单——“内容营销人员最好的开斋节礼物”——并了解 LLM 如何通过结合有关礼物、开斋节和内容营销人员的文档的文本线索来生成此列表。在处理之前,文本被分解成称为“令牌”的小块。这些标记可以短至一个字符,也可以长至一个单词。

例:“开斋节是一个庆祝活动”变成[“开斋节”,“al-Fitr”,“is”,“a”,“庆祝”]。这允许模型处理可管理的文本块并理解句子的结构。然后使用嵌入将每个标记转换为向量(数字列表)。这些向量捕获每个单词的含义和上下文。位置编码向每个单词向量添加有关其在句子中的位置的信息,确保模型不会丢失此顺序信息。

然后我们使用注意力机制:这允许模型在生成输出时专注于输入文本的不同部分。如果你还记得BERT,这就是谷歌员工对BERT如此兴奋的地方。

如果我们的模型看过关于“礼物”的文本,并且知道人们在庆祝活动中赠送礼物,并且它也看到关于“开斋节”是一个重要庆祝活动的文本,它将“注意”这些联系。

同样,如果它看到有关“内容营销人员”需要特定工具或资源的文本,它可以将“礼物”的概念与“内容营销人员”联系起来。

现在我们可以组合上下文:当模型通过多个转换器层处理输入文本时,它会组合它所学习的上下文。因此,即使原始文本从未提到“开斋节给内容营销人员的礼物”,该模型也可以将“开斋节”、“礼物”和“内容营销人员”的概念结合在一起来生成这些内容。这是因为它已经了解了围绕这些术语中的每一个的更广泛背景。通过注意力机制和每个转换器层中的前馈网络处理输入后,模型在其词汇表上为序列中的下一个单词生成概率分布。它可能会认为,在“最好”和“开斋节”等词之后,“礼物”这个词很有可能出现在下一个。同样,它可能会将“礼物”与“内容营销人员”等潜在接收者联系起来。

如何构建大型语言模型

从基本转换器模型到复杂的大型语言模型(LLM)如GPT-3或BERT的过程涉及扩展和完善各种组件。

以下是分步细分:

LLM在大量文本数据上接受训练。很难解释这些数据有多庞大。C4 数据集是许多 LLM 的起点,是 750 GB 的文本数据。这是 805,306,368,000 字节 – 很多信息。这些数据可以包括书籍、文章、网站、论坛、评论部分和其他来源。数据越多样化和全面,模型的理解和泛化能力就越强。虽然基本的变压器架构仍然是基础,但LLM具有更多的参数。例如,GPT-3 有 175 亿个参数。在这种情况下,参数是指在训练过程中学习的神经网络中的权重和偏差。在深度学习中,通过调整这些参数来训练模型进行预测,以减少其预测与实际结果之间的差异。调整这些参数的过程称为优化,它使用梯度下降等算法。

权重:这些是神经网络中的值,用于转换网络层内的输入数据。它们在训练期间进行调整,以优化模型的输出。相邻层中神经元之间的每个连接都有一个相关的权重。偏见:这些也是神经网络中的值,这些值被添加到层变换的输出中。它们为模型提供了额外的自由度,使其能够更好地拟合训练数据。层中的每个神经元都有一个相关的偏差。

这种缩放允许模型在数据中存储和处理更复杂的模式和关系。大量的参数也意味着模型需要大量的计算能力和内存来进行训练和推理。这就是为什么训练此类模型是资源密集型的,并且通常使用专用硬件(如 GPU 或 TPU)。该模型经过训练,可以使用强大的计算资源预测序列中的下一个单词。它根据所犯的错误调整其内部参数,不断改进其预测。像我们讨论过的那些注意力机制对LLM至关重要。它们允许模型在生成输出时专注于输入的不同部分。通过权衡上下文中不同单词的重要性,注意力机制使模型能够生成连贯且上下文相关的文本。以如此大规模的规模进行这项工作使LLM能够以他们的方式工作。

转换器如何预测文本?

转换器通过多个层处理输入标记来预测文本,每个层都配备了注意力机制和前馈网络。

处理后,模型在其词汇表上为序列中的下一个单词生成概率分布。通常选择概率最高的单词作为预测。

如何构建和训练大型语言模型?

构建LLM涉及收集数据,清理数据,训练模型,微调模型以及积极,持续的测试。该模型最初在庞大的语料库上进行训练,以预测序列中的下一个单词。这个阶段允许模型学习在语法中获取模式的单词之间的联系,可以代表世界事实的关系以及感觉像逻辑推理的联系。这些连接也使其能够拾取训练数据中存在的偏差。预训练后,模型在较窄的数据集上进行优化,通常由人工审阅者遵循指南。微调是构建LLM的关键步骤。它涉及在更具体的数据集或任务上训练预训练的模型。让我们以 ChatGPT 为例。如果您玩过 GPT 模型,您就会知道提示不是“写这个东西”,而更像是

提示: 从前延续: 塔顶有一个邪恶的巫师。提示:鸡为什么加入乐队?续:因为它有鼓槌!

从这一点进入ChatGPT涉及大量的低薪劳动力。这些人创建了巨大的语料库来衡量 GPT 响应和预期行为的权重。这些工作人员创建了大量的提示/继续文本,如下所示:

提示:完成这个故事:“从前......”续:当然!从前,在遥远的土地上,有一个坐落在两座雄伟山脉之间的小村庄。提示:给我讲一个关于鸡的笑话。续:鸡为什么加入乐队?因为它有鸡腿!

出于以下几个原因,此微调过程至关重要:

特 异性: 虽然预训练使模型对语言有广泛的理解,但微调会缩小其知识和行为的范围,使其更符合特定任务或领域。例如,对医疗数据进行微调的模型将更好地回答医学问题。控制:微调使开发人员能够更好地控制模型的输出。开发人员可以使用特选数据集来指导模型生成所需的响应并避免不需要的行为。安全: 它有助于减少有害或有偏见的输出。通过在微调过程中使用指南,人工审阅者可以确保模型不会生成不适当的内容。性能:微调可以显著提高模型在特定任务上的性能。例如,针对客户支持进行微调的模型将比通用模型做得更好。

你可以说ChatGPT在某些方面进行了微调。

例如,“逻辑推理”是LLM倾向于挣扎的事情。ChatGPT 的最佳逻辑推理模型 - GPT-4 - 已经过密集训练,可以明确识别数字模式。

而不是这样的东西:

提示:什么是 2+2?过程:通常在儿童数学教科书中 2+2 =4。偶尔会提到“2+2=5”,但在这种情况下,通常有更多的上下文与乔治奥威尔或星际迷航有关。如果是在这种情况下,权重将更有利于 2+2=5。但是该上下文不存在,因此在这种情况下,下一个令牌可能是 4。响应:2+2=4

训练执行以下操作:

训练:2+2=4训练:4/2=2训练:4的一半是2训练:2 的 2 是 <>

...等等。

这意味着对于那些更“逻辑”的模型,训练过程更加严格,专注于确保模型理解并正确应用逻辑和数学原理。

该模型暴露于各种数学问题及其解决方案,确保它可以将这些原则推广并应用于新的、看不见的问题。

这种微调过程的重要性,特别是对于逻辑推理的重要性,怎么强调都不为过。没有它,模型可能会为简单的逻辑或数学问题提供不正确或荒谬的答案。

图像模型与语言模型

虽然图像和语言模型可能使用类似的架构,如转换器,但它们处理的数据是根本不同的:

图像模型

这些模型处理像素,通常以分层方式工作,首先分析小图案(如边缘),然后将它们组合起来以识别较大的结构(如形状),依此类推,直到它们理解整个图像。

语言模型

这些模型处理单词或字符序列。他们需要了解上下文、语法和语义,以生成连贯且与上下文相关的文本。

突出的生成式 AI 接口的工作原理达尔-E+中途

Dall-E 是适用于图像生成的 GPT-3 模型的变体。它是在庞大的文本-图像对数据集上进行训练的。Midjourney是另一种基于专有模型的图像生成软件。

输入:您提供文本描述,例如“双头火烈鸟”。加工:这些模型将这些文本编码为一系列数字,然后解码这些向量,找到与像素的关系,以生成图像。该模型从其训练数据中学习了文本描述和视觉表示之间的关系。输出: 与给定说明匹配或相关的图像。

手指、图案、问题

为什么这些工具不能始终如一地生成看起来正常的手?这些工具通过查看彼此相邻的像素来工作。

当将较早或更原始的生成图像与较新的图像进行比较时,您可以看到这是如何工作的:早期的模型看起来非常模糊。相比之下,最近的模型要清晰得多。

这些模型通过根据已生成的像素预测下一个像素来生成图像。这个过程重复数百万次以产生完整的图像。

手,尤其是手指,错综复杂,有很多细节需要准确捕捉。

在不同的图像中,每个手指的位置、长度和方向可能会有很大差异。

从文本描述生成图像时,模型必须对手的确切姿势和结构做出许多假设,这可能会导致异常。

查特

ChatGPT 基于 GPT-3.5 架构,这是一种基于转换器的模型,专为自然语言处理任务而设计。

输入:用于模拟对话的提示或一系列消息。加工:ChatGPT 利用其从各种互联网文本中获得的大量知识来生成响应。它考虑对话中提供的上下文,并尝试产生最相关和最连贯的答复。输出:继续或回答对话的文本响应。

专业

ChatGPT 的优势在于它能够处理各种主题并模拟类似人类的对话,使其成为聊天机器人和虚拟助手的理想选择。

吟游诗人+搜索生成体验(SGE)

虽然具体细节可能是专有的,但 Bard 基于转换器 AI 技术,类似于其他最先进的语言模型。SGE基于类似的模型,但编织了Google使用的其他ML算法。

SGE 可能使用基于转换器的生成模型生成内容,然后模糊地从搜索中的排名页面中提取答案。(这可能不是真的。只是根据它似乎如何玩弄它的猜测。请不要起诉我!

输入:提示/命令/搜索加工: 巴德处理输入并像其他LLM一样工作。 SGE使用类似的架构,但增加了一个层,在其中搜索其内部知识(从训练数据中获得)以生成合适的响应。它考虑提示的结构、上下文和生成相关内容的意图。输出:生成的内容可以是故事、答案或任何其他类型的文本。生成式AI的应用(及其争议)艺术与设计

生成式 AI 现在可以创建艺术品、音乐甚至产品设计。这为创造力和创新开辟了新的途径。

争议

人工智能在艺术领域的兴起引发了关于创意领域失业的争论。

此外,还存在以下问题:

违反劳工法,尤其是当人工智能生成的内容在没有适当归属或补偿的情况下使用时。高管们威胁作家用人工智能取代他们是引发作家罢工的问题之一。自然语言处理 (NLP)

AI 模型现在广泛用于聊天机器人、语言翻译和其他 NLP 任务。

在通用人工智能(AGI)的梦想之外,这是LLM的最佳用途,因为它们接近于“通才”NLP模型。

争议

许多用户发现聊天机器人没有人情味,有时很烦人。

此外,虽然人工智能在语言翻译方面取得了重大进展,但它往往缺乏人类翻译带来的细微差别和文化理解,导致翻译令人印象深刻且有缺陷。

医学和药物发现

人工智能可以快速分析大量医疗数据并生成潜在的药物化合物,从而加快药物发现过程。许多医生已经使用LLM来写笔记和患者沟通

争议

依靠LLM用于医疗目的可能会有问题。医学需要精确性,人工智能的任何错误或疏忽都可能产生严重后果。

医学也已经存在偏见,只有在使用LLMs时才会变得更加成熟。如下所述,隐私、功效和道德方面也存在类似的问题。

赌博

许多人工智能爱好者对在游戏中使用人工智能感到兴奋:他们说人工智能可以生成逼真的游戏环境、角色,甚至整个游戏情节,从而增强游戏体验。通过使用这些工具可以增强NPC对话。

争议

关于游戏设计的意向性存在争议。

虽然人工智能可以生成大量内容,但一些人认为它缺乏人类设计师带来的深思熟虑的设计和叙事凝聚力。

《看门狗2》有程序化的NPC,这对整个游戏的叙事凝聚力几乎没有帮助。

营销和广告

人工智能可以分析消费者行为并生成个性化的广告和促销内容,使营销活动更加有效。

LLM具有其他人写作的背景,使它们可用于生成用户故事或更细微的程序化想法。LLMs可以推荐某人可能想要的配件,而不是向刚购买电视的人推荐电视。

争议

在营销中使用人工智能引发了隐私问题。关于使用人工智能影响消费者行为的道德影响也存在争议。

深入挖掘:如何在营销中扩展大型语言模型的使用

LLMS 的持续问题

上下文理解和理解人类语言

限度: 包括 GPT 在内的 AI 模型经常与细微的人际互动作斗争,例如检测讽刺、幽默或谎言。例:在一个角色对其他角色撒谎的故事中,人工智能可能并不总是掌握潜在的欺骗,并可能从表面上解释陈述。

模式匹配

限度:人工智能模型,尤其是像GPT这样的模型,从根本上来说是模式匹配器。他们擅长根据在训练数据中看到的模式识别和生成内容。然而,当面对新情况或偏离既定模式时,它们的性能可能会下降。例: 如果在模型上次训练更新后出现新的俚语或文化参考,则可能无法识别或理解它。

缺乏常识理解

限度: 虽然人工智能模型可以存储大量信息,但它们往往缺乏对世界的“常识”理解,导致输出可能在技术上正确,但在上下文中是荒谬的。

强化偏见的可能性

道德考虑: 人工智能模型从数据中学习,如果数据包含偏差,模型可能会重现甚至放大这些偏差。这可能导致性别歧视、种族主义或其他偏见的输出。

产生独特想法的挑战

限度:AI 模型根据它们看到的模式生成内容。虽然他们可以以新颖的方式组合这些模式,但它们并不像人类那样“发明”。他们的“创造力”是对现有想法的重新组合。

数据隐私、知识产权和质量控制问题:

道德考虑:在处理敏感数据的应用程序中使用 AI 模型会引起对数据隐私的担忧。当人工智能生成内容时,就会出现谁拥有知识产权的问题。确保人工智能生成内容的质量和准确性也是一个重大挑战。

错误代码

AI 模型在用于编码任务时可能会生成语法正确的代码,但在功能上存在缺陷或不安全。我不得不纠正人们添加到他们使用 LLM 生成的网站的代码。它看起来是正确的,但事实并非如此。即使它确实有效,LLM对代码的期望也会过时,使用“document.write”等不再被认为是最佳实践的函数。MLOps 工程师和技术 SEO 的热门内容

本节涵盖了我对LLM和生成AI的一些热门看法。随意和我战斗。

提示工程不是真实的(对于生成文本界面)

生成模型,尤其是像 GPT-3 及其后续版本这样的大型语言模型 (LLM),因其能够根据提示生成连贯且上下文相关的文本而受到吹捧。

正因为如此,并且由于这些模型已成为新的“淘金热”,人们已经开始将“提示工程”作为一种技能货币化。这可以是 1,400 美元的课程或即时工程工作。

但是,有一些关键的注意事项:

法学硕士变化迅速

随着技术的发展和新模型版本的发布,它们对提示的响应方式可能会发生变化。适用于 GPT-3 的方法可能与 GPT-4 甚至更新版本的 GPT-3 的工作方式不同。

这种不断发展意味着快速工程可能成为移动目标,这使得保持一致性具有挑战性。1 月有效的提示在 3 月可能不起作用。

无法控制的结果

虽然您可以使用提示指导 LLM,但不能保证它们始终会产生所需的输出。例如,要求LLM生成一篇500字的文章可能会导致不同长度的输出,因为LLM不知道数字是什么。

同样,虽然您可以要求提供事实信息,但模型可能会产生不准确之处,因为它本身无法区分准确和不准确的信息。

在非基于语言的应用程序中使用LLM是一个坏主意

LLM主要用于语言任务。虽然它们可以用于其他目的,但存在固有的局限性:

与新奇的想法作斗争

LLM是在现有数据上进行训练的,这意味着它们本质上是在反刍和重新组合他们以前看到的东西。他们不是真正意义上的“发明”。

需要真正创新或开箱即用思维的任务不应该使用LLM。

当涉及到人们将 GPT 模型用于新闻内容时,您可以看到这个问题——如果出现一些新颖的东西,LLM 很难处理它。

这没有发生,但它在网上发布,目前是梅根·克罗斯比的最高结果。

例如,一个似乎正在使用LLM生成内容的网站发表了一篇关于梅根·克罗斯比的诽谤性文章。克罗斯比在现实生活中被抓到肘击对手。

没有这个背景,LLM创造了一个完全不同的,关于“有争议的评论”的无证据故事。

以文本为中心

LLM的核心是为文本设计的。虽然它们可以适应图像生成或音乐创作等任务,但它们可能不如专门为这些任务设计的模型熟练。

法学硕士不知道真相是什么

他们根据训练数据中遇到的模式生成输出。这意味着他们无法核实事实或辨别真假信息。

如果他们在训练期间接触到错误信息或有偏见的数据,或者他们没有某些事情的背景,他们可能会在他们的输出中传播这些不准确之处。

这在新闻生成或学术研究等应用中尤其成问题,在这些应用中,准确性和真实性至关重要。

可以这样想:如果一个LLM以前从未遇到过“Jimmy Scrambles”这个名字,但知道它是一个名字,那么写它的提示只会想出相关的向量。

设计师总是比人工智能生成的艺术更好

人工智能在艺术领域取得了重大进展,从生成绘画到创作音乐。然而,人造艺术和人工智能生成的艺术之间有一个根本的区别:

意图、感觉、氛围

艺术不仅仅是最终产品,而是背后的意图和情感。

人类艺术家将他们的经验、情感和观点带到他们的作品中,赋予其深度和细微差别,这对人工智能来说是难以复制的。

一个人的“坏”艺术品比提示的美丽艺术品更有深度。

0 阅读:0

米言看科技

简介:感谢大家的关注