In a small machine shop, reviewing a drawing is almost artisanal: you print the drawing, read every dimension by hand, walk between machines, check tools, and guess whether the machine can hold the tolerances. Can you imagine losing hours on every request and, sometimes, finding halfway through production that you're missing a drill or a tap? MachinaCheck was born to remove that uncertainty and save you valuable time.
What MachinaCheck does
MachinaCheck is a multi-agent system that analyzes a STEP file (the standard CAD format customers send) plus three simple inputs: material, tolerance, and thread specifications. In about 30 seconds it delivers a full manufacturability report: whether the part can be made, which operations and tools are required, what’s missing, and what actions to take before starting production.
No more manual readings of the drawing. No walking the shop floor. No guesses.
Why privacy is a design requirement
Parts that go through shops are often valuable intellectual property: hole patterns in medical devices, cavities in aerospace components. Sending a STEP to a commercial API is, literally, violating an NDA. Period.
This is where a key architectural decision comes in: running the LLM locally on on-prem hardware. With 192 GB of HBM3 and 5.3 TB/s of bandwidth, the AMD Instinct MI300X lets you run Qwen 2.5 7B Instruct entirely on site. STEP files never leave the shop. This isn’t marketing; this is what "privacy by design" means for manufacturing.
Technical architecture
MachinaCheck uses a five-component pipeline built with LangChain and orchestrated with FastAPI. Key tools: cadquery for geometric parsing (based on OpenCASCADE), vLLM to serve the LLM locally, ROCm for the AMD stack, and a small Python layer for deterministic logic.
Geometric extraction (exact and deterministic)
Cadquery reads the STEP and extracts exact mathematical geometry. There’s no vision, OCR, or approximations: dimensions come out exactly as defined in the geometry.
- Cylindrical holes with exact diameter and depth
- Flat surfaces and their areas
- Chamfers and fillets
- Bounding box
- Volume and surface area
The advantage is obvious: a hole Ø6.0 mm is Ø6.0 mm, not an estimate.
Simplified extraction example:
def extract_features(step_path):
model = importStep(step_path)
shape = model.val()
bb = shape.BoundingBox()
# iterate faces and detect cylinders, planes, etc.
return {
'bounding_box_mm': {...},
'holes': [...],
'flat_surfaces': count
}
Multi-agent flow and division of responsibilities
The pipeline splits the problem into agents with clear roles:
- Agent 1 (geometry): extracts and structures features from the STEP.
- Agent 2 (inventory / matching): deterministic Python logic that queries the shop's tool database and matches needs. It does not use LLMs for this: that would be slow, costly, and prone to hallucinations.
- Agent 3 (reasoning): Qwen 2.5 7B on the MI300X that interprets the extraction, applies manufacturing rules, and prioritizes actions.
- Agent 4 (synthesis): generates the professional structured report (decision, confidence, action list, risk flags, estimated setup hours).
The intermediate output is structured JSON that the system validates before producing the final report.
Deployment on AMD MI300X with vLLM and ROCm
Running Qwen 2.5 7B on the MI300X was straightforward using vLLM on ROCm. With 192 GB of VRAM we used about 96 GB in the test configuration, leaving headroom for concurrency or larger models.
Operational results of note:
- Latency for LLM agent calls: ~3 seconds per call
- Geometric extraction: < 1 second for parts with up to 50 features
- Full pipeline (4 agents): 25 to 40 seconds end-to-end
- Accuracy in tests: correct decisions on the evaluation set
- Privacy: 0 bytes of STEP transmitted externally
The vLLM setup integrates with LangChain via an OpenAI-compatible endpoint, which simplifies orchestration logic.
Practical lessons and technical recommendations
-
Use LLMs where they add value: flexible reasoning, synthesis, and exception handling. Avoid LLMs for deterministic database queries.
-
Extract geometry directly from the CAD with geometric libraries (OpenCASCADE/cadquery). Geometric precision reduces costly risks.
-
On-prem privacy is more than policy: in manufacturing it’s a requirement for contracts and enterprise adoption.
-
If your budget allows, the MI300X memory gives room for much larger models (for example Qwen 2.5 72B), which can improve reasoning quality while keeping data inside your perimeter.
Performance and real experience
Tests with real files (datasets like GrabCAD) showed practical times and reliability: feature extraction under 1 second, full pipeline in under a minute, and correct manufacturability decisions in all test cases.
Also, because the tooling logic is deterministic, the system clearly identifies what’s missing (for example a tap M10x1.5) and suggests concrete actions (purchase, spindle speed check, setup hours), with quantifiable estimates.
In the end, MachinaCheck isn’t just an experiment: it’s a practical solution to cut skilled labor hours, avoid scrapped parts, and protect the client’s intellectual property.
Think of it this way: turning an artisanal process that takes 30 to 60 minutes per drawing into a reproducible, auditable, private flow that takes less than a minute. Isn’t that exactly what a shop needs to scale?
Original source
https://huggingface.co/blog/lablab-ai-amd-developer-hackathon/machinacheck
