👋Welcome

Hypster is a lightweight configuration framework for managing and optimizing AI & ML workflows

Hypster is in preview and is not ready for production use.

We're working hard to make Hypster stable and feature-complete, but until then, expect to encounter bugs, missing features, and occasional breaking changes.

Key Features

  • 🐍 Pythonic API: Intuitive & minimal syntax that feels natural to Python developers

  • 🪆 Hierarchical, Conditional Configurations: Support for nested and swappable configurations

  • 📐 Type Safety: Built-in type hints and validation

  • 🧪 Hyperparameter Optimization Built-In: Native, first-class optuna support

Show your support by giving us a star! ⭐

How Does it work?

1

Install Hypster

uv add hypster

Or using pip:

pip install hypster
2

Define a configuration space

from hypster import HP


def llm_config(hp: HP):
    model_name = hp.select(["gpt-5", "claude-sonnet-4-0", "gemini-2.5-flash"], name="model_name")
    temperature = hp.float(0.0, name="temperature", min=0.0, max=1.0)
    return {"model_name": model_name, "temperature": temperature}
3

Instantiate your configuration

from hypster import instantiate

cfg = instantiate(llm_config, values={"model_name": "gpt-5", "temperature": 0.7})
4

Define an execution function

def generate(prompt: str, model_name: str, temperature: float) -> str:
    model = llm.get_model(model_name)
    response = model.prompt(prompt, temperature=temperature)
    return response
5

Execute!

generate(prompt="What is Hypster?", **cfg)

Discover Hypster

Why Use Hypster?

In modern AI/ML development, we often need to handle multiple configurations across different scenarios. This is essential because:

  1. We don't know in advance which hyperparameters will best optimize our performance metrics and satisfy our constraints.

  2. We need to support multiple "modes" for different scenarios. For example:

    1. Local vs. Remote Environments, Development vs. Production Settings

    2. Different App Configurations for specific use-cases and populations

Hypster takes care of these challenges by providing a simple way to define configuration spaces and instantiate them into concrete workflows. This enables you to easily manage and optimize multiple configurations in your codebase.

Additional Reading

Last updated

Was this helpful?