text-generation-inference/server
Peter Lowrance bd998d8797
Fix window_size_left for flash attention v1 (#1089)
This fixes flash attention v1 which was always
NotImplementedError("window_size_left is only available with flash attn
v2").

Currently flash_llama_modeling.py doesn't override the default value of
window_size_left when calling attention(..) (line 282). This means that
window_size_left will always be the default of -1, but flash attention
v1 throws an exception if `window_size_left != 0`.

To fix this, we should be checking `window_size_left != -1` before
throwing the NotImplementedError.


Fixes #1084 


## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the
other checks if that's the case).
- [ ] Did you read the [contributor
guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
      Pull Request section?
- [ ] Was this discussed/approved via a Github issue or the
[forum](https://discuss.huggingface.co/)? Please add a link
      to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes?
Here are the
[documentation
guidelines](https://github.com/huggingface/transformers/tree/main/docs),
and
[here are tips on formatting
docstrings](https://github.com/huggingface/transformers/tree/main/docs#writing-source-documentation).
- [ ] Did you write any new necessary tests?


## Who can review?

Anyone in the community is free to review the PR once the tests have
passed. Feel free to tag
members/contributors who may be interested in your PR.

@OlivierDehaene OR @Narsil
2023-10-02 20:53:14 +02:00
..
custom_kernels feat(server): Rework model loading (#344) 2023-06-08 14:51:52 +02:00
exllama_kernels feat: add cuda memory fraction (#659) 2023-07-24 11:43:58 +02:00
tests feat: format code (#1070) 2023-09-27 12:22:09 +02:00
text_generation_server Fix window_size_left for flash attention v1 (#1089) 2023-10-02 20:53:14 +02:00
.gitignore Support eetq weight only quantization (#1068) 2023-09-27 11:42:57 +02:00
Makefile Support eetq weight only quantization (#1068) 2023-09-27 11:42:57 +02:00
Makefile-awq Add AWQ quantization inference support (#1019) (#1054) 2023-09-25 15:31:27 +02:00
Makefile-eetq Support eetq weight only quantization (#1068) 2023-09-27 11:42:57 +02:00
Makefile-flash-att feat(server): use latest flash attention commit (#543) 2023-07-04 20:23:55 +02:00
Makefile-flash-att-v2 feat: add mistral model (#1071) 2023-09-28 09:55:47 +02:00
Makefile-vllm feat: add mistral model (#1071) 2023-09-28 09:55:47 +02:00
poetry.lock Add AWQ quantization inference support (#1019) (#1054) 2023-09-25 15:31:27 +02:00
pyproject.toml Preping 1.1.0 (#1066) 2023-09-27 10:40:18 +02:00
README.md feat(router): refactor API and add openAPI schemas (#53) 2023-02-03 12:43:37 +01:00
requirements.txt Preping 1.1.0 (#1066) 2023-09-27 10:40:18 +02:00

Text Generation Inference Python gRPC Server

A Python gRPC server for Text Generation Inference

Install

make install

Run

make run-dev