Turning a raw dataset into embeddings is the step that happens before a RAG build or a fine-tune ever starts, and it's also the step most people reach for a notebook and a spare afternoon to do. Spheron's Agent GPU Sandbox names this exact job as a documented use case: one prompt to Claude Code, a GPU it provisions itself, and a Parquet file with vectors in it waiting on the VM when it's done. This agent GPU sandbox walkthrough covers the mechanism end to end: the prompt, which GPU the agent picks and why it isn't the H100 a LoRA fine-tune would ask for, what streams back into chat while millions of rows get embedded, and what the job costs.
TL;DR: An Agent GPU Sandbox Walkthrough for Embeddings and Data Prep
Asking an agent to embed a dataset means it provisions a GPU through Spheron's Agent GPU Sandbox, pulls your data directly onto the VM, runs the embedding batch as a background job, and reports back a Parquet file with vectors once it's done.
- Named use case: Spheron's feature page lists "data prep and embeddings" with the documented example prompt "Embed these five million rows and save them as Parquet."
- GPU default: the feature page suggests 1x H100 SXM 80 GB for this job, because an embedding pass is throughput work, not a compute-bound training step.
- Transfer limit: chat caps file transfer at 5MB per file, so the agent pulls a multi-million-row dataset onto the VM itself with
curl,git clone, orhuggingface-cli. - Runtime ceiling: a background command runs up to 24 hours, well past the 10-minute default timeout a multi-hour batch job would otherwise hit.
- Cost: you pay the instance's normal hourly rate; Spheron's on-demand L40S runs $0.96/hr as of 16 Nov 2026.
The Prompt: Asking Claude Code to Embed and Index a Dataset
The whole job starts with a single line once the sandbox is connected. Spheron's own feature page gives the documented example verbatim: "Embed these five million rows and save them as Parquet." No flag for a model name, no batch size, no mention of the GPU tier, unless you want to override the default.
Before that line means anything, the Agent GPU Sandbox has to be added as an MCP server once, per machine or per Claude Code session:
claude mcp add --transport http spheron https://connect.spheron.ai/mcpA version of the prompt that actually works in practice usually names the dataset and the embedding model, the same way a real fine-tuning prompt names the base checkpoint and the data path:
Embed the rows in ~/data/support-tickets.parquet using BAAI/bge-m3.
There are about 5 million rows in the "text" column. Save the output
as embeddings.parquet with the original row id alongside the vector.
Tell me how long it took and how many rows per second you got.If the dataset is already sitting somewhere other than the chat window, that's deliberate design, not an oversight. File transfer between chat and the sandbox VM is capped at 5MB per file, so a five-million-row file has no path through the conversation itself. The agent pulls it straight onto the machine instead, with curl, git clone, or huggingface-cli run as a shell command on the VM, the same way it would download a base model for a LoRA fine-tune or clone a repo to debug a failing kernel.
Which GPU the Agent Picks for Batch Embedding (and Why Not an H100)
This is the detail that's easy to get wrong by analogy with other sandbox jobs: a bigger GPU isn't automatically the right default here. Spheron's Agent GPU Sandbox feature page suggests a single H100 SXM 80 GB for "cleaning, tokenizing, and embedding millions of rows, with output kept on the VM," with its fine-tuning use case reaching for an H100 for an 8B model as well. Both are documented on the same feature page, pointed at two different shapes of work.
The reason comes down to what the GPU is actually doing. A LoRA fine-tune runs forward and backward passes through billions of parameters, repeatedly, across every batch in an epoch, which is a compute-bound job that benefits from an H100's tensor core throughput and extra VRAM headroom. An embedding model like BAAI/bge-m3 is a few hundred million parameters doing a single forward pass per batch of text, over and over, with no backward pass and no optimizer state to hold in memory. That's closer to a bulk throughput job than a training job, and it's why sufficient VRAM isn't the constraint most five-million-row datasets run into.
The question that matters in practice is cost per row, since an H100's hourly rate runs well above an L40S's: Spheron's on-demand L40S runs $0.96/hr against $2.98/hr for on-demand H100, as of 16 Nov 2026, and whether the L40S or the H100 actually lands cheaper per million rows depends on that rate gap against the throughput gap between the two cards, not on raw throughput alone. For most five-million-row jobs the L40S's lower hourly rate and sufficient VRAM is the simpler default, which is exactly the one the feature page documents.
The sandbox's supported range runs wider than either tier if your dataset or model calls for it: RTX cards and A100 up through H100, H200, B200, and B300, single or multi-GPU on most offers. The agent provisions whichever tier your prompt names, so naming the L40S explicitly, or letting the documented default stand, keeps a routine embedding job off a GPU it doesn't need.
Watching the Run: Throughput and What Gets Reported Back
Once the embedding job starts, it runs as a background command rather than a blocking one. The sandbox's default command timeout is 10 minutes, nowhere near long enough for five million rows at a few hundred texts per second, so the agent has to launch the job explicitly as a background process, with output streaming back into chat as it goes. A background command can run for up to 24 hours before it needs restarting, which is comfortable headroom for a batch this size even running at only a few hundred texts per second.
What streams back resembles the progress output any batch inference script prints: rows processed, a rolling rows-per-second figure, and periodic checkpoints as the output Parquet file is written incrementally rather than held in memory until the very end. Chat only shows the first 1MB of that output, though, so a five-million-row run's complete per-batch log doesn't fit in the summary the agent relays. The full log saves to /var/log/spheron-agent/ on the VM itself, which is where to look if you want the exact timing of every batch rather than the agent's rounded-off summary. Because the VM's disk persists between tasks, including installed packages, downloaded models, and output files, the embeddings file the agent writes stays on the machine for whatever comes next, instead of disappearing the moment the chat session ends.
Is It Safe to Let an Agent Run This With Sudo?
The honest answer is that the sandbox is built to limit what can go wrong, not to pretend nothing can. The agent runs its download, batching, and file-write commands as the login user with sudo, and the controls sit around that access rather than inside it: every deploy, Stop, and terminate shows a price preview and needs your explicit approval before it executes, only the person who deployed the instance can use its sandbox, the VM opens no inbound port, and every command is logged with its text and exit code, though not the command's contents beyond that. A per-connection spend limit caps what an unattended multi-hour batch job can run up, so a job that drifts past its expected runtime gets stopped rather than left to bill indefinitely, and your own SSH key keeps working the entire time, so you can log into the same machine mid-run and check the output file yourself. Full detail on each of these controls is in Spheron's Agent GPU Sandbox docs.
A sub-second CPU code sandbox like the ones in Spheron's agent code execution sandbox guide doesn't need most of this, because its jobs finish before a runaway cost or a long-running background process is even possible. A GPU VM that takes a few minutes to boot and then runs unattended for hours is a different risk shape, and the approval gates above are built for that shape specifically.
Where This Fits Before a Fine-Tune or RAG Build
This walkthrough stops at the embeddings file, deliberately. The sandbox produces a Parquet file with vectors in it and leaves it on the VM; it doesn't ship a vector database, so loading that output into something like Qdrant or Milvus for retrieval is a separate step the agent or you still has to run.
What the output feeds into depends on what the dataset was for in the first place. A support-ticket or document corpus embedded for retrieval becomes the index behind a RAG pipeline. A labeled dataset embedded for similarity or deduplication, or just cleaned and tokenized on the same GPU, becomes the training data for the next step in the chain: the same sandbox that just embedded it can also fine-tune a LoRA on it from a single follow-up prompt, and once that adapter exists, run evals across the resulting checkpoints before anything gets promoted. Embedding and data prep is the part of that chain that happens first and gets talked about least, which is part of why it's worth walking through on its own rather than as a footnote inside a fine-tuning post.
If you're setting this up for the first time rather than reproducing a specific run, Spheron's base Agent GPU Sandbox walkthrough covers connecting Claude Code, Cursor, or Codex CLI to the sandbox before any of the job-specific prompts above will do anything.
What an Agent GPU Sandbox Walkthrough Costs to Embed Millions of Rows
The sandbox itself carries no separate fee. What you pay is the GPU instance's normal hourly rate for however long it stays running, the same rate as renting that GPU directly. Spheron's on-demand L40S runs $0.96/hr as of 16 Nov 2026, and the on-demand H100 rate is there too, for anyone who decides the extra throughput is worth the premium for a particular dataset.
For a five-million-row job, the total comes down to how many hours the batch takes at whatever rows-per-second figure your model and GPU combination actually hits, plus any idle minutes before you tell the agent to stop or terminate the instance once the output file is confirmed written. A slower embedding model or a longer passage length pushes that runtime up; a smaller, faster model or shorter chunking pushes it down. Either way, the number worth checking after the run isn't just total cost, it's cost per million rows, since that's the figure that tells you whether the L40S default was the right call for that specific dataset or whether the next run is worth pointing at a different tier.
Pricing fluctuates based on GPU availability. Spheron's L40S and H100 rates above are live as of 16 Nov 2026. Check current GPU pricing → for live rates.
To reproduce the walkthrough end to end:
- Add the MCP server once:
claude mcp add --transport http spheron https://connect.spheron.ai/mcp. - Send a prompt naming the dataset path, the embedding model, and the output format, the way the example above does.
- Approve the deploy preview when the agent shows you the GPU tier and its price.
- Let the embedding run as a background command and check in on the streamed progress.
- Approve Stop or terminate once the agent confirms the output Parquet file and its row count.
Embedding a dataset from one chat message only works if the agent can get its hands on a real GPU, pull the data itself, and run for longer than a single tool call allows, which is what Spheron's Agent GPU Sandbox is built for.
Frequently Asked Questions
Spheron's Agent GPU Sandbox feature page suggests 1x H100 SXM 80 GB for its 'data prep and embeddings' use case. An embedding model like BGE-M3 is small enough that the GPU's VRAM is not the constraint; the job is closer to a bulk throughput task than the compute-bound forward and backward passes a LoRA fine-tune runs.
The sandbox bounds the risk rather than removing it. Every deploy, Stop, and terminate shows a price preview and needs your explicit approval first, the VM opens no inbound port, only the person who deployed it can use its sandbox, and every command the agent runs is logged with its text and exit code. A per-connection spend limit also caps what an unattended multi-hour batch job can run up.
Not through the chat window. File transfer between chat and the sandbox is capped at 5MB per file, so a dataset of any real size has to be pulled directly onto the VM with curl, git clone, or huggingface-cli, commands the agent runs itself once it has sudo access to the machine.
The sandbox carries no separate fee. You pay the GPU instance's normal hourly rate for however long the job runs. Spheron's on-demand L40S runs $0.96/hr as of 16 Nov 2026, and the sandbox's free background-command ceiling runs up to 24 hours, which comfortably covers a multi-hour batch embedding pass.







