Skip to content
@Pantheom

Cerebrus

Context aware LLM gateway for smarter routing, caching, and inference optimization.
  • India

Cerebrus Cerebrus

More tokens, lower compute costs. A context aware optimization pipeline designed to maximise LLM throughput while cutting unnecessary LLM calls.

Cerebrus acts as an intelligent optimization layer sitting between your client applications and frontier model providers. Instead of treating every prompt as a full, expensive model call, it caches semantically similar queries, eliminates redundant context overhead, and cascades difficult queries only to the models that actually need them.

Request Lifecycle

Every user request moves through an intelligent, fallback-driven pipeline:

[ Frontend / Client ]
      │
      ▼
[ Backend Gateway ]
      │
      ├──► 1. Semantic Cache Check
      │     ├── Hit  ──► Return cached result immediately (Zero LLM cost)
      │     └── Miss ──▼
      ├──► 2. Context Classification & Pruning
      │        └── Decides if conversation history is needed & extracts minimal slice
      │
      ├──► 3. Model Cascading & Routing
      │        └── Evaluates complexity; routes to the cheapest capable model tier
      │
      ▼
[ Return Optimized Response ]

Core Modules

Our architecture is split into focused microservices:

  • Semantic Cache System
    Reduces repetitive LLM calls by checking vector similarity against previously answered prompts before dispatching new inferences.

  • Context Classification & Summarization
    Analyzes multi-turn dialogue on a per-prompt basis to determine whether chat history is required, injecting only the necessary context window to save tokens.

  • Model Cascader
    Dynamically measures prompt complexity to route queries to the most cost-effective model tier capable of handling the task.

Each service contains its own setup guides, configuration options, and deep-dive documentation within its respective repository.

Pinned Loading

  1. Semantic-Cache-System Semantic-Cache-System Public

    The system is a microservice to reduce LLM api calls by calling similar meaning query before deciding to call a LLM. PGvector, Embedding, Vector Search

    Python 1

  2. modelcascader modelcascader Public

    A 3-tier LLM cascade router that classifies query difficulty using RouteLLM's classifier, routing each prompt to the cheapest of three models likely to handle it well.

    Python

  3. contextclassandsum contextclassandsum Public

    A lightweight, local-first system that decides per prompt whether a conversational AI needs earlier chat history to answer correctly, and fetches exactly the right slice of it when it does.

    Python

Repositories

Showing 6 of 6 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…