Nó đọc một bức ảnh như thế nào?
Vision: ảnh thành token · Thực hành · 5 phút · tokens, llm · học sau Token
Model vision cắt ảnh thành những ô vuông nhỏ (patch hoặc tile) và đọc mỗi ô như một token. Ảnh càng lớn càng tốn token, cho tới một giới hạn kích thước; vượt quá thì ảnh bị thu nhỏ, có thể làm nhoè chữ nhỏ.
1 Đoán trước
2 Xem
A picture, in tokens
1 / 4RECEIPT2 × coffee ........ $7.00tax ............... $0.56280 × 168 px → ⌈280/28⌉ × ⌈168/28⌉ = 10 × 6 = 60 tokens
rule: Anthropic vision docs, 28×28 px patches (checked 2026-10-21) · sample picture illustrative
The model cuts the picture into small squares. Each square becomes one token.
Một bức ảnh là một lưới token patch: nhiều điểm ảnh hơn là nhiều token hơn, cho tới giới hạn kích thước; vượt quá thì ảnh bị thu nhỏ, kể cả chữ nhỏ trong đó.
Một patch là ô vuông điểm ảnh nhỏ mà model đọc như một token: rộng 28 điểm ảnh ở Anthropic, 32 ở OpenAI, tile 768 điểm ảnh ở Gemini. Mỗi hãng đặt giới hạn kích thước rồi thu nhỏ ảnh lớn hơn. Vì thế một tấm ảnh có thể tốn cả nghìn token, và chữ li ti trong ảnh chụp màn hình khổng lồ bị đọc sai.
4 Bạn là model
Bạn là đôi mắt của model (Anthropic, mức standard). Đếm các ô 28 điểm ảnh của từng ảnh và chọn số token của nó.
image 1 of 4 · Anthropic, standard tier: 28 px patches, long edge ≤ 1568 px
How many tokens is a 280 × 280 px image?
Anthropic vision docs (checked 2026-10-21)
You are the model’s eyes: count the 28-pixel squares.5 Kiểm tra
6 Nói lại bằng lời bạn
7 Nhiệm vụ · 5 phút
Với một key Gemini API miễn phí, đếm token của một ảnh chụp màn hình nhỏ và một tấm ảnh lớn (count_tokens, tài liệu Gemini “Understand and count tokens”). Rồi nhờ Gemini 3.8 Flash đọc dòng chữ nhỏ nhất trong ảnh lớn, sau đó trong ảnh đã cắt riêng góc đó, và so sánh.
Ba câu nhanh
Rút ngẫu nhiên từ bộ câu hỏi của bài; lần sau sẽ khác.
Xong chưa?
Đọc thêm
Nguồn
- https://platform.claude.com/docs/en/build-with-claude/vision (checked 2026-10-21): 28×28-pixel patches, ⌈width/28⌉ × ⌈height/28⌉ visual tokens; standard tier max long edge 1568 px and 1568 tokens; high-resolution tier (Claude 4.7 and later) 2576 px and 4784 tokens; table 200×200 → 64, 1000×1000 → 1296, 1092×1092 → 1521, 1920×1080 → 1456×819, 1560 (standard) or not resized, 2691 (high-res); 3840×2160 → 2576×1449, 4784 (high-res); resizing “might, for example, make text less legible”
- https://ai.google.dev/gemini-api/docs/image-understanding (updated 2026-09-23, checked 2026-10-21): 258 tokens if both dimensions ≤ 384 px; larger images tiled into 768×768 tiles of 258 tokens; 960×540 → 6 tiles
- https://ai.google.dev/gemini-api/docs/tokens (updated 2026-10-13, checked 2026-10-21): count_tokens with an image
- https://developers.openai.com/api/docs/guides/images-vision (checked 2026-10-21; no update date): 32px patches × model multiplier; gpt-6-astra, detail high: 1024×1024 → 1229 tokens
- https://ai.google.dev/gemini-api/docs/pricing (updated 2026-10-19, checked 2026-10-21): Gemini 3.8 Flash input free of charge on the free tier
- Arithmetic on the vendors’ rules is labelled in the picture (60, 1,369, 1,548 tokens; the 0.392 shrink); the sample receipt, screenshot and text sizes are illustrative
Đăng Oct 21, 2026 · cập nhật Oct 21, 2026