AI Course · Week 4 · สัปดาห์ที่ 4 · 第 4 周

🧠 Embeddings & Tokens

เอมเบดดิ้งและโทเคน — หัวใจของการที่ AI เข้าใจภาษา
How AI actually understands language
嵌入与词元 — AI 真正理解语言的核心

▶ The Vocabulary Bottleneck · 🇬🇧 English
🎧 🇨🇳 ฟังคำอธิบายเรื่องโทเคน (ภาษาจีน) Listen: token explanation in Chinese 中文音频讲解:词元、嵌入与 AI 的含义地图
คำบรรยายภาษาจีน · ~28 MB Mandarin narration · ~28 MB 普通话讲解 · 约 28 MB

🧩 โทเคนคืออะไร? — What is a Token?

🇹🇭 ภาษาไทย

ก่อนที่ AI จะเข้าใจข้อความของคุณ มันจะต้องหั่นข้อความออกเป็นชิ้นเล็กๆ ก่อน ชิ้นเล็กๆ เหล่านี้เรียกว่า โทเคน (token)

โทเคนหนึ่งตัวอาจเป็นคำทั้งคำ เช่น cat หรือเป็นส่วนของคำ เช่น un + believ + able สำหรับคำที่ยาวหรือไม่ค่อยใช้

ทุกโทเคนมี หมายเลข ID ของตัวเองในพจนานุกรมของโมเดล (ปกติมี 50,000–200,000 โทเคน)

🇬🇧 English

Before AI can understand your text, it first chops the text into small pieces. These pieces are called tokens.

A token can be a whole word like cat, or a piece of a word like un + believ + able for longer or rare words.

Every token has its own ID number in the model's vocabulary (usually 50,000–200,000 tokens).

🇨🇳 中文

AI 在理解你的文字之前,会先把文字切成小块。这些小块叫做词元(token)

一个 token 可以是一整个单词(例如 cat),也可以是单词的一部分(例如 un + believ + able),常用于长词或罕见词。

每个 token 在模型的词表里都有自己的 ID 编号(通常 50,000–200,000 个)。

🧱 Analogy — การเปรียบเทียบ — 类比

Think of tokens like LEGO bricks. You can't hand a whole sentence to a computer the way you hand it to a person — so the model breaks language into standard-sized bricks that it can build with.

โทเคนก็เหมือนLEGO bricks (ตัวต่อเลโก้) — คุณส่งประโยคทั้งประโยคให้คอมพิวเตอร์แบบเดียวกับคนไม่ได้ ดังนั้นโมเดลจึงหั่นภาษาออกเป็น "ก้อนอิฐ" ขนาดมาตรฐานที่เอาไปต่อได้

把 token 想象成乐高积木。你不能像跟人聊天那样把一整句话直接交给电脑 —— 所以模型把语言切成标准尺寸的积木,再用它们来"搭建"理解。

🎮 Try itลองเล่นดู试试看

Type a sentence below and watch how tokens are created:

พิมพ์ประโยคในช่องด้านล่าง และดูว่าแต่ละโทเคนถูกสร้างขึ้นอย่างไร:

在下面的输入框里随便输一句话,看看每个 token 是怎么被切出来的:

💡 Notice — สังเกต — 注意

EN: Common words like cat become one token. But a longer, rarer word like unbelievable might be split into pieces. This way, the model can handle any word — even ones it has never seen — by building it from known parts.

TH: คำที่ใช้บ่อยอย่าง cat จะเป็นหนึ่งโทเคน แต่คำที่ยาวหรือไม่ค่อยใช้อย่าง unbelievable อาจถูกแบ่งออก วิธีนี้ทำให้โมเดลสามารถจัดการคำใดก็ได้ — แม้แต่คำที่ไม่เคยเห็นมาก่อน — โดยการประกอบจากส่วนที่รู้จัก

ZH:cat 这样的常用词会被切成一个 token,而像 unbelievable 这样的长词或罕见词会被切成多块。这样,模型就能处理任何单词 —— 即使是它从未见过的,也能用已知的小块"拼出来"。

🔄 From text to numbers — จากข้อความสู่ตัวเลข

Raw text"The cat sat"
Tokens[The] [cat] [sat]
Token IDs[464, 2415, 3332]

