SimGemma: Democratizing STEM Education with Offline-First AI Simulations

Simgemma - Thumbnail

Introduction

Imagine a classroom in a remote village. There’s a blackboard, a few passionate teachers, and curious students. What’s missing? A high-end physics lab. Even more challenging? A stable internet connection.

Physics is a subject that demands exploration. It’s hard to grasp the beauty of gravity or the silence of a vacuum from a two-dimensional drawing. This is why I built SimGemma—an offline-first, AI-powered platform designed to bring high-fidelity 3D science simulations to every classroom, regardless of connectivity.

I’m Damodharan, a Tech Lead who spends my weekends teaching math and science to kids through an NGO. I’ve always felt that teaching topics like pendulum motion or trigonometry on a blackboard didn’t do justice to the science. These concepts, along with things like molecular structures (methane, for instance), are simply better understood in 3D.

SimGemma was created for the Google Gemma Challenge to demonstrate how open-weights models like Gemma can solve real-world problems in resource-constrained environments.

The Problem: The “Blackboard Gap”

Traditional STEM education often suffers from two major hurdles:

  1. Static Learning: Concepts like “pendulum motion in a vacuum” are taught theoretically because recreating a vacuum in a classroom is expensive and difficult.
  2. The Connectivity Divide: Most modern educational tools require high-speed internet, leaving students in remote areas behind.

I used to hand-code these simulations in Three.js, but it was time-consuming and hard to scale. I needed a way to generate these artifacts on demand.

The Solution: SimGemma

SimGemma is a “Lab in a Box.” It allows educators to generate interactive 3D simulations using simple natural language.

Key Features:

  • On-Demand 3D Artifacts: Want to see how a pendulum behaves on the Moon? Just ask. Need to visualize a Methane molecule? Gemma’s got it.
  • Vibecoding for Teachers: Teachers don’t need to be coders. They can describe the “vibe” of the lesson, and SimGemma generates the simulation logic and 3D assets.
  • True Offline Architecture: Everything runs locally. From the AI model to the 3D rendering engine.

Simgemma - carbon

Simgemma - pendulum

Simgemma - Trigonometry

Simgemma – Product link

Technical Architecture: Powered by Gemma 4

The heart of SimGemma is the Gemma 4 model. We chose Gemma for its exceptional performance-to-size ratio, making it perfect for local deployment.

1. Hybrid Offline Inference

We implemented a two-tier offline approach:

  • Server-Side (Local): For complex simulation generation, we run Gemma 4 via Ollama or llama.cpp on a local machine (e.g., a teacher’s laptop).
  • Client-Side (In-Browser): Using ONNX browser gemma4-e2b, we enable zero-server editing. This allows teachers to tweak simulation logic directly in the browser without needing any backend sandbox—everything is emulated in a local shell.

2. Programmatic Video & 3D

  • Remotion: We use Remotion to programmatically create educational videos and presentations of these simulations.
  • React Three Fiber / Three.js: The simulations themselves are high-fidelity 3D artifacts that students can interact with.

The “Vibecoding” Experience

One of the most exciting aspects of SimGemma is what we call “Vibecoding.” In our NGO workshops, we’ve seen that the biggest barrier to using technology in the classroom isn’t lack of interest—it’s the complexity of the tools.

With Gemma 4, we’ve turned the creation process into a conversation. A teacher can say: “Show me a double pendulum where the second arm is twice as heavy, and let’s see it in Mars’ gravity.”

Gemma understands the physics constraints, generates the necessary React/Three.js code, and renders it instantly. It turns educators into creators.

Breaking the Language Barrier

Living in India, where we have 22 official languages, I’ve seen how language can be a barrier to quality STEM content. Gemma 4’s translation capabilities are a game-changer. SimGemma can generate and translate these artifacts into regional languages like Tamil instantly. This means a teacher can create a simulation in English and have it ready for a Tamil-medium classroom in seconds, ensuring no student is left behind because of a language gap.

Impact: Bringing the Lab to the NGO

As a STEM volunteer, I’ve seen firsthand how an interactive simulation can light up a student’s eyes. SimGemma isn’t just about code; it’s about equity. It ensures that a child in a rural NGO workshop has access to the same quality of scientific exploration as a student in a tech-hub city.

Conclusion & Future Work

SimGemma proves that “Offline AI” isn’t a compromise—it’s a superpower. By leveraging the open-weights of Gemma 4, we’ve built a tool that is resilient, private, and accessible.

We are currently looking into:

  • Expanding the library of physics primitives.
  • Improving the browser-native ONNX performance for even smaller devices.
  • Collaborating with more NGOs to deploy SimGemma “Lab-in-a-box” kits.

Links

  • GitHub Repository: Github
  • Video Demo: Youtube
  • Try Simgemma now!

#Gemma #AI #OpenSource #Education #STEM #Physics #Remotion #ThreeJS