-
Notifications
You must be signed in to change notification settings - Fork 20
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
Set up a Rust-first repo structure #4
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------- Co-authored-by: Andrew Lapp <[email protected]>
Release Docker dispatch: https://github.com/lapp0/outlines/actions/runs/7994419887 - "Fails successfully": Got to the point where it only auth errors. `Error: buildx failed with: ERROR: denied: requested access to the resource is denied` Not testing fetch PyPi. Changes are minimal between this version and the previous *working* main. ``` git diff e99d92d -- .github/workflows/release_pypi.yaml .github/workflows/release.yml | cat diff --git a/.github/workflows/release.yml b/.github/workflows/release_pypi.yaml similarity index 92% rename from .github/workflows/release.yml rename to .github/workflows/release_pypi.yaml index e6bf1b1..597ebb7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release_pypi.yaml @@ -1,16 +1,17 @@ -name: Release +name: Release PyPi on: release: types: - created - jobs: release-job: name: Build and publish on PyPi runs-on: ubuntu-latest + environment: release steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: ``` --------- Co-authored-by: Andrew Lapp <[email protected]>
We currently store the logits processor in the `LlamaCpp` instance. This causes issues when doing successive generations with different generators. In this PR we create a new `LlamaSequenceGenerator` instance every time we create a new generator, and store the logits processor in this instance which solves the issue. Fixes #700.
When integrating Outlines with vLLM I faced the following issues, which are fixed in this PR: 1. When calling `vllm.LLM.generate` then within the internals of vLLM a `copy.deepcopy` of the vLLM `SamplingParams` is made, which includes the logits processor from Outlines (`RegexLogitsProcessor`, say). This requires everything to be pickleable, and the `RegexLogitsProcessor.fsm.vocabulary` is a `dict_values` object, which doesn't satisfy that. The fix is easy: just convert it to a list. This doesn't affect how this `vocabulary` variable is being used in the code. 2. The `RegexLogitsProcessor` takes an `llm` argument, which the docstring states should be a `vllm.LLM` object, but then attempts to extract the underlying tokenizer via `llm.tokenizer.tokenizer`. The tokenizer of `vllm.LLM` currently lies in the `vllm.LLM.llm_engine.tokenizer.tokenizer` attribute, but this is a big mess and isn't backwards compatible with previous vLLM versions. Instead, they have a convenience method, `vllm.LLM.get_tokenizer`, which fetches the tokenizer. To remain backwards compatibility, in case people have supplied `vllm.LLM.llm_engine` directly into `RegexLogitsProcessor`, it falls back to a `tokenizer` or `tokenizer.tokenizer` attribute. I also updated the vLLM example script, as that was outdated as well (used the previous `_patched_apply_logits_processors`). Closes #704
A recent change replaced the set of FSM final states with the state -1 that is used to represent an EOS token being generated. This could explain the issue reported in #605.
…pported by exllama (#729) Refactored the exl2 function in exllamav2.py. The new version offers the following benefits: 1. auto split support. You no longer need to split a large model over 2 GPUs manually, exllama will do it for you 2. 8 bit cache support. Supports the 8 bit cache, can squeeze more context into the same GPU 3. Additional exllamav2 improvements. Supports low_mem, fasttensors. 4. No longer need to pass in num_experts, it is optional. 5. Future support for 4 bit cache. Whenever turbo updates the pip package, uncomment the 4 bit lines for 4 bit support. 6. Refactored the function parameters. Changed the model_kwargs dictionary to individual parameters. Combined with documentation this makes it easier for new users to understand what options they can select.
…r individual bytes
Some model use bytes as their tokens, such as Qwen (see: https://huggingface.co/Qwen/Qwen-7B/blob/ef3c5c9c57b252f3149c1408daf4d649ec8b6c85/tokenization_qwen.py#L136 )
take in everything from main
This PR update the `pyproject.toml`, `Manifest.in` and `Cargo.toml` to support compilation and installation of rust `outlines_core`. Note* building and install relies on `pip` rather then the `build` library. --------- Co-authored-by: erikkaum <[email protected]>
brandonwillard
force-pushed
the
repo-structure
branch
from
August 23, 2024 23:13
83003ec
to
804c66a
Compare
brandonwillard
force-pushed
the
main
branch
2 times, most recently
from
August 29, 2024 15:36
347e191
to
c448997
Compare
brandonwillard
force-pushed
the
main
branch
2 times, most recently
from
September 10, 2024 22:20
2b07cfd
to
ed7cdf2
Compare
brandonwillard
force-pushed
the
main
branch
from
September 23, 2024 23:25
e63edab
to
c39600f
Compare
brandonwillard
force-pushed
the
main
branch
from
September 30, 2024 22:02
b656883
to
bcf655a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR still no more in draft. The main goal of this PR is to have:
*the build process is not necessarily the most elegant one. We're between two choices matruin vs. setuptools-rust.
maturin build
"just works"note: CI is currently not working with the new setup, I propose to create a new issue+PR where we address that separately.