📍 เอมเบดดิ้งคืออะไร? — What are Embeddings?

🇹🇭 ภาษาไทย

หมายเลข ID อย่าง 2415 เป็นแค่ "เลขที่ในตู้เก็บของ" — มันไม่มีความหมายในตัวเอง 2415 ไม่ได้คล้ายกับ 2416 มากกว่า 98421 เลย

โมเดลจึงต้องการวิธีแทนความหมาย — นั่นคือที่มาของ เอมเบดดิ้ง (embedding) ทุกโทเคนจะได้รับรายการตัวเลขยาวๆ เรียกว่า เวกเตอร์ (vector) โดยทั่วไปมี 768, 1536 หรือ 4096 ตัวเลข

ตัวเลขเหล่านี้ไม่ได้ถูกคนกำหนด แต่โมเดลเรียนรู้เองจากการอ่านข้อความมหาศาล โดยจะดันคำที่ปรากฏในบริบทคล้ายกันให้อยู่ใกล้กัน

🇬🇧 English

A token ID like 2415 is just a locker number — it has no meaning on its own. 2415 is no more similar to 2416 than it is to 98421.

So the model needs a way to represent meaning. That's where embeddings come in. Every token gets a long list of numbers called a vector — usually 768, 1536, or 4096 numbers.

These numbers aren't set by humans. The model learns them by reading huge amounts of text, pushing words that appear in similar contexts close together.

🇨🇳 中文

2415 这样的 token ID 只是一个储物柜号码 —— 它本身没有任何含义24152416 的相似度,和它跟 98421 的相似度是一样的(即都"不相似")。

所以模型需要一种方式来表示含义,这就是嵌入(embedding)登场的地方。每个 token 都会得到一长串数字,叫做向量(vector) —— 通常 768、1536 或 4096 个数。

这些数字不是人工设定的,而是模型自己从海量文本中学出来的:把出现在相似上下文中的词推得彼此靠近。

🔢 What an embedding actually looks like — เอมเบดดิ้งหน้าตาเป็นยังไง

"cat" →[ 0.21, -0.44, 0.87, 0.12, -0.05, 0.33, -0.71, 0.58, ... 1536 numbers ]
"dog" →[ 0.19, -0.41, 0.85, 0.15, -0.08, 0.29, -0.68, 0.61, ... 1536 numbers ]
"pizza" →[-0.53, 0.71, -0.12, 0.88, 0.42, -0.19, 0.33, -0.55, ... 1536 numbers ]

🗺️ Analogy — การเปรียบเทียบ — 类比

EN: Think of each vector as coordinates on a giant map of meaning. Instead of 2 coordinates like latitude/longitude, the map has hundreds of dimensions. Words with similar meanings end up close togethercat and dog are neighbors; pizza is far away.

TH: คิดซะว่าเวกเตอร์แต่ละตัวคือพิกัดบนแผนที่ความหมายขนาดยักษ์ แทนที่จะมีแค่ 2 พิกัด (ละติจูด-ลองจิจูด) แผนที่นี้มีหลายร้อยมิติ คำที่ความหมายคล้ายกันจะลงเอยอยู่ใกล้กัน — cat กับ dog เป็นเพื่อนบ้านกัน ส่วน pizza อยู่ไกลโพ้น

ZH:把每个向量想象成一张巨型"含义地图"上的坐标。这张地图不只有 2 个坐标(像经纬度),而是有几百个维度。含义相近的词最终会落在彼此靠近的位置 —— catdog 是邻居,而 pizza 在很远的地方。

🗺️ แผนที่ความหมาย — The Meaning Map

🇹🇭 ภาษาไทย

เอมเบดดิ้งจริงๆ มีหลายร้อยมิติ ซึ่งวาดไม่ได้ แต่เราสามารถบีบลงมาเป็น 2 มิติเพื่อให้เห็นภาพได้ ข้างล่างคือแผนที่ความหมายแบบย่อ — คำที่เกี่ยวข้องกันจะรวมกลุ่มกัน

🇬🇧 English

Real embeddings live in hundreds of dimensions — impossible to draw. But we can squish them down to 2D so you can see. Below is a simplified meaning map. Related words form clusters.

