Gemma 3 4B Instruct is an excellent, cost-effective choice for driving Atlas's classification and triage capabilities, especially for tasks requiring broad code scanning. Priced at $0.04 per Mtok input and $0.08 per Mtok output via Amazon Bedrock, it offers a generous 128K token context window, making it ideal for understanding large codebases without incurring high costs.
What is Gemma 3 4B Instruct best for in Atlas?
Gemma 3 4B Instruct excels at powering Atlas's read-only plan agent and summary calls, offering a 128K token context window at just $0.04 per Mtok input. This makes it highly efficient for scanning entire codebases to inform routing decisions and generate concise titles or summaries, leveraging its low latency and non-reasoning strengths.
Within Atlas, Gemma 3 4B Instruct is specifically designed for tasks that require broad contextual understanding but limited output generation. Its 128K token context window allows Atlas to search code with hybrid semantic and keyword retrieval, powered by Axis, across vast amounts of code. This model is particularly effective for the initial planning phase, where Atlas drafts a plan in a read-only plan agent. It can quickly process and summarize code, identify relevant sections, and assist in making high-level routing decisions. Its low latency is beneficial for interactive use cases like generating quick titles or summaries for code changes or agent actions, ensuring a responsive user experience in the terminal-native TUI.
What are the cost and context tradeoffs of Gemma 3 4B Instruct?
The Gemma 3 4B Instruct model provides a significant 128K token context window for Atlas at a competitive price of $0.04 per Mtok input, making it one of the most economical options for extensive code scanning. However, its 4,096 token maximum output is a key limitation, restricting its ability to generate detailed responses or complex code modifications.
The primary advantage of Gemma 3 4B Instruct is its cost-effectiveness for input processing. At $0.04 per Mtok input, it is cheap enough for Atlas to scan an entire codebase, leveraging its 128K token context window for comprehensive understanding. This makes it ideal for initial analysis, code indexing by AST declarations using tree-sitter, and permission-gated tool calls. The tradeoff, however, lies in its output capabilities. With a maximum output of 4,096 tokens, which is half the 8,192 tokens offered by larger Gemma 3 variants, it cannot write meaningful diffs or drive Atlas's build agent reliably for anything beyond trivial edits. This model is fundamentally a classification and triage model, not a builder, meaning it excels at understanding and summarizing but struggles with generating substantial new content or complex modifications.
When should I choose a different model for Atlas?
You should choose a different model for Atlas if your tasks require generating significant code changes or driving the build agent, as Gemma 3 4B Instruct is limited by its 4,096 token output cap. For complex edits or when Atlas needs to compute and surface a unified diff for approval, a larger model with an 8,192 token output capacity or more would be necessary.
While Gemma 3 4B Instruct is excellent for read-only tasks and initial planning, it is not suitable for driving Atlas's build agent for anything beyond the most trivial edits. If your workflow with Atlas involves generating substantial code, refactoring, or implementing complex features, you will encounter limitations due to its 4,096 token maximum output. Atlas computes a unified diff for every file edit and surfaces it for approval before writing, a process that requires a model capable of generating detailed and accurate diffs. For these generative tasks, especially those involving significant code modification or the creation of new files, a larger model from the Gemma 3 family (like the 12B or 27B variants) or another model with a higher output token limit would be a more appropriate choice to ensure reliable and effective operation of Atlas's build agent.
Can Gemma 3 4B Instruct be self-hosted with Atlas?
Yes, Gemma 3 4B Instruct is an open-weights model, meaning it can be self-hosted and fits comfortably in 8GB of VRAM. This allows Atlas users to keep code off third-party servers by building its code index with local Ollama embeddings, offering a privacy-focused option for those who prefer to run models locally.
As an open-weights model, Gemma 3 4B Instruct provides the flexibility for self-hosting. Its 4B dense parameters mean it fits comfortably within 8GB of VRAM, making it accessible for many local development environments. This capability is particularly valuable for Atlas users who prioritize data privacy and wish to keep their code entirely off third-party servers. When self-hosted, Atlas can build its code index using local Ollama embeddings, ensuring that sensitive code never leaves your local machine. This setup allows developers to leverage Atlas's powerful code search (Axis) and planning capabilities while maintaining full control over their data, aligning with Atlas's commitment to secure and flexible agent operation.
Setup
- 01Configure AWS authentication by setting AWS_PROFILE or the AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY pair in your environment.
- 02Set your desired AWS_REGION environment variable.
- 03Grant Bedrock model access to Gemma 3 4B within your specified AWS region through the AWS console.
- 04Run `atlas models amazon-bedrock` to verify the model's availability and look for `google.gemma-3-4b-it` in the output.
- 05Edit your `atlas.json` configuration file to use `google.gemma-3-4b-it` only in the `small_model` slot, never as the primary `model`.
- 06Configure Atlas's permission settings to deny write tools for this model, ensuring it can only read and summarize but not edit files.
Frequently asked questions
- What is the context window size for Gemma 3 4B Instruct in Atlas?
- Gemma 3 4B Instruct provides a substantial 128K token context window when used with Atlas, enabling it to process and understand large codebases for tasks like code search (Axis) and initial planning.
- How much does Gemma 3 4B Instruct cost to use with Atlas via Amazon Bedrock?
- When driving Atlas via Amazon Bedrock, Gemma 3 4B Instruct is priced at $0.04 per Mtok for input tokens and $0.08 per Mtok for output tokens, making it a cost-effective option for high-volume input processing.
- Can Gemma 3 4B Instruct write code or make edits in Atlas?
- No, Gemma 3 4B Instruct is not designed for writing code or making significant edits in Atlas. Its 4,096 token maximum output means it cannot generate meaningful diffs or reliably drive Atlas's build agent for anything beyond trivial changes. It is best suited for read-only tasks.
- Is Gemma 3 4B Instruct suitable for Atlas's build agent?
- Gemma 3 4B Instruct is generally too small to reliably drive Atlas's build agent on anything beyond trivial edits. Its primary role is as a classification and triage model, not a builder, due to its limited output token capacity.
- Can I run Gemma 3 4B Instruct locally with Atlas?
- Yes, as an open-weights model, Gemma 3 4B Instruct can be self-hosted. Its 4B dense parameters allow it to fit comfortably in 8GB of VRAM, enabling Atlas to build its code index with local Ollama embeddings and keep code off third-party servers.
- What Atlas features benefit most from Gemma 3 4B Instruct?
- Gemma 3 4B Instruct is particularly beneficial for Atlas's read-only plan agent, summary calls, and code scanning for routing decisions. Its low latency and large input context window make it efficient for understanding code and generating concise, non-reasoning outputs.
- How do I configure Atlas to use Gemma 3 4B Instruct?
- To configure Atlas, you need to set up AWS authentication and region, grant Bedrock access to the model, and then specify `google.gemma-3-4b-it` in the `small_model` slot of your `atlas.json` configuration. Crucially, you must deny write tools for this model in Atlas's permission config.
Try SeaShell in your terminal
The terminal-native AI coding agent. Free core, single binary.
Install SeaShellRelated guides
Atlas for TypeScript in 2026
In 2026, TypeScript developers leverage Atlas, the terminal-native AI coding agent, to enhance productivity. Atlas understands your types, ensures code quality, and offers robust safety features.
Atlas for Erlang in 2026
Atlas is a terminal-native AI coding agent for Erlang/OTP in 2026. Run it in an app with a rebar.config, map supervisors and gen_server modules, review every diff.
Atlas for JavaScript in 2026
In 2026, Atlas empowers JavaScript developers with a terminal-native AI coding agent. It indexes code by AST, uses local embeddings, and offers permission-gated tools for safe, efficient development.
Atlas for Actix Web in 2026
Atlas is a terminal-native AI coding agent for Actix Web in 2026. It reads extractors and app_data, then runs cargo test and cargo clippy behind a prompt.
Atlas vs Roo Code: A Developer's Guide to AI Coding Agents in 2026
Compare Atlas, the terminal-native AI coding agent, with Roo Code, a discontinued VS Code extension, for developers in 2026. Evaluate features, safety, and availability.
Atlas for WebAssembly: Terminal-Native AI Coding in 2026
Atlas is a terminal-native AI coding agent for WebAssembly. Audit wasm-bindgen exports, batch calls across the JS boundary, and run wasm-pack test --node in 2026.
Atlas vs Qwen Code: Terminal AI Coding Agents in 2026
Atlas vs Qwen Code in 2026: Compare terminal-native AI coding agents. Atlas offers local control, permission-gated tools, and a TUI. Qwen Code features 1M token context and desktop automation.
Atlas for Express in 2026
Atlas is a terminal-native AI coding agent for Express in 2026. It reads your middleware order, wraps async route handlers, and runs mocha behind a prompt.