Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the sequence generation #366

Merged
merged 25 commits into from
Dec 8, 2023
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f70a05f
Move `prompts.py` to root folder
rlouf Nov 16, 2023
f942fb1
Rename `sample.py` to `samplers.py`
rlouf Nov 16, 2023
84b70c2
Separate indexing from generation. /text -> /generate and flatten
rlouf Nov 16, 2023
009f02a
Add `Index` type
rlouf Nov 16, 2023
121e983
Add generator that samples the next tokens
rlouf Nov 15, 2023
f0ef464
Create FSM that stops generation when token found
rlouf Nov 22, 2023
190cac0
Create Regex FSM
rlouf Nov 22, 2023
0ed3609
Add user interface for text generation
rlouf Nov 23, 2023
0e599ef
Remove old text generation logic
rlouf Nov 27, 2023
dc3c1ef
Use `torch.multinomial` instead of custom sampler
rlouf Nov 30, 2023
557fb73
Fix `datetime.time` regex
rlouf Nov 30, 2023
f6a711d
Add aliases and deprecation warnings for old API
rlouf Nov 30, 2023
45c7571
Convert JSON output to pydantic model or dictionary
rlouf Nov 30, 2023
97a62d6
Move `index` to `fsm`
rlouf Dec 1, 2023
3f1c955
Update the documentation
rlouf Dec 1, 2023
71b2003
Make `max_token` change FSM state
rlouf Dec 1, 2023
3c0edde
Add `torch.inference_mode` decorator
rlouf Dec 4, 2023
0357640
Rename `next_instruction` to `forbidden_logits`
rlouf Dec 4, 2023
40019eb
Move init of generator state outside of `SequenceGeneration`
rlouf Dec 4, 2023
7c82d66
Move `SequenceGenerator` to `api.py`
rlouf Dec 4, 2023
17096a4
Return FSM states with the sequence generator
rlouf Dec 4, 2023
dd8e21a
Make FSM return allowed tokens
rlouf Dec 6, 2023
3e15a11
Make `stream` output tokens with whitespaces
rlouf Dec 7, 2023
36feb3c
Bump Pytorch version
rlouf Dec 7, 2023
8190126
Update the documentation
rlouf Dec 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the documentation
rlouf committed Dec 8, 2023
commit 3f1c955b8442d6be9593392ab8e00ca4db4ad91d
1 change: 0 additions & 1 deletion docs/api/continuation.md

This file was deleted.

2 changes: 1 addition & 1 deletion docs/api/fsm.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: outlines.index.fsm
::: outlines.fsm.fsm
2 changes: 1 addition & 1 deletion docs/api/json_schema.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: outlines.index.json_schema
::: outlines.fsm.json_schema
2 changes: 1 addition & 1 deletion docs/api/parsing.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
::: outlines.index.parsing
::: outlines.fsm.parsing
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -125,7 +125,8 @@ nav:
- api/prompts.md
- api/json_schema.md
- api/fsm.md
- api/regex.md
- api/parsing.md
- api/regex.md
- api/samplers.md
- api/continuation.md
- api/text.md