🇨🇳 中文

真实的嵌入活在几百个维度里 —— 根本画不出来。但我们可以把它"压扁"到 2D,让你能看见。下面是一张简化的含义地图,相关的词会自然形成聚类(cluster)

Animals — สัตว์ Food — อาหาร Royalty & People — ราชวงศ์และคน Vehicles — ยานพาหนะ Emotions — อารมณ์

💡 What to notice — สังเกตอะไร — 注意看

EN: Words in the same category cluster together. cat, dog, rabbit are neighbors. happy, joyful, excited form their own group. The model wasn't told any of this — the patterns emerged from reading billions of sentences.

TH: คำในหมวดเดียวกันรวมกลุ่มกัน cat, dog, rabbit เป็นเพื่อนบ้าน happy, joyful, excited มีกลุ่มของตัวเอง โมเดลไม่ได้ถูกบอกเรื่องพวกนี้เลย — รูปแบบพวกนี้ผุดขึ้นมาเองจากการอ่านประโยคเป็นพันล้านประโยค

ZH:同类的词会聚在一起cat、dog、rabbit 是邻居;happy、joyful、excited 形成自己的小圈子。模型并没有被告知这些类别 —— 这些规律是从几十亿句子中自己"涌现"出来的。

📏 วัดความคล้าย — Measuring Similarity

🇹🇭 ภาษาไทย

เนื่องจากเอมเบดดิ้งเป็นแค่ตัวเลข เราสามารถคำนวณว่าสองคำคล้ายกันแค่ไหนได้ด้วยคณิตศาสตร์ เครื่องมือมาตรฐานคือ โคไซน์ซิมิลาริตี้ (cosine similarity) ซึ่งวัดมุมระหว่างเวกเตอร์สองตัว

ใกล้ 1.0 = ความหมายคล้ายมาก ใกล้ 0 = ไม่เกี่ยวข้องกัน

🇬🇧 English

Since embeddings are just numbers, we can calculate how similar two words are with math. The standard tool is cosine similarity — it measures the angle between two vectors.

Close to 1.0 = very similar meaning. Close to 0 = unrelated.

🇨🇳 中文

因为嵌入只是数字,我们可以用数学算出两个词有多相似。标准工具是余弦相似度(cosine similarity) —— 它测量两个向量之间的夹角

接近 1.0 = 含义非常相似;接近 0 = 毫无关联

🎮 Try itลองเล่นดู试试看

Type a word below (try cat, pizza, happy, car, king):

พิมพ์คำในช่องด้านล่าง (ตัวอย่าง: cat, pizza, happy, car, king):

在下面的输入框里输入一个单词(试试 catpizzahappycarking):

🌟 Real-world uses — การใช้งานจริง — 实际用途

  • Semantic search — Google doesn't just match letters; it also finds things "close in meaning"
  • Recommendation systems — Netflix uses embeddings of movies you liked to suggest movies with similar vectors
  • RAG (Retrieval-Augmented Generation) — ChatGPT-on-your-docs uses embeddings to find the most relevant documents
  • Chatbots like Claude & ChatGPT — they use embeddings to "understand" your question
  • Semantic search — ค้นหาตามความหมาย: Google ไม่ได้หาแค่ตัวอักษรตรงกัน แต่หาสิ่งที่ "ความหมายใกล้เคียง" ด้วย
  • Recommendation systems — ระบบแนะนำ: Netflix ใช้เอมเบดดิ้งของหนังที่คุณชอบเพื่อแนะนำหนังที่มีเวกเตอร์คล้ายกัน
  • RAG (Retrieval-Augmented Generation) — ระบบค้นข้อมูลแล้วสร้างคำตอบ: ChatGPT กับเอกสารของบริษัท ใช้เอมเบดดิ้งเพื่อหาเอกสารที่เกี่ยวข้อง
  • Chatbots like Claude & ChatGPT — แชทบอท: ใช้เอมเบดดิ้งเพื่อ "เข้าใจ" คำถามของคุณ
  • 语义搜索(Semantic search) —— Google 不只匹配字母,还会找"含义接近"的结果
  • 推荐系统 —— Netflix 用你喜欢的电影的嵌入,去推荐向量相似的电影
  • RAG(检索增强生成) —— "用你的文档跑 ChatGPT",靠嵌入找到最相关的文档
  • Claude / ChatGPT 等聊天机器人 —— 用嵌入来"读懂"你的问题

