<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sachitt A V</title>
    <description>The latest articles on DEV Community by Sachitt A V (@sachittav).</description>
    <link>https://dev.to/sachittav</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4040535%2Fcc2fc6a7-0875-4918-a9ca-6ccda0e528df.png</url>
      <title>DEV Community: Sachitt A V</title>
      <link>https://dev.to/sachittav</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sachittav"/>
    <language>en</language>
    <item>
      <title>I Built a Local-First AI Operating System With 296,000 Lines of Code. Alone.</title>
      <dc:creator>Sachitt A V</dc:creator>
      <pubDate>Sat, 25 Jul 2026 07:39:19 +0000</pubDate>
      <link>https://dev.to/sachittav/i-built-a-local-first-ai-operating-system-with-296000-lines-of-code-alone-6aj</link>
      <guid>https://dev.to/sachittav/i-built-a-local-first-ai-operating-system-with-296000-lines-of-code-alone-6aj</guid>
      <description>&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**No cloud. No API keys. No subscription. Just a laptop, an RTX 5070, and 30 days.**

---

Most AI products today are wrappers around OpenAI's API. I wanted to build something different -- an operating system where the AI runs on your own machine, generates 3D models from phone videos, has conversations through voice, and improves itself while you sleep.

I call it **CODA** -- Connected Operating System for Multimodal Intelligent Computing.

Here's what 296,000 lines of code looks like when one person builds it.

---

## The Problem I Was Solving

Every "AI assistant" today has the same three problems:

1. **It needs the internet.** No WiFi, no AI.
2. **Your data leaves your machine.** Every prompt, every voice command, every file -- sent to someone else's server.
3. **You're renting intelligence.** $20/month for ChatGPT, $100/month for Claude Teams, and you still don't own anything.

I wanted an AI that lives on my laptop. One I could train, modify, and break without asking permission.

---

## What CODA Actually Is

