8 releases

new 0.1.27 Jan 17, 2025
0.1.26 Dec 12, 2024
0.1.0 Sep 6, 2024

#480 in Database interfaces

Download history 7/week @ 2024-09-29 2/week @ 2024-11-17 193/week @ 2024-12-01 535/week @ 2024-12-08 40/week @ 2024-12-15 2/week @ 2024-12-22 20/week @ 2024-12-29 9/week @ 2025-01-05 93/week @ 2025-01-12

125 downloads per month

Apache-2.0

200KB
4K SLoC

Rust 3K SLoC // 0.1% comments Python 763 SLoC // 0.3% comments Shell 15 SLoC // 0.2% comments Forge Config 9 SLoC

Outlines-core Logo

Contributors

Structured generation (in Rust).

This package provides the core functionality for structured generation, formerly implemented in Outlines, with a focus on performance and portability.

Install

We provide bindings to the following languages:

The latest release of the Python bindings is available on PyPi using pip:

pip install outlines-core

The current development branch of outlines-core can be installed from GitHub, also using pip:

pip install git+https://github.com/outlines-dev/outlines-core

Or install in a rust project with cargo:

cargo add outlines-core

How to contribute?

Setup

First, fork the repository on GitHub and clone the fork locally:

git clone git@github.com/YourUserName/outlines-core.git
cd outlines-core

Create a new virtual environment:

python -m venv .venv
source .venv/bin/activate

Then install the dependencies in editable mode, and install the pre-commit hooks:

pip install -e ".[test]"
pre-commit install

Before pushing your code

Run the tests:

pytest

And run the code style checks:

pre-commit run --all-files

Dependencies

~17–30MB
~455K SLoC