คณิตศาสตร์บนความหมาย — Math on Meaning

🇹🇭 ภาษาไทย

เพราะความหมายอยู่ในพื้นที่พิกัด เราสามารถทำคณิตศาสตร์กับคำได้ ตัวอย่างคลาสสิกคือ:

🇬🇧 English

Because meaning lives in a coordinate space, you can do math on words. The classic example:

🇨🇳 中文

因为含义住在一个坐标空间里,你可以对单词做数学。经典的例子是:

king man + woman queen

🇹🇭 คำอธิบาย

ลบความ "เป็นชาย" ออกจาก "king" แล้วเพิ่มความ "เป็นหญิง" เข้าไป — เราจะมาหยุดใกล้ๆ "queen"

โมเดลเรียนรู้เรื่องนี้ได้โดยไม่มีใครบอกว่าเพศหรือราชวงศ์คืออะไร มันแค่สังเกตเห็นรูปแบบจากการที่คำเหล่านี้ถูกใช้

🇬🇧 Explanation

Subtract the "man-ness" from "king", add the "woman-ness", and you land near "queen".

The model learned this without being told what gender or royalty are. It just noticed the pattern in how these words get used.

🇨🇳 解释

从 "king" 里减去"男性气质",再加上"女性气质" —— 结果会停在 "queen" 附近。

模型在没人告诉它"性别"或"皇室"是什么的情况下,自己学会了这个 —— 它只是观察到这些词在使用中的规律。

💡 Why this matters — ทำไมถึงสำคัญ — 为什么重要

EN: Embeddings don't just memorize words — they capture relationships. The same direction that turns king → queen also turns uncle → aunt, actor → actress, and prince → princess. Meaning has structure, and embeddings discover it.

TH: เอมเบดดิ้งไม่ได้แค่ท่องจำคำ — แต่มันจับความสัมพันธ์ได้ด้วย ทิศทางเดียวกันที่เปลี่ยน king → queen ก็เปลี่ยน uncle → aunt, actor → actress, และ prince → princess ได้ด้วย ความหมายมีโครงสร้าง และเอมเบดดิ้งค้นพบมัน

ZH:嵌入不只是背单词 —— 它捕捉关系。把 king → queen 的同一个方向,也能把 uncle → auntactor → actressprince → princess 都"翻译"过去。含义是有结构的,而嵌入把这种结构挖了出来。

🖥️ ส่งข้อมูล 3 มิติเข้า CPU vs GPU — How 3D Data Flows Through CPUs vs GPUs

🇹🇭 ภาษาไทย

เวกเตอร์เอมเบดดิ้งเป็นแค่ตัวเลขชุดหนึ่ง เช่น [x, y, z, ...] เวลาใช้งานจริง โมเดลต้องคูณ เวกเตอร์เป็นล้านตัว กับ เมทริกซ์น้ำหนัก — แล้วฮาร์ดแวร์ไหนทำได้เร็วกว่ากัน?

CPU มีคอร์ใหญ่และฉลาด ~4–16 คอร์ ทำงานทีละชิ้นเร็วมาก เหมาะเวลาประมวลเวกเตอร์เพียงไม่กี่ตัว

GPU มีคอร์เล็กๆ หลายพันคอร์ ทำงานพร้อมกันทั้งหมด — เหมาะกับการคูณเมทริกซ์ขนาดใหญ่ ซึ่งคือหัวใจของ AI

🇬🇧 English

An embedding vector is just a tuple of numbers — [x, y, z, ...]. In real models you multiply millions of vectors by weight matrices. Which chip is faster?

CPU — a few big, smart cores (~4–16). Each is a step-by-step super-pipeline that crunches one vector blazingly fast. Best for a few vectors at a time (low latency).

GPU — thousands of tiny cores, all firing at the same instant. Best for the huge matrix multiplications inside neural nets (high throughput).

🇨🇳 中文

