Views
No views yet
Hardware: Request 1× L4 (l4x1) — required for CUDA llama-cpp + 27B GGUF.
Sleep: 15 minutes idle (900s) — set via Space settings to control billing.
Not ZeroGPU — this Space runs your model locally on L4.
app.py imports llama_bootstrap first (before Gradio). It auto-detects GPU:DAVIDAU_N_GPU_LAYERS=-1DAVIDAU_N_GPU_LAYERS=0LLAMA_CPP_FORCE_CPU=1USE_MINIMAL_CHAT=1 → blank-slate chat handler + /predict API.1from gradio_client import Client
2client = Client("kirikir13/mr-SmithDavinci_Full-Harness_v1")
3result = client.predict(prompt, system_prompt, api_name="/predict")DavidAU/Qwen3.6-27B-Heretic-Uncensored-FINETUNE-NEO-CODE-Di-IMatrix-MAX-GGUF| Zone | Purpose | User Access |
|---|---|---|
| Documents | PDF, DOCX, TXT uploads | Upload, list, view |
| Skills | Claude-format skill folders (.md + .json + .yaml) | Upload, toggle on/off |
| Conversations | Chat threads | Chat, history, search |
| Patterns | AI auto-extracted insights from docs/chat | Read-only |
| Scratchpad | Raw AI processing logs | Peek, cleanup old entries |
SPACE_ID): defaults to llama_cpp — point it at a local llama.cpp server running DavidAU. Falls back to hf_inference or openrouter if configured.SPACE_ID present): defaults to openrouter if OPENROUTER_API_KEY is set, otherwise hf_inference. The HF Inference API endpoint is often DNS-blocked from inside a Space, so OpenRouter is recommended.1# 1. Install dependencies
2pip install -r requirements.txt
3
4# 2. Make sure MongoDB is running on localhost:27017
5# (or set MONGODB_URI in .env)
6
7# 3. Copy and edit environment
8cp .env.example .env
9# Add your HF_TOKEN and/or OPENROUTER_API_KEY
10
11# 4. Run
12python app.py1# Download the GGUF once
2huggingface-cli download DavidAU/Qwen3.6-27B-Heretic-Uncensored-FINETUNE-NEO-CODE-Di-IMatrix-MAX-GGUF \
3 Qwen3.6-27B-NEO-CODE-HERE-2T-OT-HIGH-Q4_K_M.gguf --local-dir ./models
4
5# Start llama.cpp server (adjust -ngl for your GPU; 0 = CPU)
6llama-server -m ./models/Qwen3.6-27B-NEO-CODE-HERE-2T-OT-HIGH-Q4_K_M.gguf -ngl -1 --port 8080http://localhost:8080.1# API keys
2HF_TOKEN=hf_...
3OPENROUTER_API_KEY=sk-or-...
4
5# MongoDB
6MONGODB_URI=mongodb://localhost:27017
7MONGODB_DB=smith_davinci
8
9# Chairman model (non-negotiable)
10CHAIRMAN_MODEL=DavidAU/Qwen3.6-27B-Heretic-Uncensored-FINETUNE-NEO-CODE-Di-IMatrix-MAX-GGUF
11
12# Local GGUF / llama.cpp
13DAVIDAU_BACKEND=llama_cpp
14DAVIDAU_REPO_ID=DavidAU/Qwen3.6-27B-Heretic-Uncensored-FINETUNE-NEO-CODE-Di-IMatrix-MAX-GGUF
15DAVIDAU_FILENAME=Qwen3.6-27B-NEO-CODE-HERE-2T-OT-HIGH-Q4_K_M.gguf
16DAVIDAU_N_GPU_LAYERS=-1
17
18# Override auto-detection (optional)
19DEFAULT_BACKEND=llama_cpp1├── app.py # Entry point with env auto-detection
2├── requirements.txt # Python dependencies
3├── .env.example # Environment template
4├── README.md # This file
5├── smith_davinci/ # Core engine
6│ ├── __init__.py
7│ ├── config.py # Settings
8│ ├── registry.py # Plugin registry
9│ ├── engine.py # Main orchestration
10│ ├── mongo_memory.py # MongoDB 5-zone memory
11│ ├── documents.py # Document ingestion
12│ ├── skills.py # Skill system
13│ ├── agents.py # Multi-agent dispatcher
14│ ├── council.py # CouncilSmith deliberation
15│ └── backends/ # LLM backend plugins
16│ ├── base.py
17│ ├── space_direct.py
18│ ├── hf_inference.py
19│ ├── hf_local_gguf.py
20│ ├── llama_cpp.py
21│ └── openrouter.py
22├── ui/ # Gradio interface
23│ └── app.py
24└── COUNCILSMITH_BLUEPRINT.md # Distributed swarm blueprintHF_TOKEN or OPENROUTER_API_KEYMONGODB_URI if using an external MongoDB (MongoDB Atlas recommended for Spaces)#, @, :, or /, URL-encode those characters in MONGODB_URI. For example, ## becomes %23%23:mongodb+srv://user:pass%23%23@cluster.mongodb.net/db?retryWrites=true&w=majority0.0.0.0/0 (allow from anywhere).SSL handshake failed: TLSV1_ALERT_INTERNAL_ERROR.MONGODB_TLS_ALLOW_INVALID_CERTIFICATES=true — skip certificate validation.MONGODB_TLS_ALLOW_INVALID_HOSTNAMES=true — skip hostname verification.MONGODB_TLS_INSECURE=true — disable all TLS checks (least secure, debugging only).audioop-lts backport is included for Gradio/pydub compatibility.app.py patches gradio_client.utils.get_type() to fix the boolean-schema crash in gradio-client==1.4.0.