Add inference.coop MVP design: component analysis, architecture, cost estimate

This commit is contained in:
Botbot committed 2026-08-26 16:54:57 -06:00
1 parent ceec3196e2
commit 4e870d37a0
7 files changed
+336 -5

No files matched your search

@@ -0,0 +1,326 @@
---
type: research-project
function: inference
region: global
maturity: planned
ownership: cooperative
---
# inference.coop — Minimum Viable Cooperative Inference Utility
**Status:** Design/planning phase
**Category:** Cooperative AI infrastructure — proof of concept
**Goal:** A working, membership-based inference cooperative providing API and chatbot access to open models, hosted on renewable energy, with unified account management and cooperative governance.
## Design goals
1. **Leverage existing open-source software** for the full stack — no custom infrastructure to build
2. **Renewable energy hosting** — inference on providers powered by renewables
3. **Unified account management** across services (chat, API, billing, governance)
4. **Membership-based payment** through a service that supports recurring payments and cooperative governance
5. **Small scale first** — viable for a handful of user-testers, then scale
---
## Component 1: Inference engine
The backend that loads and serves open models via an OpenAI-compatible API.
### Options
| Engine | Throughput | Key features | Best for |
|--------|-----------|-------------|----------|
| **vLLM** | Highest (PagedAttention, continuous batching) | OpenAI-compatible API, multi-LoRA, production-grade multi-tenant | Production serving, many concurrent users |
| **Ollama** | Lower (single-user optimized) | One-command setup, model library, extreme ease of use | MVP/prototyping, small deployments |
| **SGLang** | ~30% faster than vLLM on some workloads | RadixAttention, structured outputs | Latency-sensitive workloads |
| **TGI (HuggingFace)** | Competitive | HF ecosystem integration | HF-centric workflows |
### Recommendation
**Start with Ollama, migrate to vLLM at scale.** Ollama is available as a Cloudron app (one-click install), handles model management, and exposes an OpenAI-compatible API. For <10 concurrent users, Ollama is sufficient. When usage grows, swap the backend to vLLM behind the same Open WebUI frontend — the API contract is identical.
- vLLM: [https://vllm.ai/](https://vllm.ai/) — "The High-Throughput and Memory-Efficient inference and serving engine for LLMs"
- Ollama: [https://ollama.com/](https://ollama.com/)
- vLLM production deployment guide: [Spheron (2026)](https://www.spheron.network/blog/vllm-production-deployment-2026/)
- vLLM vs Ollama comparison: [Codersera (2026)](https://codersera.com/blog/vllm-vs-ollama-vs-lm-studio-production-2026/)
### Model selection
Start with 2-3 models covering capability tiers:
- **Lightweight:** Qwen 3.5 7B or Llama 4 Scout 13B — fast, cheap, handles 80% of queries
- **Mid-range:** DeepSeek V4 Lite or Qwen 3.5 32B — research assistance, complex reasoning
- **Frontier (brokered):** Access via OpenRouter API for models too large to self-host
### Recommendation: use OpenRouter for frontier access
OpenRouter provides a single API to 300+ models from 60+ providers with pay-as-you-go pricing. For the MVP, self-host lightweight/mid-range models and broker frontier access through OpenRouter. This avoids the cost of renting H100 GPUs for frontier models while still offering full model coverage.
- [OpenRouter](https://openrouter.ai/)
---
## Component 2: Chat frontend
The user-facing web interface for chatting with models.
### Options
| Frontend | Stars | Key features | Cloudron app? |
|----------|-------|-------------|--------------|
| **Open WebUI** | 141K+ | ChatGPT-style, multi-user, RAG, model switching, document upload, pipelines, Python extensibility | ✅ Yes |
| **LibreChat** | — | ChatGPT-like with model switching, multi-user | ✅ Yes |
| **Lobster** | — | Clean chat interface | ❌ |
### Recommendation: Open WebUI
Open WebUI is the leading self-hosted chat interface (141K+ GitHub stars). It's available as a **one-click Cloudron app**, supports multi-user accounts with role-based access, model switching, document upload for RAG, and connects to both Ollama and any OpenAI-compatible API (including vLLM and OpenRouter). It also has a Python pipeline system for extensibility.
- [Open WebUI](https://openwebui.com/)
- [Open WebUI on GitHub](https://github.com/open-webui/open-webui)
- [Open WebUI on Cloudron App Store](https://www.cloudron.io/store/index.html) (listed as "Open WebUI — ChatGPT-Style WebUI for LLMs")
- Open WebUI + vLLM integration guide: [Markaicode (2026)](https://markaicode.com/integrate/open-webui-with-vllm/)
- Self-hosted AI stack guide (Ollama + Open WebUI): [DEV Community (May 2026)](https://dev.to/jovan_chan_9500711396d4e6a/self-hosted-ai-privacy-stack-2026-49n8)
---
## Component 3: Hosting (renewable energy)
### Options
| Provider | Renewable claim | GPU types | Location | Notes |
|----------|----------------|-----------|----------|-------|
| **Scaleway** | 100% renewable (wind + hydro, GO certified) at DC5 (Paris) | L4, L40S | Paris, Amsterdam, Warsaw | EU data residency, GDPR. No H100. Best for lightweight models. |
| **Hetzner** | Certified data centers in Germany/Finland (mixed energy) | GPU dedicated servers | Germany, Finland | Best value CPU/GPU servers, but not 100% renewable |
| **IREN** | 100% renewable-powered data centers | H100, H200, B200 | Global (AU, US, CA) | For GPU-heavy workloads |
| **Lambda Labs** | Not renewable-specific | H100, A100 | US | Best price/reliability for GPU rental |
| **GreenPT** (backend) | 100% renewable (uses Scaleway infra) | Not disclosed | Netherlands | Could white-label, but €17.50/seat/month is expensive |
### Recommendation
**Two-tier approach:**
1. **Chat/lightweight models:** Hetzner or Scaleway VPS with Cloudron + Ollama running small models on CPU or modest GPU. Scaleway DC5 for 100% renewable. ~€15-30/month for the VPS + Cloudron license.
2. **Frontier/heavy models:** Broker via OpenRouter (no GPU hosting needed). When self-hosting frontier becomes necessary, move to IREN or Lambda Labs with renewable energy credits.
For the MVP, a single Scaleway or Hetzner server running Cloudron + Ollama + Open WebUI can serve 5-10 user-testers with lightweight models. Add OpenRouter API access for frontier model needs.
- [Scaleway GPU instances](https://www.scaleway.com/en/gpu-instances/)
- [Hetzner GPU servers](https://www.hetzner.com/dedicated-rootserver/matrix-gpu/)
- Scaleway vs Hetzner comparison: [VPSBenchmarks (2026)](https://www.vpsbenchmarks.com/compare/hetzner_vs_scaleway)
---
## Component 4: Unified account management (Cloudron)
### What Cloudron provides
Cloudron is a self-hosting platform that runs on your VPS and provides:
- **One-click app installation** from an app store (100+ apps)
- **Single Sign-On (SSO)** — users log in once, access all apps
- **Centralized user management** — LDAP-based directory, admin/user roles
- **Automatic SSL, DNS, backups, updates**
- **Access control** — restrict which users can access which apps
- [Cloudron](https://www.cloudron.io/)
- [Cloudron docs: user management](https://docs.cloudron.io/user-management/)
- Cloudron pricing: ~€15/month for the Cloudron license + your VPS cost
### Key Cloudron apps for inference.coop
| App | Purpose | In Cloudron store? |
|-----|---------|-------------------|
| **Open WebUI** | Chat frontend | ✅ |
| **Ollama** | Model serving | ✅ |
| **LibreChat** | Alternative chat frontend | ✅ |
| **Gitea** | Git hosting (for skills/agents) | ✅ |
| **Nextcloud** | File sharing, collaboration | ✅ |
| **Loomio** | Democratic decision-making / governance | ✅ |
| **Discourse** | Forum / community discussion | ✅ |
| **Matrix/Element** | Chat / communication | ✅ |
This means **the entire cooperative platform** — inference, chat, governance, communication, file sharing — can be deployed through Cloudron with unified SSO. Members log in once and access all services.
### Alternatives to Cloudron
| Platform | Open source? | SSO? | Notes |
|----------|------------|------|-------|
| **Coolify** | ✅ Yes (self-hostable) | Partial | Open-source Cloudron alternative. 280+ one-click services. No built-in SSO/LDAP. |
| **YunoHost** | ✅ Yes | ✅ Yes | Free, Debian-based. Simpler than Cloudron. Fewer apps. Already used on Nathan's server. |
| **Cosmo Cloud** | ✅ Yes | ✅ Yes | Newer, Cosmos Server based. |
### Recommendation
**YunoHost is worth serious consideration** since Nathan already runs it for git.sixletters.org. It provides SSO, user management, and app installation. However, Cloudron has more polished app support (Open WebUI and Ollama are confirmed in the store) and better documentation. The trade-off: Cloudron costs €15/month, YunoHost is free.
If running on YunoHost, Open WebUI and Ollama would need to be installed manually or via custom app packages. Check whether YunoHost's app catalog includes them.
- [Coolify](https://coolify.io/)
- [YunoHost](https://yunohost.org/)
- Cloudron alternatives comparison: [AlternativeTo (2026)](https://alternativeto.net/software/cloudron/)
---
## Component 5: Payment and membership (Open Collective)
### What Open Collective provides
Open Collective is a platform for transparent funding of open projects:
- **Recurring payments** — monthly/yearly tiers
- **Fiscal sponsorship** — no need to incorporate immediately; a fiscal host handles legal/banking
- **Transparent budget** — all income and expenses visible
- **Tier system** — different membership levels with different benefits
- **Expense submission** — members can submit expenses for reimbursement
- [Open Collective](https://opencollective.com/)
- [Open Collective: fiscal hosts FAQ](https://docs.opencollective.com/help/fiscal-hosts/fiscal-hosts)
### How it fits inference.coop
1. Create an Open Collective for inference.coop
2. Set up tiers: Free (limited), Member ($5-10/month), Supporter ($20+/month)
3. Connect to a fiscal host (e.g., Open Collective Foundation, or a cooperative-specific host)
4. Members pay through Open Collective → funds held transparently
5. Expenses (server costs, OpenRouter API costs) paid from the collective
### Gaps and additional needs
Open Collective handles **money in** (membership payments) but not:
- **Access provisioning** — automatically granting/denying API access based on payment status
- **Usage metering** — tracking token usage per member
- **Rate limiting** — enforcing per-tier limits
These would need a lightweight middleware layer between Open Collective's webhook/API and Cloudron's user management. This is the main piece of custom code needed for the MVP.
### Alternatives
| Platform | Recurring payments | Fiscal sponsorship | Membership management | Cooperative-friendly? |
|----------|-------------------|-------------------|----------------------|----------------------|
| **Open Collective** | ✅ | ✅ | Partial (tiers, not access control) | ✅ Designed for collective governance |
| **Patreon** | ✅ | ❌ | Partial | ❌ Extractive platform |
| **Stripe + custom** | ✅ | ❌ | Custom build | Neutral |
| **Memberstack** | ✅ | ❌ | ✅ Access control, member portals | ❌ SaaS, not cooperative |
| **Outseta** | ✅ | ❌ | ✅ Full member management | ❌ SaaS |
### Recommendation
**Open Collective for payments + fiscal sponsorship, custom middleware for access provisioning.** The middleware is a small webhook handler that:
1. Receives Open Collective webhooks when payments are made/missed
2. Enables/disables the user's Cloudron account
3. Optionally sets rate limits in Open WebUI based on tier
This is maybe 200-500 lines of Python — the only custom code needed for the MVP.
---
## Component 6: Governance (missing from original design goals)
A cooperative needs governance infrastructure. Cloudron has **Loomio** in its app store — an open-source platform for democratic decision-making used by cooperatives and community organizations worldwide.
### Recommendation
Install **Loomio via Cloudron** for member governance:
- Proposals and voting
- Discussion threads
- Working groups
- Transparent decision history
This gives members a space to decide on model selection, pricing, privacy policies, and platform direction — all within the same SSO ecosystem as the chat and API.
- [Loomio](https://loomio.org/)
- [Loomio on Cloudron](https://www.cloudron.io/store/index.html)
---
## Component 7: API access (missing from original design goals)
In addition to the chat frontend, members need direct API access to use models in their own code, agents, and integrations.
### How to provide it
Both Ollama and vLLM expose an **OpenAI-compatible API** (`/v1/chat/completions`). Members point their code at:
```
https://inference.coop/v1/chat/completions
```
with their API key (issued via Cloudron SSO or a simple key management layer).
### Key management
Open WebUI has built-in API key generation for users. Alternatively, a lightweight API gateway (e.g., LiteLLM proxy) can handle:
- Per-user API keys
- Rate limiting per tier
- Usage logging
- Model routing (lightweight → self-hosted, frontier → OpenRouter)
- [LiteLLM](https://github.com/BerriAI/litellm) — proxy that unifies 100+ LLM providers behind OpenAI API
---
## Architecture summary (MVP)
```
┌─────────────────────────────────────────────────┐
│ Member's browser │
│ Chat: https://chat.inference.coop (Open WebUI) │
│ API: https://api.inference.coop/v1/... │
│ Gov: https://gov.inference.coop (Loomio) │
│ Pay: https://opencollective.com/inference-coop │
└──────────────────────┬──────────────────────────┘
│ HTTPS + SSO
┌──────────────────────▼──────────────────────────┐
│ Cloudron (VPS) │
│ ┌─────────┐ ┌──────────┐ ┌─────────────────┐ │
│ │ SSO/LDAP│ │ Open WebUI│ │ Loomio │ │
│ └─────────┘ └────┬─────┘ └─────────────────┘ │
│ ┌────▼─────┐ │
│ │ Ollama │ (lightweight models) │
│ │ or vLLM │ │
│ └────┬─────┘ │
│ │ OpenAI-compatible API │
│ ┌────▼─────┐ │
│ │OpenRouter│ (frontier brokered) │
│ └──────────┘ │
│ ┌──────────────────────┐ │
│ │ Middleware (custom) │ │
│ │ OC webhook → Cloudron │ │
│ │ account enable/disable│ │
│ └──────────────────────┘ │
└──────────────────────────────────────────────────┘
Hosted on: Scaleway DC5 (renewable) or Hetzner
```
---
## Cost estimate (MVP, 5-10 user-testers)
| Component | Monthly cost | Notes |
|-----------|-------------|-------|
| VPS (Scaleway or Hetzner) | €15-30 | 4-8 vCPU, 8-16GB RAM, modest GPU or CPU-only |
| Cloudron license | €15 | If using Cloudron (free if YunoHost) |
| OpenRouter API (frontier) | €5-20 | Pay-as-you-go, depends on usage |
| Domain | ~€1 | inference.coop or similar |
| Open Collective | 0-5% | Platform fee depends on fiscal host |
| **Total** | **€36-66/month** | |
At 10 members paying €10/month = €100/month revenue → **surplus of €34-64/month** for reinvestment.
---
## What's missing / needs further design
1. **Legal structure** — Open Collective fiscal sponsorship for MVP; formal cooperative incorporation later
2. **Data policy** — what's logged, retained, shared. FERPA/GDPR considerations.
3. **Model governance** — how members decide which models to add/remove
4. **Sustainability metrics** — energy per query, CO₂ tracking (à la GreenPT)
5. **API key management** — whether to use Open WebUI's built-in keys or a dedicated gateway (LiteLLM)
6. **Migration path** — Ollama → vLLM when scale requires it
7. **Agent support** — whether to offer agentic capabilities (like Hermes Agent) beyond chat
---
## Connections
- [co/core](../../organizations/cocore.md) — most architecturally similar project (ATProto, mutual credit)
- [GreenPT](../../organizations/greenpt.md) — renewable energy AI hosting precedent
- [Public AI Switzerland](../../organizations/public-ai-switzerland.md) — consumer-facing AI cooperative model
- [Ollama](../../assessments/ollama-e2c.md) — inference engine + potential E2C candidate
- [OpenRouter](../../organizations/openrouter.md) — model brokering for frontier access
- [Campus AI Cooperative](../projects/campus-ai-cooperative.md) — larger-scale version of the same concept
+5 -5
View File
@@ -13,7 +13,7 @@ All tags in the wiki, grouped by dimension. Click through to see all pages with
- [multilateral-governance](tag-type-multilateral-governance.md) (1)
- [network](tag-type-network.md) (6)
- [public-ai](tag-type-public-ai.md) (2)
- [research-project](tag-type-research-project.md) (7)
- [research-project](tag-type-research-project.md) (8)
## Function
@@ -24,7 +24,7 @@ All tags in the wiki, grouped by dimension. Click through to see all pages with
- [encrypted-inference](tag-function-encrypted-inference.md) (1)
- [funding](tag-function-funding.md) (3)
- [handbook-chapter](tag-function-handbook-chapter.md) (1)
- [inference](tag-function-inference.md) (15)
- [inference](tag-function-inference.md) (16)
- [model-development](tag-function-model-development.md) (3)
- [n/a](tag-function-n-a.md) (6)
- [routing/brokering](tag-function-routing-brokering.md) (1)
@@ -35,7 +35,7 @@ All tags in the wiki, grouped by dimension. Click through to see all pages with
- [africa](tag-region-africa.md) (2)
- [asia](tag-region-asia.md) (11)
- [europe](tag-region-europe.md) (16)
- [global](tag-region-global.md) (26)
- [global](tag-region-global.md) (27)
- [global-south](tag-region-global-south.md) (1)
- [latin-america](tag-region-latin-america.md) (1)
- [middle-east](tag-region-middle-east.md) (5)
@@ -46,13 +46,13 @@ All tags in the wiki, grouped by dimension. Click through to see all pages with
- [early-stage](tag-maturity-early-stage.md) (7)
- [live](tag-maturity-live.md) (31)
- [n/a](tag-maturity-n-a.md) (28)
- [planned](tag-maturity-planned.md) (3)
- [planned](tag-maturity-planned.md) (4)
- [prototype](tag-maturity-prototype.md) (2)
## Ownership
- [consortium](tag-ownership-consortium.md) (3)
- [cooperative](tag-ownership-cooperative.md) (23)
- [cooperative](tag-ownership-cooperative.md) (24)
- [n/a](tag-ownership-n-a.md) (30)
- [nonprofit](tag-ownership-nonprofit.md) (7)
- [state-led](tag-ownership-state-led.md) (3)
+1
View File
@@ -11,6 +11,7 @@ Pages tagged `function: inference`:
- [Desjardins Group](../organizations/desjardins.md) — North America's largest federation of credit unions and the largest cooperative financial institution in Canada.
- [GAD eG](../organizations/gad-eg.md) — A German cooperative (Genossenschaft) that owns and operates data centers.
- [GreenPT](../organizations/greenpt.md) — A sustainable AI platform from the Netherlands offering AI access with 100% renewable energy infrastructure.
- [inference.coop — Minimum Viable Cooperative Inference Utility](../solidarity-economies/projects/inference-coop.md) — 1. **Leverage existing open-source software** for the full stack — no custom infrastructure to build
- [Ollama — E2C Assessment](../solidarity-economies/assessments/ollama-e2c.md) — 1. Community dependence is structural — 8.9M developers, 67K integrations, ecosystem value exceeds company value
- [Public AI Switzerland](../organizations/public-ai-switzerland.md) — A customer-owned cooperative that distributes access to the Apertus large language model to Swiss residents.
- [Rabobank](../organizations/rabobank.md) — Dutch cooperative bank founded as agricultural credit unions (Raiffeisen model).
+1
View File
@@ -5,3 +5,4 @@ Pages tagged `maturity: planned`:
- [AI Imaginaries — Special Issue](../cross-cultural-ai/projects/ai-imaginaries.md) — Special issue on AI imaginaries — visions, positions, conflicts.
- [Campus AI Cooperative](../solidarity-economies/projects/campus-ai-cooperative.md) — A member-owned cooperative providing AI inference to higher education institutions as an alternative to corporate campus AI deals (OpenAI, Anthropic).
- [CosyAI](../organizations/cosyai.md) — A coalition of cooperatives, SMEs, and researchers building cooperatively-owned AI alternatives.
- [inference.coop — Minimum Viable Cooperative Inference Utility](../solidarity-economies/projects/inference-coop.md) — 1. **Leverage existing open-source software** for the full stack — no custom infrastructure to build
+1
View File
@@ -14,6 +14,7 @@ Pages tagged `ownership: cooperative`:
- [Desjardins Group](../organizations/desjardins.md) — North America's largest federation of credit unions and the largest cooperative financial institution in Canada.
- [GAD eG](../organizations/gad-eg.md) — A German cooperative (Genossenschaft) that owns and operates data centers.
- [icoop.ai](../organizations/icoop-ai.md) — The world's largest cooperative intelligence platform — an AI-driven platform analyzing 339,000+ cooperatives across 136 countries.
- [inference.coop — Minimum Viable Cooperative Inference Utility](../solidarity-economies/projects/inference-coop.md) — 1. **Leverage existing open-source software** for the full stack — no custom infrastructure to build
- [Land O'Lakes](../organizations/land-o-lakes.md) — One of the largest farmer-owned cooperatives in the US.
- [MIDATA](../organizations/midata.md) — A Swiss health data cooperative where members store their health data encrypted and share it with researchers on a consent-based basis.
- [Mondragon Corporation — Precedent for AI Cooperatives](../solidarity-economies/assessments/mondragon-precedent.md) — The Mondragon Corporation is the **world's largest worker cooperative** — a federation of worker cooperatives in the Basque region of Spain, founded in 1956.
+1
View File
@@ -14,6 +14,7 @@ Pages tagged `region: global`:
- [Exit to Community](../solidarity-economies/concepts/exit-to-community.md) — Exit to Community (E2C) is a strategy for startups to mature toward community ownership rather than the standard exits of acquisition or IPO.
- [Humanity AI](../organizations/humanity-ai.md) — A $500M pooled philanthropic fund from major foundations supporting public-interest AI infrastructure.
- [icoop.ai](../organizations/icoop-ai.md) — The world's largest cooperative intelligence platform — an AI-driven platform analyzing 339,000+ cooperatives across 136 countries.
- [inference.coop — Minimum Viable Cooperative Inference Utility](../solidarity-economies/projects/inference-coop.md) — 1. **Leverage existing open-source software** for the full stack — no custom infrastructure to build
- [Infernet Protocol](../organizations/infernet-protocol.md) — An open-source peer-to-peer protocol for distributed GPU inference tasks.
- [Key Works — Cross-Cultural AI](../cross-cultural-ai/key-works.md) — Essential publications and resources for understanding how different societies and philosophical traditions engage with AI.
- [Key Works — Solidarity Economy + AI](../solidarity-economies/key-works.md) — Essential publications for understanding how cooperative, mutual aid, and democratic ownership models apply to AI infrastructure, governance, and labor.
+1
View File
@@ -8,4 +8,5 @@ Pages tagged `type: research-project`:
- [China AI Research](../cross-cultural-ai/china/README.md) — China's AI ecosystem is the world's second largest and arguably the most dynamic.
- [Chinese Science Fiction on AI](../cross-cultural-ai/china/sci-fi.md) — Chinese science fiction offers a distinctive window into how Chinese society imagines AI futures.
- [Cross-Cultural AI](../cross-cultural-ai/README.md) — Research on how different societies, philosophical traditions, and cultural contexts engage with AI.
- [inference.coop — Minimum Viable Cooperative Inference Utility](../solidarity-economies/projects/inference-coop.md) — 1. **Leverage existing open-source software** for the full stack — no custom infrastructure to build
- [Solidarity Economies for AI](../solidarity-economies/README.md) — Research on how cooperative, mutual aid, and democratic ownership models apply to AI infrastructure, governance, and labor.