Skip to content

Commit

Permalink
Add README
Browse files Browse the repository at this point in the history
  • Loading branch information
rlouf committed Sep 13, 2024
1 parent ed7cdf2 commit 365d683
Show file tree
Hide file tree
Showing 3 changed files with 322 additions and 1 deletion.
76 changes: 75 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,75 @@
# outlines-core
<div align="center" style="margin-bottom: 1em;">

<img src="./docs/assets/images/logo.png" alt="Outlines-core Logo" width=500></img>

[![Contributors][contributors-badge]][contributors]

*Structured generation (in Rust).*
</div>

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

# Install

We provide bindings to the following languages:
- [Rust][rust-implementation] (Original implementation)
- [Python][python-bindings]

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

``` python
pip install outlines-core
```

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

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

# How to contribute?

## Setup

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

```bash
git clone [email protected]/YourUserName/outlines-core.git
cd outlines-core
```

Create a new virtual environment:

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

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

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

## Before pushing your code

Run the tests:


``` bash
pytest
```

And run the code style checks:

``` bash
pre-commit run --all-files
```


[outlines]: https://github.com/dottxt-ai/outlines
[contributors]: https://github.com/outlines-dev/outlines-core/graphs/contributors
[contributors-badge]: https://img.shields.io/github/contributors/outlines-dev/outlines-core?style=flat-square&logo=github&logoColor=white&color=ECEFF4
[rust-implementation]: https://github.com/outlines-dev/outlines-core/tree/readme/src
[python-bindings]: https://github.com/outlines-dev/outlines-core/tree/readme/python/outlines_core
Binary file added docs/assets/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
247 changes: 247 additions & 0 deletions docs/assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 365d683

Please sign in to comment.