AI Research · 2025

Fundamental Research Labs logo

Fundamental Research Labs

ML infrastructure for the frontier.

Fundamental Research Labs is the a16z and Prosus-backed AI research company behind Shortcut.ai, with a team out of MIT EECS, Stanford NLP Group, Google X, and Citadel. We built ML infrastructure for their model research pipeline: a deployment path that takes a fine-tuned checkpoint to a live inference endpoint, deploy-time provider selection between Modal and Baseten by estimated parameter count, an evaluation workspace for researchers, and a containerized deployment of EleutherAI's lm-evaluation-harness driven by Airflow and a CLI. One engineer embedded in a four-engineer platform team, Aug to Sep 2025. The platform already existed when we arrived — a colleague had built the inference half, the Modal proxy, the model routing layer, and the Anthropic-to-OpenAI format translation. We built the lifecycle half on top of it. The standalone evaluation service was the piece built from zero.

The results

  • 10BRouting ThresholdEstimated parameter count picks Modal + vLLM or Baseten + Truss
  • 3Surfaces OwnedEvaluation, datasets, and large-model deployment
  • 46%Platform Code21,108 of 45,871 lines at main HEAD, measured by git blame
  • $33MSeries ARaised by the client from Andreessen Horowitz and Prosus

Overview

Challenge

Fundamental Research Labs' team spans MIT EECS, Stanford NLP Group, Google X, and Citadel. Beyond Shortcut.ai, they're advancing frontier agent research: their Fairies platform powers autonomous AI agents (originally built for Minecraft simulations under their earlier name, LyfeGame), and Project Sid demonstrated thousands of AI agents developing specialized roles, democratic governance, and cultural propagation. Their model research pipeline needed infrastructure that didn't exist off the shelf: a unified platform to deploy model checkpoints, send them to the right GPU infrastructure based on size, expose them via standard APIs, and evaluate them against academic benchmarks and real-world software engineering tasks. The cycle of train, deploy, evaluate, iterate needed to be fast, reliable, and repeatable with full environment isolation.

Solution

We owned three surfaces of the lab's internal platform: evaluation, datasets, and large-model deployment. The deployment path handles the model lifecycle from checkpoint to live inference endpoint. It estimates parameter count from the checkpoint's safetensors index metadata and torch_dtype rather than guessing from filenames, then selects the deployment provider at deploy time: models under roughly 10B parameters go to Modal with vLLM for fast cold starts, larger models go to Baseten with Truss for multi-GPU inference. The platform's OpenAI-compatible endpoints — a colleague's surface — are pointed at the right model by an endpoint-resolution layer we built: a four-tier lookup behind a write-through edge cache. A custom evaluation workspace with an embedded Monaco Editor lets researchers author evaluators in Python against reward_kit templates, upload datasets to Modal Volumes, and track job results. Alongside it we containerized and operationalized EleutherAI's lm-evaluation-harness: packaged as a Modal service, wrapped in a CLI for terminal-first researchers, and driven by Airflow DAGs, including the DAG that orchestrates the lab's Modal-based SWE-Gym runner and makes it schedulable, observable, and cancellable.

Outcome

Researchers got a single workflow: pick a checkpoint, deploy it in one click, test it in the inference playground, then run benchmarks from the CLI or an Airflow DAG. Size detection and deploy-time provider selection meant nobody had to know whether their model belonged on Modal or Baseten. A live progress stream and stuck-deploy detection turned deployment from a black box into something observable. Environment isolation separated dev experiments from production endpoints. By mid-September the inference platform was live and being used by another team: a separate group inside the lab had pointed its agent configurations at the platform's inference endpoints. The evaluation execution path was still stubbed when the contract ended.

The Context

Building tools for the toolmakers

Fundamental Research Labs isn't a typical software company. They're an a16z and Prosus-backed AI research lab whose team comes from MIT EECS, Stanford NLP Group, Google X, and Citadel. Their flagship product, Shortcut.ai, is an AI-powered analyst. Their Fairies platform powers autonomous AI agents, originally built for Minecraft simulations under their earlier name LyfeGame. Their research program, Project Sid, demonstrated thousands of AI agents developing specialized roles, democratic governance systems, and cultural propagation.

The work they do requires a constant cycle of training model checkpoints, deploying them for inference, testing quality, and evaluating performance against standardized benchmarks. That cycle needs to be fast, reliable, and repeatable. Manual deployment means wasted researcher time. Inconsistent evaluation means unreliable results. No environment isolation means one experiment can break another.

They needed infrastructure purpose-built for ML research workflows: a platform that understands model checkpoints, GPU requirements, inference APIs, and evaluation pipelines as first-class concepts. Not a generic dashboard bolted onto a deployment script. A system where a researcher can go from checkpoint to benchmark results without context-switching between different tools.

