supplAI — Chain to the Future 🔗
The trust layer for global manufacturing. AI-powered contract analysis, real-time risk scoring, and instant blockchain payments — built solo at LA Hacks 2025.
The Problem
Global manufacturing is broken for the little guy.
A small factory owner in Vietnam who wants to sell to American companies faces three walls. They can't afford a lawyer to review contracts written in English. They have no way to prove they're trustworthy. And when they finally land a deal, they wait 60-90 days to get paid through banks that charge 5-8% in fees.
On the other side, small US businesses want cheaper manufacturing but are terrified of getting scammed.
Both sides lose because there's no trust infrastructure between them.
The Solution
supplAI is a sovereign supply chain agent that orchestrates four steps:
1. Discover & Evaluate — A digital twin of the global supply chain built on Palantir AIP. Every manufacturer modeled with reliability scores, certifications, capacity, and track record.
2. Upload & Extract — Upload a contract in any format (PDF, photo, handwritten) in any language. Google Gemini 2.5 Flash reads every clause and extracts structured terms instantly.
3. Analyze & Protect — A 70-billion-parameter Llama 3 model runs locally on AMD MI300X hardware (192GB VRAM). It flags risks, identifies unfair terms, and suggests balanced alternatives for BOTH sides. Sensitive contract data never leaves the system.
4. Approve & Pay — AI recommends, humans decide. Approved contracts trigger instant payments on Solana — no banks, no 60-day waits, no 5% fees. Both parties see the transaction on a public ledger.
Architecture
Contract Upload (PDF / Photo / Any Language)
│
▼
Google Gemini 2.5 Flash ──── Multimodal Extraction
│
▼
Palantir AIP Ontology ──── Digital Supply Chain Twin
│
▼
Llama 3 70B on AMD MI300X ──── Local Risk Analysis (zero cloud)
│
▼
Human-in-the-Loop ──── Review AI recommendation
│
▼
Solana Blockchain ──── Instant cross-border payment
Tech Stack
| Component | Technology | Purpose |
|---|---|---|
| Core Platform | Palantir AIP (Ontology + Workshop + AIP Logic) | Data modeling, UI, orchestration |
| Contract Parsing | Google Gemini 2.5 Flash | Multimodal document understanding, any language |
| Risk Analysis | Llama 3 70B via Ollama | Deep contract risk assessment |
| Custom Model | supplAI fine-tuned model (LoRA on TinyLlama) | Domain-specific contract analysis |
| Compute | AMD Instinct MI300X (192GB VRAM) | Local LLM inference + model training |
| Orchestrator | FastAPI on AMD droplet | Pipeline coordination |
| Payments | Solana (devnet) | Instant blockchain cross-border payments |
| Tunnel | Cloudflare Quick Tunnel | Secure bridge between Palantir and AMD |
| Frontend | Custom HTML/CSS/JS | Presentation and demo website |
Key Features
Multimodal Contract Parsing
Upload contracts as PDFs, photos, or scanned documents in any language. Gemini extracts every clause into structured data. Tested with English and Mandarin contracts.
AI Risk Analysis with Fair Terms
The 70B model doesn't just flag risks — it suggests balanced alternatives that protect BOTH the buyer and manufacturer. This isn't one-sided AI; it's a fair trade tool.
Privacy-First Architecture
Contract data contains trade secrets, pricing, and legal terms. Unlike cloud AI solutions, supplAI runs a 70B parameter model locally on AMD MI300X. Sensitive business data never leaves the system.
Self-Improving System
Every contract analyzed becomes future training data. The system continuously accumulates domain knowledge. We fine-tuned a custom supplAI model using LoRA on AMD MI300X in 29 seconds — loss dropped from 2.516 to 1.803 across 5 epochs.
Human-in-the-Loop
AI never decides alone. It analyzes, scores, flags, and recommends — then a human reviews and approves. Full transparency into risk reasoning.
Instant Blockchain Payment
Approved contracts trigger Solana payments that settle in seconds. No intermediary banks, no 3-5 day delays, no 5-8% fees. Verifiable on-chain by both parties.
API Endpoints
The FastAPI orchestrator exposes:
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | System status, GPU info, model availability |
/extract-document |
POST | Upload contract → Gemini extracts terms |
/risk-assessment |
POST | Contract data → Llama 70B risk analysis |
/payment-decision |
POST | Risk data → Pay/Hold/Reject decision |
/analyze-contract |
POST | Full pipeline: extract → analyze → decide |
/training-stats |
GET | Number of training examples accumulated |
Running Locally
Prerequisites
- AMD MI300X GPU (or any GPU with 100GB+ VRAM for 70B model)
- Python 3.10+
- Ollama installed
Setup
# Install Ollama and pull model
curl -fsSL https://ollama.com/install.sh | sh
ollama pull llama3:70b
# Install dependencies
pip install fastapi uvicorn google-generativeai requests python-multipart
# Set Gemini API key
export GEMINI_API_KEY="your-key-here"
# Start the orchestrator
python main.py
# Optional: Cloudflare tunnel for external access
cloudflared tunnel --url http://127.0.0.1:5000
Fine-tuning
# Install training dependencies
pip install peft transformers datasets trl accelerate
# Run fine-tuning on AMD MI300X
python finetune2.py
# Test fine-tuned model
python test_model.py
Training Results
Fine-tuned on AMD MI300X (206GB VRAM detected):
Epoch 0.8 | Loss: 2.516
Epoch 1.0 | Loss: 2.381
Epoch 1.8 | Loss: 2.290
Epoch 2.0 | Loss: 1.986
Epoch 2.8 | Loss: 2.104
Epoch 3.0 | Loss: 1.811
Epoch 3.8 | Loss: 1.932
Epoch 4.0 | Loss: 1.860
Epoch 4.8 | Loss: 1.844
Epoch 5.0 | Loss: 1.803
Training runtime: 29.22 seconds
Train samples/second: 0.856
Demo
The live demo flow:
- Open the supplAI website → scroll through the problem and solution
- Launch the Palantir Workshop dashboard → browse manufacturers, view contracts
- Upload a contract → Gemini extracts terms in seconds
- AI analyzes risk on AMD MI300X → returns score, flags, fair terms suggestion
- Human approves → Solana payment executes on-chain
Why It Matters
This isn't a tech demo. It's economic infrastructure.
There are millions of skilled manufacturers in developing countries who can't access global markets because the system is stacked against them. supplAI levels the playing field with verifiable reputation, fair AI-powered contract analysis, and instant payment — so a factory in Vietnam can safely do business with a company in Ohio.
Prize Categories
- Overall
- Most Technically Complex
- Best Solo Hack
- Best Social Impact
- [Palantir] Best Use of AIP
- [AMD] Best Use of AI powered by AMD GPUs
- [MLH] Best Use of Solana
- [MLH] Best Use of GenAI
Built By
[Your Name] — Solo Hacker at LA Hacks 2025
Built with zero sleep and a lot of Claude.
Log in or sign up for Devpost to join the conversation.