CODA is 25+ components that together form a complete AI operating system:
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```
BHAASM (2.2B neural brain)
    |
    +-&amp;gt; CODA OS (5 interfaces: desktop, mobile, web, Electron, Next.js)
    +-&amp;gt; CODA Forge (turn phone videos into 3D-printable human models)
    +-&amp;gt; CODA Genesis (generate images, videos, and 3D from text)
    +-&amp;gt; VIJAY (voice assistant with 33 tools, runs locally)
    +-&amp;gt; COSMIC (10 composable device projects)
    +-&amp;gt; Cloud GPU training (Kaggle, Modal, Colab, Lightning -- all free tiers)
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The key insight: **each component works standalone**. You can use just the 3D scanner, just the voice assistant, or just the neural brain. But when you connect them, something interesting happens.

---

## The Neural Brain: BHAASM

The core is a 2.2 billion parameter transformer I built from scratch. Not a fine-tuned LLaMA -- I mean from random weights to working model.

**Architecture:**
- **RoPE** (Rotary Position Embeddings) -- the model understands position in sequences
- **GQA** (Grouped Query Attention) -- efficient attention without wasting memory
- **SwiGLU** -- gated feed-forward that actually learns
- **MoE** (Mixture of Experts) -- 8 experts, top-2 routing, shared expert for common patterns
- **LoRA adapters** -- AGNI (creative), VEDA (analytical), Generation (prompt refinement)

The model trained on free cloud GPUs. Kaggle gives you 30 hours/week of T4 for free. Modal gives you $30/month of credits. I round-robined between them.

**Training stats:**
- Base: 1.1B TinyLlama, grown to 2.2B via depth-stacking
- Healed on 50K curated records (loss: 0.35 -&amp;gt; 0.008)
- AGNI adapter: creative task routing
- VEDA adapter: safety validation and analysis
- Generation adapter: prompt refinement for image/video/3D generation

---

## CODA Forge: Phone Video to 3D Model

This is the project I'm most proud of.

**The pipeline:**
1. Record yourself rotating 360 degrees with your phone
2. Feed the video into CODA Forge
3. Get a textured, watertight 3D model back

**17 stages:**
- Quality check (lighting, blur, motion)
- Frame extraction (adaptive sharpness selection)
- Temporal consistency (optical flow + landmark smoothing)
- Depth estimation (Depth Anything V2 or MiDaS)
- Scale estimation (automatic metric scale from body proportions)
- Camera calibration (chessboard + EXIF + fallback)
- COLMAP SfM (camera pose estimation)
- Neural reconstruction (ECON, PIFuHD, SMPL-X)
- Face reconstruction (MediaPipe + FLAME)
- Gaussian splatting (optional neural rendering)
- Mesh fusion (Poisson + alpha shape)
- Texture baking (xatlas UV + multi-view blending)
- Export (GLB, OBJ, STL -- 3D print ready)

**The output is a real, 3D-printable mesh.** Not a point cloud, not a depth map -- a watertight mesh with textures.

---

## VIJAY: Voice That Actually Works

Most voice assistants need the cloud. VIJAY runs locally:

- **VAD** (Voice Activity Detection) -- knows when you're speaking
- **Whisper** (STT) -- OpenAI's speech-to-text, running locally
- **Edge TTS** -- Microsoft's text-to-speech, no API key needed
- **33 tools** -- system commands, web search, app control, screenshots, WhatsApp

The wake word is "Hey VIJAY." It listens continuously, processes locally, and responds through your speakers.

---

## The Self-Improvement Loop: TRISHUL

CODA doesn't just run -- it improves itself.

**TRISHUL** (Transcendent Recursive Intelligent Self-improving Holistic Unified Learning) is a training loop:

1. **Generate** -- AGNI creates output (image, video, 3D, code)
2. **Evaluate** -- VEDA scores it, CLIP compares quality
3. **Improve** -- weak outputs become training data
4. **Retrain** -- LoRA adapters update on free cloud GPUs

The system literally gets better while you sleep. I wake up to new checkpoints and curated training datasets.

---

## The COSMIC Ecosystem

10 composable projects that form a virtual device:

| Project | What It Does |
|---------|-------------|
| Cosmic Explore | 3D codebase intelligence -- navigate code as a graph |
| Cosmic Voice | Local voice pipeline (STT + TTS) |
| Cosmic Vision | Gesture recognition + hand tracking |
| Cosmic Canvas | Sketch-to-3D generation |
| Cosmic Core | AI operating system shell |
| Cosmic Flow | Visual pipeline builder |
| Cosmic Atlas | 3D code navigation |
| Cosmic Debug | Visual debugger |
| Cosmic Connect | Service registry + discovery |
| Cosmic Shield | Supply chain security scanning |

Each one is a standalone tool. Together, they form something resembling an operating system.

---

## Tech Stack
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```
AI/ML        PyTorch, HuggingFace, LoRA, MoE, BPE Tokenizer
3D Recon     COLMAP, ECON, PIFuHD, Gaussian Splatting, TripoSR
Generation   Stable Diffusion XL, AnimateDiff, I2V, NIM FLUX
Voice        Silero VAD, faster-whisper, edge-tts, MediaPipe
Web          FastAPI, Next.js 16, React 19, TailwindCSS
Desktop      PySide6, Electron 28, Flutter/Dart
Security     AES-256-GCM, PBKDF2, MFA, Audit Chain
Cloud GPU    Kaggle T4, Modal T4, Colab T4, Lightning T4
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---

## What I Learned

**1. Build the boring parts first.**
Everyone wants to build the AI. The hard part is the 17-stage pipeline, the security primitives, the cloud GPU scheduler. Build those first.

**2. Free cloud GPUs are enough.**
Kaggle + Modal + Colab + Lightning = 4 free T4 tiers. You don't need an $800/month A100 to train a 2.2B model.

**3. Local-first is a feature, not a limitation.**
When the AI runs on your machine, you can break things, modify things, and experiment without worrying about API costs or rate limits.

**4. Composition beats monoliths.**
Each CODA component works standalone. This means I can ship parts of the system without waiting for the whole thing to be ready.

---

## What's Next

- **Train KARNA** (the 2.2B assistant) to completion on free cloud GPUs
- **CODA Forge** improvements: better face reconstruction, multi-person support
- **VIJAY** voice improvements: faster wake word detection, better compound commands
- **Community**: open to contributors, looking for people who want to build local-first AI

