Spaces:
Running on Zero
Running on Zero
space: voice-passed README + FIELD NOTES with HF absolute image URLs
Browse files- FIELD-NOTES.md +15 -16
- README.md +7 -8
FIELD-NOTES.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
| 1 |
# Field Notes: building a shop-floor AI on a small local model
|
| 2 |
|
| 3 |
-
|
| 4 |
retrieves what happened in similar conditions, reasons about what transfers, proposes settings,
|
| 5 |
-
and gets
|
| 6 |
O'Brien proposes, La Forge inspects. Built in ten days for the Hugging Face Build Small
|
| 7 |
hackathon. These are the notes from building it small, in the open, on my own machine.
|
| 8 |
|
|
@@ -20,7 +20,7 @@ what make it trustworthy.
|
|
| 20 |
## 2. Steering a small Gemma is a discipline
|
| 21 |
|
| 22 |
Everything in the steering playbook earned its place: a role-locked persona ("you do not hype"),
|
| 23 |
-
JSON mode with an output contract and
|
| 24 |
ledger hands the model two or three relevant precedents, never the whole history), and a typed
|
| 25 |
fallback for every call so a parse failure costs one shrug, not a crash. Prompt budget matters
|
| 26 |
more than context window. Attention quality sags past about 800 tokens, so the hot-path prompt
|
|
@@ -72,15 +72,15 @@ of inventing one.
|
|
| 72 |
## 8. Honesty is a feature you can ship, even when the numbers are bad
|
| 73 |
|
| 74 |
I checked the simulator against real FDM failure prints from a Modal ingestion run. The first pass
|
| 75 |
-
read 34.2%
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
|
| 85 |

