Kepler builds enterprise intelligence for high-stakes industries, starting with investment firms. Frontier models keep getting smarter, but they’re fundamentally probabilistic and often don't know a firm's internal definitions, data lineage, or entity relationships.
Kepler handles this by splitting the workload: frontier models interpret questions and draft the text, while deterministic code extracts and computes every number with an inspectable citation back to the original page.
To accommodate this workload, Kepler’s ML team builds its own domain models. Kepler rents frontier LLMs for reasoning and prose, but trains in-house models for everything else: document OCR, line-item extraction, entity resolution, classification, and search. They run their entire ML lifecycle on Modal, from raw data prep and distributed training to evaluation and inference.
“The model is rented and everything that makes it work is ours. A frontier model is great at understanding a question and writing the answer. The models that read every page a firm owns, resolve every entity, and pin every number to its place on the page, we build ourselves, and we build them on Modal.”
Why enterprise documents need their own models
Financial filings and legal contracts often separate numbers from their actual meaning. In financial filings, a table footnote specifying "in thousands" sits a median of 559 tokens away from the figures it governs. Standard OCR turns "thousands" into "th0usands," while international filers write "百万" or "miljoen." Inside audit reports, "we" refers to the auditor, not the issuer. A single 10-K spans 60k to 250k tokens. Contracts and technical specs follow the same pattern: governing definitions sit dozens of pages away from active clauses.
Regex breaks on this, and frontier LLM context windows get prohibitively expensive across millions of pages.
From a single 28 MB fund report, Kepler’s extraction model parses 83,798 facts, 45,846 entities, and 9,474 relationships in seconds. Without human intervention, a script traversed those relationships to construct the entire fund family tree: 1 adviser, 12 funds, 44 sub-advisers, 62 mandates, and 354 issuers.
Running that 28 MB report through a frontier LLM in 8,000-character chunks costs ~$185. Kepler’s specialist model runs it for $0.15, which brings the median cost to $0.0014 per document.
Small, task-specific models are also more accurate. Kepler's first fine-tuned model, a financial taxonomy classifier trained before moving training to Modal, took 20 minutes and $9 in compute. It achieved 94% accuracy, compared to 38% to 46% from leading frontier models.
Models that go where the data lives
Kepler's enterprise clients work with sensitive assets that cannot leave their network boundaries like fund financials, LP communications, deal rooms, and internal research.
To support this, Kepler established a strict architectural constraint: every model must be completely portable.
Weights are bundled offline into versioned artifacts, paired with standard open-source serving engines, and exposed via plain HTTP APIs. Kepler trains and benchmarks each model on Modal, then ships that same artifact into a client’s cloud account or on-prem hardware.
“A firm's most sensitive documents should never have to travel to a model. We built Kepler so the models travel to the documents. Modal is where we build and prove them, and the same artifacts deploy wherever a firm needs them to run.”
Inside Kepler’s Modal pipeline: Training, search, and serving
To deliver custom models that deploy anywhere, Kepler replaced managed third-party APIs and manual cloud infrastructure with a single platform. They chose Modal because it satisfied four core technical criteria out of the box:
- On-demand H100 scaling: Rapid fan-out across hundreds of parallel containers
- Run standard open-source frameworks unmodified code: Bring existing Python/C++ training and serving code to Modal
- Custom API endpoints that scale to zero: Arbitrary REST/gRPC endpoints that scale down to zero compute cost when idle
- Edge authentication: Modal authenticates requests at the proxy layer before they reach Kepler’s GPU-backed application, blocking unauthorized traffic without triggering unnecessary cold starts or consuming GPU compute
Training: from single GPU instances to dozens running overnight
Kepler previously managed training on a single, manually provisioned cloud GPU instance. Moving workloads to Modal shifted their development workflow from single, blocking runs to parallelized experiment waves.
Datasets, model checkpoints, and feature caches (>1 TB) reside on Modal Volumes. Modal Volumes let the team reuse those datasets and precomputed features across experiments without rebuilding them for each run. Each training job runs as a Modal Function with a 24-hour timeout and automatic retries, writing checkpoints and results back to the Volume.
In their first two months on Modal, Kepler executed ~200 training and evaluation runs across 40 experiments, benchmarking context windows, parameter scales, and dataset mixtures in parallel. A single scoring pass over the training set covers more than 300M tokens.
Preprocessing fans out across CPU and GPU containers:
- OCR Pipelines: 80 CPU-core-hours of document processing completed in ~20 minutes using 50 concurrent containers
- Feature precomputation: 3,750 financial filings processed across 16 parallel GPUs, writing 1.2 TB of features to Modal Volumes
- Production models: Multi-H100 training runs execute overnight
“An experiment used to be a decision: which one idea do we test tonight? Now we launch a wave of them, go to sleep, and read the results off the Volume in the morning. The only bottleneck left is how fast we can come up with the next idea.”
Search: rebuilding two production models in under two weeks
Kepler’s search stack depends on two open-weight models: a dense embedding model and a cross-encoder reranker. Previously hosted on a third-party managed API, the team faced a hard deadline to migrate both components in-house.
To avoid re-indexing millions of historical vector embeddings, the replacement models had to preserve the legacy output format and vector dimensions while closely matching its embeddings and score scaling.
Because the legacy provider did not document their input formatting, token pooling, or projection layers, Kepler engineered exact replicas directly from weight inspection, running evaluation passes against the live API. Both replacement models were deployed to production ahead of schedule:
- Verified parity: Across 29,511 test texts, regenerated embeddings matched the live API with a minimum cosine similarity of 0.995. The FP8 engines actually tracked the original provider's API output closer than native BF16 precision
- Single-H100 consolidation: Both models run inside a single H100 container using custom-compiled FP8 TensorRT-LLM engines. The single H100 delivers 9.5× the throughput of an L4 GPU for 4.9× the cost, sustaining ~30,000 tokens/sec
- Faster cold starts: Moving from vLLM (which compiles engines dynamically on startup) to precompiled TensorRT-LLM engines reduced container boot times from 32 seconds down to 8 seconds
- Edge auth protection: Unauthenticated requests are rejected at the Modal proxy layer in 0.1 seconds, preventing unnecessary cold starts and GPU cycles
Production migration required a single configuration flag swap, achieving zero-downtime cutover a week ahead of deadline.
“From the pipeline's side, a model on Modal is just an endpoint. Our ingestion flows call it like any other service, it scales with whatever we send it, and nobody gets paged about a GPU.”
Serving: every number at 250,000 tokens per second
For every parsed figure, Kepler's extraction service outputs: scale, unit, reporting period, associated entities, graph relationship edges, confidence scores, and bounding-box page coordinates for interactive UI highlighting.
Performance characteristics on Modal:
- 250,000+ tokens/sec: throughput for the core extraction model on a single H100 GPU
- 128 documents in 17 seconds: (spanning ~605,000 characters in a single batch API call)
- 313 small documents/sec: on 1 GPU (up from 27 doc/sec under single-request processing). Dynamic GPU-pass batching improved small document processing efficiency by 12×, while INT8 quantization added an additional ~30% throughput gain
- Faster cold starts with GPU snapshots: Storing the compiled CUDA kernel cache on a Modal Volume and using GPU snapshots for fact extraction cut container boot times from 60–75 seconds down to 9–24 seconds.