一个嵌入向量就是一串数字 —— [x, y, z, ...]。真实的模型要把几百万个向量乘以权重矩阵。哪种芯片更快?

CPU —— 只有几个(约 4–16 个)又大又聪明的核,每个都是一条精密的顺序流水线,处理单个向量的速度极快。适合少量向量,追求低延迟

GPU —— 成千上万个小核同一瞬间一起开火。适合神经网络里那种巨大的矩阵乘法,追求高吞吐

3D embedding vector — เวกเตอร์ 3 มิติ CPU core busy — คอร์ทำงาน GPU core busy — คอร์ GPU ทำงาน

💡 The pipeline analogy — เปรียบเทียบสายงาน — 流水线类比

EN: A CPU is like one expert chef making each plate of food perfectly, one after another. A GPU is like a thousand line cooks all chopping onions at once — slower per onion, but a mountain of onions disappears in seconds. Embeddings come in mountains, so the line cooks win.

TH: CPU เหมือนเชฟผู้เชี่ยวชาญหนึ่งคน ทำอาหารทีละจานอย่างประณีต GPU เหมือนคนหั่นหอมพันคน หั่นพร้อมกัน — ช้ากว่าต่อหัว แต่ภูเขาหอมหมดในไม่กี่วินาที เอมเบดดิ้งคือภูเขา GPU จึงชนะ

ZH:CPU 就像一位大厨,一道菜一道菜地精心做。GPU 就像一千个切菜工同时在切洋葱 —— 单个切得慢,但一座洋葱山几秒就消失。嵌入就是一座座洋葱山,所以 GPU 大获全胜。

🧠 Why memory layout matters — ทำไม "การจัดเรียงข้อมูล" สำคัญ — 内存布局为什么重要

EN: The 3D vectors must be packed as contiguous rows in a tensor (a 2D matrix: [N × D] for N vectors of D dimensions). GPU threads in a "warp" then read 32 rows in a single memory transaction — this is called coalesced access. Feed a GPU one vector at a time and it's actually slower than a CPU, because most of its cores sit idle. Batching is what unlocks GPU speed.

TH: เวกเตอร์ต้องถูกอัดเรียงเป็น แถวต่อเนื่องในเทนเซอร์ (เมทริกซ์ [N × D]) เพื่อให้เธรดบน GPU อ่านพร้อมกัน 32 แถวในการเข้าถึงหน่วยความจำครั้งเดียว ถ้าส่งเวกเตอร์ทีละตัว GPU จะช้ากว่า CPU เพราะคอร์ส่วนใหญ่ว่าง — การแบทช์คือกุญแจ

ZH:3D 向量必须以张量里的连续行形式打包(即 [N × D] 的二维矩阵:N 个向量、每个 D 维)。GPU 的"线程束(warp)"就能在一次内存访问中同时读 32 行 —— 这叫合并访问(coalesced access)。如果一次只喂一个向量给 GPU,它反而比 CPU更慢,因为绝大多数核都在闲着。批处理(batching)才是 GPU 的速度密钥。

Aspect — ด้าน CPU GPU
Cores — คอร์4–16 large2,000–20,000 small
Per-core speed⭐⭐⭐⭐⭐ very fast⭐⭐ slower individually
Best forBranching logic, 1 vector, latencyMatrix multiply, batched vectors, throughput
Embedding lookupFine for 1–10 tokensCrushes 10,000+ tokens
Memory modelCache hierarchy, random accessCoalesced reads, contiguous tensors

🎯 ภาพรวมทั้งหมด — The Full Picture

Here's the full journey from your typed text to the numbers a model actually works with:

นี่คือเส้นทางเต็มจากข้อความที่คุณพิมพ์ไปจนถึงตัวเลขที่โมเดลใช้จริง:

从你输入的文字,到模型真正使用的数字,全程是这样的:

Text"Hello world"
Tokens[Hello] [world]
Token IDs[15496, 995]
Embeddings[0.2, -0.4, ...]
AI Modeldoes its magic