That's the half we built, working inside their engineering team.

The Engineering

Model deployment is harder than it looks

Deploying an AI model for inference sounds straightforward until you account for the variables. A 7B parameter model needs different infrastructure than a 70B parameter model. Some checkpoints live on HuggingFace, others on a cloud volume. GPU selection depends on model size and throughput requirements. Memory utilization has to be pushed high enough to justify the GPU without crashing the server.

The platform resolves the provider question at deploy time, and on size alone. It estimates parameter count from the checkpoint's safetensors index metadata and torch_dtype instead of guessing from filenames, then picks the path: under roughly 10B parameters goes to Modal with vLLM, where cold starts are fast and idle deployments scale to zero; anything larger goes to Baseten with Truss for multi-GPU inference. GPU tier is configurable per deployment with sensible defaults. Deploys became observable too, with a Server-Sent Events stream reporting progress live and a deployment that stalls past 25 minutes marked failed rather than left hanging.

Every deployment comes up behind an OpenAI-compatible endpoint, so any tool built for GPT works against it. That surface was a colleague's; the layer that points it at the right model was ours. Resolving a model name to its live URL runs through a four-tier lookup ordered by cost, in front of an in-process edge cache with write-through invalidation on deploy and stale-on-error fallback. The most consequential line in that layer is a refusal: when Modal's output doesn't yield a real endpoint URL, the deploy fails loudly instead of constructing a plausible-looking one and handing researchers an address that quietly points nowhere.

Evaluation was the other half of the mandate. We containerized and operationalized EleutherAI's lm-evaluation-harness, the open-source standard rather than something we rebuilt, packaging it as a Modal service and putting a CLI and Airflow DAGs in front of it. Exactly one benchmark is wired: HellaSwag, as the reference path. We also built the task-registration and model-routing scaffolding for the Berkeley Function Call Leaderboard inside the harness fork, with dataset wiring still in progress when the engagement closed.

SWE-Gym evaluates models against real GitHub issues, each task isolated in its own Docker container. The lab's Modal runner for it was invoked by hand from a terminal. We wrote the Airflow DAG that orchestrates it: a concurrency parameter with guardrails at either end, a cancel branch that finds and stops running Modal apps, and runner output streamed line by line into Airflow logs. A benchmark run went from something an engineer babysat in a shell to something the platform could schedule, watch, and kill.

A professional CLI wraps the pipeline for terminal-first researchers. Run evaluations, list available tasks, test configurations, and manage settings from the command line. It supports local HuggingFace models, remote OpenAI-compatible endpoints, quantization options, automatic device detection, and configurable batch sizes.

The transformation

What we built

  • Deploy-Time Provider SelectionSelect a checkpoint from HuggingFace or cloud storage and deploy with one click. The platform estimates parameter count from safetensors index metadata and torch_dtype, then selects the provider by that estimate alone: Modal with vLLM under roughly 10B parameters, Baseten with Truss above it for multi-GPU inference. It is a threshold applied once at deploy time, not a live router. Configurable GPU tiers with auto-scaling to zero on idle and instant wake on request.
  • Endpoint Resolution & Edge CacheThe layer that maps a model name to its live inference URL: a four-tier lookup ordered by cost, in front of an in-process edge cache with write-through invalidation on deploy, a seven-day TTL as a backstop, and stale-on-error fallback so a cache-backend outage cannot break routing. Plus a hard refusal to ever hand back a constructed URL when the deploy output doesn't yield a real one.
  • Custom Evaluation WorkspaceWrite evaluator code in an embedded Monaco Editor against reward_kit templates for single-metric and multi-metric rollup scoring. Upload datasets in JSON/JSONL to Modal Volumes with syntax highlighting and pagination. Track evaluation jobs through their lifecycle and export results as CSV or JSON.
  • Containerized Evaluation HarnessEleutherAI's lm-evaluation-harness containerized as a Modal service and operationalized behind a CLI and Airflow DAGs. Exactly one benchmark is wired: HellaSwag, as the reference path. Plus task-registration and model-routing scaffolding for the Berkeley Function Call Leaderboard inside the harness fork, with dataset wiring still in progress when the engagement closed.
  • SWE-Gym OrchestrationAn Airflow DAG that drives the lab's Modal SWE-Gym runner against real GitHub issues, each task isolated in its own Docker container. Concurrency exposed as a guarded parameter, runner output streamed line by line into Airflow logs, Modal app IDs parsed out of that stream, and a cancel branch that finds and stops in-flight runs.
  • Professional CLIA terminal-first interface for researchers who prefer the command line. Run evaluations, list available tasks and models, test configurations, and manage settings. Supports local HuggingFace models, OpenAI-compatible API endpoints, quantization options, automatic device detection (CUDA, CPU, MPS), and configurable batch sizes.

Architecture