---

## Try It
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;```
git clone https://github.com/Sachitt-AV-08/COSMIC.git
cd COSMIC
pip install -r requirements.txt
python -m core_engine.pipeline.orchestrator --video input.mp4 --height 175
```
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Or just explore the repos:
- [BHAASM Transformer](https://github.com/Sachitt-AV-08/bhaasm-transformer) -- the neural brain
- [CODA Forge 3D](https://github.com/Sachitt-AV-08/coda-forge-3d) -- 3D reconstruction
- [Rotation-Scan 3D](https://github.com/Sachitt-AV-08/rotation-scan-3d) -- no-GPU 3D scanning
- [Deception Engine](https://github.com/Sachitt-AV-08/deception-engine) -- security through deception
- [COSMIC](https://github.com/Sachitt-AV-08/COSMIC) -- the umbrella

---

**296,000 lines. 25+ components. 5 languages. 1 developer. All local.**

That's CODA.

---

*Built by A.V. Sachitt. Find me on [GitHub](https://github.com/Sachitt-AV-08) and [LinkedIn](https://www.linkedin.com/in/sachitt-a-v-604224414/).*
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>webdev</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>*This is a submission for [DEV's Summer Bug Smash: Smash Stories](https://dev.to/bugsmash) powered by [Sentry](https://sentry.io/).*</title>
      <dc:creator>Sachitt A V</dc:creator>
      <pubDate>Tue, 21 Jul 2026 17:53:25 +0000</pubDate>
      <link>https://dev.to/sachittav/this-is-a-submission-for-devs-summer-bug-smash-smash-storieshttpsdevtobugsmash-powered-473m</link>
      <guid>https://dev.to/sachittav/this-is-a-submission-for-devs-summer-bug-smash-smash-storieshttpsdevtobugsmash-powered-473m</guid>
      <description>&lt;h2&gt;
  
  
  The Texture That Vanished
&lt;/h2&gt;

&lt;p&gt;I'm 17 and I built a 3D reconstruction pipeline called CODA Forge — it takes a phone rotation video and outputs a photorealistic 3D human model. 18 stages, CPU-only, no cloud. I was proud of it.&lt;/p&gt;

&lt;p&gt;Then I exported a GLB file with texture and... it was grey. No texture. Just a flat grey mesh.&lt;/p&gt;

&lt;p&gt;I spent 3 hours debugging before I found it. One line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;baseColorTexture&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. The &lt;code&gt;_export_textured_glb&lt;/code&gt; method accepted a &lt;code&gt;texture_path&lt;/code&gt; parameter, the caller checked if the file existed, everything looked correct. But inside the method, the texture was hardcoded to &lt;code&gt;None&lt;/code&gt;. The parameter was accepted, validated, and then completely ignored.&lt;/p&gt;

&lt;p&gt;The fix was two lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;PILImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;texture_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;baseColorTexture&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But the real lesson was: &lt;strong&gt;the code looked correct&lt;/strong&gt;. The function signature said it took a texture. The caller passed a texture. The validation passed. The export succeeded. It just silently dropped the texture and returned a grey mesh. No error, no warning, no indication anything was wrong.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Tokenizer That Never Cached
&lt;/h2&gt;

&lt;p&gt;Same week, I was profiling my transformer's generation speed. Something felt slow.&lt;/p&gt;

&lt;p&gt;I added timing to the tokenizer calls and found this: the BPE tokenizer was being loaded from disk on every single token generation. For a 256-token output, that's 256 file reads. Each one opens the JSON file, parses it, builds the vocabulary, and initializes the encoder.&lt;/p&gt;

&lt;p&gt;The code looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_tokenize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vocab_size&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;tok_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/bpe_tokenizer.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="n"&gt;tok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_tokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# Loaded EVERY call
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tok&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two functions (&lt;code&gt;_tokenize&lt;/code&gt; and &lt;code&gt;_detokenize&lt;/code&gt;) both independently loaded the same tokenizer on every call. No caching. No shared state.&lt;/p&gt;

&lt;p&gt;Fixed with &lt;code&gt;functools.lru_cache&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nd"&gt;@lru_cache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_get_tokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenizer_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/bpe_tokenizer.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;tok_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenizer_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;load_tokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One load. Cached forever. 256x fewer file reads.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Call That Did Nothing
&lt;/h2&gt;

&lt;p&gt;Third one was in my rotation-scan pipeline. There was this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;estimate_body_volume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ellipse_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths_cm&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# Result thrown away
&lt;/span&gt;    &lt;span class="nf"&gt;estimate_body_volume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ellipse_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths_cm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first call computed volume without weight calibration. The result was never stored, never used, never returned. Then the second call recomputed everything with weight calibration. The first call was pure waste.&lt;/p&gt;

&lt;p&gt;I stared at this for 10 minutes trying to understand if there was some side effect I was missing. There wasn't. It was just a leftover from an earlier refactor where the first call used to do something.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Silent bugs are the worst bugs.&lt;/strong&gt; The texture export "worked" — it produced a file. It just produced the wrong file. No exception, no traceback, no error message.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Profile before you optimize.&lt;/strong&gt; The tokenizer thing looked fine in code review. Only profiling revealed the 256x redundancy.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dead code lies.&lt;/strong&gt; The redundant &lt;code&gt;estimate_body_volume&lt;/code&gt; call looked intentional. It wasn't. It was just... there.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All three fixes are live, CI-passing across Python 3.10, 3.11, and 3.12.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Sachitt-AV-08/coda-forge-3d" rel="noopener noreferrer"&gt;https://github.com/Sachitt-AV-08/coda-forge-3d&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/Sachitt-AV-08/bhaasm-transformer" rel="noopener noreferrer"&gt;https://github.com/Sachitt-AV-08/bhaasm-transformer&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/Sachitt-AV-08/rotation-scan-3d" rel="noopener noreferrer"&gt;https://github.com/Sachitt-AV-08/rotation-scan-3d&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
    </item>
    <item>
      <title>*This is a submission for [DEV's Summer Bug Smash: Clear the Lineup](https://dev.to/bugsmash) powered by [Sentry](https://sentry.io/).*</title>
      <dc:creator>Sachitt A V</dc:creator>
      <pubDate>Tue, 21 Jul 2026 17:40:36 +0000</pubDate>
      <link>https://dev.to/sachittav/this-is-a-submission-for-devs-summer-bug-smash-clear-the-lineuphttpsdevtobugsmash-53ki</link>
      <guid>https://dev.to/sachittav/this-is-a-submission-for-devs-summer-bug-smash-clear-the-lineuphttpsdevtobugsmash-53ki</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for &lt;a href="https://dev.to/bugsmash"&gt;DEV's Summer Bug Smash: Clear the Lineup&lt;/a&gt; powered by &lt;a href="https://sentry.io/" rel="noopener noreferrer"&gt;Sentry&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Overview
&lt;/h2&gt;

&lt;p&gt;CODA OS is a fully local AI ecosystem — 228K+ lines of code, custom 2.2B transformer, 3D body reconstruction from phone videos, voice assistant, video calling, messaging. Zero cloud dependency.&lt;/p&gt;

&lt;p&gt;The specific repos I fixed:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;rotation-scan-3d&lt;/strong&gt; — CPU-only 3D body reconstruction from phone rotation videos&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;coda-forge-3d&lt;/strong&gt; — 18-stage photorealistic 3D reconstruction pipeline&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;bhaasm-transformer&lt;/strong&gt; — Custom decoder-only transformer with MoE, GQA, RoPE&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Bug Fix or Performance Improvement
&lt;/h2&gt;

&lt;p&gt;Three issues across three repos:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Texture bug in GLB export (coda-forge-3d)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;_export_textured_glb&lt;/code&gt; method accepted a &lt;code&gt;texture_path&lt;/code&gt; parameter but never used it. The texture was hardcoded to &lt;code&gt;None&lt;/code&gt;, so every textured GLB export lost its texture. This meant users calling &lt;code&gt;export_all(mesh_path, texture_path="texture.png")&lt;/code&gt; would get a GLB without any texture applied.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Tokenizer loaded 256 times per generation (bhaasm-transformer)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;_tokenize&lt;/code&gt; and &lt;code&gt;_detokenize&lt;/code&gt; functions in &lt;code&gt;sampler.py&lt;/code&gt; each independently loaded the BPE tokenizer from disk on every single call. During generation with &lt;code&gt;max_new_tokens=256&lt;/code&gt;, this meant 256+ file reads and tokenizer initializations. The tokenizer was never cached.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Redundant computation (rotation-scan-3d)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In &lt;code&gt;pipeline_adapter.py&lt;/code&gt;, &lt;code&gt;estimate_body_volume()&lt;/code&gt; was called twice in succession — once without &lt;code&gt;weight_kg&lt;/code&gt; (result discarded) and once with &lt;code&gt;weight_kg&lt;/code&gt;. The first call was wasted computation that did nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Fix 1: Texture bug&lt;/strong&gt; — &lt;code&gt;coda-forge-3d/src/codaforge/export/export_manager.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Before (broken):
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_export_textured_glb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;texture_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;material&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;trimesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;visual&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;material&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PBRMaterial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;baseColorTexture&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# &amp;lt;-- BUG: texture ignored
&lt;/span&gt;        &lt;span class="n"&gt;baseColorFactor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;visual&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;texture&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;visual&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;material&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;material&lt;/span&gt;
    &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;glb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# After (fixed):
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_export_textured_glb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;texture_path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;PIL.Image&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;PILImage&lt;/span&gt;
    &lt;span class="n"&gt;img&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;PILImage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;texture_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;material&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;trimesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;visual&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;material&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;PBRMaterial&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;baseColorTexture&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;img&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# &amp;lt;-- Now actually uses the texture
&lt;/span&gt;        &lt;span class="n"&gt;baseColorFactor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;visual&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;material&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;material&lt;/span&gt;
    &lt;span class="n"&gt;mesh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;export&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;glb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix 2: Tokenizer caching&lt;/strong&gt; — &lt;code&gt;bhaasm-transformer/src/bhaasm/inference/sampler.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Before (slow):
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_tokenize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vocab_size&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;tok_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/bpe_tokenizer.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
            &lt;span class="n"&gt;tok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_tokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# Loaded every call
&lt;/span&gt;            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tok&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;vocab_size&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="c1"&gt;# After (fast):
&lt;/span&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;functools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;lru_cache&lt;/span&gt;

&lt;span class="nd"&gt;@lru_cache&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;maxsize&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_get_tokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenizer_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/bpe_tokenizer.json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;tok_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Path&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tokenizer_path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exists&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;load_tokenizer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tok_path&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_tokenize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vocab_size&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;tok&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;_get_tokenizer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;tok&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tok&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;ord&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;vocab_size&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Fix 3: Redundant call&lt;/strong&gt; — &lt;code&gt;rotation-scan-3d/src/rotationscan/pipeline_adapter.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Before (wasted):
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;estimate_body_volume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ellipse_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths_cm&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;           &lt;span class="c1"&gt;# Result discarded
&lt;/span&gt;    &lt;span class="nf"&gt;estimate_body_volume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ellipse_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths_cm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# After (clean):
&lt;/span&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;estimate_body_volume&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ellipse_params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lengths_cm&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;weight_kg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  My Improvements
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Texture fix:&lt;/strong&gt; The bug was subtle — the method signature accepted &lt;code&gt;texture_path&lt;/code&gt; and the caller checked &lt;code&gt;if texture_path and os.path.isfile(texture_path)&lt;/code&gt; before calling it, so it &lt;em&gt;looked&lt;/em&gt; like it should work. But inside the method, &lt;code&gt;baseColorTexture=None&lt;/code&gt; meant the texture was silently dropped. The fix loads the image with PIL and passes it to PBRMaterial. Also added error handling around &lt;code&gt;trimesh.load&lt;/code&gt; in the parent &lt;code&gt;export_all&lt;/code&gt; method.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tokenizer performance:&lt;/strong&gt; The old code loaded the tokenizer from disk on every &lt;code&gt;_tokenize&lt;/code&gt; and &lt;code&gt;_detokenize&lt;/code&gt; call. During a 256-token generation, that's 512+ file reads. Using &lt;code&gt;functools.lru_cache(maxsize=1)&lt;/code&gt; caches the tokenizer object after the first load. Same tokenizer, zero re-reads. The &lt;code&gt;_detokenize&lt;/code&gt; function was also updated to use the cached tokenizer instead of independently loading its own copy.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redundant computation:&lt;/strong&gt; The first &lt;code&gt;estimate_body_volume&lt;/code&gt; call computed uncalibrated volume but discarded the result. The second call recomputed with weight calibration. Removing the first call eliminates unnecessary work without changing behavior — the calibrated result is identical.&lt;/p&gt;

&lt;p&gt;All three fixes are committed and CI-passing across Python 3.10, 3.11, and 3.12.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best Use of Sentry
&lt;/h2&gt;

&lt;p&gt;Not submitting to this category.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>bugsmash</category>
    </item>
    <item>
      <title>I built a fully local AI ecosystem — 3D reconstruction, voice assistant, video calling, messaging — all on your hardware, $0 cloud cost</title>
      <dc:creator>Sachitt A V</dc:creator>
      <pubDate>Tue, 21 Jul 2026 17:25:58 +0000</pubDate>
      <link>https://dev.to/sachittav/i-built-a-fully-local-ai-ecosystem-3d-reconstruction-voice-assistant-video-calling-messaging-2ee3</link>
      <guid>https://dev.to/sachittav/i-built-a-fully-local-ai-ecosystem-3d-reconstruction-voice-assistant-video-calling-messaging-2ee3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Body:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hey r/selfhosted,&lt;/p&gt;

&lt;p&gt;I've been building what I call CODA OS — not really an operating system, more like a complete AI-native ecosystem that runs entirely on local hardware. No API keys, no subscriptions, no data leaving your machine.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's in it:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CODA Forge&lt;/strong&gt; — 3D human reconstruction from phone rotation videos. 18-stage pipeline, CPU-only geometric reconstruction. Outputs photorealistic 3D models (OBJ/GLB/STL) with face reconstruction and texture baking.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;BHAASM Transformer&lt;/strong&gt; — Custom 2.2B parameter language model with Mixture of Experts, Grouped Query Attention, and Rotary Position Embeddings. Trained on Kaggle T4x2 + P100. I progressively replaced every weight from TinyLlama-1.1B until nothing original remained.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;VIJAY Voice Assistant&lt;/strong&gt; — Desktop voice assistant with wake word detection ("Hey VIJAY"), Whisper-based STT, edge-tts TTS, 30+ capabilities (web search, system control, file operations, media playback, etc.). Runs locally, no cloud needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CODA Call&lt;/strong&gt; — WebRTC video calling with STUN/TURN relay, Flutter + Web clients, cross-network NAT traversal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CODA Connect&lt;/strong&gt; — Real-time messaging with WebSocket push, token-based auth, full REST API.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SPECTRA&lt;/strong&gt; — Gesture control via MediaPipe hand tracking for spatial interaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Security:&lt;/strong&gt; Deception honeypot framework, AES-256-GCM encryption, Argon2 password hashing, tamper-evident audit chains.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why I built it:&lt;/strong&gt; I'm 17 and couldn't afford cloud AI APIs. So I built everything to run on my RTX 5070 + Intel NPU laptop. The 3D reconstruction part actually works better on CPU than GPU because it's pure geometry.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's next:&lt;/strong&gt; Training the transformer to 1B parameters, writing an IEEE paper on the rotation-scan algorithm, and launching the 3D reconstruction as a B2B API.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/Sachitt-AV-08" rel="noopener noreferrer"&gt;https://github.com/Sachitt-AV-08&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Website: &lt;a href="https://codaos.qzz.io" rel="noopener noreferrer"&gt;https://codaos.qzz.io&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love feedback from the self-hosted community. What would you use? What's missing?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
