Best fit: use EmbeddingGemma 2 on CPU to build and test a text-embedding path, then keep it in production only if measurements on your own documents meet your indexing and query targets. A successful model load proves that the software runs; it does not prove that your RAG service can process its real workload on time.
This guide is for AI developers and independent developers setting up a private RAG knowledge base. It also helps small teams that want to limit document exposure, and technical leads assessing a long-running server.
Last updated November 18, 2026. Model details and usage guidance were checked against Google’s EmbeddingGemma 2 model card and Gemma release notes. Confirm the model revision and runtime instructions again before deployment.
Separate embedding work from text generation
EmbeddingGemma 2 turns text into vectors for semantic search. That is different from asking a generative model to write an answer. A CPU-only test of embedding does not establish that a server can generate responses quickly, serve heavy concurrent LLM workloads, or train a model.
For a RAG application, the embedding service handles tasks such as converting new documents into vectors and turning a user’s search query into a vector. A separate retrieval layer finds relevant stored text. A generative model may then use that retrieved text to compose a response. These components have different resource needs, so measure them separately.
CPU execution is a reasonable candidate when the goal is to validate the embedding pipeline, process a manageable document collection, or run a workload whose measured indexing and query times meet the team’s requirements. It is not a shortcut to GPU-class generative inference. RootAMD does not offer GPU servers, so this article focuses on CPU text embedding only.
Before installing anything, define what “ready” means for the project:
- What document formats and preprocessing steps will be used?
- How long can initial indexing and later updates take?
- What query response time is acceptable to the application?
- How much retrieval quality is required on a labeled test set?
- Will the embedding service share a machine with the application and vector database?
If these limits are not written down, a deployment can appear successful while leaving the actual production question unanswered.
Confirm the model, runtime, and license
Start with Google’s model card rather than copying a command from an unrelated example. Check the current model identifier, supported inference path, license, input instructions, and any model-specific configuration described there. Google identifies the license as Apache 2.0; the team should still review the license terms for its intended use and distribution. The model card is the source for the model’s own requirements and supported usage, not a guarantee that every CPU server will deliver the same performance.
Record the exact model revision that the test uses. If the repository or runtime allows a fixed revision, pin it rather than silently following a moving default. Also record the operating system, runtime, library versions, CPU device selection, and any input preprocessing. These details make later tests reproducible and help distinguish a model change from a hardware or application change.
The model card includes Sentence Transformers usage guidance. Follow its current task formatting for both document text and search queries. Do not assume the two inputs use identical prefixes, prompts, or text organization. A library can accept both strings while still producing vectors that are poorly suited to the intended retrieval task if the task instructions are wrong.
Check the license before placing the model in a commercial or internal service. An open model license does not automatically answer every question about company policy, document access, or data retention. For the system around the model, decide where source documents, generated vectors, logs, and backups will live. RootAMD’s guide to data privacy considerations for server workloads can help frame that part of the design.
Prepare a CPU environment before connecting real data
Use a clean test environment that matches the operating system and deployment method intended for production. Install the runtime recommended by the model card and start with a small set of synthetic or non-sensitive text. This avoids exposing company documents while the model load, dependency resolution, and input format are still being checked.
For a Python-based Sentence Transformers setup, keep the model identifier as a value copied from the official model card. The following is a structure to adapt to the documented model configuration; it is not a substitute for checking the current example:
from sentence_transformers import SentenceTransformer
model_id = "COPY_THE_CURRENT_MODEL_ID_FROM_THE_MODEL_CARD"
model = SentenceTransformer(model_id, device="cpu")
# Configure the exact document and query task formats
# specified by the model card and supported by this model.
document_vectors = model.encode(
document_texts,
prompt_name="document",
normalize_embeddings=True,
)
query_vectors = model.encode(
search_queries,
prompt_name="query",
normalize_embeddings=True,
)
The names document and query are placeholders for task names configured in the selected model and library path. They may need to be replaced with the exact prompt names or input format in the current official example. Do not assume that these names exist by default. Confirm the vector normalization behavior as well; do not normalize on one side of retrieval and leave the other side in an incompatible state.
If the process creates thread contention, measure alternatives rather than guessing. PyTorch provides a control for the number of CPU threads through torch.set_num_threads. Test thread settings under the same application mix that production will use. More threads are not automatically better when the vector store, API process, and embedding job compete for CPU time.
A successful startup should leave a small record of what ran: model revision, runtime and library versions, task formatting, device selection, and thread settings. Without this, later comparisons can mix different software configurations and produce misleading conclusions.
Validate vectors and retrieval with a controlled sample
Move from startup checks to a small, owned test collection. Include documents that represent the material the application will actually search, but keep the sample limited enough to inspect manually. Include queries with known relevant documents and queries that should not match strongly.
The first check is whether the embedding service accepts the intended document and query inputs and returns usable vectors. Record the vector length from the result rather than hard-coding a dimension from an unrelated model example. Then confirm that the vector store is configured for that length and uses compatible distance and normalization behavior.
For a PostgreSQL-based store, consult the pgvector project documentation for its supported vector types, indexing options, and query behavior. Keep the model and vector-store settings consistent. Changing the model, preprocessing, dimension, normalization, or distance choice can invalidate comparisons with an earlier test.
Do not stop at checking that a vector row was inserted. Run a retrieval test end to end:
- Create document vectors using the model’s documented document task format.
- Store those vectors alongside stable document IDs and the source text or a reliable reference to it.
- Encode each test query using the documented query task format.
- Retrieve candidates from the vector store and inspect their order.
- Compare retrieved items with the manually labeled expected results.
- Record misses, irrelevant matches, and cases where preprocessing changed the meaning.
A small manual review can reveal issues that an API health check cannot. For example, the embedding endpoint may return valid vectors while the search layer uses an incompatible distance operator or the query path omits the model’s required task instruction. The resulting service looks healthy but returns weak matches.
If Docker Compose is used, persist the vector database’s data directory instead of relying on an ephemeral container filesystem. Docker’s Compose volume reference explains how volumes are declared. A volume is not a backup: plan a separate backup and restore test for the data that must survive host or disk failure.
FAQ: CPU deployment and RAG checks
Can EmbeddingGemma 2 run without a GPU?
Yes. Test the official local inference path with CPU selected, then check whether the complete workload meets your timing and quality targets. CPU support does not promise a particular throughput on a particular server.
How are document vectors generated?
Load the model using the current official identifier and encode documents with the model’s documented document task format. Keep the revision and preprocessing settings with the test results.
Should queries and documents have identical input formats?
Not automatically. Follow the separate query and document instructions in the model card. Then confirm the difference with retrieval tests rather than relying on successful API responses.
What confirms that RAG retrieval works?
Use queries with known relevant documents, search the stored vectors, and inspect the retrieved results. Record misses and false matches, along with the model and vector-store settings.
Measure the real workload before choosing a server
Once the sample behaves correctly, test three separate phases: first-time indexing, incremental updates, and online queries. These phases stress the system differently. Initial indexing can create a sustained CPU workload; updates can compete with application requests; queries add latency sensitivity and may run alongside other services.
Measure CPU use, memory use, disk use, elapsed processing time, and task backlog while each phase runs. Repeat with the intended document size, preprocessing, batch settings, vector store, and application services. Note whether the embedding service is sharing resources with a database or other containers. Results from an isolated model test do not describe an assembled RAG stack.
Use a decision record instead of a generic “minimum server” claim:
- Accept CPU for production when the measured indexing and query behavior meets the team’s written targets and the service remains stable alongside the rest of the stack.
- Reduce or schedule the workload when embedding jobs interfere with interactive queries but can be run during quieter periods.
- Rework the architecture when the vector database or application, rather than embedding, is the actual bottleneck.
- Do not infer generative capacity from a successful embedding test. High-concurrency text generation is outside what this CPU embedding benchmark proves.
A CPU-only application can still need substantial memory for the application, model files, vector index, cache, and operating system. Add those requirements from observed usage, not from the embedding model alone. The same applies to disk: include source documents, database files, logs, container images, and backup staging space in the storage plan.
Compare deployment options against the measured workload
| Option | Best fit | What to validate | Main trade-off |
|---|---|---|---|
| Local development machine | Initial code checks and small, disposable samples | Whether the model loads and the input path works | It may not match production resources or availability |
| Shared VPS or cloud instance | Light or variable workloads where shared capacity is acceptable | CPU contention, memory limits, storage behavior, and billing terms | Neighbor workloads and provider limits can make sustained capacity less predictable |
| Dedicated CPU server | A stable, long-running embedding and RAG stack with measured resource needs | Whole-stack memory, storage, indexing time, and query behavior | You manage deployment, updates, data protection, and operational monitoring |
The table is a planning tool, not a performance ranking. A developer who only needs a brief proof of concept may be better served by an existing machine. A team with a persistent private knowledge base should compare the cost and operational work of its current hosting against the cost of an exclusively allocated server. For a server purchase decision, check RootAMD’s available hardware options against the measured application, index, and model requirements.
Map the validated stack to RootAMD’s available hardware
RootAMD’s available AMD EPYC server options include 128 GB or 256 GB of DDR4-3200 ECC RDIMM memory, a 32-core, 64-thread CPU, and two directly connected 1 TB NVMe drives. These are product specifications, not an EmbeddingGemma 2 benchmark. Confirm current server options and terms on the RootAMD hardware page before ordering.
The memory choice cannot be made from model size alone. Add the observed memory used by the embedding service, vector database, application containers, operating system, and expected working data. Choose the memory option that accommodates the complete stack with room for its measured peaks. If the test has not captured those peaks, defer the purchase decision rather than treating a successful model load as proof that the smaller option is sufficient.
The two NVMe drives provide storage capacity, but they are not a mirrored pair by default. Keep a separate backup outside the server for data that must survive a disk or host failure. A production plan should also include a restore test, because a backup that has never been restored does not confirm recovery readiness.
RootAMD’s server service is an exclusively allocated physical machine, not a shared VPS. That can be a better fit when monitoring shows that a steady embedding and retrieval stack needs predictable access to the server’s resources. It does not remove the team’s responsibility for model updates, system hardening, database maintenance, or backups. Check RootAMD’s current billing options and listed terms before making a purchase decision.
For a light test, an existing workstation or modest shared instance may be sufficient, especially if the service runs only occasionally. For a long-running RAG system, shared CPU contention, resource caps, and less direct control over storage can complicate capacity planning. Once the full stack has passed its retrieval and load checks, an exclusively allocated RootAMD AMD server is a reasonable option to evaluate against those constraints. If monitoring is not complete, keep testing first and make the server choice from measured demand.
Frequently asked questions
Can I run EmbeddingGemma 2 without a GPU?
Yes, you can test CPU execution for text embedding by following the model card’s supported local inference path and checking that your chosen runtime loads the model on CPU. That confirms the execution path, not production capacity. Measure indexing time, query latency, CPU use, and memory use with your own documents before deciding whether CPU service meets your workload.
How do I create document vectors with EmbeddingGemma 2?
Load the model using the identifier and runtime shown in its official model card, then encode your documents using the documented document task format. Save the model revision, preprocessing, and normalization settings with your test. Keep document vectors and query vectors tied to the same model and compatible vector-store settings.
Should query text and document text use the same input format?
Not necessarily. Embedding models can define different task instructions or prompts for search queries and stored documents. Use the exact query and document formats specified by the model card and supported by your inference library. A successful request alone does not prove the formats are correct; test retrieval against known relevant documents.
How do I check RAG retrieval after adding the embeddings?
Create a small labeled test set with queries and the documents expected to match. Generate query vectors using the documented query format, search the stored document vectors, and inspect whether the expected items appear near the top. Record the model revision, vector-store configuration, and test data so changes can be compared fairly.
RootAMD EPYC 7543P Dedicated Server
From $456.3/month
