已适配 2026 年 10 月 6 日版本

在开始开发前,先算清 EmbeddingGemma 2 需要多少资源。

为 RAG 和多模态搜索开发者准备:一分钟计算输入上限、向量存储和合适的向量维度。

计算我的配置
✓ 不需要 API Key ✓ 不上传文件 ✓ 浏览器本地运行 ✓ 基于官方模型数据
768dnative output
8,192shared input tokens
740Mfull model parameters
4input modalities
用大白话讲价值

部署之前,先回答三个可能让你多花钱的问题。

不用翻多份官方文档,也不用先写测试脚本。输入一次业务数据,就能得到可执行的部署起点。

01

输入会不会超限?

把文字、图片、视频和音频放在一起计算,避免超过共享的 8,192 Token 上限。

02

需要多少存储?

估算向量、元数据、索引开销、副本数量和每月存储费用。

03

应该从什么配置开始?

比较 128–768 维,按需加载编码器,并复制对应的 Python 配置。

你最终得到更稳妥的配置、接近真实的容量预算,以及更少的返工成本。
01 / INPUT BUDGET

这次多模态输入会不会超限?

文字、图片、视频帧和音频共同使用 8,192 Token 上限。

Fits comfortably81%
6,620 / 8,192 tokens

02 / VECTOR STORAGE

向量索引会占多大空间?

估算向量、元数据和索引开销,并考虑副本。

bytes
%
$/GB/mo
Estimated indexed footprint
952 MiB
Raw vectors488 MiB
Metadata244 MiB
Index overhead220 MiB
Monthly storage$0.25
03 / DIMENSION DECISION

向量越小,不代表一定越好。

先比较官方质量数据和存储节省,再用自己的数据测试。

04 / MODEL FOOTPRINT

只加载你真正需要的编码器。

Parameters loaded270M
Approx. raw BF16 weights515 MiB
Weight estimate excludes framework, activations, caches and runtime overhead.
05 / METHODOLOGY

每一项计算都能看懂。

所有假设都公开,你可以按自己的业务修改。

INPUT BUDGET

One shared context

Text tokens + images × visual tokens + sampled video frames × visual tokens + audio seconds × 25.

Total ≤ 8,192 tokens
VECTOR INDEX

Storage before provider fees

Vector values and metadata are calculated first, then multiplied by index overhead and replica count.

(vectors + metadata) × (1 + overhead) × replicas
MODEL FOOTPRINT

Weights, not total VRAM

The model estimate uses selected encoder parameters × two bytes for BF16 weights. Runtime memory is additional.

parameters × 2 bytes
Last source check: October 12, 2026. Model behavior and provider pricing can change. Verify against the linked official documentation before production use.
06 / SAFE STARTER

复制一份符合当前方案的配置。

代码会跟随你选择的维度和模态自动变化。

embeddinggemma_setup.py
07 / PRACTICAL ANSWERS

建立索引之前,先看这些问题。

Which EmbeddingGemma 2 dimension should I use?

Start with 256d for storage-sensitive text retrieval, and 512d or 768d when code or multimodal recall matters more. Treat 128d as a text-first shortlist candidate, not a universal default. Benchmark on representative queries before re-indexing production data.

Why must truncated vectors be normalized?

Slicing a normalized 768d vector changes its length. Re-normalizing keeps cosine similarity meaningful. Google specifically recommends using truncate_dim together with normalize_embeddings=True.

Does this calculator call an API or upload my data?

No. All calculations run in your browser. The tool does not ask for files, prompts, credentials or an API key.

Is the model footprint estimate the same as required VRAM?

No. It estimates raw BF16 weights only. Real VRAM or RAM usage also includes the framework, activations, temporary tensors, caches, media processing and operating-system overhead.

Is the storage result my final vector database bill?

No. It is a planning estimate for vectors, metadata, index overhead and replicas. A provider may also charge for compute, operations, backups, network transfer and minimum capacity.

Can I mix text, images, video and audio in one input?

Yes. EmbeddingGemma 2 maps these modalities into one shared vector space, but all media and text inside one input share the same 8,192-token budget.

SOURCE DISCIPLINE

计算依据来自官方模型卡。

Copied