menu_book Course Curriculum (Generative AI) expand_more
Model Inputs
Generation Controls
Grounding & Retrieval
Token IDs
Learn Token IDs in Generative AI with a focused explanation, a topic-specific example, and a mastery check.
12 min read
•
Beginner
generative-ai-002.py
python
vocab={'<unk>':0,'hello':1,'model':2}
words='hello model hello'.split()
print([vocab.get(w,0) for w in words])
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content