|
| 86 |
|
|
@@ -108,14 +108,13 @@ step keeps the two quants from overwriting each other on the Hub. Seven
|
|
| 108 |
gotchas got written down on the way (HF tokens with whitespace, `nohup &`
|
| 109 |
losing cwd, Ollama keys living in your home not the daemon's, `ollama push`
|
| 110 |
refusing any prefix that isn't `<username>/`, etc.) so the next adapter is a
|
| 111 |
-
ten-minute job, not a half-day.
|
| 112 |
-
|
| 113 |
-
it in one line. Build the publishing in.
|
| 114 |
|
| 115 |
---
|
| 116 |
|
| 117 |
*Microfactory Node: 3D Printer runs fully local (Ollama / llama.cpp, Gemma E4B/E2B), falls back
|
| 118 |
-
|
| 119 |
datasets. It is the first node of the Microfactory, a network of small machines and the people who
|
| 120 |
run them, with a real economy growing around the work.*
|
| 121 |
|
|
|
|
| 1 |
# Field Notes: building a shop-floor AI on a small local model
|
| 2 |
|
| 3 |
+
I built a small local Gemma that learns 3D printing job by job. It
|
| 4 |
retrieves what happened in similar conditions, reasons about what transfers, proposes settings,
|
| 5 |
+
and gets slapped down by deterministic code when it is wrong. Two named agents run it: Chief Engineer
|
| 6 |
O'Brien proposes, La Forge inspects. Built in ten days for the Hugging Face Build Small
|
| 7 |
hackathon. These are the notes from building it small, in the open, on my own machine.
|
| 8 |
|
|
|
|
| 20 |
## 2. Steering a small Gemma is a discipline
|
| 21 |
|
| 22 |
Everything in the steering playbook earned its place: a role-locked persona ("you do not hype"),
|
| 23 |
+
JSON mode with an output contract and cleanup code behind it, pre-filtered context (the
|
| 24 |
ledger hands the model two or three relevant precedents, never the whole history), and a typed
|
| 25 |
fallback for every call so a parse failure costs one shrug, not a crash. Prompt budget matters
|
| 26 |
more than context window. Attention quality sags past about 800 tokens, so the hot-path prompt
|
|
|
|
| 72 |
## 8. Honesty is a feature you can ship, even when the numbers are bad
|
| 73 |
|
| 74 |
I checked the simulator against real FDM failure prints from a Modal ingestion run. The first pass
|
| 75 |
+
read 34.2%. The cause was the data, not the model: the parser only looked at G-code headers, so 178
|
| 76 |
+
of 260 rows had fan speed defaulting to zero. After cleaning that β parse M106 across the whole file,
|
| 77 |
+
final temps, real retraction β the score settled at 32.6% on 178 prints: correct on every clean
|
| 78 |
+
success, blind to the moderate failures. That gap is structural, not a knob to turn, and forcing a
|
| 79 |
+
prettier number would have broken the part that works. So the constants stayed, the reason got
|
| 80 |
+
written down, and the fix got named. Calibration is also a data check. One unparsed field had
|
| 81 |
+
quietly flipped the read on a third of the set. The same rule that keeps the model from grading
|
| 82 |
+
itself kept me from grading the simulator on bad data. Build the system so the honest answer is
|
| 83 |
+
also the impressive one.
|
| 84 |
|
| 85 |

|
| 86 |
|
|
|
|
| 108 |
gotchas got written down on the way (HF tokens with whitespace, `nohup &`
|
| 109 |
losing cwd, Ollama keys living in your home not the daemon's, `ollama push`
|
| 110 |
refusing any prefix that isn't `<username>/`, etc.) so the next adapter is a
|
| 111 |
+
ten-minute job, not a half-day. Done means someone you've never met can pull
|
| 112 |
+
and run it in one line. Build the publishing in.
|
|
|
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
*Microfactory Node: 3D Printer runs fully local (Ollama / llama.cpp, Gemma E4B/E2B), falls back
|
| 117 |
+
to a deterministic advisor, and publishes both its lesson ledger and its live interaction log as open
|
| 118 |
datasets. It is the first node of the Microfactory, a network of small machines and the people who
|
| 119 |
run them, with a real economy growing around the work.*
|
| 120 |
|
README.md
CHANGED
|
@@ -32,7 +32,7 @@ tags:
|
|
| 32 |
|
| 33 |
# Microfactory Node: 3D Printer
|
| 34 |
|
| 35 |
-
*The 3D-printing node of the Microfactory. Its
|
| 36 |
|
| 37 |
**It predicts where a 3D print will fail before it runs, learns from every job, and runs entirely on your own machine for $0 a month.**
|
| 38 |
|
|
@@ -49,7 +49,7 @@ My grandfather had a shop. He was an electrical engineer by training β taught
|
|
| 49 |
|
| 50 |
The Chief Engineer is my attempt at the opposite of that: a small AI that runs on my own machine and learns the craft of 3D printing the way a shop veteran would, job by job, remembering what worked in which conditions, and tells me where a print will fail *before* it runs. It compresses expert knowledge so it compounds instead of disappearing. Because the knowledge a maker builds over a lifetime shouldn't rent space in someone's cloud β and it shouldn't vanish when the shop closes.
|
| 51 |
|
| 52 |
-
This project is the first node of a larger plan
|
| 53 |
|
| 54 |
**Build Small hackathon Β· Backyard AI track.** A small local **Gemma** model that has accumulated
|
| 55 |
expert 3D-printing knowledge across prior jobs and applies it **proactively** to a new one.
|
|
@@ -82,11 +82,11 @@ A model this size earns trust through constraints, not through scale. The surfac
|
|
| 82 |
|
| 83 |
It runs offline, on your own hardware, for $0 a month. That is not a deployment footnote β it is the point. The knowledge a maker builds over a lifetime should not rent space in someone's cloud, and it should not vanish when the shop closes. The public Space runs the live model on ZeroGPU so you can see the real reasoning. If the GPU is cold or out of quota the node falls back to the deterministic advisor and the banner says so plainly β the reasoning panel never fakes output.
|
| 84 |
|
| 85 |
-
This is retrieval plus reflection plus a small learned policy, not fine-tuning, and that is deliberate. Fine-tuning would bury the knowledge in the weights where you can't watch it move. Retrieval keeps the memory visible: a lesson gets written after one job and pulled back up to shape the next, in plain sight. For
|
| 86 |
|
| 87 |
## Run it (fully local, no cloud, no API key)
|
| 88 |
|
| 89 |
-
The
|
| 90 |
Ollama registry or load the same GGUF directly in llama.cpp:
|
| 91 |
|
| 92 |
```bash
|
|
@@ -218,10 +218,10 @@ Storytelling is a judging principle, not a badge.
|
|
| 218 |
|
| 219 |
- **Built:** retrieval-based compounding knowledge, environment-keyed lessons, a learned parametric
|
| 220 |
policy that generalizes across similar conditions, the closed learning loop, the Brain/Spine veto,
|
| 221 |
-
|
| 222 |
|
| 223 |
- **Simulated (the one boundary):** print outcomes, via a deterministic physics-lite stand-in for the
|
| 224 |
-
printer + sensors (`sim/outcome.py`). The simulator was calibrated against 178 real FDM failure prints. Ingestion and parsing of those corpora ran on **Modal** for about five cents of compute, producing 1,304 material reference facts and 178 cleaned calibration prints. After cleaning the
|
| 225 |
|
| 226 |
- **In progress:** a LoRA fine-tune on the accumulated ledger (training on Modal), so the craft lives
|
| 227 |
in the weights as well as the memory. The live node stays retrieval-based until a held-out eval
|
|
@@ -249,5 +249,4 @@ MIT. **No OrcaSlicer/PrusaSlicer code** (AGPL-3.0): trimesh/PySLM/manifold3d/pyc
|
|
| 249 |
## Source
|
| 250 |
|
| 251 |
Built in the open. The full build plan, run-and-test runbook, the small-Gemma steering notes,
|
| 252 |
-
and
|
| 253 |
-
after the demo video + write-up are finalized).
|
|
|
|
| 32 |
|
| 33 |
# Microfactory Node: 3D Printer
|
| 34 |
|
| 35 |
+
*The 3D-printing node of the Microfactory. Its expert is **the Chief Engineer**: a small local model that learns the craft job by job.*
|
| 36 |
|
| 37 |
**It predicts where a 3D print will fail before it runs, learns from every job, and runs entirely on your own machine for $0 a month.**
|
| 38 |
|
|
|
|
| 49 |
|
| 50 |
The Chief Engineer is my attempt at the opposite of that: a small AI that runs on my own machine and learns the craft of 3D printing the way a shop veteran would, job by job, remembering what worked in which conditions, and tells me where a print will fail *before* it runs. It compresses expert knowledge so it compounds instead of disappearing. Because the knowledge a maker builds over a lifetime shouldn't rent space in someone's cloud β and it shouldn't vanish when the shop closes.
|
| 51 |
|
| 52 |
+
This project is the first node of a larger plan I call the Microfactory: a network of small machines and the people who run them, with a real economy growing around the work. Everything in this demo is built end to end so the idea reads as a working thing, not a sketch. The rest is on the roadmap, not in this demo.
|
| 53 |
|
| 54 |
**Build Small hackathon Β· Backyard AI track.** A small local **Gemma** model that has accumulated
|
| 55 |
expert 3D-printing knowledge across prior jobs and applies it **proactively** to a new one.
|
|
|
|
| 82 |
|
| 83 |
It runs offline, on your own hardware, for $0 a month. That is not a deployment footnote β it is the point. The knowledge a maker builds over a lifetime should not rent space in someone's cloud, and it should not vanish when the shop closes. The public Space runs the live model on ZeroGPU so you can see the real reasoning. If the GPU is cold or out of quota the node falls back to the deterministic advisor and the banner says so plainly β the reasoning panel never fakes output.
|
| 84 |
|
| 85 |
+
This is retrieval plus reflection plus a small learned policy, not fine-tuning, and that is deliberate. Fine-tuning would bury the knowledge in the weights where you can't watch it move. Retrieval keeps the memory visible: a lesson gets written after one job and pulled back up to shape the next, in plain sight. For craft you want to preserve and show, visible memory beats invisible memory.
|
| 86 |
|
| 87 |
## Run it (fully local, no cloud, no API key)
|
| 88 |
|
| 89 |
+
The best local run uses the fine-tuned Chief Engineer model. Pull it from the public
|
| 90 |
Ollama registry or load the same GGUF directly in llama.cpp:
|
| 91 |
|
| 92 |
```bash
|
|
|
|
| 218 |
|
| 219 |
- **Built:** retrieval-based compounding knowledge, environment-keyed lessons, a learned parametric
|
| 220 |
policy that generalizes across similar conditions, the closed learning loop, the Brain/Spine veto,
|
| 221 |
+
flags for risky geometry before it prints, fully local Gemma inference, human-reported outcomes, knowledge ingestion from slicer/firmware configs, the two-agent integrity model (proposer + inspector, never the model grading itself).
|
| 222 |
|
| 223 |
- **Simulated (the one boundary):** print outcomes, via a deterministic physics-lite stand-in for the
|
| 224 |
+
printer + sensors (`sim/outcome.py`). The simulator was calibrated against 178 real FDM failure prints. Ingestion and parsing of those corpora ran on **Modal** for about five cents of compute, producing 1,304 material reference facts and 178 cleaned calibration prints. The first pass read 34.2% β the parser only looked at G-code headers, so 178 of 260 rows had fan speed defaulting to zero. After cleaning that, the score settled at 32.6%: correct on clean successes, blind to moderate failures. The gap is structural (the model can't infer true defects without real vision + sensors), not a knob to quietly turn. Rather than fake a prettier number, the gap is documented in `sim/calibration/CALIBRATION-REPORT.md`. The honest signal preserves integrity: the rule that keeps the model from grading itself kept us from tuning the simulator on bad data.
|
| 225 |
|
| 226 |
- **In progress:** a LoRA fine-tune on the accumulated ledger (training on Modal), so the craft lives
|
| 227 |
in the weights as well as the memory. The live node stays retrieval-based until a held-out eval
|
|
|
|
| 249 |
## Source
|
| 250 |
|
| 251 |
Built in the open. The full build plan, run-and-test runbook, the small-Gemma steering notes,
|
| 252 |
+
and these field notes live in the project's source repository.
|
|
|