⚙️ Operations Status
Live systems, scheduled jobs, methods, and infrastructure — updated 2026-07-11
Live Services
~$24
Monthly Cost (Tier 2)
6hr
BioMistral Daily Window
2
Models (BioMistral + OpenBioLLM)
Daily Schedule (All Times ET)
| Time | Event | Method | Duration |
2:45 AM | BioMistral starts | EventBridge → Lambda → ECS RunTask (Fargate 4vCPU/8GB) | ~30s startup |
3:00 AM | Nightly pipeline runs | ECS nightly container → scoring, docking, governance, learning | ~60-90 min |
3:00 AM | BioMistral consulted | HTTP POST to biomistral.cortex.internal:8080 with RAG evidence | ~30-60s per query |
~4:30 AM | Nightly completes | Task auto-stops BioMistral (in nightly_docking.py) | — |
8:45 AM | BioMistral force-stop | EventBridge → Lambda (stop_lambda.py) — safety net | — |
Weekly Schedule (Sundays)
| Time (ET) | Event | Method | Output |
4:00 AM | Training data refresh | EventBridge → Fargate task → training_data_refresh.py | ~10K examples → S3 |
6:00 AM | QLoRA retrain | EventBridge → GPU Batch (g4dn.xlarge) → qlora_train.py | Adapter → S3 |
Models
| Model | Size | Quant | S3 Path | Status |
| BioMistral-7B | 4.4 GB | Q4_K_M |
edice-brain-biomistral-gguf/biomistral-7b-q4_K_M.gguf |
LIVE |
| OpenBioLLM-8B | 4.6 GB | Q4_K_M |
edice-brain-openbio-gguf/openbiollm-llama3-8b-q4_K_M.gguf |
READY |
Methods: Inference
BioMistral CPU Inference (biomistral_server_cpu.py)
- Runtime: llama-cpp-python (llama.cpp bindings)
- Quantization: GGUF Q4_K_M — 4-bit with K-quant mixed precision
- Hardware: Fargate 4 vCPU / 8 GB RAM (no GPU)
- Context: 2048 tokens
- Throughput: ~1.8 tokens/sec (CPU, 4 threads)
- Endpoint:
POST /v1/generate — prompt, max_tokens, temperature, stop
- Scale-to-zero: starts on demand, stops after use
- DNS:
biomistral.cortex.internal:8080 (Cloud Map)
CortexQ Scientific Reasoning (cortexq_master.py)
- Flow: CortexQ builds context → retrieves evidence (RAG) → constructs prompt → queries BioMistral → evaluates response → decides
- RAG sources: PubMed (NCBI E-utilities), ClinicalTrials.gov (V2 API), internal DDB (heroes/evidence), TCGA/GDC (S3), pathways (S3)
- Retrieval: parallel ThreadPoolExecutor, 8s timeout per source
- Authority: BioMistral authority is dynamic (DDB), starts at 0, earned through accuracy tracking
- Decision: CortexQ decides (reject/repair/re-rank/escalate/proceed). BioMistral informs, never overrides.
Methods: Training
QLoRA Fine-Tuning (qlora_train.py)
- Base model: BioMistral-7B (HuggingFace, downloaded at runtime)
- Quantization: NF4 (4-bit normal float) via bitsandbytes
- LoRA config: rank=32, alpha=64, dropout=0.05
- Target modules: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
- Optimizer: paged_adamw_32bit
- Batch: 4 × 4 gradient accumulation = effective 16
- Epochs: 3
- Max seq length: 2048 tokens
- Hardware: g4dn.xlarge (1× T4 16GB, 4 vCPU, 16GB RAM)
- Output: adapter weights →
s3://edice-brain-models-v2/adapters/{name}/{timestamp}/
- Registry: SSM
/edice/adapters/{name}/latest updated on completion
Training Data Generation (5 pipelines)
| Pipeline | Method | Output |
| Internal Lake | S3 scan (966 genes) → cBioPortal mutations + DepMap scores + hero records → instruction pairs | ~5K examples |
| ChEMBL | REST API (ebi.ac.uk) → drug-target activities (IC50/Ki/Kd) for 41 targets → SAR assessment pairs | ~500 examples |
| DepMap | S3 lake (pre-indexed) → CRISPR dependency scores for 54 genes → essentiality assessment pairs | ~200 examples |
| CRC MSS Corpus | PubMed E-utilities (10 topics × 50 articles) + ClinicalTrials.gov V2 API → structured output pairs | ~1K examples |
| CortexQ Alignment | DDB heroes scan (all grades ≥C) × 7 task types → claim/evidence/disproof JSON format | ~3.5K examples |
Methods: Disease Adapters
Adapter Architecture
- Type: Separate QLoRA adapter per cancer (loaded at inference time)
- Format: Chat template — system prompt + user evidence + assistant structured JSON
- Adapter size: ~50MB each (rank 32 on 7B model)
- Switching: load/unload per query based on cancer_type field
| Adapter | Topics | Key Mechanisms | Status |
| CRC MSS | 10 |
Immune exclusion, myeloid suppression, TGF-β/WNT, KRAS/MAPK, checkpoint resistance |
DATA READY |
| Prostate | 7 |
AR signaling, castration resistance, lineage plasticity, DNA repair, PI3K/PTEN |
DATA READY |
| Lung | 7 |
EGFR/ALK/KRAS TKI resistance, histologic transformation, MET bypass, co-mutations |
DATA READY |
| Pancreatic | 7 |
Stroma barrier, KRAS dependency, immune desert, metabolic adaptation, drug delivery |
DATA READY |
Methods: NPEAD V2 Scoring
npead_v2_score() — Unified Scoring Entry Point
- Input: gene, hero dict, disease_profile, model_output, evidence_records, all_heroes
- Output: composite score (0-1) + 8 dimension breakdowns
- Composite formula: disease_context×0.3 + base×0.7 − contradictions×0.3 + resistance×0.2 + actionability×0.1, multiplied by freshness, plus evidence_source×0.1
| # | Dimension | Method |
| 1 | Disease Context | Weighted dimension scoring per cancer profile (7 dims × profile weights) |
| 2 | Resistance Mechanism | Keyword matching against 6 resistance types (primary/acquired/immune/bypass/lineage/metabolic) |
| 3 | Evidence Source | Fixed weighting: wet-lab(1.0) > cohort(0.95) > trial(0.80) > paper(0.50) > model(0.30) |
| 4 | Confidence Separation | 6 independent confidence fields: LM, evidence, statistical, biological, translational, disproof |
| 5 | Cross-Cancer Transfer | Count gene appearances across cancer types in heroes table |
| 6 | Retrieval Freshness | Linear decay: 1.0 at day 0 → 0.0 at day 90 from last update |
| 7 | Clinical Actionability | 6 components: patient_selection, biomarker, combination, trial, target, diagnostic |
| 8 | Contradiction Handling | Penalty accumulation: overexpressed bystander(+0.3), grade vs MD(+0.2), docking vs binding(+0.2) |
Methods: Retrieval Layer (RAG)
retrieve_evidence() → build_evidence_context()
- Execution: parallel (ThreadPoolExecutor, 5 workers)
- Timeout: 8s per source, 10s total before fallback
- Priority order: internal DDB → clinical trials → PubMed → TCGA → pathways
- Context budget: max 2000 tokens formatted for BioMistral prompt
- Graceful degradation: if any source fails, others still return
| Source | API | Rate Limit |
| PubMed | NCBI E-utilities (esearch + esummary) | 3 req/s (10 with API key) |
| ClinicalTrials.gov | V2 REST API | No published limit |
| Internal Heroes | DynamoDB Query (pk = gene) | On-demand capacity |
| TCGA/GDC | Pre-indexed JSON in S3 | N/A (local read) |
| Pathways | Pre-indexed JSON in S3 (KEGG/Reactome) | N/A (local read) |
CIFOG Graph — 51K+ Edges (Production Scale)
| Layer | Edges | Source | Enables |
| Molecular (ChEMBL) | ~46,500 | IC50/Ki/Kd pChEMBL≥5 | Compound→target, SAR, selectivity |
| Pathway (curated) | 211 | Hand-built signaling | Directional: EGFR→SOS1→KRAS→BRAF→MEK→ERK + feedback |
| Pathway (KEGG) | 2,552 | 14 cancer pathways | Gene→pathway membership |
| Knowledge (heroes) | 1,530 | Internal heroes | Target→cancer/pathway/resistance |
| TOTAL | ~51,000 | | |
14 Curated Signaling Pathways (211 directional edges)
RAS/MAPK (27) · PI3K/AKT/mTOR (20) · WNT/β-catenin (16) · TGF-β/SMAD (14) · cGAS/STING (14) · PD-1/Checkpoint (11) · Cell Cycle (18) · DNA Damage (14) · Apoptosis (18) · Myeloid Suppression (12) · AR Signaling (11) · Hippo/YAP (12) · Notch (9) · JAK/STAT (15)
Infrastructure
| Resource | Type | Config | Purpose |
| ECS Cluster | mindnetq | Fargate | BioMistral + OpenBioLLM inference |
| Batch Queue | cortex-gpu-queue | g4dn.xlarge (spot) | QLoRA training, docking, MD |
| Task Def | biomistral-inference-cpu:1 | 4 vCPU / 8 GB | BioMistral GGUF serving |
| Task Def | openbio-inference-cpu:1 | 4 vCPU / 16 GB | OpenBioLLM GGUF serving |
| Job Def | cortex-qlora-train:1 | 4 vCPU / 30 GB / 1 GPU | QLoRA fine-tuning |
| Lambda | start-biomistral | 128 MB / 30s | Starts BioMistral Fargate task |
| Lambda | stop-biomistral | 128 MB / 30s | Stops BioMistral tasks |
| Cloud Map | cortex.internal | Private DNS | Service discovery (biomistral.cortex.internal) |
| S3 | edice-brain-models-v2 | Standard | Models, adapters, training data |
| S3 | edicer-raw-source-lake | Standard | 966 genes, genomics, drugs, pathways |
| ECR | biomistral-inference-cpu | — | Inference container (llama.cpp) |
| ECR | qlora-training | — | Training container (peft + trl + bitsandbytes) |
Key Files
| Category | File | Purpose |
| Inference | biomistral-server/biomistral_server_cpu.py | GGUF inference server (llama.cpp) |
cortexq_master.py | Master decision engine + BioMistral consultation |
retrieval_layer.py | RAG — PubMed/trials/DDB/TCGA retrieval |
| Training | biomistral-server/qlora_train.py | QLoRA entry point (GPU Batch) |
alignment_training_data.py | Heroes → structured output training data |
training_data_refresh.py | Weekly orchestrator (all 5 pipelines) |
| Adapters | crc_mss_adapter_data.py | CRC MSS corpus collector |
cancer_adapter_corpus.py | Prostate/lung/pancreatic collectors |
npead_predictive_engine.py | NPEAD V2 + disease profiles + 8 dimensions |
| Data | lake_to_training.py | Internal lake → training examples |
chembl_training_data.py | ChEMBL API → SAR training data |
depmap_training_data.py | DepMap CRISPR → essentiality training data |
Benchmark Results (BioMistral-7B)
| Question | Category | Time | Tokens/s | Result |
| TBK1 target assessment in MSS CRC | Target Assessment | 72.9s | 1.5 | ✅ Correct |
| KRAS G12D + anti-PD1 + MEK resistance | Resistance Reasoning | 31.8s | 1.5 | ✅ PI3K/AKT bypass identified |
| MYC modality in pancreatic cancer | Modality Selection | 30.3s | 1.7 | ✅ PROTAC recommended |
| CDK4/6i conflicting studies synthesis | Evidence Synthesis | 92.7s | 2.4 | ✅ Sample size limitation noted |
| MEK inhibitor feedback loops in KRAS CRC | Pathway Reasoning | 31.7s | 1.8 | ✅ Feedback mechanisms described |
Average: 51.9s response time, 1.8 tok/s, 5/5 questions answered. CPU inference on Fargate 4vCPU.
CortexQ is the master. NPEAD is the lead engine. Models are subordinate tools. Nothing overrides CortexQ.
Last updated: 2026-07-11 16:50 ET