The new foundation

Two interconnected systems: a deployment platform and an evaluation service. The deployment layer selects an inference provider at deploy time from the parameter count it estimates out of checkpoint metadata. A four-tier endpoint-resolution path behind an edge cache maps model names to live inference URLs. The evaluation layer packages EleutherAI's lm-evaluation-harness as a containerized Modal service and drives it through Airflow DAGs and a CLI. Supabase provides the data layer with environment isolation. The pipeline supports a researcher going from checkpoint to benchmark results in a single workflow.

  • Next.js DashboardReact, TypeScript, Radix UI, Monaco EditorResearcher workspace for deployment, evaluation, and inference
  • Modal + vLLMFastAPI proxy, auto-scalingSmaller model deployment with fast cold starts
  • Baseten + TrussFastAPI proxy, multi-GPULarger model deployment with multi-GPU inference
  • Endpoint ResolutionFour-tier lookup, edge cache, Modal Dict KVModel names to live inference URLs with write-through invalidation
  • Evaluation HarnessEleutherAI lm-eval, containerized on ModalAcademic benchmark execution; HellaSwag is the one wired benchmark
  • Apache AirflowDAGs, LocalExecutor, PostgreSQLOrchestration for local, API, and SWE-Gym evaluations
  • Modal + SWE-GymDocker isolation per taskSWE-Gym runs scheduled, streamed, and cancelled from Airflow
  • Supabase PostgreSQLAuth, database, env isolationModel registry, deployments, evaluations, and datasets
  • Cloud StorageCheckpoint and dataset hostingModel checkpoint and evaluation dataset storage

Technology

The modern toolkit

  • FrontendNext.js
  • UI LibraryReact
  • LanguageTypeScript
  • StylingTailwind CSS
  • BackendPython
  • DatabasePostgreSQL
  • ContainersDocker
  • Model RegistryHugging Face
  • InferencevLLM
  • ComputeModal
  • DeploymentBaseten

The result

See what emerged

Researcher Dashboard

A unified workspace for the model research pipeline. Model management, deployment tracking, evaluation results, dataset storage, and inference testing. Environment isolation separates dev, preview, and production.

  • Dashboard HomeModel overview with deployment status, recent evaluations, and quick actions
  • Model ManagementBrowse and manage model checkpoints with parameter count estimated from checkpoint metadata
  • API ReferenceAround 21 sections of endpoint documentation so downstream teams could integrate without reading source
  • Environment IsolationSeparate dev, preview, and production environments with independent deployments and storage paths

Model Deployment

One-click deployment with provider selection at deploy time. Select a checkpoint, configure GPU and scaling, and the platform handles parameter estimation, provider selection, endpoint registration, and progress reporting.

  • Checkpoint SelectionBrowse checkpoints with parameter count estimated from safetensors index metadata and torch_dtype
  • Deployment ConfigurationGPU tier selection, memory settings, concurrency limits, and scaling configuration
  • Deployment ProgressLive Server-Sent Events tracking from provisioning through active inference readiness, with stuck-deploy detection
  • Endpoint ManagementActive deployments with OpenAI-compatible URLs, health status, and auto-scaling config

Evaluation Workspace

Write custom evaluators with Monaco Editor, upload datasets, run evaluation jobs, and analyze results. Pre-built reward_kit templates for single-metric and multi-metric rollup scoring.

  • Evaluator EditorMonaco-powered code editor for writing custom evaluation logic in Python
  • Evaluation TemplatesPre-built reward_kit templates for single-metric and multi-metric rollup patterns
  • Dataset ManagementUpload JSON/JSONL datasets to Modal Volumes with syntax highlighting and pagination
  • Job TrackingMonitor evaluation runs with status tracking and CSV/JSON export
  • Results AnalysisThe results view for comparing scores across models and tasks. The execution path behind it was still a simulator when the engagement closed, so the scores shown are placeholder values, not benchmark results

Inference Playground

Test deployed models directly in the browser. Send prompts, compare models side by side, and validate behavior before running formal evaluations.

  • Chat InterfaceInteractive prompt testing with streaming responses
  • Multi-Model ComparisonRun the same prompt against several deployed models side by side

CLI & Pipeline

A professional command-line interface for terminal-first researchers. Run benchmarks, manage models, and configure evaluations. Backed by Airflow for orchestrated, repeatable evaluation runs.

  • Run EvaluationsExecute benchmarks against local or API models with configurable tasks, quantization, and batch size
  • Browse BenchmarksList the tasks exposed by the harness and the model configurations the CLI supports
  • Airflow OrchestrationDAGs for local models, API models, and SWE-Gym runs
  • SWE-Gym OrchestrationAirflow DAG driving the Modal SWE-Gym runner with concurrency guardrails, live log streaming, and a cancel path

Tell us what youre building.