2022-10-08 04:30:12 -06:00
|
|
|
# This file is automatically @generated by Cargo.
|
|
|
|
# It is not intended for manual editing.
|
|
|
|
version = 3
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "addr2line"
|
2024-06-04 07:56:56 -06:00
|
|
|
version = "0.22.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-04 07:56:56 -06:00
|
|
|
checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
|
|
|
"gimli",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "adler"
|
|
|
|
version = "1.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe"
|
|
|
|
|
2023-02-16 09:18:53 -07:00
|
|
|
[[package]]
|
|
|
|
name = "ahash"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.8.11"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
2023-07-01 11:25:41 -06:00
|
|
|
"cfg-if",
|
2024-02-21 03:05:32 -07:00
|
|
|
"getrandom",
|
2023-02-16 09:18:53 -07:00
|
|
|
"once_cell",
|
2024-02-21 03:05:32 -07:00
|
|
|
"serde",
|
2023-02-16 09:18:53 -07:00
|
|
|
"version_check",
|
2023-11-30 07:18:15 -07:00
|
|
|
"zerocopy",
|
2023-02-16 09:18:53 -07:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "aho-corasick"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "1.1.3"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
2023-06-16 08:25:11 -06:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "aligned-vec"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4aa90d7ce82d4be67b64039a3d588d38dbcc6736577de4a847025ce5b0c468d1"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
2023-04-09 12:22:27 -06:00
|
|
|
name = "anstream"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.6.14"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-04-09 12:22:27 -06:00
|
|
|
"anstyle",
|
|
|
|
"anstyle-parse",
|
2023-04-20 03:07:40 -06:00
|
|
|
"anstyle-query",
|
2023-04-09 12:22:27 -06:00
|
|
|
"anstyle-wincon",
|
2023-04-20 03:07:40 -06:00
|
|
|
"colorchoice",
|
2024-05-06 05:48:11 -06:00
|
|
|
"is_terminal_polyfill",
|
2023-04-09 12:22:27 -06:00
|
|
|
"utf8parse",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "anstyle"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "1.0.7"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b"
|
2023-04-09 12:22:27 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "anstyle-parse"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.2.4"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
|
|
|
"utf8parse",
|
|
|
|
]
|
|
|
|
|
2023-04-20 03:07:40 -06:00
|
|
|
[[package]]
|
|
|
|
name = "anstyle-query"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.1.0"
|
2023-04-20 03:07:40 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391"
|
2023-04-20 03:07:40 -06:00
|
|
|
dependencies = [
|
2023-12-11 04:46:30 -07:00
|
|
|
"windows-sys 0.52.0",
|
2023-04-20 03:07:40 -06:00
|
|
|
]
|
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
|
|
|
name = "anstyle-wincon"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "3.0.3"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
|
|
|
"anstyle",
|
2023-12-11 04:46:30 -07:00
|
|
|
"windows-sys 0.52.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "anyhow"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.86"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da"
|
2023-06-16 08:25:11 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "arbitrary"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7d5a26814d8dcb93b0e5a0ff3c6d80a8843bafb21b39e8e18a6f05471870e110"
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "arc-swap"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "1.7.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
|
2023-06-16 08:25:11 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "arg_enum_proc_macro"
|
|
|
|
version = "0.3.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "arrayvec"
|
|
|
|
version = "0.7.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "async-rustls"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "93b21a03b7c21702a0110f9f8d228763a533570deb376119042dabf33c37a01a"
|
|
|
|
dependencies = [
|
|
|
|
"futures-io",
|
2023-09-27 02:40:18 -06:00
|
|
|
"rustls 0.20.9",
|
2023-06-16 08:25:11 -06:00
|
|
|
"webpki",
|
|
|
|
]
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async-stream"
|
2023-04-11 12:32:18 -06:00
|
|
|
version = "0.3.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-11 12:32:18 -06:00
|
|
|
checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"async-stream-impl",
|
|
|
|
"futures-core",
|
2023-02-24 05:27:41 -07:00
|
|
|
"pin-project-lite",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async-stream-impl"
|
2023-04-11 12:32:18 -06:00
|
|
|
version = "0.3.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-11 12:32:18 -06:00
|
|
|
checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "async-trait"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.1.80"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "atomic-waker"
|
|
|
|
version = "1.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "autocfg"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.3.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "av1-grain"
|
|
|
|
version = "0.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6678909d8c5d46a42abcf571271e15fdbc0a225e3646cf23762cd415046c78bf"
|
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"arrayvec",
|
|
|
|
"log",
|
|
|
|
"nom",
|
|
|
|
"num-rational",
|
|
|
|
"v_frame",
|
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "average"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.14.2"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "c309b1c7fca12ebeec3ecba29ea917b3a4cb458ccf504df68bb4d8a0ca565a00"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
|
|
|
"easy-cast",
|
|
|
|
"float-ord",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "avif-serialize"
|
|
|
|
version = "0.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "876c75a42f6364451a033496a14c44bffe41f5f4a8236f697391f11024e596d2"
|
|
|
|
dependencies = [
|
|
|
|
"arrayvec",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "awaitdrop"
|
|
|
|
version = "0.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "771051cdc7eec2dc1b23fbf870bb7fbb89136fe374227c875e377f1eed99a429"
|
|
|
|
dependencies = [
|
|
|
|
"futures",
|
|
|
|
"generational-arena",
|
|
|
|
"parking_lot",
|
|
|
|
"slotmap",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "aws-lc-rs"
|
|
|
|
version = "1.7.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bf7d844e282b4b56750b2d4e893b2205581ded8709fddd2b6aa5418c150ca877"
|
|
|
|
dependencies = [
|
|
|
|
"aws-lc-sys",
|
|
|
|
"mirai-annotations",
|
|
|
|
"paste",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "aws-lc-sys"
|
|
|
|
version = "0.18.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c3a2c29203f6bf296d01141cc8bb9dbd5ecd4c27843f2ee0767bcd5985a927da"
|
|
|
|
dependencies = [
|
|
|
|
"bindgen",
|
|
|
|
"cc",
|
|
|
|
"cmake",
|
|
|
|
"dunce",
|
|
|
|
"fs_extra",
|
|
|
|
"libc",
|
|
|
|
"paste",
|
|
|
|
]
|
|
|
|
|
2022-10-11 10:14:39 -06:00
|
|
|
[[package]]
|
|
|
|
name = "axum"
|
2023-08-14 11:26:19 -06:00
|
|
|
version = "0.6.20"
|
2022-10-11 10:14:39 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-08-14 11:26:19 -06:00
|
|
|
checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf"
|
2022-10-11 10:14:39 -06:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum-core 0.3.4",
|
2023-07-01 11:25:41 -06:00
|
|
|
"bitflags 1.3.2",
|
2022-10-11 10:14:39 -06:00
|
|
|
"bytes",
|
|
|
|
"futures-util",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
|
|
|
"http-body 0.4.6",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2024-05-28 06:52:17 -06:00
|
|
|
"itoa",
|
|
|
|
"matchit",
|
|
|
|
"memchr",
|
|
|
|
"mime",
|
|
|
|
"percent-encoding",
|
|
|
|
"pin-project-lite",
|
|
|
|
"rustversion",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"serde_path_to_error",
|
|
|
|
"serde_urlencoded",
|
|
|
|
"sync_wrapper 0.1.2",
|
|
|
|
"tokio",
|
|
|
|
"tower",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "axum"
|
|
|
|
version = "0.7.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"axum-core 0.4.3",
|
|
|
|
"bytes",
|
|
|
|
"futures-util",
|
|
|
|
"http 1.1.0",
|
|
|
|
"http-body 1.0.0",
|
|
|
|
"http-body-util",
|
|
|
|
"hyper 1.3.1",
|
|
|
|
"hyper-util",
|
2022-10-11 10:14:39 -06:00
|
|
|
"itoa",
|
|
|
|
"matchit",
|
|
|
|
"memchr",
|
|
|
|
"mime",
|
|
|
|
"percent-encoding",
|
|
|
|
"pin-project-lite",
|
2023-02-03 04:43:37 -07:00
|
|
|
"rustversion",
|
2022-10-11 10:14:39 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-02-03 04:43:37 -07:00
|
|
|
"serde_path_to_error",
|
2022-10-11 10:14:39 -06:00
|
|
|
"serde_urlencoded",
|
2024-05-28 06:52:17 -06:00
|
|
|
"sync_wrapper 1.0.1",
|
2022-10-11 10:14:39 -06:00
|
|
|
"tokio",
|
|
|
|
"tower",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing",
|
2022-10-11 10:14:39 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "axum-core"
|
2023-04-11 12:32:18 -06:00
|
|
|
version = "0.3.4"
|
2022-10-11 10:14:39 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-11 12:32:18 -06:00
|
|
|
checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c"
|
2022-10-11 10:14:39 -06:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"bytes",
|
|
|
|
"futures-util",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
|
|
|
"http-body 0.4.6",
|
|
|
|
"mime",
|
|
|
|
"rustversion",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "axum-core"
|
|
|
|
version = "0.4.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"bytes",
|
|
|
|
"futures-util",
|
|
|
|
"http 1.1.0",
|
|
|
|
"http-body 1.0.0",
|
|
|
|
"http-body-util",
|
2022-10-11 10:14:39 -06:00
|
|
|
"mime",
|
2024-05-28 06:52:17 -06:00
|
|
|
"pin-project-lite",
|
2023-02-03 04:43:37 -07:00
|
|
|
"rustversion",
|
2024-05-28 06:52:17 -06:00
|
|
|
"sync_wrapper 0.1.2",
|
2022-10-11 10:14:39 -06:00
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing",
|
2022-10-11 10:14:39 -06:00
|
|
|
]
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "axum-tracing-opentelemetry"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.16.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "bdad298231394729042d1f155b93f9fdf0b5ee1aea0b62404c4d7341f7d8fe08"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum 0.7.5",
|
2023-09-27 02:40:18 -06:00
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 1.1.0",
|
|
|
|
"opentelemetry 0.21.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
"pin-project-lite",
|
2023-02-13 05:02:45 -07:00
|
|
|
"tower",
|
|
|
|
"tracing",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing-opentelemetry 0.22.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
"tracing-opentelemetry-instrumentation-sdk",
|
2023-07-01 11:25:41 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "backtrace"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.3.73"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
|
|
|
"addr2line",
|
|
|
|
"cc",
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
|
|
|
"miniz_oxide",
|
|
|
|
"object",
|
|
|
|
"rustc-demangle",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "base64"
|
2022-10-28 11:24:00 -06:00
|
|
|
version = "0.13.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-28 11:24:00 -06:00
|
|
|
checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "base64"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.21.7"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"
|
2023-04-09 12:22:27 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "base64"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.22.1"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bindgen"
|
|
|
|
version = "0.69.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags 2.6.0",
|
|
|
|
"cexpr",
|
|
|
|
"clang-sys",
|
|
|
|
"itertools 0.12.1",
|
|
|
|
"lazy_static",
|
|
|
|
"lazycell",
|
|
|
|
"log",
|
|
|
|
"prettyplease",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"regex",
|
|
|
|
"rustc-hash",
|
|
|
|
"shlex",
|
|
|
|
"syn 2.0.68",
|
|
|
|
"which",
|
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "bit-set"
|
|
|
|
version = "0.5.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
|
|
|
|
dependencies = [
|
|
|
|
"bit-vec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "bit-vec"
|
|
|
|
version = "0.6.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bit_field"
|
|
|
|
version = "0.10.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "dc827186963e592360843fb5ba4b973e145841266c1357f7180c43526f2e5b61"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bitflags"
|
|
|
|
version = "1.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bitflags"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "2.6.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
|
2023-07-01 11:25:41 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bitstream-io"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "2.4.2"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "415f8399438eb5e4b2f73ed3152a3448b98149dda642a957ee704e1daa5cf1d8"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "block-buffer"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.10.4"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "built"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.7.3"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "c6a6c0b39c38fd754ac338b00a88066436389c0f029da5d37d1e01091d9b7c17"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bumpalo"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "3.16.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-05-25 05:38:36 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bytecount"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.6.8"
|
2023-05-25 05:38:36 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "5ce89b21cab1437276d2650d57e971f9d548a2d9037cc231abdc0562b97498ce"
|
2023-05-25 05:38:36 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bytemuck"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.16.1"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "byteorder"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "1.5.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2024-05-06 05:48:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "byteorder-lite"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "bytes"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "1.6.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2024-01-26 11:04:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "camino"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.1.7"
|
2024-01-26 11:04:57 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239"
|
2024-01-26 11:04:57 -07:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cargo-platform"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.1.8"
|
2024-01-26 11:04:57 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc"
|
2024-01-26 11:04:57 -07:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cargo_metadata"
|
|
|
|
version = "0.18.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
|
|
|
|
dependencies = [
|
|
|
|
"camino",
|
|
|
|
"cargo-platform",
|
|
|
|
"semver",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "cassowary"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "cc"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.0.101"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"jobserver",
|
|
|
|
"libc",
|
2024-05-06 05:48:11 -06:00
|
|
|
"once_cell",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "cexpr"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
|
|
|
dependencies = [
|
|
|
|
"nom",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "cfg-expr"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.15.8"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"smallvec",
|
|
|
|
"target-lexicon",
|
|
|
|
]
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cfg-if"
|
|
|
|
version = "1.0.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
|
|
|
2024-03-21 10:45:56 -06:00
|
|
|
[[package]]
|
|
|
|
name = "cfg_aliases"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "clang-sys"
|
|
|
|
version = "1.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
|
|
|
|
dependencies = [
|
|
|
|
"glob",
|
|
|
|
"libc",
|
|
|
|
"libloading",
|
|
|
|
]
|
|
|
|
|
2022-10-17 10:27:33 -06:00
|
|
|
[[package]]
|
|
|
|
name = "clap"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "4.5.7"
|
2022-10-17 10:27:33 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f"
|
2022-10-17 10:27:33 -06:00
|
|
|
dependencies = [
|
2023-04-09 12:22:27 -06:00
|
|
|
"clap_builder",
|
2022-10-17 10:27:33 -06:00
|
|
|
"clap_derive",
|
2023-04-09 12:22:27 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap_builder"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "4.5.7"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
|
|
|
"anstream",
|
|
|
|
"anstyle",
|
|
|
|
"clap_lex",
|
2024-05-28 06:52:17 -06:00
|
|
|
"strsim",
|
2022-10-17 10:27:33 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap_derive"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "4.5.5"
|
2022-10-17 10:27:33 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6"
|
2022-10-17 10:27:33 -06:00
|
|
|
dependencies = [
|
2024-03-22 11:44:05 -06:00
|
|
|
"heck 0.5.0",
|
2022-10-17 10:27:33 -06:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-17 10:27:33 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "clap_lex"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.7.1"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cmake"
|
|
|
|
version = "0.1.50"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
2023-04-09 12:22:27 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "color_quant"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b"
|
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
2023-04-20 03:07:40 -06:00
|
|
|
name = "colorchoice"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "1.0.1"
|
2022-10-17 10:27:33 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422"
|
2022-10-17 10:27:33 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "console"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.15.8"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"encode_unicode",
|
|
|
|
"lazy_static",
|
|
|
|
"libc",
|
|
|
|
"unicode-width",
|
2024-01-26 11:04:57 -07:00
|
|
|
"windows-sys 0.52.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "core-foundation"
|
2023-12-11 04:46:30 -07:00
|
|
|
version = "0.9.4"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 04:46:30 -07:00
|
|
|
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "core-foundation-sys"
|
2023-12-11 04:46:30 -07:00
|
|
|
version = "0.8.6"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 04:46:30 -07:00
|
|
|
checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "cpufeatures"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.2.12"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crc32fast"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.4.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-channel"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.5.13"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-deque"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.8.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-epoch",
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-epoch"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.9.18"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossbeam-utils"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.8.20"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "crossterm"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.27.0"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-05-09 05:19:31 -06:00
|
|
|
"crossterm_winapi",
|
|
|
|
"libc",
|
|
|
|
"mio",
|
|
|
|
"parking_lot",
|
|
|
|
"signal-hook",
|
|
|
|
"signal-hook-mio",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "crossterm_winapi"
|
2023-06-16 08:25:11 -06:00
|
|
|
version = "0.9.1"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-16 08:25:11 -06:00
|
|
|
checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "crunchy"
|
|
|
|
version = "0.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "crypto-common"
|
|
|
|
version = "0.1.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
|
|
|
|
dependencies = [
|
|
|
|
"generic-array",
|
|
|
|
"typenum",
|
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ctrlc"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "3.4.4"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345"
|
2022-10-18 07:19:03 -06:00
|
|
|
dependencies = [
|
2024-03-22 11:44:05 -06:00
|
|
|
"nix",
|
2024-01-26 11:04:57 -07:00
|
|
|
"windows-sys 0.52.0",
|
2022-10-18 07:19:03 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "darling"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.20.9"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"darling_core",
|
|
|
|
"darling_macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "darling_core"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.20.9"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"fnv",
|
|
|
|
"ident_case",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-05-28 06:52:17 -06:00
|
|
|
"strsim",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "darling_macro"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.20.9"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"darling_core",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-08-14 11:26:19 -06:00
|
|
|
[[package]]
|
|
|
|
name = "deranged"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.3.11"
|
2023-08-14 11:26:19 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4"
|
2023-11-30 07:18:15 -07:00
|
|
|
dependencies = [
|
|
|
|
"powerfmt",
|
|
|
|
]
|
2023-08-14 11:26:19 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "derive_builder"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.20.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "0350b5cb0331628a5916d6c5c0b72e97393b8b6b03b47a9284f4e7f5a405ffd7"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-04-09 12:22:27 -06:00
|
|
|
"derive_builder_macro",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "derive_builder_core"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.20.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "d48cda787f839151732d396ac69e3473923d54312c070ee21e9effcaa8ca0b1d"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"darling",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-04-09 12:22:27 -06:00
|
|
|
name = "derive_builder_macro"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.20.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "206868b8242f27cecce124c19fd88157fbd0dd334df2587f36417bafbc85097b"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-04-09 12:22:27 -06:00
|
|
|
"derive_builder_core",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-04-09 12:22:27 -06:00
|
|
|
name = "digest"
|
2023-06-16 08:25:11 -06:00
|
|
|
version = "0.10.7"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-16 08:25:11 -06:00
|
|
|
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-04-09 12:22:27 -06:00
|
|
|
"block-buffer",
|
|
|
|
"crypto-common",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "dirs"
|
|
|
|
version = "5.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225"
|
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"dirs-sys",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "dirs-sys"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"option-ext",
|
|
|
|
"redox_users",
|
|
|
|
"windows-sys 0.48.0",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "dunce"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b"
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "easy-cast"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.5.2"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "10936778145f3bea71fd9bf61332cce28c28e96a380714f7ab34838b80733fd6"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
|
|
|
"libm",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "either"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.13.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "encode_unicode"
|
|
|
|
version = "0.3.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "encoding_rs"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.8.34"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
2023-07-14 08:31:48 -06:00
|
|
|
[[package]]
|
|
|
|
name = "equivalent"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "errno"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.3.9"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
2023-11-30 07:18:15 -07:00
|
|
|
"windows-sys 0.52.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "esaxx-rs"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.1.10"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "d817e038c30374a4bcb22f94d0a8a0e216958d4c3dcde369b1439fec4bdda6e6"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "exr"
|
|
|
|
version = "1.72.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "887d93f60543e9a9362ef8a21beedd0a833c5d9610e18c67abe15a5963dcb1a4"
|
|
|
|
dependencies = [
|
|
|
|
"bit_field",
|
|
|
|
"flume",
|
|
|
|
"half",
|
|
|
|
"lebe",
|
|
|
|
"miniz_oxide",
|
|
|
|
"rayon-core",
|
|
|
|
"smallvec",
|
|
|
|
"zune-inflate",
|
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "fancy-regex"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2"
|
|
|
|
dependencies = [
|
|
|
|
"bit-set",
|
|
|
|
"regex",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "fastrand"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "2.1.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "fdeflate"
|
|
|
|
version = "0.3.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4f9bfee30e4dedf0ab8b422f03af778d9612b63f502710fc500a334ebe2de645"
|
|
|
|
dependencies = [
|
|
|
|
"simd-adler32",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "fixedbitset"
|
|
|
|
version = "0.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "flate2"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "1.0.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"crc32fast",
|
|
|
|
"miniz_oxide",
|
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "float-ord"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d"
|
|
|
|
|
2022-12-16 03:29:36 -07:00
|
|
|
[[package]]
|
|
|
|
name = "float_eq"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "28a80e3145d8ad11ba0995949bbcf48b9df2be62772b3d351ef017dff6ecb853"
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "flume"
|
|
|
|
version = "0.11.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181"
|
|
|
|
dependencies = [
|
|
|
|
"spin 0.9.8",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "fnv"
|
|
|
|
version = "1.0.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "foreign-types"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
|
|
|
|
dependencies = [
|
|
|
|
"foreign-types-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "foreign-types-shared"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "form_urlencoded"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "1.2.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"percent-encoding",
|
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "fraction"
|
|
|
|
version = "0.13.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3027ae1df8d41b4bed2241c8fdad4acc1e7af60c8e17743534b545e77182d678"
|
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
"num",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "fs_extra"
|
|
|
|
version = "1.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "futures"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"futures-executor",
|
|
|
|
"futures-io",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-task",
|
|
|
|
"futures-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-channel"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-core"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-executor"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"futures-task",
|
|
|
|
"futures-util",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-io"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-macro"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-sink"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-task"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "futures-util"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"futures-io",
|
|
|
|
"futures-macro",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-task",
|
|
|
|
"memchr",
|
|
|
|
"pin-project-lite",
|
|
|
|
"pin-utils",
|
|
|
|
"slab",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "generational-arena"
|
|
|
|
version = "0.2.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "877e94aff08e743b651baaea359664321055749b398adff8740a7399af7796e7"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "generic-array"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.14.7"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"typenum",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "getrandom"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.2.15"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
2024-02-21 03:05:32 -07:00
|
|
|
"js-sys",
|
2022-10-08 04:30:12 -06:00
|
|
|
"libc",
|
2023-07-01 11:25:41 -06:00
|
|
|
"wasi",
|
2024-02-21 03:05:32 -07:00
|
|
|
"wasm-bindgen",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "gif"
|
|
|
|
version = "0.13.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3fb2d69b19215e18bb912fa30f7ce15846e301408695e44e0ef719f1da9e19f2"
|
|
|
|
dependencies = [
|
|
|
|
"color_quant",
|
|
|
|
"weezl",
|
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "gimli"
|
2024-06-04 07:56:56 -06:00
|
|
|
version = "0.29.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-04 07:56:56 -06:00
|
|
|
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd"
|
2023-02-13 05:02:45 -07:00
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "glob"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "grpc-metadata"
|
2023-04-11 12:32:18 -06:00
|
|
|
version = "0.1.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry 0.20.0",
|
2023-11-30 07:18:15 -07:00
|
|
|
"tonic 0.10.2",
|
2023-02-13 05:02:45 -07:00
|
|
|
"tracing",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing-opentelemetry 0.21.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "h2"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.3.26"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"fnv",
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"futures-util",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
2024-03-29 12:17:24 -06:00
|
|
|
"indexmap 2.2.6",
|
2022-10-08 04:30:12 -06:00
|
|
|
"slab",
|
|
|
|
"tokio",
|
2023-02-13 05:02:45 -07:00
|
|
|
"tokio-util",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "h2"
|
|
|
|
version = "0.4.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fa82e28a107a8cc405f0839610bdc9b15f1e25ec7d696aa5cf173edbcb1486ab"
|
|
|
|
dependencies = [
|
|
|
|
"atomic-waker",
|
|
|
|
"bytes",
|
|
|
|
"fnv",
|
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"http 1.1.0",
|
|
|
|
"indexmap 2.2.6",
|
|
|
|
"slab",
|
|
|
|
"tokio",
|
|
|
|
"tokio-util",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "half"
|
|
|
|
version = "2.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"crunchy",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "hashbrown"
|
|
|
|
version = "0.12.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
2023-07-01 11:25:41 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hashbrown"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.14.5"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
|
|
|
"ahash",
|
|
|
|
]
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "heck"
|
2023-02-13 05:02:45 -07:00
|
|
|
version = "0.4.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-13 05:02:45 -07:00
|
|
|
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2024-03-22 11:44:05 -06:00
|
|
|
[[package]]
|
|
|
|
name = "heck"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "hermit-abi"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.3.9"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
2023-02-13 05:02:45 -07:00
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "hf-hub"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.3.2"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "2b780635574b3d92f036890d8373433d6f9fc7abb320ee42a5c25897fc8ed732"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"dirs",
|
2024-01-10 08:35:54 -07:00
|
|
|
"futures",
|
2023-11-30 07:18:15 -07:00
|
|
|
"indicatif",
|
2023-09-27 02:40:18 -06:00
|
|
|
"log",
|
|
|
|
"native-tls",
|
2024-01-10 08:35:54 -07:00
|
|
|
"num_cpus",
|
2023-09-27 02:40:18 -06:00
|
|
|
"rand",
|
2024-01-10 08:35:54 -07:00
|
|
|
"reqwest",
|
2023-09-27 02:40:18 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
2024-01-10 08:35:54 -07:00
|
|
|
"tokio",
|
2023-09-27 02:40:18 -06:00
|
|
|
"ureq",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "home"
|
|
|
|
version = "0.5.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
|
|
|
|
dependencies = [
|
|
|
|
"windows-sys 0.52.0",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "hostname"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"match_cfg",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "http"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.2.12"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"fnv",
|
|
|
|
"itoa",
|
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "http"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"fnv",
|
|
|
|
"itoa",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "http-body"
|
2023-12-11 06:55:03 -07:00
|
|
|
version = "0.4.6"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 06:55:03 -07:00
|
|
|
checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
2022-10-08 04:30:12 -06:00
|
|
|
"pin-project-lite",
|
|
|
|
]
|
|
|
|
|
2022-10-11 10:14:39 -06:00
|
|
|
[[package]]
|
2024-05-28 06:52:17 -06:00
|
|
|
name = "http-body"
|
|
|
|
version = "1.0.0"
|
2022-10-11 10:14:39 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"http 1.1.0",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "http-body-util"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.1.2"
|
2024-05-28 06:52:17 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f"
|
2024-05-28 06:52:17 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2024-06-27 00:08:43 -06:00
|
|
|
"futures-util",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 1.1.0",
|
|
|
|
"http-body 1.0.0",
|
|
|
|
"pin-project-lite",
|
|
|
|
]
|
2022-10-11 10:14:39 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "httparse"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.9.4"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "httpdate"
|
2023-08-14 11:26:19 -06:00
|
|
|
version = "1.0.3"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-08-14 11:26:19 -06:00
|
|
|
checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hyper"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.14.29"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures-channel",
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
2024-06-27 00:08:43 -06:00
|
|
|
"h2 0.3.26",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
|
|
|
"http-body 0.4.6",
|
2022-10-08 04:30:12 -06:00
|
|
|
"httparse",
|
|
|
|
"httpdate",
|
|
|
|
"itoa",
|
|
|
|
"pin-project-lite",
|
2023-12-22 07:46:04 -07:00
|
|
|
"socket2",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tokio",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
|
|
|
"want",
|
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "hyper"
|
|
|
|
version = "1.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fe575dd17d0862a9a33781c8c4696a55c320909004a67a00fb286ba8b1bc496d"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures-channel",
|
|
|
|
"futures-util",
|
2024-06-27 00:08:43 -06:00
|
|
|
"h2 0.4.5",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 1.1.0",
|
|
|
|
"http-body 1.0.0",
|
|
|
|
"httparse",
|
|
|
|
"httpdate",
|
|
|
|
"itoa",
|
|
|
|
"pin-project-lite",
|
|
|
|
"smallvec",
|
|
|
|
"tokio",
|
2024-06-27 00:08:43 -06:00
|
|
|
"want",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hyper-rustls"
|
|
|
|
version = "0.27.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5ee4be2c948921a1a5320b629c4193916ed787a7f7f293fd3f7f5a6c9de74155"
|
|
|
|
dependencies = [
|
|
|
|
"futures-util",
|
|
|
|
"http 1.1.0",
|
|
|
|
"hyper 1.3.1",
|
|
|
|
"hyper-util",
|
|
|
|
"log",
|
|
|
|
"rustls 0.23.10",
|
|
|
|
"rustls-native-certs",
|
|
|
|
"rustls-pki-types",
|
|
|
|
"tokio",
|
|
|
|
"tokio-rustls",
|
|
|
|
"tower-service",
|
2024-05-28 06:52:17 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "hyper-timeout"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1"
|
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2022-10-08 04:30:12 -06:00
|
|
|
"pin-project-lite",
|
|
|
|
"tokio",
|
|
|
|
"tokio-io-timeout",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "hyper-tls"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
|
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2022-10-08 04:30:12 -06:00
|
|
|
"native-tls",
|
|
|
|
"tokio",
|
|
|
|
"tokio-native-tls",
|
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "hyper-util"
|
2024-06-04 07:56:56 -06:00
|
|
|
version = "0.1.5"
|
2024-05-28 06:52:17 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-04 07:56:56 -06:00
|
|
|
checksum = "7b875924a60b96e5d7b9ae7b066540b1dd1cbd90d1828f54c92e02a283351c56"
|
2024-05-28 06:52:17 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2024-06-27 00:08:43 -06:00
|
|
|
"futures-channel",
|
2024-05-28 06:52:17 -06:00
|
|
|
"futures-util",
|
|
|
|
"http 1.1.0",
|
|
|
|
"http-body 1.0.0",
|
|
|
|
"hyper 1.3.1",
|
|
|
|
"pin-project-lite",
|
2024-06-27 00:08:43 -06:00
|
|
|
"socket2",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tokio",
|
2024-06-27 00:08:43 -06:00
|
|
|
"tower",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
2024-05-28 06:52:17 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ident_case"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "idna"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.5.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"unicode-bidi",
|
|
|
|
"unicode-normalization",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "image"
|
|
|
|
version = "0.25.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "fd54d660e773627692c524beaad361aca785a4f9f5730ce91f42aabe5bce3d11"
|
|
|
|
dependencies = [
|
|
|
|
"bytemuck",
|
|
|
|
"byteorder",
|
|
|
|
"color_quant",
|
|
|
|
"exr",
|
|
|
|
"gif",
|
|
|
|
"image-webp",
|
|
|
|
"num-traits",
|
|
|
|
"png",
|
|
|
|
"qoi",
|
|
|
|
"ravif",
|
|
|
|
"rayon",
|
|
|
|
"rgb",
|
|
|
|
"tiff",
|
|
|
|
"zune-core",
|
|
|
|
"zune-jpeg",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "image-webp"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.1.2"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "d730b085583c4d789dfd07fdcf185be59501666a90c97c40162b37e4fdad272d"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
2024-05-06 05:48:11 -06:00
|
|
|
"byteorder-lite",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "imgref"
|
|
|
|
version = "1.10.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "44feda355f4159a7c757171a77de25daf6411e217b4cabd03bd6650690468126"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "indexmap"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "1.9.3"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
2023-07-01 11:25:41 -06:00
|
|
|
"hashbrown 0.12.3",
|
2023-07-14 08:31:48 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "indexmap"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "2.2.6"
|
2023-07-14 08:31:48 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26"
|
2023-07-14 08:31:48 -06:00
|
|
|
dependencies = [
|
|
|
|
"equivalent",
|
2024-05-06 05:48:11 -06:00
|
|
|
"hashbrown 0.14.5",
|
2023-02-03 04:43:37 -07:00
|
|
|
"serde",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "indicatif"
|
2024-02-16 09:50:57 -07:00
|
|
|
version = "0.17.8"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-16 09:50:57 -07:00
|
|
|
checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"console",
|
2023-09-27 02:40:18 -06:00
|
|
|
"instant",
|
2023-11-30 07:18:15 -07:00
|
|
|
"number_prefix",
|
2023-09-27 02:40:18 -06:00
|
|
|
"portable-atomic",
|
|
|
|
"unicode-width",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "indoc"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "2.0.5"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
2023-06-16 08:25:11 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "init-tracing-opentelemetry"
|
|
|
|
version = "0.14.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "94bd26b1b737bc11f183620072e188d1c6ede67e0e78682228d66b49ec510e17"
|
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry 0.20.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
"opentelemetry-otlp",
|
|
|
|
"thiserror",
|
|
|
|
"tracing",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing-opentelemetry 0.21.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
]
|
2023-02-13 05:02:45 -07:00
|
|
|
|
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "instant"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.1.13"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"cfg-if",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "interpolate_name"
|
|
|
|
version = "0.2.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c34819042dc3d3971c46c2190835914dfbe0c3c13f61449b2997f4e9722dfa60"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
]
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ipnet"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "2.9.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2024-05-06 05:48:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "is_terminal_polyfill"
|
|
|
|
version = "1.70.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800"
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "iso8601"
|
|
|
|
version = "0.6.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "924e5d73ea28f59011fec52a0d12185d496a9b075d360657aed2a5707f701153"
|
|
|
|
dependencies = [
|
|
|
|
"nom",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "itertools"
|
|
|
|
version = "0.10.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "itertools"
|
|
|
|
version = "0.11.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
]
|
2023-04-09 12:22:27 -06:00
|
|
|
|
2024-02-16 09:50:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "itertools"
|
|
|
|
version = "0.12.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
]
|
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "itoa"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "1.0.11"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "jobserver"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.1.31"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "jpeg-decoder"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "js-sys"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.3.69"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "jsonschema"
|
|
|
|
version = "0.17.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2a071f4f7efc9a9118dfb627a0a94ef247986e1ab8606a4c806ae2b3aa3b6978"
|
|
|
|
dependencies = [
|
|
|
|
"ahash",
|
|
|
|
"anyhow",
|
|
|
|
"base64 0.21.7",
|
|
|
|
"bytecount",
|
|
|
|
"clap",
|
|
|
|
"fancy-regex",
|
|
|
|
"fraction",
|
|
|
|
"getrandom",
|
|
|
|
"iso8601",
|
|
|
|
"itoa",
|
|
|
|
"memchr",
|
|
|
|
"num-cmp",
|
|
|
|
"once_cell",
|
|
|
|
"parking_lot",
|
|
|
|
"percent-encoding",
|
|
|
|
"regex",
|
|
|
|
"reqwest",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"time",
|
|
|
|
"url",
|
|
|
|
"uuid",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "lazy_static"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.5.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "lazycell"
|
|
|
|
version = "1.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "lebe"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "03087c2bad5e1034e8cace5926dec053fb3790248370865f5117a7d0213354c8"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "libc"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.2.155"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
|
2023-02-13 05:02:45 -07:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "libfuzzer-sys"
|
|
|
|
version = "0.4.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a96cfd5557eb82f2b83fed4955246c988d331975a002961b07c81584d107e7f7"
|
|
|
|
dependencies = [
|
|
|
|
"arbitrary",
|
|
|
|
"cc",
|
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "libloading"
|
|
|
|
version = "0.8.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e310b3a6b5907f99202fcdb4960ff45b93735d7c7d96b760fcff8db2dc0e103d"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"windows-targets 0.52.5",
|
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "libm"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.2.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "libredox"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.1.3"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d"
|
2023-11-30 07:18:15 -07:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-11-30 07:18:15 -07:00
|
|
|
"libc",
|
|
|
|
]
|
2023-05-09 05:19:31 -06:00
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "linux-raw-sys"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.4.14"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
|
2023-07-01 11:25:41 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "lock_api"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.4.12"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"scopeguard",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "log"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.4.21"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "loop9"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0fae87c125b03c1d2c0150c90365d7d6bcc53fb73a9acaef207d2d065860f062"
|
|
|
|
dependencies = [
|
|
|
|
"imgref",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "macro_rules_attribute"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.2.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "8a82271f7bc033d84bbca59a3ce3e4159938cb08a9c3aebbe54d215131518a13"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"macro_rules_attribute-proc_macro",
|
|
|
|
"paste",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "macro_rules_attribute-proc_macro"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.2.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "b8dd856d451cc0da70e2ef2ce95a18e39a93b7558bedf10201ad28503f918568"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "match_cfg"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4"
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "matchers"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558"
|
|
|
|
dependencies = [
|
2023-07-14 08:31:48 -06:00
|
|
|
"regex-automata 0.1.10",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2022-10-11 10:14:39 -06:00
|
|
|
[[package]]
|
|
|
|
name = "matchit"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.7.3"
|
2022-10-11 10:14:39 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94"
|
2022-10-11 10:14:39 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "maybe-rayon"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8ea1f30cedd69f0a2954655f7188c6a834246d2bcf1e315e2ac40c4b24dc9519"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"rayon",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "memchr"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "2.7.4"
|
2023-07-13 06:22:37 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-02-16 09:18:53 -07:00
|
|
|
[[package]]
|
|
|
|
name = "metrics"
|
2023-07-14 08:31:48 -06:00
|
|
|
version = "0.21.1"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-14 08:31:48 -06:00
|
|
|
checksum = "fde3af1a009ed76a778cb84fdef9e7dbbdf5775ae3e4cc1f434a6a307f6f76c5"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
|
|
|
"ahash",
|
|
|
|
"metrics-macros",
|
2023-07-01 11:25:41 -06:00
|
|
|
"portable-atomic",
|
2023-02-16 09:18:53 -07:00
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "metrics"
|
|
|
|
version = "0.23.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "884adb57038347dfbaf2d5065887b6cf4312330dc8e94bc30a1a839bd79d3261"
|
|
|
|
dependencies = [
|
|
|
|
"ahash",
|
|
|
|
"portable-atomic",
|
|
|
|
]
|
|
|
|
|
2023-02-16 09:18:53 -07:00
|
|
|
[[package]]
|
|
|
|
name = "metrics-exporter-prometheus"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.15.1"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "bf0af7a0d7ced10c0151f870e5e3f3f8bc9ffc5992d32873566ca1f9169ae776"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"base64 0.22.1",
|
|
|
|
"http-body-util",
|
|
|
|
"hyper 1.3.1",
|
|
|
|
"hyper-rustls",
|
|
|
|
"hyper-util",
|
|
|
|
"indexmap 2.2.6",
|
2023-02-16 09:18:53 -07:00
|
|
|
"ipnet",
|
2024-06-27 00:08:43 -06:00
|
|
|
"metrics 0.23.0",
|
2023-02-16 09:18:53 -07:00
|
|
|
"metrics-util",
|
|
|
|
"quanta",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "metrics-macros"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.7.1"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "38b4faf00617defe497754acde3024865bc143d44a86799b24e191ecff91354f"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-02-16 09:18:53 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "metrics-util"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.17.0"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "4259040465c955f9f2f1a4a8a16dc46726169bca0f88e8fb2dbeced487c3e828"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-epoch",
|
|
|
|
"crossbeam-utils",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hashbrown 0.14.5",
|
|
|
|
"metrics 0.23.0",
|
2023-02-16 09:18:53 -07:00
|
|
|
"num_cpus",
|
|
|
|
"quanta",
|
|
|
|
"sketches-ddsketch",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "mime"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.3.17"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "mime_guess"
|
|
|
|
version = "2.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef"
|
|
|
|
dependencies = [
|
|
|
|
"mime",
|
|
|
|
"unicase",
|
|
|
|
]
|
|
|
|
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
[[package]]
|
|
|
|
name = "minijinja"
|
2024-06-13 09:53:49 -06:00
|
|
|
version = "2.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e136ef580d7955019ab0a407b68d77c292a9976907e217900f3f76bc8f6dc1a4"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "minijinja-contrib"
|
|
|
|
version = "2.0.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "15ee37078c98d31e510d6a7af488031a2c3ccacdb76c5c4fc98ddfe6d0e9da07"
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
dependencies = [
|
2024-06-13 09:53:49 -06:00
|
|
|
"minijinja",
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "minimal-lexical"
|
|
|
|
version = "0.2.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "miniz_oxide"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.7.4"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"adler",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
"simd-adler32",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "mio"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.8.11"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"log",
|
2023-07-01 11:25:41 -06:00
|
|
|
"wasi",
|
2023-06-16 08:25:11 -06:00
|
|
|
"windows-sys 0.48.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "mirai-annotations"
|
|
|
|
version = "1.12.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c9be0862c1b3f26a88803c4a49de6889c10e608b3ee9344e6ef5b45fb37ad3d1"
|
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
|
|
|
name = "monostate"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.1.13"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "0d208407d7552cd041d8cdb69a1bc3303e029c598738177a3d87082004dc0e1e"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
|
|
|
"monostate-impl",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "monostate-impl"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.1.13"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "a7ce64b975ed4f123575d11afd9491f2e37bbd5813fbfbc0f09ae1fbddea74e0"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-04-09 12:22:27 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "multimap"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.10.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "muxado"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e92b89ac3127251efde6f5a9586e5aae99468d06fcf9f133b377f58d5ed66446"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"awaitdrop",
|
2023-07-01 11:25:41 -06:00
|
|
|
"bitflags 1.3.2",
|
2023-06-16 08:25:11 -06:00
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"pin-project",
|
|
|
|
"rand",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tokio-util",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "native-tls"
|
2024-06-04 07:56:56 -06:00
|
|
|
version = "0.2.12"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-04 07:56:56 -06:00
|
|
|
checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"log",
|
|
|
|
"openssl",
|
|
|
|
"openssl-probe",
|
|
|
|
"openssl-sys",
|
|
|
|
"schannel",
|
|
|
|
"security-framework",
|
|
|
|
"security-framework-sys",
|
|
|
|
"tempfile",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "new_debug_unreachable"
|
|
|
|
version = "1.0.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ngrok"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.13.1"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "1454b1edbc5f2c8ff3242c237cb84388b50eced8eb26b4204e49698ed6511784"
|
2023-06-16 08:25:11 -06:00
|
|
|
dependencies = [
|
|
|
|
"arc-swap",
|
|
|
|
"async-rustls",
|
|
|
|
"async-trait",
|
|
|
|
"awaitdrop",
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum 0.6.20",
|
2023-06-16 08:25:11 -06:00
|
|
|
"base64 0.13.1",
|
|
|
|
"bytes",
|
|
|
|
"futures",
|
|
|
|
"hostname",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2023-06-16 08:25:11 -06:00
|
|
|
"muxado",
|
|
|
|
"once_cell",
|
|
|
|
"parking_lot",
|
|
|
|
"regex",
|
2024-06-27 00:08:43 -06:00
|
|
|
"rustls-pemfile 1.0.4",
|
2023-06-16 08:25:11 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tokio-retry",
|
|
|
|
"tokio-util",
|
|
|
|
"tracing",
|
|
|
|
"windows-sys 0.45.0",
|
|
|
|
]
|
|
|
|
|
2024-03-21 10:45:56 -06:00
|
|
|
[[package]]
|
|
|
|
name = "nix"
|
|
|
|
version = "0.28.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4"
|
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2024-03-21 10:45:56 -06:00
|
|
|
"cfg-if",
|
|
|
|
"cfg_aliases",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
2023-01-26 08:29:13 -07:00
|
|
|
[[package]]
|
|
|
|
name = "nohash-hasher"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "nom"
|
2023-02-13 05:02:45 -07:00
|
|
|
version = "7.1.3"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-13 05:02:45 -07:00
|
|
|
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
"minimal-lexical",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "noop_proc_macro"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0676bb32a98c1a483ce53e500a81ad9c3d5b3f7c920c28c24e9cb0980d0b5bc8"
|
|
|
|
|
2023-05-02 07:43:19 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ntapi"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4"
|
|
|
|
dependencies = [
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "nu-ansi-term"
|
|
|
|
version = "0.46.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84"
|
|
|
|
dependencies = [
|
|
|
|
"overload",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "num"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.4.3"
|
2024-02-21 03:05:32 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23"
|
2024-02-21 03:05:32 -07:00
|
|
|
dependencies = [
|
|
|
|
"num-bigint",
|
|
|
|
"num-complex",
|
|
|
|
"num-integer",
|
|
|
|
"num-iter",
|
|
|
|
"num-rational",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-bigint"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.4.5"
|
2024-02-21 03:05:32 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7"
|
2024-02-21 03:05:32 -07:00
|
|
|
dependencies = [
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-cmp"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "63335b2e2c34fae2fb0aa2cecfd9f0832a1e24b3b32ecec612c3426d46dc8aaa"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-complex"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.4.6"
|
2024-02-21 03:05:32 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495"
|
2024-02-21 03:05:32 -07:00
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
2024-02-16 09:50:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "num-conv"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9"
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "num-derive"
|
|
|
|
version = "0.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "num-integer"
|
|
|
|
version = "0.1.46"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-iter"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.1.45"
|
2024-02-21 03:05:32 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf"
|
2024-02-21 03:05:32 -07:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "num-rational"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.4.2"
|
2024-02-21 03:05:32 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824"
|
2024-02-21 03:05:32 -07:00
|
|
|
dependencies = [
|
|
|
|
"num-bigint",
|
|
|
|
"num-integer",
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "num-traits"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.2.19"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
"libm",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "num_cpus"
|
2023-07-01 11:25:41 -06:00
|
|
|
version = "1.16.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-07-01 11:25:41 -06:00
|
|
|
checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-07-01 11:25:41 -06:00
|
|
|
"hermit-abi",
|
2022-10-08 04:30:12 -06:00
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
2023-07-14 08:31:48 -06:00
|
|
|
[[package]]
|
|
|
|
name = "num_threads"
|
2024-02-16 09:50:57 -07:00
|
|
|
version = "0.1.7"
|
2023-07-14 08:31:48 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-16 09:50:57 -07:00
|
|
|
checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9"
|
2023-07-14 08:31:48 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "number_prefix"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3"
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "object"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.36.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "once_cell"
|
2023-12-11 06:55:03 -07:00
|
|
|
version = "1.19.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 06:55:03 -07:00
|
|
|
checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "onig"
|
|
|
|
version = "6.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8c4b31c8722ad9171c6d77d3557db078cab2bd50afcc9d09c8b315c59df8ca4f"
|
|
|
|
dependencies = [
|
2023-07-01 11:25:41 -06:00
|
|
|
"bitflags 1.3.2",
|
2022-10-08 04:30:12 -06:00
|
|
|
"libc",
|
|
|
|
"once_cell",
|
|
|
|
"onig_sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "onig_sys"
|
|
|
|
version = "69.8.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7b829e3d7e9cc74c7e315ee8edb185bf4190da5acde74afd7fc59c35b1f086e7"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"pkg-config",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl"
|
2024-02-21 06:50:57 -07:00
|
|
|
version = "0.10.64"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-21 06:50:57 -07:00
|
|
|
checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
"cfg-if",
|
|
|
|
"foreign-types",
|
|
|
|
"libc",
|
|
|
|
"once_cell",
|
|
|
|
"openssl-macros",
|
|
|
|
"openssl-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl-macros"
|
2023-04-11 12:32:18 -06:00
|
|
|
version = "0.1.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-11 12:32:18 -06:00
|
|
|
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl-probe"
|
|
|
|
version = "0.1.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "openssl-sys"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "0.9.102"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
"pkg-config",
|
|
|
|
"vcpkg",
|
|
|
|
]
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "opentelemetry"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.20.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "9591d937bc0e6d2feb6f71a559540ab300ea49955229c347a517a28d27784c54"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"opentelemetry_api",
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry_sdk 0.20.0",
|
2023-07-01 11:25:41 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2024-05-28 06:52:17 -06:00
|
|
|
name = "opentelemetry"
|
|
|
|
version = "0.21.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "1e32339a5dc40459130b3bd269e9892439f55b33e772d2a9d402a789baaf4e8a"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"futures-core",
|
|
|
|
"futures-sink",
|
|
|
|
"indexmap 2.2.6",
|
|
|
|
"js-sys",
|
|
|
|
"once_cell",
|
|
|
|
"pin-project-lite",
|
|
|
|
"thiserror",
|
|
|
|
"urlencoding",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "opentelemetry-otlp"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.13.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "7e5e5a5c4135864099f3faafbe939eb4d7f9b80ebf68a8448da961b32a7c1275"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
2023-09-27 02:40:18 -06:00
|
|
|
"futures-core",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
2023-02-13 05:02:45 -07:00
|
|
|
"opentelemetry-proto",
|
2023-09-27 02:40:18 -06:00
|
|
|
"opentelemetry-semantic-conventions",
|
|
|
|
"opentelemetry_api",
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry_sdk 0.20.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
"prost 0.11.9",
|
2023-02-13 05:02:45 -07:00
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
2023-09-27 02:40:18 -06:00
|
|
|
"tonic 0.9.2",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "opentelemetry-proto"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.3.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "b1e3f814aa9f8c905d0ee4bde026afd3b2577a97c10e1699912e3e44f0c4cbeb"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"opentelemetry_api",
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry_sdk 0.20.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
"prost 0.11.9",
|
|
|
|
"tonic 0.9.2",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "opentelemetry-semantic-conventions"
|
|
|
|
version = "0.12.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "73c9f9340ad135068800e7f1b24e9e09ed9e7143f5bf8518ded3d3ec69789269"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry 0.20.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "opentelemetry_api"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.20.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
|
|
|
"futures-channel",
|
|
|
|
"futures-util",
|
2023-07-14 08:31:48 -06:00
|
|
|
"indexmap 1.9.3",
|
2023-09-27 02:40:18 -06:00
|
|
|
"js-sys",
|
2023-07-01 11:25:41 -06:00
|
|
|
"once_cell",
|
|
|
|
"pin-project-lite",
|
|
|
|
"thiserror",
|
|
|
|
"urlencoding",
|
|
|
|
]
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "opentelemetry_sdk"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.20.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "fa8e705a0612d48139799fcbaba0d4a90f06277153e43dd2bdc16c6f0edd8026"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"crossbeam-channel",
|
|
|
|
"futures-channel",
|
|
|
|
"futures-executor",
|
|
|
|
"futures-util",
|
|
|
|
"once_cell",
|
2023-09-27 02:40:18 -06:00
|
|
|
"opentelemetry_api",
|
2024-05-28 06:52:17 -06:00
|
|
|
"ordered-float 3.9.2",
|
2023-07-01 11:25:41 -06:00
|
|
|
"percent-encoding",
|
|
|
|
"rand",
|
2023-09-27 02:40:18 -06:00
|
|
|
"regex",
|
|
|
|
"serde_json",
|
2023-07-01 11:25:41 -06:00
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
|
|
|
"tokio-stream",
|
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "opentelemetry_sdk"
|
|
|
|
version = "0.21.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "2f16aec8a98a457a52664d69e0091bac3a0abd18ead9b641cb00202ba4e0efe4"
|
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
|
|
|
"crossbeam-channel",
|
|
|
|
"futures-channel",
|
|
|
|
"futures-executor",
|
|
|
|
"futures-util",
|
|
|
|
"glob",
|
|
|
|
"once_cell",
|
|
|
|
"opentelemetry 0.21.0",
|
|
|
|
"ordered-float 4.2.0",
|
|
|
|
"percent-encoding",
|
|
|
|
"rand",
|
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "option-ext"
|
|
|
|
version = "0.2.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ordered-float"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "3.9.2"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"num-traits",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ordered-float"
|
|
|
|
version = "4.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e"
|
|
|
|
dependencies = [
|
|
|
|
"num-traits",
|
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "overload"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
|
|
|
|
|
2023-05-25 05:38:36 -06:00
|
|
|
[[package]]
|
|
|
|
name = "papergrid"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.10.0"
|
2023-05-25 05:38:36 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "a2ccbe15f2b6db62f9a9871642746427e297b0ceb85f9a7f1ee5ff47d184d0c8"
|
2023-05-25 05:38:36 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytecount",
|
|
|
|
"fnv",
|
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "parking_lot"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.12.3"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"lock_api",
|
|
|
|
"parking_lot_core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "parking_lot_core"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.9.10"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"libc",
|
2023-11-30 07:18:15 -07:00
|
|
|
"redox_syscall",
|
2022-10-08 04:30:12 -06:00
|
|
|
"smallvec",
|
2024-05-06 05:48:11 -06:00
|
|
|
"windows-targets 0.52.5",
|
2023-04-09 12:22:27 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "paste"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.15"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"
|
2023-04-09 12:22:27 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "percent-encoding"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "2.3.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "petgraph"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.6.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"fixedbitset",
|
2024-03-29 12:17:24 -06:00
|
|
|
"indexmap 2.2.6",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "1.1.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"pin-project-internal",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project-internal"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "1.1.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-project-lite"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.2.14"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pin-utils"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "pkg-config"
|
2024-02-16 09:50:57 -07:00
|
|
|
version = "0.3.30"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-16 09:50:57 -07:00
|
|
|
checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "png"
|
|
|
|
version = "0.17.13"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "06e4b0d3d1312775e782c86c91a111aa1f910cbb65e1337f9975b5f9a554b5e1"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags 1.3.2",
|
|
|
|
"crc32fast",
|
|
|
|
"fdeflate",
|
|
|
|
"flate2",
|
|
|
|
"miniz_oxide",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "portable-atomic"
|
2023-12-11 06:55:03 -07:00
|
|
|
version = "1.6.0"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 06:55:03 -07:00
|
|
|
checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "powerfmt"
|
|
|
|
version = "0.2.0"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
|
2023-02-16 09:18:53 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ppv-lite86"
|
2022-11-09 10:24:07 -07:00
|
|
|
version = "0.2.17"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-11-09 10:24:07 -07:00
|
|
|
checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "prettyplease"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.2.20"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2022-10-17 10:27:33 -06:00
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-error"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro-error-attr",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-04-09 12:22:27 -06:00
|
|
|
"syn 1.0.109",
|
2022-10-17 10:27:33 -06:00
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "proc-macro-error-attr"
|
|
|
|
version = "1.0.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "proc-macro2"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.0.86"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"unicode-ident",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "profiling"
|
|
|
|
version = "1.0.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58"
|
|
|
|
dependencies = [
|
|
|
|
"profiling-procmacros",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "profiling-procmacros"
|
|
|
|
version = "1.0.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8021cf59c8ec9c432cfc2526ac6b8aa508ecaf29cd415f271b8406c1b851c3fd"
|
|
|
|
dependencies = [
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "prost"
|
2023-04-20 03:07:40 -06:00
|
|
|
version = "0.11.9"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-20 03:07:40 -06:00
|
|
|
checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2023-09-27 02:40:18 -06:00
|
|
|
"prost-derive 0.11.9",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "prost"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.12.6"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2024-05-28 06:52:17 -06:00
|
|
|
"prost-derive 0.12.6",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "prost-build"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.12.6"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "22505a5c94da8e3b7c2996394d1c933236c4d743e81a410bcca4e6989fc066a4"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
2024-04-12 10:38:34 -06:00
|
|
|
"heck 0.5.0",
|
|
|
|
"itertools 0.12.1",
|
2022-10-08 04:30:12 -06:00
|
|
|
"log",
|
|
|
|
"multimap",
|
2023-09-27 02:40:18 -06:00
|
|
|
"once_cell",
|
2022-10-08 04:30:12 -06:00
|
|
|
"petgraph",
|
2023-02-13 05:02:45 -07:00
|
|
|
"prettyplease",
|
2024-05-28 06:52:17 -06:00
|
|
|
"prost 0.12.6",
|
2022-10-08 04:30:12 -06:00
|
|
|
"prost-types",
|
|
|
|
"regex",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tempfile",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "prost-derive"
|
2023-04-20 03:07:40 -06:00
|
|
|
version = "0.11.9"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-20 03:07:40 -06:00
|
|
|
checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
|
|
|
"itertools 0.10.5",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-04-09 12:22:27 -06:00
|
|
|
"syn 1.0.109",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "prost-derive"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.12.6"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
2024-04-12 10:38:34 -06:00
|
|
|
"itertools 0.12.1",
|
2023-09-27 02:40:18 -06:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-09-27 02:40:18 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "prost-types"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.12.6"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "9091c90b0a32608e984ff2fa4091273cbdd755d54935c51d520887f4a1dbd5b0"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"prost 0.12.6",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "qoi"
|
|
|
|
version = "0.4.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7f6d64c71eb498fe9eae14ce4ec935c555749aef511cca85b5568910d6e48001"
|
|
|
|
dependencies = [
|
|
|
|
"bytemuck",
|
|
|
|
]
|
|
|
|
|
2023-02-16 09:18:53 -07:00
|
|
|
[[package]]
|
|
|
|
name = "quanta"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.12.3"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-utils",
|
|
|
|
"libc",
|
|
|
|
"once_cell",
|
|
|
|
"raw-cpuid",
|
2023-07-01 11:25:41 -06:00
|
|
|
"wasi",
|
2023-02-16 09:18:53 -07:00
|
|
|
"web-sys",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "quick-error"
|
|
|
|
version = "2.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "quote"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "1.0.36"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand"
|
|
|
|
version = "0.8.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"rand_chacha",
|
|
|
|
"rand_core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_chacha"
|
|
|
|
version = "0.3.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88"
|
|
|
|
dependencies = [
|
|
|
|
"ppv-lite86",
|
|
|
|
"rand_core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rand_core"
|
|
|
|
version = "0.6.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
|
|
|
dependencies = [
|
|
|
|
"getrandom",
|
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ratatui"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.23.0"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "2e2e4cd95294a85c3b4446e63ef054eea43e0205b1fd60120c16b74ff7ff96ad"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-05-09 05:19:31 -06:00
|
|
|
"cassowary",
|
|
|
|
"crossterm",
|
2023-09-27 02:40:18 -06:00
|
|
|
"indoc",
|
|
|
|
"itertools 0.11.0",
|
|
|
|
"paste",
|
|
|
|
"strum",
|
2023-05-09 05:19:31 -06:00
|
|
|
"unicode-segmentation",
|
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rav1e"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "cd87ce80a7665b1cce111f8a16c1f3929f6547ce91ade6addf4ec86a8dda5ce9"
|
|
|
|
dependencies = [
|
|
|
|
"arbitrary",
|
|
|
|
"arg_enum_proc_macro",
|
|
|
|
"arrayvec",
|
|
|
|
"av1-grain",
|
|
|
|
"bitstream-io",
|
|
|
|
"built",
|
|
|
|
"cfg-if",
|
|
|
|
"interpolate_name",
|
|
|
|
"itertools 0.12.1",
|
|
|
|
"libc",
|
|
|
|
"libfuzzer-sys",
|
|
|
|
"log",
|
|
|
|
"maybe-rayon",
|
|
|
|
"new_debug_unreachable",
|
|
|
|
"noop_proc_macro",
|
|
|
|
"num-derive",
|
|
|
|
"num-traits",
|
|
|
|
"once_cell",
|
|
|
|
"paste",
|
|
|
|
"profiling",
|
|
|
|
"rand",
|
|
|
|
"rand_chacha",
|
|
|
|
"simd_helpers",
|
|
|
|
"system-deps",
|
|
|
|
"thiserror",
|
|
|
|
"v_frame",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "ravif"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.11.7"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "67376f469e7e7840d0040bbf4b9b3334005bb167f814621326e4c7ab8cd6e944"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"avif-serialize",
|
|
|
|
"imgref",
|
|
|
|
"loop9",
|
|
|
|
"quick-error",
|
|
|
|
"rav1e",
|
|
|
|
"rayon",
|
|
|
|
"rgb",
|
|
|
|
]
|
|
|
|
|
2023-02-16 09:18:53 -07:00
|
|
|
[[package]]
|
|
|
|
name = "raw-cpuid"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "11.0.2"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "e29830cbb1290e404f24c73af91c5d8d631ce7e128691e9477556b540cd01ecd"
|
2023-02-16 09:18:53 -07:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-02-16 09:18:53 -07:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rayon"
|
2024-03-29 12:17:24 -06:00
|
|
|
version = "1.10.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-29 12:17:24 -06:00
|
|
|
checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"rayon-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rayon-cond"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.3.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "059f538b55efd2309c9794130bc149c6a553db90e9d99c2030785c82f0bd7df9"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"either",
|
2023-11-30 07:18:15 -07:00
|
|
|
"itertools 0.11.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
"rayon",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rayon-core"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "1.12.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"crossbeam-deque",
|
|
|
|
"crossbeam-utils",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "redox_syscall"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.5.2"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-04-09 12:22:27 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "redox_users"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.4.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"getrandom",
|
2023-11-30 07:18:15 -07:00
|
|
|
"libredox",
|
2022-10-08 04:30:12 -06:00
|
|
|
"thiserror",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "regex"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.10.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-11-30 07:18:15 -07:00
|
|
|
"aho-corasick",
|
2022-10-08 04:30:12 -06:00
|
|
|
"memchr",
|
2024-06-27 00:08:43 -06:00
|
|
|
"regex-automata 0.4.7",
|
|
|
|
"regex-syntax 0.8.4",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "regex-automata"
|
|
|
|
version = "0.1.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132"
|
|
|
|
dependencies = [
|
2023-06-16 08:25:11 -06:00
|
|
|
"regex-syntax 0.6.29",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2023-07-14 08:31:48 -06:00
|
|
|
[[package]]
|
|
|
|
name = "regex-automata"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.4.7"
|
2023-07-14 08:31:48 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
|
2023-07-14 08:31:48 -06:00
|
|
|
dependencies = [
|
2023-11-30 07:18:15 -07:00
|
|
|
"aho-corasick",
|
2023-07-14 08:31:48 -06:00
|
|
|
"memchr",
|
2024-06-27 00:08:43 -06:00
|
|
|
"regex-syntax 0.8.4",
|
2023-07-14 08:31:48 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "regex-syntax"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.6.29"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "regex-syntax"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.8.4"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "reqwest"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.11.27"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2024-01-26 11:04:57 -07:00
|
|
|
"base64 0.21.7",
|
2022-10-08 04:30:12 -06:00
|
|
|
"bytes",
|
|
|
|
"encoding_rs",
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
2024-06-27 00:08:43 -06:00
|
|
|
"h2 0.3.26",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
|
|
|
"http-body 0.4.6",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2022-10-08 04:30:12 -06:00
|
|
|
"hyper-tls",
|
|
|
|
"ipnet",
|
|
|
|
"js-sys",
|
|
|
|
"log",
|
|
|
|
"mime",
|
|
|
|
"native-tls",
|
|
|
|
"once_cell",
|
|
|
|
"percent-encoding",
|
|
|
|
"pin-project-lite",
|
2024-06-27 00:08:43 -06:00
|
|
|
"rustls-pemfile 1.0.4",
|
2022-10-08 04:30:12 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"serde_urlencoded",
|
2024-05-28 06:52:17 -06:00
|
|
|
"sync_wrapper 0.1.2",
|
2023-11-30 07:18:15 -07:00
|
|
|
"system-configuration",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tokio",
|
|
|
|
"tokio-native-tls",
|
|
|
|
"tower-service",
|
|
|
|
"url",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"wasm-bindgen-futures",
|
|
|
|
"web-sys",
|
|
|
|
"winreg",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rgb"
|
|
|
|
version = "0.8.37"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8"
|
|
|
|
dependencies = [
|
|
|
|
"bytemuck",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ring"
|
|
|
|
version = "0.16.20"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc"
|
|
|
|
dependencies = [
|
|
|
|
"cc",
|
|
|
|
"libc",
|
|
|
|
"once_cell",
|
2023-11-30 07:18:15 -07:00
|
|
|
"spin 0.5.2",
|
|
|
|
"untrusted 0.7.1",
|
2023-06-16 08:25:11 -06:00
|
|
|
"web-sys",
|
|
|
|
"winapi",
|
|
|
|
]
|
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "ring"
|
2024-02-21 06:50:57 -07:00
|
|
|
version = "0.17.8"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-21 06:50:57 -07:00
|
|
|
checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d"
|
2023-11-30 07:18:15 -07:00
|
|
|
dependencies = [
|
|
|
|
"cc",
|
2024-02-21 06:50:57 -07:00
|
|
|
"cfg-if",
|
2023-11-30 07:18:15 -07:00
|
|
|
"getrandom",
|
|
|
|
"libc",
|
|
|
|
"spin 0.9.8",
|
|
|
|
"untrusted 0.9.0",
|
2024-02-21 06:50:57 -07:00
|
|
|
"windows-sys 0.52.0",
|
2023-11-30 07:18:15 -07:00
|
|
|
]
|
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "rust-embed"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "8.4.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "19549741604902eb99a7ed0ee177a0663ee1eda51a29f71401f166e47e77806a"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
|
|
|
"rust-embed-impl",
|
|
|
|
"rust-embed-utils",
|
|
|
|
"walkdir",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rust-embed-impl"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "8.4.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "cb9f96e283ec64401f30d3df8ee2aaeb2561f34c824381efa24a35f79bf40ee4"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"rust-embed-utils",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-02-03 04:43:37 -07:00
|
|
|
"walkdir",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rust-embed-utils"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "8.4.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "38c74a686185620830701348de757fd36bef4aa9680fd23c49fc539ddcc1af32"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
|
|
|
"sha2",
|
|
|
|
"walkdir",
|
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustc-demangle"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.1.24"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f"
|
2023-07-01 11:25:41 -06:00
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustc-hash"
|
|
|
|
version = "1.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
|
|
|
2023-05-02 07:43:19 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustc_version"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366"
|
|
|
|
dependencies = [
|
|
|
|
"semver",
|
|
|
|
]
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "rustix"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.38.34"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-07-01 11:25:41 -06:00
|
|
|
"errno",
|
|
|
|
"libc",
|
2023-08-14 11:26:19 -06:00
|
|
|
"linux-raw-sys",
|
2023-12-11 04:46:30 -07:00
|
|
|
"windows-sys 0.52.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustls"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.20.9"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99"
|
2023-06-16 08:25:11 -06:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
2023-11-30 07:18:15 -07:00
|
|
|
"ring 0.16.20",
|
2023-06-16 08:25:11 -06:00
|
|
|
"sct",
|
|
|
|
"webpki",
|
|
|
|
]
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustls"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.22.4"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "bf4ef73721ac7bcd79b2b315da7779d8fc09718c6b3d2d1b2d94850eb8c18432"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
2024-02-21 06:50:57 -07:00
|
|
|
"ring 0.17.8",
|
2024-02-16 09:50:57 -07:00
|
|
|
"rustls-pki-types",
|
2023-11-30 07:18:15 -07:00
|
|
|
"rustls-webpki",
|
2024-02-16 09:50:57 -07:00
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
2023-09-27 02:40:18 -06:00
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustls"
|
|
|
|
version = "0.23.10"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "05cff451f60db80f490f3c182b77c35260baace73209e9cdbbe526bfe3a4d402"
|
|
|
|
dependencies = [
|
|
|
|
"aws-lc-rs",
|
|
|
|
"log",
|
|
|
|
"once_cell",
|
|
|
|
"rustls-pki-types",
|
|
|
|
"rustls-webpki",
|
|
|
|
"subtle",
|
|
|
|
"zeroize",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "rustls-native-certs"
|
|
|
|
version = "0.7.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8f1fb85efa936c42c6d5fc28d2629bb51e4b2f4b8a5211e297d599cc5a093792"
|
|
|
|
dependencies = [
|
|
|
|
"openssl-probe",
|
|
|
|
"rustls-pemfile 2.1.2",
|
|
|
|
"rustls-pki-types",
|
|
|
|
"schannel",
|
|
|
|
"security-framework",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustls-pemfile"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "1.0.4"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
2024-01-26 11:04:57 -07:00
|
|
|
"base64 0.21.7",
|
2023-09-27 02:40:18 -06:00
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustls-pemfile"
|
|
|
|
version = "2.1.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d"
|
|
|
|
dependencies = [
|
|
|
|
"base64 0.22.1",
|
|
|
|
"rustls-pki-types",
|
|
|
|
]
|
|
|
|
|
2024-02-16 09:50:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "rustls-pki-types"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.7.0"
|
2024-02-16 09:50:57 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d"
|
2024-02-16 09:50:57 -07:00
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "rustls-webpki"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.102.4"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "ff448f7e92e913c4b7d4c6d8e4540a1724b319b4152b8aef6d4cf8339712b33e"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"aws-lc-rs",
|
2024-02-21 06:50:57 -07:00
|
|
|
"ring 0.17.8",
|
2024-02-16 09:50:57 -07:00
|
|
|
"rustls-pki-types",
|
2023-11-30 07:18:15 -07:00
|
|
|
"untrusted 0.9.0",
|
2023-06-16 08:25:11 -06:00
|
|
|
]
|
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "rustversion"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.17"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6"
|
2023-02-03 04:43:37 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ryu"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.18"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "same-file"
|
|
|
|
version = "1.0.6"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "schannel"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.1.23"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2024-01-26 11:04:57 -07:00
|
|
|
"windows-sys 0.52.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "scopeguard"
|
2023-08-14 11:26:19 -06:00
|
|
|
version = "1.2.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-08-14 11:26:19 -06:00
|
|
|
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "sct"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.7.1"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414"
|
2023-06-16 08:25:11 -06:00
|
|
|
dependencies = [
|
2024-02-21 06:50:57 -07:00
|
|
|
"ring 0.17.8",
|
2023-11-30 07:18:15 -07:00
|
|
|
"untrusted 0.9.0",
|
2023-06-16 08:25:11 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "security-framework"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "2.11.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
"core-foundation",
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
"security-framework-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "security-framework-sys"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "2.11.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
2023-05-02 07:43:19 -06:00
|
|
|
[[package]]
|
|
|
|
name = "semver"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.23"
|
2023-05-02 07:43:19 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b"
|
2024-01-26 11:04:57 -07:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
2023-05-02 07:43:19 -06:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "serde"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.203"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"serde_derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde_derive"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.203"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "serde_json"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.0.118"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"itoa",
|
|
|
|
"ryu",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "serde_path_to_error"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.1.16"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
2023-07-14 08:31:48 -06:00
|
|
|
"itoa",
|
2023-02-03 04:43:37 -07:00
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "serde_spanned"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.6.6"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "serde_urlencoded"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"
|
|
|
|
dependencies = [
|
|
|
|
"form_urlencoded",
|
|
|
|
"itoa",
|
|
|
|
"ryu",
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sha2"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.10.8"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"cpufeatures",
|
|
|
|
"digest",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "sharded-slab"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.1.7"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"lazy_static",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "shlex"
|
|
|
|
version = "1.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "signal-hook"
|
2023-08-14 11:26:19 -06:00
|
|
|
version = "0.3.17"
|
2023-05-09 05:19:31 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-08-14 11:26:19 -06:00
|
|
|
checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"signal-hook-registry",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "signal-hook-mio"
|
|
|
|
version = "0.2.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af"
|
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
"mio",
|
|
|
|
"signal-hook",
|
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "signal-hook-registry"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "1.4.2"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1"
|
2022-10-18 07:19:03 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "simd-adler32"
|
|
|
|
version = "0.3.7"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "simd_helpers"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "95890f873bec569a0362c235787f3aca6e1e887302ba4840839bcc6459c42da6"
|
|
|
|
dependencies = [
|
|
|
|
"quote",
|
|
|
|
]
|
|
|
|
|
2023-02-16 09:18:53 -07:00
|
|
|
[[package]]
|
|
|
|
name = "sketches-ddsketch"
|
2024-02-16 09:50:57 -07:00
|
|
|
version = "0.2.2"
|
2023-02-16 09:18:53 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-16 09:50:57 -07:00
|
|
|
checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c"
|
2023-02-16 09:18:53 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "slab"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.4.9"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"autocfg",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "slotmap"
|
2023-12-11 04:46:30 -07:00
|
|
|
version = "1.0.7"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 04:46:30 -07:00
|
|
|
checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a"
|
2023-06-16 08:25:11 -06:00
|
|
|
dependencies = [
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "smallvec"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "1.13.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-08-14 11:26:19 -06:00
|
|
|
[[package]]
|
|
|
|
name = "socket2"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.5.7"
|
2023-08-14 11:26:19 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c"
|
2023-08-14 11:26:19 -06:00
|
|
|
dependencies = [
|
|
|
|
"libc",
|
2024-02-28 08:12:14 -07:00
|
|
|
"windows-sys 0.52.0",
|
2023-08-14 11:26:19 -06:00
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "spin"
|
|
|
|
version = "0.5.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d"
|
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "spin"
|
|
|
|
version = "0.9.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"lock_api",
|
|
|
|
]
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "spm_precompiled"
|
|
|
|
version = "0.1.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5851699c4033c63636f7ea4cf7b7c1f1bf06d0cc03cfb42e711de5a5c46cf326"
|
|
|
|
dependencies = [
|
2023-02-13 05:02:45 -07:00
|
|
|
"base64 0.13.1",
|
2022-10-08 04:30:12 -06:00
|
|
|
"nom",
|
|
|
|
"serde",
|
|
|
|
"unicode-segmentation",
|
|
|
|
]
|
|
|
|
|
2024-02-16 09:50:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "strsim"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.11.1"
|
2024-02-16 09:50:57 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
2024-02-16 09:50:57 -07:00
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "strum"
|
|
|
|
version = "0.25.0"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
|
|
|
|
dependencies = [
|
|
|
|
"strum_macros",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "strum_macros"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.25.3"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
2024-03-22 11:44:05 -06:00
|
|
|
"heck 0.4.1",
|
2023-09-27 02:40:18 -06:00
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"rustversion",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-09-27 02:40:18 -06:00
|
|
|
]
|
2023-04-09 12:22:27 -06:00
|
|
|
|
2024-02-16 09:50:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "subtle"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "2.6.1"
|
2024-02-16 09:50:57 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
2024-02-16 09:50:57 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "syn"
|
2023-02-24 05:27:41 -07:00
|
|
|
version = "1.0.109"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-24 05:27:41 -07:00
|
|
|
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"unicode-ident",
|
|
|
|
]
|
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
|
|
|
name = "syn"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "2.0.68"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9"
|
2023-04-09 12:22:27 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"unicode-ident",
|
|
|
|
]
|
|
|
|
|
2022-10-11 10:14:39 -06:00
|
|
|
[[package]]
|
|
|
|
name = "sync_wrapper"
|
2023-02-13 05:02:45 -07:00
|
|
|
version = "0.1.2"
|
2022-10-11 10:14:39 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-13 05:02:45 -07:00
|
|
|
checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160"
|
2022-10-11 10:14:39 -06:00
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "sync_wrapper"
|
|
|
|
version = "1.0.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394"
|
|
|
|
|
2023-05-02 07:43:19 -06:00
|
|
|
[[package]]
|
|
|
|
name = "sysinfo"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.30.12"
|
2023-05-02 07:43:19 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "732ffa00f53e6b2af46208fba5718d9662a421049204e156328b66791ffa15ae"
|
2023-05-02 07:43:19 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
"ntapi",
|
|
|
|
"once_cell",
|
2024-01-26 11:04:57 -07:00
|
|
|
"windows",
|
2023-05-02 07:43:19 -06:00
|
|
|
]
|
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "system-configuration"
|
|
|
|
version = "0.5.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
|
|
|
|
dependencies = [
|
|
|
|
"bitflags 1.3.2",
|
|
|
|
"core-foundation",
|
|
|
|
"system-configuration-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "system-configuration-sys"
|
|
|
|
version = "0.5.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
|
|
|
|
dependencies = [
|
|
|
|
"core-foundation-sys",
|
|
|
|
"libc",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "system-deps"
|
|
|
|
version = "6.2.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"
|
|
|
|
dependencies = [
|
|
|
|
"cfg-expr",
|
|
|
|
"heck 0.5.0",
|
|
|
|
"pkg-config",
|
|
|
|
"toml",
|
|
|
|
"version-compare",
|
|
|
|
]
|
|
|
|
|
2023-05-25 05:38:36 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tabled"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.14.0"
|
2023-05-25 05:38:36 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "dfe9c3632da101aba5131ed63f9eed38665f8b3c68703a6bb18124835c1a5d22"
|
2023-05-25 05:38:36 -06:00
|
|
|
dependencies = [
|
|
|
|
"papergrid",
|
|
|
|
"tabled_derive",
|
|
|
|
"unicode-width",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tabled_derive"
|
|
|
|
version = "0.6.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "99f688a08b54f4f02f0a3c382aefdb7884d3d69609f785bd253dc033243e3fe4"
|
|
|
|
dependencies = [
|
2024-03-22 11:44:05 -06:00
|
|
|
"heck 0.4.1",
|
2023-05-25 05:38:36 -06:00
|
|
|
"proc-macro-error",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn 1.0.109",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "target-lexicon"
|
|
|
|
version = "0.12.14"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tempfile"
|
2024-02-28 08:12:14 -07:00
|
|
|
version = "3.10.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-28 08:12:14 -07:00
|
|
|
checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"fastrand",
|
2023-08-14 11:26:19 -06:00
|
|
|
"rustix",
|
2024-01-26 11:04:57 -07:00
|
|
|
"windows-sys 0.52.0",
|
2022-10-17 10:27:33 -06:00
|
|
|
]
|
|
|
|
|
2023-05-09 05:19:31 -06:00
|
|
|
[[package]]
|
|
|
|
name = "text-generation-benchmark"
|
2024-06-27 08:04:03 -06:00
|
|
|
version = "2.1.1-dev0"
|
2023-05-09 05:19:31 -06:00
|
|
|
dependencies = [
|
|
|
|
"average",
|
|
|
|
"clap",
|
|
|
|
"crossterm",
|
|
|
|
"float-ord",
|
2023-11-30 07:18:15 -07:00
|
|
|
"hf-hub",
|
2023-05-09 05:19:31 -06:00
|
|
|
"ratatui",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2023-05-25 05:38:36 -06:00
|
|
|
"tabled",
|
2023-05-09 05:19:31 -06:00
|
|
|
"text-generation-client",
|
|
|
|
"thiserror",
|
2024-04-18 09:17:40 -06:00
|
|
|
"tokenizers",
|
2023-05-09 05:19:31 -06:00
|
|
|
"tokio",
|
|
|
|
"tracing",
|
|
|
|
"tracing-subscriber",
|
|
|
|
]
|
|
|
|
|
2022-10-28 11:24:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "text-generation-client"
|
2024-06-27 08:04:03 -06:00
|
|
|
version = "2.1.1-dev0"
|
2022-10-28 11:24:00 -06:00
|
|
|
dependencies = [
|
2024-06-04 07:56:56 -06:00
|
|
|
"async-trait",
|
2024-06-03 01:27:22 -06:00
|
|
|
"base64 0.22.1",
|
2022-10-28 11:24:00 -06:00
|
|
|
"futures",
|
2023-02-13 05:02:45 -07:00
|
|
|
"grpc-metadata",
|
2024-05-28 06:52:17 -06:00
|
|
|
"prost 0.12.6",
|
2023-02-13 05:02:45 -07:00
|
|
|
"prost-build",
|
2022-10-28 11:24:00 -06:00
|
|
|
"thiserror",
|
|
|
|
"tokio",
|
2023-11-30 07:18:15 -07:00
|
|
|
"tonic 0.10.2",
|
2022-10-28 11:24:00 -06:00
|
|
|
"tonic-build",
|
|
|
|
"tower",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "text-generation-launcher"
|
2024-06-27 08:04:03 -06:00
|
|
|
version = "2.1.1-dev0"
|
2022-10-18 07:19:03 -06:00
|
|
|
dependencies = [
|
2023-04-09 12:22:27 -06:00
|
|
|
"clap",
|
2022-10-18 07:19:03 -06:00
|
|
|
"ctrlc",
|
2022-12-16 03:29:36 -07:00
|
|
|
"float_eq",
|
2024-04-12 06:20:31 -06:00
|
|
|
"hf-hub",
|
2024-03-22 11:44:05 -06:00
|
|
|
"nix",
|
2024-04-12 06:20:31 -06:00
|
|
|
"once_cell",
|
2022-12-16 03:29:36 -07:00
|
|
|
"reqwest",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2024-05-06 05:48:11 -06:00
|
|
|
"thiserror",
|
2022-10-18 07:19:03 -06:00
|
|
|
"tracing",
|
|
|
|
"tracing-subscriber",
|
2023-05-02 07:43:19 -06:00
|
|
|
"vergen",
|
2022-10-18 07:19:03 -06:00
|
|
|
]
|
|
|
|
|
2022-10-17 06:59:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "text-generation-router"
|
2024-06-27 08:04:03 -06:00
|
|
|
version = "2.1.1-dev0"
|
2022-10-17 06:59:00 -06:00
|
|
|
dependencies = [
|
2023-01-31 09:04:00 -07:00
|
|
|
"async-stream",
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum 0.7.5",
|
2023-02-13 05:02:45 -07:00
|
|
|
"axum-tracing-opentelemetry",
|
2024-05-06 05:48:11 -06:00
|
|
|
"base64 0.22.1",
|
2023-04-09 12:22:27 -06:00
|
|
|
"clap",
|
2022-10-17 06:59:00 -06:00
|
|
|
"futures",
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
"futures-util",
|
2023-11-30 07:18:15 -07:00
|
|
|
"hf-hub",
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
"image",
|
2023-09-27 02:40:18 -06:00
|
|
|
"init-tracing-opentelemetry",
|
2024-06-27 07:54:35 -06:00
|
|
|
"itertools 0.10.5",
|
2024-02-21 03:05:32 -07:00
|
|
|
"jsonschema",
|
2024-06-27 00:08:43 -06:00
|
|
|
"metrics 0.21.1",
|
2023-02-16 09:18:53 -07:00
|
|
|
"metrics-exporter-prometheus",
|
feat: supports openai chat completions API (#1427)
This PR adds support to make TGI a drop in replacement for OpenAI
clients by exposing the same HTTP interface.
Notes
- TGI inits a single model at startup so the `model` field is unused in
HTTP requests.
- `max_tokens` and `stream` should work as expected but other params may
be (unimplemented or not supported)
General approach
- fetch the `tokenizer_config` at startup from the hub
- pass `tokenizer_config` into `Infer` so we have it at request time
- use the `chat_template` on the config to format chat request
- parse jinja template and render chat string
- pass inputs into existing generate function
- wrap generation output in expected structure before returning
# How to test
### Streaming curl
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{
"model": "tgi",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "What is deep learning?"
}
],
"stream": true,
"max_tokens": 20
}' \
-H 'Content-Type: application/json'
```
It is also possible to use the `openai` python library and change the
base url
### 🌊 STREAMING REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=True
)
# iterate and print stream
for message in chat_completion:
print(message)
# ChatCompletionChunk(id='', choices=[Choice(delta=ChoiceDelta(content=' that', function_call=None, role='assistant', tool_calls=None), finish_reason=None, index=2, logprobs=None)], created=1704486761, model='', object='text_completion', system_fingerprint='')
```
### 🚗 SYNCHRONOUS REQUEST
```python
from openai import OpenAI
# init the client but point it to TGI
client = OpenAI(
base_url="http://localhost:3000/v1",
api_key="not needed for a local LLM"
)
chat_completion = client.chat.completions.create(
model="tgi",
messages=[
{"role": "system", "content": "You are a helpful assistant." },
{"role": "user", "content": "What is deep learning?"}
],
stream=False
)
print(chat_completion)
# ChatCompletion(id='', choices=[Choice(finish_reason=None, index=0, logprobs=None, message=ChatCompletionMessage(content='\nDeep learning is a new field of research that has been gaining traction in the last ...', role='assistant', function_call=None, tool_calls=None))], created=1704486762, model='', object='text_completion', system_fingerprint='', usage=CompletionUsage(completion_tokens=100, prompt_tokens=76, total_tokens=176))
```
## How to run dev
```bash
cd text-generation-inference/server
MASTER_ADDR=127.0.0.1 MASTER_PORT=5555 text-generation-server serve --trust-remote-code gpt2
```
***note many of the existing `chat_templates` use non standard `jinja`
(ie. adding a `raise` to the template) which will throw an error when
parsing; hence using `upstage/SOLAR-10.7B-Instruct-v1.0` since it has a
valid template
```bash
cd text-generation-inference/router
cargo run -- --tokenizer-name upstage/SOLAR-10.7B-Instruct-v1.0
```
trigger
```bash
curl localhost:3000/v1/chat/completions \
-X POST \
-d '{ "model": "gpt-3.5-turbo", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "What is the IP address of the Google DNS servers?" } ], "stream": true, "max_tokens": 20, "logprobs": true }' \
-H 'Content-Type: application/json'
```
^ supports `stream: true` and `stream: false` requests
2024-01-16 03:07:41 -07:00
|
|
|
"minijinja",
|
2024-06-13 09:53:49 -06:00
|
|
|
"minijinja-contrib",
|
2023-06-16 08:25:11 -06:00
|
|
|
"ngrok",
|
2023-01-26 08:29:13 -07:00
|
|
|
"nohash-hasher",
|
2024-03-22 10:14:54 -06:00
|
|
|
"once_cell",
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry 0.20.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
"opentelemetry-otlp",
|
2023-01-31 08:01:15 -07:00
|
|
|
"rand",
|
2024-03-22 10:14:54 -06:00
|
|
|
"regex",
|
2023-02-28 02:19:32 -07:00
|
|
|
"reqwest",
|
2022-10-17 06:59:00 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2022-10-28 11:24:00 -06:00
|
|
|
"text-generation-client",
|
2022-10-17 06:59:00 -06:00
|
|
|
"thiserror",
|
2024-04-18 09:17:40 -06:00
|
|
|
"tokenizers",
|
2022-10-17 06:59:00 -06:00
|
|
|
"tokio",
|
2023-10-23 07:51:12 -06:00
|
|
|
"tokio-stream",
|
2023-09-27 02:40:18 -06:00
|
|
|
"tower-http",
|
2022-10-17 06:59:00 -06:00
|
|
|
"tracing",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing-opentelemetry 0.21.0",
|
2022-10-17 06:59:00 -06:00
|
|
|
"tracing-subscriber",
|
2023-02-03 04:43:37 -07:00
|
|
|
"utoipa",
|
|
|
|
"utoipa-swagger-ui",
|
2023-04-18 08:16:06 -06:00
|
|
|
"vergen",
|
2022-10-17 06:59:00 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "thiserror"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.61"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"thiserror-impl",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thiserror-impl"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.0.61"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "thread_local"
|
2024-02-21 06:50:57 -07:00
|
|
|
version = "1.1.8"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-21 06:50:57 -07:00
|
|
|
checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-02-13 05:02:45 -07:00
|
|
|
"cfg-if",
|
2022-10-08 04:30:12 -06:00
|
|
|
"once_cell",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tiff"
|
|
|
|
version = "0.9.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ba1310fcea54c6a9a4fd1aad794ecc02c31682f6bfbecdf460bf19533eed1e3e"
|
|
|
|
dependencies = [
|
|
|
|
"flate2",
|
|
|
|
"jpeg-decoder",
|
|
|
|
"weezl",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "time"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.3.36"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-08-14 11:26:19 -06:00
|
|
|
"deranged",
|
2023-04-18 08:16:06 -06:00
|
|
|
"itoa",
|
2023-07-14 08:31:48 -06:00
|
|
|
"libc",
|
2024-02-16 09:50:57 -07:00
|
|
|
"num-conv",
|
2023-07-14 08:31:48 -06:00
|
|
|
"num_threads",
|
2023-11-30 07:18:15 -07:00
|
|
|
"powerfmt",
|
2023-04-09 12:22:27 -06:00
|
|
|
"serde",
|
|
|
|
"time-core",
|
2023-04-18 08:16:06 -06:00
|
|
|
"time-macros",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
|
|
|
name = "time-core"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.1.2"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3"
|
2023-04-09 12:22:27 -06:00
|
|
|
|
2023-04-18 08:16:06 -06:00
|
|
|
[[package]]
|
|
|
|
name = "time-macros"
|
2024-04-12 10:38:34 -06:00
|
|
|
version = "0.2.18"
|
2023-04-18 08:16:06 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-12 10:38:34 -06:00
|
|
|
checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf"
|
2023-04-18 08:16:06 -06:00
|
|
|
dependencies = [
|
2024-02-16 09:50:57 -07:00
|
|
|
"num-conv",
|
2023-04-18 08:16:06 -06:00
|
|
|
"time-core",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tinyvec"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.6.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "c55115c6fbe2d2bef26eb09ad74bde02d8255476fc0c7b515ef09fbb35742d82"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"tinyvec_macros",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tinyvec_macros"
|
2023-02-13 05:02:45 -07:00
|
|
|
version = "0.1.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-13 05:02:45 -07:00
|
|
|
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokenizers"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.19.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "e500fad1dd3af3d626327e6a3fe5050e664a6eaa4708b8ca92f1794aaf73e6fd"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-11-30 07:18:15 -07:00
|
|
|
"aho-corasick",
|
2024-02-08 10:41:25 -07:00
|
|
|
"derive_builder",
|
|
|
|
"esaxx-rs",
|
|
|
|
"getrandom",
|
|
|
|
"hf-hub",
|
|
|
|
"indicatif",
|
2024-02-16 09:50:57 -07:00
|
|
|
"itertools 0.12.1",
|
2022-10-08 04:30:12 -06:00
|
|
|
"lazy_static",
|
|
|
|
"log",
|
|
|
|
"macro_rules_attribute",
|
2023-04-09 12:22:27 -06:00
|
|
|
"monostate",
|
2022-10-08 04:30:12 -06:00
|
|
|
"onig",
|
|
|
|
"paste",
|
|
|
|
"rand",
|
|
|
|
"rayon",
|
|
|
|
"rayon-cond",
|
|
|
|
"regex",
|
2024-06-27 00:08:43 -06:00
|
|
|
"regex-syntax 0.8.4",
|
2022-10-08 04:30:12 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"spm_precompiled",
|
|
|
|
"thiserror",
|
|
|
|
"unicode-normalization-alignments",
|
|
|
|
"unicode-segmentation",
|
|
|
|
"unicode_categories",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio"
|
2024-06-04 07:56:56 -06:00
|
|
|
version = "1.38.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-04 07:56:56 -06:00
|
|
|
checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-07-01 11:25:41 -06:00
|
|
|
"backtrace",
|
2022-10-08 04:30:12 -06:00
|
|
|
"bytes",
|
|
|
|
"libc",
|
|
|
|
"mio",
|
|
|
|
"num_cpus",
|
|
|
|
"parking_lot",
|
|
|
|
"pin-project-lite",
|
2022-10-18 07:19:03 -06:00
|
|
|
"signal-hook-registry",
|
2023-12-22 07:46:04 -07:00
|
|
|
"socket2",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tokio-macros",
|
2023-06-16 08:25:11 -06:00
|
|
|
"windows-sys 0.48.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-io-timeout"
|
|
|
|
version = "1.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
|
|
|
|
dependencies = [
|
|
|
|
"pin-project-lite",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-macros"
|
2024-06-04 07:56:56 -06:00
|
|
|
version = "2.3.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-04 07:56:56 -06:00
|
|
|
checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-native-tls"
|
2023-02-13 05:02:45 -07:00
|
|
|
version = "0.3.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-13 05:02:45 -07:00
|
|
|
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"native-tls",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tokio-retry"
|
|
|
|
version = "0.3.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f"
|
|
|
|
dependencies = [
|
|
|
|
"pin-project",
|
|
|
|
"rand",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tokio-rustls"
|
|
|
|
version = "0.26.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
|
|
|
|
dependencies = [
|
|
|
|
"rustls 0.23.10",
|
|
|
|
"rustls-pki-types",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tokio-stream"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.1.15"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"pin-project-lite",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tokio-util"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.7.11"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bytes",
|
|
|
|
"futures-core",
|
2023-06-16 08:25:11 -06:00
|
|
|
"futures-io",
|
2022-10-08 04:30:12 -06:00
|
|
|
"futures-sink",
|
|
|
|
"pin-project-lite",
|
|
|
|
"tokio",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "toml"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.8.14"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "6f49eb2ab21d2f26bd6db7bf383edc527a7ebaee412d17af4d40fdccd442f335"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
"serde_spanned",
|
|
|
|
"toml_datetime",
|
|
|
|
"toml_edit",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "toml_datetime"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.6.6"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "toml_edit"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.22.14"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"indexmap 2.2.6",
|
|
|
|
"serde",
|
|
|
|
"serde_spanned",
|
|
|
|
"toml_datetime",
|
|
|
|
"winnow",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tonic"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.9.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"async-trait",
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum 0.6.20",
|
2024-01-26 11:04:57 -07:00
|
|
|
"base64 0.21.7",
|
2022-10-08 04:30:12 -06:00
|
|
|
"bytes",
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
2024-06-27 00:08:43 -06:00
|
|
|
"h2 0.3.26",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
|
|
|
"http-body 0.4.6",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2022-10-08 04:30:12 -06:00
|
|
|
"hyper-timeout",
|
|
|
|
"percent-encoding",
|
|
|
|
"pin-project",
|
2023-09-27 02:40:18 -06:00
|
|
|
"prost 0.11.9",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tokio",
|
|
|
|
"tokio-stream",
|
|
|
|
"tower",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tonic"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.10.2"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"async-stream",
|
2023-07-01 11:25:41 -06:00
|
|
|
"async-trait",
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum 0.6.20",
|
2024-01-26 11:04:57 -07:00
|
|
|
"base64 0.21.7",
|
2023-07-01 11:25:41 -06:00
|
|
|
"bytes",
|
2024-06-27 00:08:43 -06:00
|
|
|
"h2 0.3.26",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 0.2.12",
|
|
|
|
"http-body 0.4.6",
|
2024-06-27 00:08:43 -06:00
|
|
|
"hyper 0.14.29",
|
2023-07-01 11:25:41 -06:00
|
|
|
"hyper-timeout",
|
|
|
|
"percent-encoding",
|
|
|
|
"pin-project",
|
2024-05-28 06:52:17 -06:00
|
|
|
"prost 0.12.6",
|
2023-07-01 11:25:41 -06:00
|
|
|
"tokio",
|
|
|
|
"tokio-stream",
|
|
|
|
"tower",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tonic-build"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.10.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-02-13 05:02:45 -07:00
|
|
|
"prettyplease",
|
2022-10-08 04:30:12 -06:00
|
|
|
"proc-macro2",
|
|
|
|
"prost-build",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tower"
|
|
|
|
version = "0.4.13"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c"
|
|
|
|
dependencies = [
|
|
|
|
"futures-core",
|
|
|
|
"futures-util",
|
2023-07-14 08:31:48 -06:00
|
|
|
"indexmap 1.9.3",
|
2022-10-08 04:30:12 -06:00
|
|
|
"pin-project",
|
|
|
|
"pin-project-lite",
|
|
|
|
"rand",
|
|
|
|
"slab",
|
|
|
|
"tokio",
|
2023-02-13 05:02:45 -07:00
|
|
|
"tokio-util",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
"tracing",
|
|
|
|
]
|
|
|
|
|
2022-10-11 10:14:39 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tower-http"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.5.2"
|
2023-04-13 04:43:05 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5"
|
2023-04-13 04:43:05 -06:00
|
|
|
dependencies = [
|
2024-06-27 00:08:43 -06:00
|
|
|
"bitflags 2.6.0",
|
2023-04-13 04:43:05 -06:00
|
|
|
"bytes",
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 1.1.0",
|
|
|
|
"http-body 1.0.0",
|
|
|
|
"http-body-util",
|
2023-04-13 04:43:05 -06:00
|
|
|
"pin-project-lite",
|
|
|
|
"tower-layer",
|
|
|
|
"tower-service",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tower-layer"
|
2022-10-18 07:19:03 -06:00
|
|
|
version = "0.3.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2022-10-18 07:19:03 -06:00
|
|
|
checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tower-service"
|
|
|
|
version = "0.3.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.1.40"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"pin-project-lite",
|
|
|
|
"tracing-attributes",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-attributes"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.1.27"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-core"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.1.32"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"once_cell",
|
|
|
|
"valuable",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-log"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.1.4"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2"
|
|
|
|
dependencies = [
|
|
|
|
"log",
|
|
|
|
"once_cell",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "tracing-log"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"log",
|
2023-11-30 07:18:15 -07:00
|
|
|
"once_cell",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
2023-02-13 05:02:45 -07:00
|
|
|
[[package]]
|
|
|
|
name = "tracing-opentelemetry"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.21.0"
|
2023-02-13 05:02:45 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "75327c6b667828ddc28f5e3f169036cb793c3f588d83bf0f262a7f062ffed3c8"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
|
|
|
"once_cell",
|
2024-05-28 06:52:17 -06:00
|
|
|
"opentelemetry 0.20.0",
|
|
|
|
"opentelemetry_sdk 0.20.0",
|
2023-09-27 02:40:18 -06:00
|
|
|
"smallvec",
|
2023-07-01 11:25:41 -06:00
|
|
|
"tracing",
|
|
|
|
"tracing-core",
|
2023-11-30 07:18:15 -07:00
|
|
|
"tracing-log 0.1.4",
|
2023-07-01 11:25:41 -06:00
|
|
|
"tracing-subscriber",
|
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tracing-opentelemetry"
|
|
|
|
version = "0.22.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "c67ac25c5407e7b961fafc6f7e9aa5958fd297aada2d20fa2ae1737357e55596"
|
|
|
|
dependencies = [
|
|
|
|
"js-sys",
|
|
|
|
"once_cell",
|
|
|
|
"opentelemetry 0.21.0",
|
|
|
|
"opentelemetry_sdk 0.21.2",
|
|
|
|
"smallvec",
|
|
|
|
"tracing",
|
|
|
|
"tracing-core",
|
|
|
|
"tracing-log 0.2.0",
|
|
|
|
"tracing-subscriber",
|
|
|
|
"web-time",
|
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
2023-09-27 02:40:18 -06:00
|
|
|
name = "tracing-opentelemetry-instrumentation-sdk"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.16.0"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "9920abb6a3ee3a2af7d30c9ff02900f8481935d36723c3da95cf807468218e8c"
|
2023-07-01 11:25:41 -06:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"http 1.1.0",
|
|
|
|
"opentelemetry 0.21.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
"tracing",
|
2024-05-28 06:52:17 -06:00
|
|
|
"tracing-opentelemetry 0.22.0",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
|
|
|
|
2022-11-02 10:29:56 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tracing-serde"
|
|
|
|
version = "0.1.3"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1"
|
|
|
|
dependencies = [
|
|
|
|
"serde",
|
|
|
|
"tracing-core",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "tracing-subscriber"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.3.18"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-02-13 05:02:45 -07:00
|
|
|
"matchers",
|
2022-10-18 07:19:03 -06:00
|
|
|
"nu-ansi-term",
|
2023-02-13 05:02:45 -07:00
|
|
|
"once_cell",
|
|
|
|
"regex",
|
2022-11-02 10:29:56 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
2022-10-08 04:30:12 -06:00
|
|
|
"sharded-slab",
|
|
|
|
"smallvec",
|
|
|
|
"thread_local",
|
2023-02-13 05:02:45 -07:00
|
|
|
"tracing",
|
2022-10-08 04:30:12 -06:00
|
|
|
"tracing-core",
|
2023-11-30 07:18:15 -07:00
|
|
|
"tracing-log 0.2.0",
|
2022-11-02 10:29:56 -06:00
|
|
|
"tracing-serde",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "try-lock"
|
2023-12-11 06:55:03 -07:00
|
|
|
version = "0.2.5"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-12-11 06:55:03 -07:00
|
|
|
checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "typenum"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "1.17.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "unicase"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "2.7.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
|
|
|
"version_check",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "unicode-bidi"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "0.3.15"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-ident"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "1.0.12"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-normalization"
|
2024-02-21 06:50:57 -07:00
|
|
|
version = "0.1.23"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-21 06:50:57 -07:00
|
|
|
checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"tinyvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-normalization-alignments"
|
|
|
|
version = "0.1.12"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "43f613e4fa046e69818dd287fdc4bc78175ff20331479dab6e1b0f98d57062de"
|
|
|
|
dependencies = [
|
|
|
|
"smallvec",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-segmentation"
|
2024-02-16 09:50:57 -07:00
|
|
|
version = "1.11.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-02-16 09:50:57 -07:00
|
|
|
checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode-width"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.1.13"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "unicode_categories"
|
|
|
|
version = "0.1.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "untrusted"
|
|
|
|
version = "0.7.1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a"
|
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "untrusted"
|
|
|
|
version = "0.9.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "ureq"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "2.9.7"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "d11a831e3c0b56e438a28308e7c810799e3c118417f342d30ecec080105395cd"
|
2023-09-27 02:40:18 -06:00
|
|
|
dependencies = [
|
2024-05-06 05:48:11 -06:00
|
|
|
"base64 0.22.1",
|
2023-09-27 02:40:18 -06:00
|
|
|
"flate2",
|
|
|
|
"log",
|
|
|
|
"native-tls",
|
|
|
|
"once_cell",
|
2024-05-06 05:48:11 -06:00
|
|
|
"rustls 0.22.4",
|
2024-02-16 09:50:57 -07:00
|
|
|
"rustls-pki-types",
|
2023-11-30 07:18:15 -07:00
|
|
|
"rustls-webpki",
|
2023-09-27 02:40:18 -06:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"url",
|
|
|
|
"webpki-roots",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "url"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "2.5.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"form_urlencoded",
|
|
|
|
"idna",
|
|
|
|
"percent-encoding",
|
|
|
|
]
|
|
|
|
|
2023-07-01 11:25:41 -06:00
|
|
|
[[package]]
|
|
|
|
name = "urlencoding"
|
2023-08-14 11:26:19 -06:00
|
|
|
version = "2.1.3"
|
2023-07-01 11:25:41 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-08-14 11:26:19 -06:00
|
|
|
checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da"
|
2023-07-01 11:25:41 -06:00
|
|
|
|
2023-04-09 12:22:27 -06:00
|
|
|
[[package]]
|
|
|
|
name = "utf8parse"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.2.2"
|
2023-04-09 12:22:27 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
2023-04-09 12:22:27 -06:00
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "utoipa"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "4.2.3"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "c5afb1a60e207dca502682537fefcfd9921e71d0b83e9576060f09abc6efab23"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
2024-03-29 12:17:24 -06:00
|
|
|
"indexmap 2.2.6",
|
2023-02-03 04:43:37 -07:00
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"utoipa-gen",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "utoipa-gen"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "4.3.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "7bf0e16c02bc4bf5322ab65f10ab1149bdbcaa782cba66dc7057370a3f8190be"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro-error",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2023-07-14 08:31:48 -06:00
|
|
|
"regex",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-02-03 04:43:37 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "utoipa-swagger-ui"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "6.0.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "0b39868d43c011961e04b41623e050aedf2cc93652562ff7935ce0f819aaf2da"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
2024-05-28 06:52:17 -06:00
|
|
|
"axum 0.7.5",
|
2023-02-03 04:43:37 -07:00
|
|
|
"mime_guess",
|
|
|
|
"regex",
|
|
|
|
"rust-embed",
|
|
|
|
"serde",
|
|
|
|
"serde_json",
|
|
|
|
"utoipa",
|
2023-04-09 12:22:27 -06:00
|
|
|
"zip",
|
2023-02-03 04:43:37 -07:00
|
|
|
]
|
|
|
|
|
2024-02-21 03:05:32 -07:00
|
|
|
[[package]]
|
|
|
|
name = "uuid"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "1.9.1"
|
2024-02-21 03:05:32 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439"
|
2024-02-21 03:05:32 -07:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "v_frame"
|
|
|
|
version = "0.3.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "d6f32aaa24bacd11e488aa9ba66369c7cd514885742c9fe08cfe85884db3e92b"
|
|
|
|
dependencies = [
|
|
|
|
"aligned-vec",
|
|
|
|
"num-traits",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "valuable"
|
|
|
|
version = "0.1.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "vcpkg"
|
|
|
|
version = "0.2.15"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
|
|
|
|
2023-04-18 08:16:06 -06:00
|
|
|
[[package]]
|
|
|
|
name = "vergen"
|
2024-01-26 11:04:57 -07:00
|
|
|
version = "8.3.1"
|
2023-04-18 08:16:06 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-01-26 11:04:57 -07:00
|
|
|
checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525"
|
2023-04-18 08:16:06 -06:00
|
|
|
dependencies = [
|
|
|
|
"anyhow",
|
2024-01-26 11:04:57 -07:00
|
|
|
"cargo_metadata",
|
|
|
|
"cfg-if",
|
|
|
|
"regex",
|
2023-05-02 07:43:19 -06:00
|
|
|
"rustc_version",
|
2023-04-18 08:16:06 -06:00
|
|
|
"rustversion",
|
2023-05-02 07:43:19 -06:00
|
|
|
"sysinfo",
|
2023-04-18 08:16:06 -06:00
|
|
|
"time",
|
|
|
|
]
|
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "version-compare"
|
|
|
|
version = "0.2.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "852e951cb7832cb45cb1169900d19760cfa39b82bc0ea9c0e5a14ae88411c98b"
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "version_check"
|
|
|
|
version = "0.9.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|
|
|
|
2023-02-03 04:43:37 -07:00
|
|
|
[[package]]
|
|
|
|
name = "walkdir"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "2.5.0"
|
2023-02-03 04:43:37 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"
|
2023-02-03 04:43:37 -07:00
|
|
|
dependencies = [
|
|
|
|
"same-file",
|
|
|
|
"winapi-util",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "want"
|
2023-06-16 08:25:11 -06:00
|
|
|
version = "0.3.1"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-16 08:25:11 -06:00
|
|
|
checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"try-lock",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasi"
|
|
|
|
version = "0.11.0+wasi-snapshot-preview1"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.2.92"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"wasm-bindgen-macro",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-backend"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.2.92"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"bumpalo",
|
|
|
|
"log",
|
|
|
|
"once_cell",
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
"wasm-bindgen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-futures"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.4.42"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"cfg-if",
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
"web-sys",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-macro"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.2.92"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"quote",
|
|
|
|
"wasm-bindgen-macro-support",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-macro-support"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.2.92"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2022-10-08 04:30:12 -06:00
|
|
|
"wasm-bindgen-backend",
|
|
|
|
"wasm-bindgen-shared",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "wasm-bindgen-shared"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.2.92"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "web-sys"
|
2024-03-22 11:44:05 -06:00
|
|
|
version = "0.3.69"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-03-22 11:44:05 -06:00
|
|
|
checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2024-05-28 06:52:17 -06:00
|
|
|
[[package]]
|
|
|
|
name = "web-time"
|
|
|
|
version = "0.2.4"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0"
|
|
|
|
dependencies = [
|
|
|
|
"js-sys",
|
|
|
|
"wasm-bindgen",
|
|
|
|
]
|
|
|
|
|
2023-06-16 08:25:11 -06:00
|
|
|
[[package]]
|
|
|
|
name = "webpki"
|
2023-11-30 07:18:15 -07:00
|
|
|
version = "0.22.4"
|
2023-06-16 08:25:11 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-11-30 07:18:15 -07:00
|
|
|
checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53"
|
2023-06-16 08:25:11 -06:00
|
|
|
dependencies = [
|
2024-02-21 06:50:57 -07:00
|
|
|
"ring 0.17.8",
|
2023-11-30 07:18:15 -07:00
|
|
|
"untrusted 0.9.0",
|
2023-06-16 08:25:11 -06:00
|
|
|
]
|
|
|
|
|
2023-09-27 02:40:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "webpki-roots"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.26.3"
|
2023-09-27 02:40:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd"
|
2024-02-16 09:50:57 -07:00
|
|
|
dependencies = [
|
|
|
|
"rustls-pki-types",
|
|
|
|
]
|
2023-09-27 02:40:18 -06:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "weezl"
|
|
|
|
version = "0.1.8"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
|
|
|
|
|
2024-06-27 00:08:43 -06:00
|
|
|
[[package]]
|
|
|
|
name = "which"
|
|
|
|
version = "4.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
|
|
|
|
dependencies = [
|
|
|
|
"either",
|
|
|
|
"home",
|
|
|
|
"once_cell",
|
|
|
|
"rustix",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "winapi"
|
|
|
|
version = "0.3.9"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
|
|
|
|
dependencies = [
|
|
|
|
"winapi-i686-pc-windows-gnu",
|
|
|
|
"winapi-x86_64-pc-windows-gnu",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "winapi-i686-pc-windows-gnu"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
|
|
|
|
2022-10-17 10:27:33 -06:00
|
|
|
[[package]]
|
|
|
|
name = "winapi-util"
|
2024-05-06 05:48:11 -06:00
|
|
|
version = "0.1.8"
|
2022-10-17 10:27:33 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-06 05:48:11 -06:00
|
|
|
checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
|
2022-10-17 10:27:33 -06:00
|
|
|
dependencies = [
|
2024-05-06 05:48:11 -06:00
|
|
|
"windows-sys 0.52.0",
|
2022-10-17 10:27:33 -06:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "winapi-x86_64-pc-windows-gnu"
|
|
|
|
version = "0.4.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
|
|
|
2024-01-26 11:04:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows"
|
|
|
|
version = "0.52.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be"
|
|
|
|
dependencies = [
|
|
|
|
"windows-core",
|
2024-04-18 09:17:40 -06:00
|
|
|
"windows-targets 0.52.5",
|
2024-01-26 11:04:57 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows-core"
|
|
|
|
version = "0.52.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
|
|
|
|
dependencies = [
|
2024-04-18 09:17:40 -06:00
|
|
|
"windows-targets 0.52.5",
|
2024-01-26 11:04:57 -07:00
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
2023-02-13 05:02:45 -07:00
|
|
|
name = "windows-sys"
|
|
|
|
version = "0.45.0"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-02-13 05:02:45 -07:00
|
|
|
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
|
|
|
dependencies = [
|
2023-04-11 12:32:18 -06:00
|
|
|
"windows-targets 0.42.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows-sys"
|
|
|
|
version = "0.48.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
|
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"windows-targets 0.48.5",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
2022-10-18 07:19:03 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows-sys"
|
|
|
|
version = "0.52.0"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
|
|
|
|
dependencies = [
|
2024-04-18 09:17:40 -06:00
|
|
|
"windows-targets 0.52.5",
|
2023-11-30 07:18:15 -07:00
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
2023-02-13 05:02:45 -07:00
|
|
|
name = "windows-targets"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"
|
2023-02-13 05:02:45 -07:00
|
|
|
dependencies = [
|
2023-04-11 12:32:18 -06:00
|
|
|
"windows_aarch64_gnullvm 0.42.2",
|
|
|
|
"windows_aarch64_msvc 0.42.2",
|
|
|
|
"windows_i686_gnu 0.42.2",
|
|
|
|
"windows_i686_msvc 0.42.2",
|
|
|
|
"windows_x86_64_gnu 0.42.2",
|
|
|
|
"windows_x86_64_gnullvm 0.42.2",
|
|
|
|
"windows_x86_64_msvc 0.42.2",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows-targets"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
|
2023-04-11 12:32:18 -06:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"windows_aarch64_gnullvm 0.48.5",
|
|
|
|
"windows_aarch64_msvc 0.48.5",
|
|
|
|
"windows_i686_gnu 0.48.5",
|
|
|
|
"windows_i686_msvc 0.48.5",
|
|
|
|
"windows_x86_64_gnu 0.48.5",
|
|
|
|
"windows_x86_64_gnullvm 0.48.5",
|
|
|
|
"windows_x86_64_msvc 0.48.5",
|
2023-02-13 05:02:45 -07:00
|
|
|
]
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows-targets"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb"
|
2023-11-30 07:18:15 -07:00
|
|
|
dependencies = [
|
2024-04-18 09:17:40 -06:00
|
|
|
"windows_aarch64_gnullvm 0.52.5",
|
|
|
|
"windows_aarch64_msvc 0.52.5",
|
|
|
|
"windows_i686_gnu 0.52.5",
|
|
|
|
"windows_i686_gnullvm",
|
|
|
|
"windows_i686_msvc 0.52.5",
|
|
|
|
"windows_x86_64_gnu 0.52.5",
|
|
|
|
"windows_x86_64_gnullvm 0.52.5",
|
|
|
|
"windows_x86_64_msvc 0.52.5",
|
2023-11-30 07:18:15 -07:00
|
|
|
]
|
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
2023-02-13 05:02:45 -07:00
|
|
|
name = "windows_aarch64_gnullvm"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"
|
2022-10-18 07:19:03 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_gnullvm"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_gnullvm"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
2023-02-13 05:02:45 -07:00
|
|
|
name = "windows_aarch64_msvc"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_msvc"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_aarch64_msvc"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"
|
2022-10-08 04:30:12 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnu"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_gnullvm"
|
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"
|
2022-10-18 07:19:03 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_i686_msvc"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"
|
2022-10-18 07:19:03 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnu"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-18 07:19:03 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnullvm"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"
|
2022-10-18 07:19:03 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnullvm"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_gnullvm"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
2023-04-09 12:22:27 -06:00
|
|
|
version = "0.42.2"
|
2022-10-18 07:19:03 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-04-09 12:22:27 -06:00
|
|
|
checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"
|
2022-10-18 07:19:03 -06:00
|
|
|
|
2023-04-11 12:32:18 -06:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.48.5"
|
2023-04-11 12:32:18 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
2023-04-11 12:32:18 -06:00
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "windows_x86_64_msvc"
|
2024-04-18 09:17:40 -06:00
|
|
|
version = "0.52.5"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-04-18 09:17:40 -06:00
|
|
|
checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0"
|
2023-11-30 07:18:15 -07:00
|
|
|
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
[[package]]
|
|
|
|
name = "winnow"
|
2024-06-27 00:08:43 -06:00
|
|
|
version = "0.6.13"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-06-27 00:08:43 -06:00
|
|
|
checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1"
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
dependencies = [
|
|
|
|
"memchr",
|
|
|
|
]
|
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "winreg"
|
2023-09-27 02:40:18 -06:00
|
|
|
version = "0.50.0"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-09-27 02:40:18 -06:00
|
|
|
checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
2023-09-27 02:40:18 -06:00
|
|
|
"cfg-if",
|
|
|
|
"windows-sys 0.48.0",
|
2022-10-08 04:30:12 -06:00
|
|
|
]
|
|
|
|
|
2023-11-30 07:18:15 -07:00
|
|
|
[[package]]
|
|
|
|
name = "zerocopy"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.7.34"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087"
|
2023-11-30 07:18:15 -07:00
|
|
|
dependencies = [
|
|
|
|
"zerocopy-derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zerocopy-derive"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "0.7.34"
|
2023-11-30 07:18:15 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b"
|
2023-11-30 07:18:15 -07:00
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
2024-06-27 00:08:43 -06:00
|
|
|
"syn 2.0.68",
|
2023-11-30 07:18:15 -07:00
|
|
|
]
|
|
|
|
|
2024-02-16 09:50:57 -07:00
|
|
|
[[package]]
|
|
|
|
name = "zeroize"
|
2024-05-28 06:52:17 -06:00
|
|
|
version = "1.8.1"
|
2024-02-16 09:50:57 -07:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2024-05-28 06:52:17 -06:00
|
|
|
checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde"
|
2024-06-27 00:08:43 -06:00
|
|
|
dependencies = [
|
|
|
|
"zeroize_derive",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zeroize_derive"
|
|
|
|
version = "1.4.2"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69"
|
|
|
|
dependencies = [
|
|
|
|
"proc-macro2",
|
|
|
|
"quote",
|
|
|
|
"syn 2.0.68",
|
|
|
|
]
|
2024-02-16 09:50:57 -07:00
|
|
|
|
2022-10-08 04:30:12 -06:00
|
|
|
[[package]]
|
|
|
|
name = "zip"
|
2023-06-16 08:25:11 -06:00
|
|
|
version = "0.6.6"
|
2022-10-08 04:30:12 -06:00
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
2023-06-16 08:25:11 -06:00
|
|
|
checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261"
|
2022-10-08 04:30:12 -06:00
|
|
|
dependencies = [
|
|
|
|
"byteorder",
|
|
|
|
"crc32fast",
|
2023-04-09 12:22:27 -06:00
|
|
|
"crossbeam-utils",
|
2022-10-08 04:30:12 -06:00
|
|
|
"flate2",
|
|
|
|
]
|
Adding Llava-Next (Llava 1.6) with full support. (#1709)
# What does this PR do?
- Changed all models to extract `embed_tokens` in order to enable llava
to separately call the embeddings and the core model layers.
- Added VlmCausalLM to inherit from FlashMistral in order to be
maximally supported. The only added logics sits on top and parses images
into pixel values, preallocates input_ids space for the image
embeddings, and passes them for the model.
- Added Clip for the vision tower.
- Didn't add flash for the vision tower since there's no padding anyway.
- Added heuristic (potentially incomplete) to calculate number of
features *before* calculating the clip patches (allows for easier logic
reuse of the LLM under the hood).
Still needs to be done:
- [x] Implement the image parsing in the controller side, to avoid
downloading n times per TP shard and also refusing requests too large
early and avoid issues where the truncation actually truncates the
image.
- [ ] Make sure it works with quantization properly.
- [x] Make sure it works with TP>1
<!--
Congratulations! You've made it this far! You're not quite done yet
though.
Once merged, your PR is going to appear in the release notes with the
title you set, so make sure it's a great title that fully reflects the
extent of your awesome contribution.
Then, please replace this with a description of the change and which
issue is fixed (if applicable). Please also include relevant motivation
and context. List any dependencies (if any) that are required for this
change.
Once you're done, someone will review your PR shortly (see the section
"Who can review?" below to tag some potential reviewers). They may
suggest changes to make the code even better. If no one reviewed your PR
after a week has passed, don't hesitate to post a new comment
@-mentioning the same persons---sometimes notifications get lost.
-->
<!-- Remove if not applicable -->
Fixes # (issue)
## Before submitting
- [ ] 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.
<!-- Your PR will be replied to more quickly if you can figure out the
right person to tag with @
@OlivierDehaene OR @Narsil
-->
2024-04-09 13:32:00 -06:00
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zune-core"
|
|
|
|
version = "0.4.12"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "3f423a2c17029964870cfaabb1f13dfab7d092a62a29a89264f4d36990ca414a"
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zune-inflate"
|
|
|
|
version = "0.2.54"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "73ab332fe2f6680068f3582b16a24f90ad7096d5d39b974d1c0aff0125116f02"
|
|
|
|
dependencies = [
|
|
|
|
"simd-adler32",
|
|
|
|
]
|
|
|
|
|
|
|
|
[[package]]
|
|
|
|
name = "zune-jpeg"
|
|
|
|
version = "0.4.11"
|
|
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
|
checksum = "ec866b44a2a1fd6133d363f073ca1b179f438f99e7e5bfb1e33f7181facfe448"
|
|
|
|
dependencies = [
|
|
|
|
"zune-core",
|
|
|
|
]
|