🎓 Key Takeaways — สรุปประเด็นสำคัญ — 关键要点

  • Tokens are the pieces language gets broken into
  • Token IDs are just lookup numbers — no meaning on their own
  • Embeddings turn each token into a vector that encodes meaning
  • Similar meanings = similar vectors — this is how AI "understands" language
  • You can do math on meaning — vector arithmetic reveals learned relationships
  • Every modern AI — ChatGPT, Claude, Google, Netflix — is built on this idea
  • Tokens (โทเคน) — ชิ้นส่วนที่ภาษาถูกหั่นออกมา
  • Token IDs — เป็นแค่เลขในตู้เก็บของ ไม่มีความหมายในตัวเอง
  • Embeddings (เอมเบดดิ้ง) — เปลี่ยนแต่ละโทเคนเป็นเวกเตอร์ที่เก็บความหมาย
  • Similar meanings = similar vectors — ความหมายใกล้ = เวกเตอร์ใกล้ นี่คือสิ่งที่ทำให้ AI "เข้าใจ" ภาษา
  • You can do math on meaning — ทำคณิตศาสตร์กับความหมายได้ เวกเตอร์เลขคณิตเผยความสัมพันธ์ที่เรียนรู้มา
  • Every modern AI — ChatGPT, Claude, Google, Netflix — ทุก AI สมัยใหม่สร้างบนแนวคิดนี้
  • 词元(Tokens) —— 语言被切开后的小块
  • Token ID —— 只是查找用的编号,本身没有含义
  • 嵌入(Embeddings) —— 把每个 token 变成一个编码了含义的向量
  • 含义相近 = 向量相近 —— 这就是 AI "理解" 语言的方式
  • 可以对含义做数学 —— 向量运算能揭示模型学到的关系
  • ChatGPT、Claude、Google、Netflix 等所有现代 AI 都建立在这个想法之上

📖 คำศัพท์สำคัญ — Glossary — 词汇表

Click the 🔊 button to hear the pronunciation:

คลิกที่ปุ่ม 🔊 เพื่อฟังคำอ่าน:

点击 🔊 按钮可以听单词的英文发音:

token
/ˈtoʊ.kən/
โทเคน (ชิ้นส่วนของข้อความ)
词元(文本的小碎块)
A small piece of text the AI processes. Can be a whole word or a part of a word.ชิ้นเล็กๆ ที่ AI ใช้ประมวลผล อาจเป็นคำเดียวหรือส่วนของคำAI 处理时使用的小块文字,可能是一整个词,也可能是单词的一部分。
tokenization
/ˌtoʊ.kə.naɪˈzeɪ.ʃən/
การแบ่งข้อความเป็นโทเคน
分词 / 词元化
The process of breaking text into tokens before feeding it to an AI model.ขั้นตอนการหั่นข้อความออกเป็นโทเคนก่อนที่จะส่งให้โมเดล把文本切成 token 后再喂给 AI 模型的过程。
vocabulary
/vəˈkæb.jə.ler.i/
พจนานุกรมของโมเดล
词表
The complete set of tokens a model knows, usually 50,000–200,000.ชุดโทเคนทั้งหมดที่โมเดลรู้จัก ปกติ 50,000–200,000 ตัว模型认识的全部 token 的集合,通常 50,000–200,000 个。
embedding
/ɪmˈbed.ɪŋ/
เอมเบดดิ้ง (เวกเตอร์แทนความหมาย)
嵌入(表示含义的向量)
A long list of numbers that represents the meaning of a token in a way computers can use.รายการตัวเลขยาวๆ ที่แทนความหมายของโทเคน ในรูปแบบที่คอมพิวเตอร์ใช้ได้一长串数字,用计算机能利用的方式表示一个 token 的含义。
vector
/ˈvek.tər/
เวกเตอร์ (รายการตัวเลข)
向量(一串数字)
A list of numbers. In embeddings, usually 768–4096 numbers long.รายการตัวเลข ในเอมเบดดิ้งมักยาว 768–4096 ตัว一串数字。在嵌入里通常长 768–4096 个数。
dimension
/daɪˈmen.ʃən/
มิติ
维度
Each number in a vector is one dimension. Big models live in thousands of dimensions.ตัวเลขแต่ละตัวในเวกเตอร์คือ "มิติ" หนึ่ง โมเดลใหญ่ๆ อยู่ในพื้นที่หลายพันมิติ向量里的每个数字就是一个"维度"。大模型生活在几千维的空间里。
similarity
/ˌsɪm.əˈler.ə.ti/
ความคล้ายคลึง
相似度
How close two words are in meaning, measured by the distance of their vectors.ความใกล้เคียงของความหมายระหว่างสองคำ วัดจากระยะห่างของเวกเตอร์两个词在含义上的接近程度,用它们向量的距离来衡量。
cosine similarity
/ˈkoʊ.saɪn ˌsɪm.əˈler.ə.ti/
โคไซน์ซิมิลาริตี้
余弦相似度
Measures similarity by the angle between vectors. 1.0 = identical, 0 = unrelated.วิธีวัดความคล้ายโดยดูมุมระหว่างเวกเตอร์ 1.0 = เหมือนสุด, 0 = ไม่เกี่ยวกัน通过两个向量之间的夹角来度量相似度。1.0 = 完全相同,0 = 毫无关联。
cluster
/ˈklʌs.tər/
กลุ่ม / คลัสเตอร์
聚类 / 簇
A group of words with similar meanings that end up near each other in embedding space.กลุ่มของคำที่มีความหมายใกล้กันและอยู่ใกล้กันในพื้นที่เอมเบดดิ้ง含义相近的一组词,它们在嵌入空间里也彼此靠近。
context
/ˈkɑn.tekst/
บริบท
上下文
The surrounding words that help give meaning. Models learn embeddings by seeing which contexts each word appears in.คำรอบข้างที่ช่วยบอกความหมาย โมเดลเรียนรู้เอมเบดดิ้งโดยดูว่าคำถูกใช้ในบริบทอะไร周围用来辅助理解含义的词。模型通过观察"每个词出现在什么上下文里"来学到嵌入。
subword
/ˈsʌb.wɜːd/
ส่วนของคำ
子词
A piece of a word smaller than a whole word, e.g. "un" + "believ" + "able". Used for long or rare words.ชิ้นของคำที่เล็กกว่าคำเต็ม เช่น "un" + "believ" + "able" ใช้สำหรับคำยาวหรือไม่ค่อยใช้比整词更小的一块,例如 "un" + "believ" + "able"。常用于长词或罕见词。
semantic search
/sɪˈmæn.tɪk sɜːrtʃ/
ค้นหาตามความหมาย
语义搜索
Search that uses embeddings to find results with similar meaning, not just matching letters.การค้นที่ใช้เอมเบดดิ้งเพื่อหาผลลัพธ์ที่ "ความหมายใกล้" ไม่ใช่แค่ตัวอักษรตรงกัน用嵌入来寻找"含义接近"的结果的搜索,不只是字母匹配。
vector arithmetic
/ˈvek.tər əˈrɪθ.mə.tɪk/
เลขคณิตของเวกเตอร์
向量运算
Adding and subtracting word vectors, e.g., king − man + woman ≈ queen.การบวก/ลบเวกเตอร์ของคำ เช่น king − man + woman ≈ queen对词向量做加减运算,例如 king − man + woman ≈ queen。
neural network
/ˈnʊr.əl ˈnet.wɜːk/
เครือข่ายประสาทเทียม
神经网络
A math system inspired by the brain, used to learn embeddings from data.ระบบคณิตศาสตร์ที่เลียนแบบสมอง ใช้สำหรับเรียนรู้เอมเบดดิ้งจากข้อมูล受大脑启发的一种数学系统,用来从数据中学习嵌入。
training
/ˈtreɪ.nɪŋ/
การฝึกสอนโมเดล
训练
The process where a model learns embeddings by reading billions of sentences.ขั้นตอนที่โมเดลเรียนรู้เอมเบดดิ้งจากข้อความมหาศาลหลายพันล้านประโยค模型通过阅读数十亿个句子来学习嵌入的过程。
pattern
/ˈpæt.ərn/
รูปแบบ
规律 / 模式
Repeating shapes in data. Embeddings arise from the model noticing these patterns.รูปแบบที่เกิดขึ้นซ้ำๆ ในข้อมูล เอมเบดดิ้งเกิดจากการที่โมเดลสังเกตเห็นรูปแบบเหล่านี้数据中反复出现的形态。嵌入正是模型注意到这些规律之后才"诞生"的。