url stringlengths 62 66 | repository_url stringclasses 1 value | labels_url stringlengths 76 80 | comments_url stringlengths 71 75 | events_url stringlengths 69 73 | html_url stringlengths 50 56 | id int64 377M 2.15B | node_id stringlengths 18 32 | number int64 1 29.2k | title stringlengths 1 487 | user dict | labels list | state stringclasses 2 values | locked bool 2 classes | assignee dict | assignees list | comments list | created_at int64 1.54k 1.71k | updated_at int64 1.54k 1.71k | closed_at int64 1.54k 1.71k ⌀ | author_association stringclasses 4 values | active_lock_reason stringclasses 2 values | body stringlengths 0 234k ⌀ | reactions dict | timeline_url stringlengths 71 75 | state_reason stringclasses 3 values | draft bool 2 classes | pull_request dict |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
https://api.github.com/repos/huggingface/transformers/issues/29161 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29161/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29161/comments | https://api.github.com/repos/huggingface/transformers/issues/29161/events | https://github.com/huggingface/transformers/issues/29161 | 2,145,902,969 | I_kwDOCUB6oc5_5-F5 | 29,161 | To enter token in jupyter notebook issue | {
"login": "arda1906",
"id": 157398066,
"node_id": "U_kgDOCWG0Mg",
"avatar_url": "https://avatars.githubusercontent.com/u/157398066?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/arda1906",
"html_url": "https://github.com/arda1906",
"followers_url": "https://api.github.com/users/arda1906/followers",
"following_url": "https://api.github.com/users/arda1906/following{/other_user}",
"gists_url": "https://api.github.com/users/arda1906/gists{/gist_id}",
"starred_url": "https://api.github.com/users/arda1906/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/arda1906/subscriptions",
"organizations_url": "https://api.github.com/users/arda1906/orgs",
"repos_url": "https://api.github.com/users/arda1906/repos",
"events_url": "https://api.github.com/users/arda1906/events{/privacy}",
"received_events_url": "https://api.github.com/users/arda1906/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @arda1906, thanks for raising an issue!\r\n\r\nWithout more information about the error i.e. what does it mean to \"not work\" and what is the expected behaviour? we won't be able to help you. \r\n\r\nFrom the snippet, it's not entirely clear how the code is being run, but there are two separate commands which... | 1,708 | 1,708 | null | NONE | null | I run this [from huggingface_hub import notebook_login
notebook_login() ] on cell and enter my token. but it doesn't work:( | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29161/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29161/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29160 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29160/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29160/comments | https://api.github.com/repos/huggingface/transformers/issues/29160/events | https://github.com/huggingface/transformers/pull/29160 | 2,145,779,053 | PR_kwDOCUB6oc5neHY8 | 29,160 | [WIP] add Fusion In Decoder model | {
"login": "oh-gnues-iohc",
"id": 79557937,
"node_id": "MDQ6VXNlcjc5NTU3OTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/79557937?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/oh-gnues-iohc",
"html_url": "https://github.com/oh-gnues-iohc",
"followers_url": "https://api.github.com/users/oh-gnues-iohc/followers",
"following_url": "https://api.github.com/users/oh-gnues-iohc/following{/other_user}",
"gists_url": "https://api.github.com/users/oh-gnues-iohc/gists{/gist_id}",
"starred_url": "https://api.github.com/users/oh-gnues-iohc/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/oh-gnues-iohc/subscriptions",
"organizations_url": "https://api.github.com/users/oh-gnues-iohc/orgs",
"repos_url": "https://api.github.com/users/oh-gnues-iohc/repos",
"events_url": "https://api.github.com/users/oh-gnues-iohc/events{/privacy}",
"received_events_url": "https://api.github.com/users/oh-gnues-iohc/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
<!--
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 -->
add FiD(Fusion In Decoder) models
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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).
- [x] 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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29160/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29160/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29160",
"html_url": "https://github.com/huggingface/transformers/pull/29160",
"diff_url": "https://github.com/huggingface/transformers/pull/29160.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29160.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29159 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29159/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29159/comments | https://api.github.com/repos/huggingface/transformers/issues/29159/events | https://github.com/huggingface/transformers/issues/29159 | 2,145,650,790 | I_kwDOCUB6oc5_5Ahm | 29,159 | [tokenizer] Inconsistent behavior in slow tokenizer and fast tokenizer | {
"login": "Ki-Seki",
"id": 60967965,
"node_id": "MDQ6VXNlcjYwOTY3OTY1",
"avatar_url": "https://avatars.githubusercontent.com/u/60967965?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Ki-Seki",
"html_url": "https://github.com/Ki-Seki",
"followers_url": "https://api.github.com/users/Ki-Seki/followers",
"following_url": "https://api.github.com/users/Ki-Seki/following{/other_user}",
"gists_url": "https://api.github.com/users/Ki-Seki/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Ki-Seki/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ki-Seki/subscriptions",
"organizations_url": "https://api.github.com/users/Ki-Seki/orgs",
"repos_url": "https://api.github.com/users/Ki-Seki/repos",
"events_url": "https://api.github.com/users/Ki-Seki/events{/privacy}",
"received_events_url": "https://api.github.com/users/Ki-Seki/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 2392046359,
"node_id": "MDU6TGFiZWwyMzkyMDQ2MzU5",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Good%20Second%20Issue",
"name": "Good Second Issue",
"color": "dd935a",
"default": false,
"description": "Issues that are more difficult to do than \"Good First... | open | false | null | [] | [
"Hey! Thanks for opening an issue. \r\nFew things first. You are using a custom / local checkpoint with trust remote code. \r\n\r\nFast is not erroring out when you feed OOV, while slow is and it is indeed inconsistent. Would you like to open a PR for a fix? 🤗 ",
"Yes, I'll try that. Thank you for your reply!"
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | ### System Info
- `transformers` version: 4.35.2
- Platform: Linux-5.4.0-163-generic-x86_64-with-glibc2.10
- Python version: 3.8.18
- Huggingface_hub version: 0.19.4
- Safetensors version: 0.4.1
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.1+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no need
- Using distributed or parallel set-up in script?: no need
### Who can help?
@ArthurZucker and @younesbelkada
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
```python
from transformers import AutoTokenizer
def answer_or_exception(tokenizer, id):
print(f'<<<<<<{tokenizer.__class__}>>>>>>')
try:
print(f'"{tokenizer.decode([id])}"')
except Exception as e:
print(e)
tokenizer = AutoTokenizer.from_pretrained("/mnt/data01/shichao/models/phi-2", trust_remote_code=True, use_fast=False)
# vocab size: 50294
answer_or_exception(tokenizer, 50294) # correct
answer_or_exception(tokenizer, 50295) # wrong
tokenizer = AutoTokenizer.from_pretrained("/mnt/data01/shichao/models/phi-2", trust_remote_code=True, use_fast=True)
# vocab size: 50294
answer_or_exception(tokenizer, 50294) # correct
answer_or_exception(tokenizer, 50295) # correct
tokenizer = AutoTokenizer.from_pretrained("/mnt/data01/shichao/models/Llama-2-7b-chat-hf", trust_remote_code=True, use_fast=False)
# vocab size: 31999
answer_or_exception(tokenizer, 31999) # correct
answer_or_exception(tokenizer, 32000) # wrong
tokenizer = AutoTokenizer.from_pretrained("/mnt/data01/shichao/models/Llama-2-7b-chat-hf", trust_remote_code=True, use_fast=True)
# vocab size: 31999
answer_or_exception(tokenizer, 31999) # correct
answer_or_exception(tokenizer, 32000) # correct
```
Output:
```text
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
<<<<<<<class 'transformers.models.codegen.tokenization_codegen.CodeGenTokenizer'>>>>>>>
" "
<<<<<<<class 'transformers.models.codegen.tokenization_codegen.CodeGenTokenizer'>>>>>>>
sequence item 0: expected str instance, NoneType found
Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
<<<<<<<class 'transformers.models.codegen.tokenization_codegen_fast.CodeGenTokenizerFast'>>>>>>>
" "
<<<<<<<class 'transformers.models.codegen.tokenization_codegen_fast.CodeGenTokenizerFast'>>>>>>>
""
<<<<<<<class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>>>>>>>
"给"
<<<<<<<class 'transformers.models.llama.tokenization_llama.LlamaTokenizer'>>>>>>>
piece id is out of range.
<<<<<<<class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>>>>>>>
"给"
<<<<<<<class 'transformers.models.llama.tokenization_llama_fast.LlamaTokenizerFast'>>>>>>>
""
```
### Expected behavior
Consistent `decode` behavior in slow tokenizer and fast tokenizer when id exceeds vocab size. For example, instead of raise exceptions, the slow tokenizer output empty strings like the fast tokenizer does. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29159/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29159/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29158 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29158/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29158/comments | https://api.github.com/repos/huggingface/transformers/issues/29158/events | https://github.com/huggingface/transformers/pull/29158 | 2,145,552,337 | PR_kwDOCUB6oc5ndVY6 | 29,158 | [PyTorch/XLA] Fix extra TPU compilations introduced by recent changes | {
"login": "alanwaketan",
"id": 8573935,
"node_id": "MDQ6VXNlcjg1NzM5MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/8573935?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alanwaketan",
"html_url": "https://github.com/alanwaketan",
"followers_url": "https://api.github.com/users/alanwaketan/followers",
"following_url": "https://api.github.com/users/alanwaketan/following{/other_user}",
"gists_url": "https://api.github.com/users/alanwaketan/gists{/gist_id}",
"starred_url": "https://api.github.com/users/alanwaketan/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alanwaketan/subscriptions",
"organizations_url": "https://api.github.com/users/alanwaketan/orgs",
"repos_url": "https://api.github.com/users/alanwaketan/repos",
"events_url": "https://api.github.com/users/alanwaketan/events{/privacy}",
"received_events_url": "https://api.github.com/users/alanwaketan/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
This PR tries to fix some extra TPU compilations caused by recent HF changes.
1. PyTorch/XLA doesn't support sdpa yet. So we need to set the default attention implementation to eager.
2. tensor.item() will trigger tpu graph synchronization. We should avoid using it in the training loop.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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?
@ArthurZucker @younesbelkada | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29158/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29158/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29158",
"html_url": "https://github.com/huggingface/transformers/pull/29158",
"diff_url": "https://github.com/huggingface/transformers/pull/29158.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29158.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29157 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29157/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29157/comments | https://api.github.com/repos/huggingface/transformers/issues/29157/events | https://github.com/huggingface/transformers/issues/29157 | 2,145,549,903 | I_kwDOCUB6oc5_4n5P | 29,157 | Error while saving with EarlyStoppingCallback | {
"login": "dhruvmullick",
"id": 7004024,
"node_id": "MDQ6VXNlcjcwMDQwMjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/7004024?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dhruvmullick",
"html_url": "https://github.com/dhruvmullick",
"followers_url": "https://api.github.com/users/dhruvmullick/followers",
"following_url": "https://api.github.com/users/dhruvmullick/following{/other_user}",
"gists_url": "https://api.github.com/users/dhruvmullick/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dhruvmullick/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dhruvmullick/subscriptions",
"organizations_url": "https://api.github.com/users/dhruvmullick/orgs",
"repos_url": "https://api.github.com/users/dhruvmullick/repos",
"events_url": "https://api.github.com/users/dhruvmullick/events{/privacy}",
"received_events_url": "https://api.github.com/users/dhruvmullick/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | ### System Info
- `transformers` version: 4.38.0.dev0
- Platform: Linux-5.15.0-78-generic-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: 0.28.0.dev0
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.2+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: Yes
- Using distributed or parallel set-up in script?: DeepSpeed
### Who can help?
@muellerzr and @pacman100
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
* SFTTrainer is used for training the model
* transformers.EarlyStoppingCallback is added to the trainer prior to .train()
This error has appeared in the last few days, likely due to some recent change.
Error is fixed by either rolling back to transformers version 4.37.2 or remove the early stopping callback.
Here's the stack trace:
> File "/workspace/envs/torch_env/lib/python3.10/site-packages/trl/trainer/sft_trainer.py", line 331, in train
> output = super().train(*args, **kwargs)
> File "/workspace/envs/torch_env/lib/python3.10/site-packages/transformers/trainer.py", line 1624, in train
> return inner_training_loop(
> File "/workspace/envs/torch_env/lib/python3.10/site-packages/transformers/trainer.py", line 2029, in _inner_training_loop
> self._maybe_log_save_evaluate(tr_loss, grad_norm, model, trial, epoch, ignore_keys_for_eval)
> File "/workspace/envs/torch_env/lib/python3.10/site-packages/transformers/trainer.py", line 2423, in _maybe_log_save_evaluate
> self._save_checkpoint(model, trial, metrics=metrics)
> File "/workspace/envs/torch_env/lib/python3.10/site-packages/transformers/trainer.py", line 2525, in _save_checkpoint
> self.state.save_to_json(os.path.join(staging_output_dir, TRAINER_STATE_NAME))
> File "/workspace/envs/torch_env/lib/python3.10/site-packages/transformers/trainer_callback.py", line 113, in save_to_json
> json_string = json.dumps(dataclasses.asdict(self), indent=2, sort_keys=True) + "\n"
> File "/usr/lib/python3.10/json/__init__.py", line 238, in dumps
> **kw).encode(obj)
> File "/usr/lib/python3.10/json/encoder.py", line 201, in encode
> chunks = list(chunks)
> File "/usr/lib/python3.10/json/encoder.py", line 431, in _iterencode
> yield from _iterencode_dict(o, _current_indent_level)
> File "/usr/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
> yield from chunks
> File "/usr/lib/python3.10/json/encoder.py", line 325, in _iterencode_list
> yield from chunks
> File "/usr/lib/python3.10/json/encoder.py", line 405, in _iterencode_dict
> yield from chunks
> File "/usr/lib/python3.10/json/encoder.py", line 438, in _iterencode
> o = _default(o)
> File "/usr/lib/python3.10/json/encoder.py", line 179, in default
> raise TypeError(f'Object of type {o.__class__.__name__} '
> TypeError: Object of type Tensor is not JSON serializable
>
### Expected behavior
No error with 4.38.0.dev0 transformers version. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29157/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29157/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29156 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29156/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29156/comments | https://api.github.com/repos/huggingface/transformers/issues/29156/events | https://github.com/huggingface/transformers/pull/29156 | 2,145,522,407 | PR_kwDOCUB6oc5ndO3J | 29,156 | Making extensible | {
"login": "ddevaul",
"id": 71190628,
"node_id": "MDQ6VXNlcjcxMTkwNjI4",
"avatar_url": "https://avatars.githubusercontent.com/u/71190628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ddevaul",
"html_url": "https://github.com/ddevaul",
"followers_url": "https://api.github.com/users/ddevaul/followers",
"following_url": "https://api.github.com/users/ddevaul/following{/other_user}",
"gists_url": "https://api.github.com/users/ddevaul/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ddevaul/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ddevaul/subscriptions",
"organizations_url": "https://api.github.com/users/ddevaul/orgs",
"repos_url": "https://api.github.com/users/ddevaul/repos",
"events_url": "https://api.github.com/users/ddevaul/events{/privacy}",
"received_events_url": "https://api.github.com/users/ddevaul/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @ddevaul, what is the purpose of this PR? \r\n"
] | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
<!--
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
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] 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.
- [x] 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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29156/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29156/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29156",
"html_url": "https://github.com/huggingface/transformers/pull/29156",
"diff_url": "https://github.com/huggingface/transformers/pull/29156.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29156.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29155 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29155/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29155/comments | https://api.github.com/repos/huggingface/transformers/issues/29155/events | https://github.com/huggingface/transformers/issues/29155 | 2,145,382,760 | I_kwDOCUB6oc5_3_Fo | 29,155 | PyTest import error | {
"login": "loadams",
"id": 114770087,
"node_id": "U_kgDOBtdApw",
"avatar_url": "https://avatars.githubusercontent.com/u/114770087?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/loadams",
"html_url": "https://github.com/loadams",
"followers_url": "https://api.github.com/users/loadams/followers",
"following_url": "https://api.github.com/users/loadams/following{/other_user}",
"gists_url": "https://api.github.com/users/loadams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/loadams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/loadams/subscriptions",
"organizations_url": "https://api.github.com/users/loadams/orgs",
"repos_url": "https://api.github.com/users/loadams/repos",
"events_url": "https://api.github.com/users/loadams/events{/privacy}",
"received_events_url": "https://api.github.com/users/loadams/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | ### System Info
Current head of transformers shows this issue, when importing functions from pytest, the `import_path` function is not found. Sample error from DeepSpeed's unit tests [here](https://github.com/microsoft/DeepSpeed/actions/runs/7977730884/job/21781270161?pr=5164#step:7:391).
```
______________ ERROR collecting tests/deepspeed/test_deepspeed.py ______________
ImportError while importing test module '/tmp/actions-runner/_work/DeepSpeed/DeepSpeed/accelerate/tests/deepspeed/test_deepspeed.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../unit-test-venv/lib/python3.8/site-packages/_pytest/python.py:538: in importtestmodule
mod = import_path(path, mode=importmode, root=config.rootpath)
../unit-test-venv/lib/python3.8/site-packages/_pytest/pathlib.py:566: in import_path
importlib.import_module(module_name)
/opt/conda/envs/ptca/lib/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
???
<frozen importlib._bootstrap>:991: in _find_and_load
???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:671: in _load_unlocked
???
../unit-test-venv/lib/python3.8/site-packages/_pytest/assertion/rewrite.py:178: in exec_module
exec(co, module.__dict__)
tests/deepspeed/test_deepspeed.py:26: in <module>
from transformers.testing_utils import mockenv_context
../unit-test-venv/lib/python3.8/site-packages/transformers/testing_utils.py:129: in <module>
from _pytest.doctest import (
E ImportError: cannot import name 'import_path' from '_pytest.doctest' (/tmp/actions-runner/_work/DeepSpeed/DeepSpeed/unit-test-venv/lib/python3.8/site-packages/_pytest/doctest.py)
!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
=============================== 1 error in 4.71s ===============================
```
### Who can help?
@pacman100
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
With pytest 8.0.1:
1. `from _pytest.doctest import import_path`
2. observe error.
### Expected behavior
No errors. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29155/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29155/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29154 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29154/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29154/comments | https://api.github.com/repos/huggingface/transformers/issues/29154/events | https://github.com/huggingface/transformers/pull/29154 | 2,145,294,779 | PR_kwDOCUB6oc5nccpR | 29,154 | Update pytest `import_path` location | {
"login": "loadams",
"id": 114770087,
"node_id": "U_kgDOBtdApw",
"avatar_url": "https://avatars.githubusercontent.com/u/114770087?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/loadams",
"html_url": "https://github.com/loadams",
"followers_url": "https://api.github.com/users/loadams/followers",
"following_url": "https://api.github.com/users/loadams/following{/other_user}",
"gists_url": "https://api.github.com/users/loadams/gists{/gist_id}",
"starred_url": "https://api.github.com/users/loadams/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/loadams/subscriptions",
"organizations_url": "https://api.github.com/users/loadams/orgs",
"repos_url": "https://api.github.com/users/loadams/repos",
"events_url": "https://api.github.com/users/loadams/events{/privacy}",
"received_events_url": "https://api.github.com/users/loadams/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29154). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
Fixes location of `import_path` from pytest from `_pytest.doctest` to `_pytest.pathlib` when using PyTest 8.0.1+ since it is finally deprecated from being in `_pytest.doctest`. It is provided in `_pytest.pathlib` from at least 7.2.0+ so we do not need to modify the supported pytest range in `setup.py`
Tested [here in DeepSpeed](https://github.com/microsoft/DeepSpeed/pull/5164) and tests appear to be passing.
Fixes: #29155
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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.
@muellerzr and @pacman100
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29154/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29154/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29154",
"html_url": "https://github.com/huggingface/transformers/pull/29154",
"diff_url": "https://github.com/huggingface/transformers/pull/29154.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29154.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29153 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29153/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29153/comments | https://api.github.com/repos/huggingface/transformers/issues/29153/events | https://github.com/huggingface/transformers/issues/29153 | 2,145,101,851 | I_kwDOCUB6oc5_26gb | 29,153 | Plans to add DoRA? | {
"login": "RonanKMcGovern",
"id": 78278410,
"node_id": "MDQ6VXNlcjc4Mjc4NDEw",
"avatar_url": "https://avatars.githubusercontent.com/u/78278410?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/RonanKMcGovern",
"html_url": "https://github.com/RonanKMcGovern",
"followers_url": "https://api.github.com/users/RonanKMcGovern/followers",
"following_url": "https://api.github.com/users/RonanKMcGovern/following{/other_user}",
"gists_url": "https://api.github.com/users/RonanKMcGovern/gists{/gist_id}",
"starred_url": "https://api.github.com/users/RonanKMcGovern/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/RonanKMcGovern/subscriptions",
"organizations_url": "https://api.github.com/users/RonanKMcGovern/orgs",
"repos_url": "https://api.github.com/users/RonanKMcGovern/repos",
"events_url": "https://api.github.com/users/RonanKMcGovern/events{/privacy}",
"received_events_url": "https://api.github.com/users/RonanKMcGovern/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 2648621985,
"node_id": "MDU6TGFiZWwyNjQ4NjIxOTg1",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Feature%20request",
"name": "Feature request",
"color": "FBCA04",
"default": false,
"description": "Request for a new feature"
}
] | open | false | null | [] | [
"cc @younesbelkada @pacman100 ",
"Hi @RonanKMcGovern ! \r\nThanks for the feature request! There is already an ongoing work from @BenjaminBossan to add DoRA in PEFT: https://github.com/huggingface/peft/pull/1474",
"Closing as there is a PR underway.",
"OK thank you @RonanKMcGovern !"
] | 1,708 | 1,708 | null | NONE | null | ### Feature request
Improves on LoRA by allowing magnitude fine-tuning.
### Motivation
Improved perplexity.
### Your contribution
Sebastien Bubeck has published demo code. https://github.com/rasbt/dora-from-scratch | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29153/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29153/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29152 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29152/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29152/comments | https://api.github.com/repos/huggingface/transformers/issues/29152/events | https://github.com/huggingface/transformers/pull/29152 | 2,145,071,699 | PR_kwDOCUB6oc5nbr5K | 29,152 | Alternative approach | {
"login": "amyeroberts",
"id": 22614925,
"node_id": "MDQ6VXNlcjIyNjE0OTI1",
"avatar_url": "https://avatars.githubusercontent.com/u/22614925?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amyeroberts",
"html_url": "https://github.com/amyeroberts",
"followers_url": "https://api.github.com/users/amyeroberts/followers",
"following_url": "https://api.github.com/users/amyeroberts/following{/other_user}",
"gists_url": "https://api.github.com/users/amyeroberts/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amyeroberts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amyeroberts/subscriptions",
"organizations_url": "https://api.github.com/users/amyeroberts/orgs",
"repos_url": "https://api.github.com/users/amyeroberts/repos",
"events_url": "https://api.github.com/users/amyeroberts/events{/privacy}",
"received_events_url": "https://api.github.com/users/amyeroberts/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @Rocketknight1 ",
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29152). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | COLLABORATOR | null | # What does this PR do?
Alternative way to use stop words for generated sequences. Note - it doesn't
<details>
<summary>Script</summary>
```py
import time
import numpy as np
from transformers.generation.stopping_criteria import StopStringCriteria, StopStringCriteria2
from transformers import AutoTokenizer
model_id = "google-bert/bert-base-uncased"
tokenizer = AutoTokenizer.from_pretrained(model_id)
stopping_criteria = StopStringCriteria(stop_strings=["giraffe", "polo"], tokenizer=tokenizer)
long_sentence = "This is a long sentence which should eventually stop because I have the word giraffe. This is a generated sentence"
input_ids = tokenizer(long_sentence, return_tensors="pt").input_ids
# Let's iterate over input_ids, increasing the length of the input sequence at each iteration and see when the
# criterion is met
print("Current implementation")
for i in range(1, len(input_ids[0]) + 1):
input_seq = input_ids[:, :i]
is_done = stopping_criteria(input_ids=input_ids[:, :i], scores=None)
print(f"Current length: {i}, stops: {is_done}, input sequence: {tokenizer.batch_decode(input_seq)}")
N_RUNS = 100
times = []
for _ in range(N_RUNS):
start = time.time()
for i in range(1, len(input_ids[0]) + 1):
input_seq = input_ids[:, :i]
is_done = stopping_criteria(input_ids=input_ids[:, :i], scores=None)
end = time.time()
times.append(end - start)
print(f"Average time taken - current: {np.mean(times)}, std: {np.std(times)}")
print("\nAlternative implementation")
stopping_criteria_2 = StopStringCriteria2(stop_strings=["giraffe", "polo"], tokenizer=tokenizer)
for i in range(1, len(input_ids[0]) + 1):
input_seq = input_ids[:, :i]
is_done = stopping_criteria_2(input_ids=input_ids[:, :i], scores=None)
print(f"Current length: {i}, stops: {is_done}, input sequence: {tokenizer.batch_decode(input_seq)}")
times = []
for _ in range(N_RUNS):
start = time.time()
for i in range(1, len(input_ids[0]) + 1):
input_seq = input_ids[:, :i]
is_done = stopping_criteria_2(input_ids=input_ids[:, :i], scores=None)
end = time.time()
times.append(end - start)
print(f"Average time taken - new: {np.mean(times)}, std: {np.std(times)}")
```
</details>
Not sure if testing assumption is correct i.e. how the input ids are passed in. When testing this alternative and the current implementation, the original `StopStringCriteria` does not stop when "giraffe" is in the sentence.
This alternative is also faster on this small test.
Note: the alternative will stop when any of the generated strings has a stop word (which AFAICT is the same for the current `StopStringCriteria` too)
<details>
<summary>Output</summary>
```
Current implementation
Current length: 1, stops: False, input sequence: ['[CLS]']
Current length: 2, stops: False, input sequence: ['[CLS] this']
Current length: 3, stops: False, input sequence: ['[CLS] this is']
Current length: 4, stops: False, input sequence: ['[CLS] this is a']
Current length: 5, stops: False, input sequence: ['[CLS] this is a long']
Current length: 6, stops: False, input sequence: ['[CLS] this is a long sentence']
Current length: 7, stops: False, input sequence: ['[CLS] this is a long sentence which']
Current length: 8, stops: False, input sequence: ['[CLS] this is a long sentence which should']
Current length: 9, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually']
Current length: 10, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop']
Current length: 11, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because']
Current length: 12, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i']
Current length: 13, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have']
Current length: 14, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the']
Current length: 15, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word']
Current length: 16, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word gi']
Current length: 17, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraf']
Current length: 18, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe']
Current length: 19, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe.']
Current length: 20, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this']
Current length: 21, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is']
Current length: 22, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a']
Current length: 23, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a generated']
Current length: 24, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a generated sentence']
Current length: 25, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a generated sentence [SEP]']
Average time taken - current: 0.007625923156738281, std: 0.00019846132464233505
Alternative implementation
Current length: 1, stops: False, input sequence: ['[CLS]']
Current length: 2, stops: False, input sequence: ['[CLS] this']
Current length: 3, stops: False, input sequence: ['[CLS] this is']
Current length: 4, stops: False, input sequence: ['[CLS] this is a']
Current length: 5, stops: False, input sequence: ['[CLS] this is a long']
Current length: 6, stops: False, input sequence: ['[CLS] this is a long sentence']
Current length: 7, stops: False, input sequence: ['[CLS] this is a long sentence which']
Current length: 8, stops: False, input sequence: ['[CLS] this is a long sentence which should']
Current length: 9, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually']
Current length: 10, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop']
Current length: 11, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because']
Current length: 12, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i']
Current length: 13, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have']
Current length: 14, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the']
Current length: 15, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word']
Current length: 16, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word gi']
Current length: 17, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraf']
Current length: 18, stops: True, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe']
Current length: 19, stops: True, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe.']
Current length: 20, stops: True, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this']
Current length: 21, stops: True, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is']
Current length: 22, stops: True, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a']
Current length: 23, stops: True, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a generated']
Current length: 24, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a generated sentence']
Current length: 25, stops: False, input sequence: ['[CLS] this is a long sentence which should eventually stop because i have the word giraffe. this is a generated sentence [SEP]']
Average time taken - new: 0.0011045789718627929, std: 2.974982062175288e-05
```
</details>
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29152/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29152/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29152",
"html_url": "https://github.com/huggingface/transformers/pull/29152",
"diff_url": "https://github.com/huggingface/transformers/pull/29152.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29152.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29151 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29151/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29151/comments | https://api.github.com/repos/huggingface/transformers/issues/29151/events | https://github.com/huggingface/transformers/issues/29151 | 2,145,069,207 | I_kwDOCUB6oc5_2yiX | 29,151 | Static cache + torch.compile: support prefill static sequence length | {
"login": "fxmarty",
"id": 9808326,
"node_id": "MDQ6VXNlcjk4MDgzMjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/9808326?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fxmarty",
"html_url": "https://github.com/fxmarty",
"followers_url": "https://api.github.com/users/fxmarty/followers",
"following_url": "https://api.github.com/users/fxmarty/following{/other_user}",
"gists_url": "https://api.github.com/users/fxmarty/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fxmarty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fxmarty/subscriptions",
"organizations_url": "https://api.github.com/users/fxmarty/orgs",
"repos_url": "https://api.github.com/users/fxmarty/repos",
"events_url": "https://api.github.com/users/fxmarty/events{/privacy}",
"received_events_url": "https://api.github.com/users/fxmarty/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @gante ",
"@fxmarty this is the same problem as we have in TF and Flax. There, we nudged users to use the `pad_to_multiple_of` argument in the tokenizer, which I believe solves the problem 🤗 \r\n\r\nHow do you suggest us to let users know about this feature, other than docs?"
] | 1,708 | 1,708 | null | COLLABORATOR | null | ### Feature request
When using torch.compile, the prefill is recompiled for every new sequence length, which is slow. It may be nice to be able to compile only say for some sequence lengths (`1, 2, 4, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, etc`) on the fly depending on the input lengths, using some padding.
### Motivation
torch.compile compilation is prohibitively slow even with https://github.com/huggingface/transformers/pull/29114
If people want to use transformers + static cache + torch.compile, it should be FAST to run `generate` on new sequence lengths.
### Your contribution
None for now | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29151/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29151/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29150 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29150/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29150/comments | https://api.github.com/repos/huggingface/transformers/issues/29150/events | https://github.com/huggingface/transformers/issues/29150 | 2,144,941,834 | I_kwDOCUB6oc5_2TcK | 29,150 | Difficulty in adding custom model | {
"login": "El-chapo-007",
"id": 125077963,
"node_id": "U_kgDOB3SJyw",
"avatar_url": "https://avatars.githubusercontent.com/u/125077963?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/El-chapo-007",
"html_url": "https://github.com/El-chapo-007",
"followers_url": "https://api.github.com/users/El-chapo-007/followers",
"following_url": "https://api.github.com/users/El-chapo-007/following{/other_user}",
"gists_url": "https://api.github.com/users/El-chapo-007/gists{/gist_id}",
"starred_url": "https://api.github.com/users/El-chapo-007/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/El-chapo-007/subscriptions",
"organizations_url": "https://api.github.com/users/El-chapo-007/orgs",
"repos_url": "https://api.github.com/users/El-chapo-007/repos",
"events_url": "https://api.github.com/users/El-chapo-007/events{/privacy}",
"received_events_url": "https://api.github.com/users/El-chapo-007/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @El-chapo-007, thanks for opening this issue! \r\n\r\nGlad to hear that your journey has been mostly successful 🤗 \r\n\r\nHave you seen our documentation page about adding custom models? This should contain all the info and example code needed to get started: https://huggingface.co/docs/transformers/custom_mod... | 1,708 | 1,708 | null | NONE | null | ### Feature request
Hi
Hope all the team members of hugging face are well
I am a student and currently doing work on nlp projects , although most of my journey was successful because well documented information for starters especially example notebooks but what part is confusing and difficult is to upload and create a custom model from scratch i have and several other users have difficulty in it could you please make a notebook for step by step guidence to help me and other researchers to focus on thier projects not on these lenghty procedures
### Motivation
Difficulty in portting custom model
### Your contribution
Student | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29150/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29150/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29149 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29149/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29149/comments | https://api.github.com/repos/huggingface/transformers/issues/29149/events | https://github.com/huggingface/transformers/issues/29149 | 2,144,914,235 | I_kwDOCUB6oc5_2Ms7 | 29,149 | Generate: support passing position_ids | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [
{
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.co... | [
"@zucchini-nlp FYI. We shouldn't fix this now, as it requires significant manual labor to update all models. After the static cache sprint we should have a look at this :)"
] | 1,708 | 1,708 | null | MEMBER | null | Thank you @tengomucho, for uncovering this bug.
### The problem
In a nutshell, passing the correct `position_ids` to `generate` should result in exactly the same results as not passing them. In other words, the following test should pass on all models, if added to `GenerationTesterMixin`. We can see that it is failing in general.
```py
def test_passing_position_ids(self):
# Check that passing position ids to generate yields the same results as not passing them, if the position ids
# are correctly built. If the test fails, it means one of two things:
# 1 - the manual position ids are not being piped correctly; OR
# 2 - the automated position ids are not being correctly built.
for model_class in self.all_generative_model_classes:
config, input_ids, attention_mask, _ = self._get_input_ids_and_config(batch_size=1)
if config.is_encoder_decoder:
self.skipTest("This model does not support position_ids")
# To truly test this property, let's create a batch where the second row corresponds to the test input with
# left padding of 1.
pad_token = torch.tensor([[config.pad_token_id or 0]], device=input_ids.device, dtype=input_ids.dtype)
input_ids = torch.cat((input_ids, torch.cat((pad_token, input_ids[:, 1:]), dim=1)), dim=0)
pad_mask = torch.zeros((1, 1), dtype=attention_mask.dtype, device=attention_mask.device)
attention_mask = torch.cat((attention_mask, torch.cat((pad_mask, attention_mask[:, 1:]), dim=1)), dim=0)
position_ids = torch.clamp(torch.cumsum(attention_mask, dim=-1) - 1, min=0)
config.use_cache = True
config.is_decoder = True
model = model_class(config).to(torch_device).eval()
try:
output_position_ids = model.generate(
input_ids,
attention_mask=attention_mask,
position_ids=position_ids,
max_new_tokens=10
)
except ValueError as exc:
if "The following `model_kwargs` are not used by the model: ['position_ids']" in str(exc):
self.skipTest("This model does not support position_ids")
else:
raise
output_no_position_ids = model.generate(
input_ids,
attention_mask=attention_mask,
max_new_tokens=10
)
self.assertListEqual(output_no_position_ids.tolist(), output_position_ids.tolist())
```
### The fix
There are two root causes for this:
1. `position_ids` is rejected in some models when it is passed (e.g. see [here](https://github.com/huggingface/transformers/blob/3c00b885b92fbcd0e7451e56ccf424a2d5a19bbb/src/transformers/models/gpt2/modeling_gpt2.py#L1022)). These models often assume no padding when `position_ids` is rejected.
2. `position_ids` is never updated, so it is only correct when created from scratch (=not passed).
As such, a fix to this problem should consist in updating `position_ids` in `generate`, with `prepare_inputs_for_generation` only creating new `position_ids` when they don't exist.
The test pasted above should be part of our tests after fixing the issue. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29149/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29149/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29148 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29148/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29148/comments | https://api.github.com/repos/huggingface/transformers/issues/29148/events | https://github.com/huggingface/transformers/pull/29148 | 2,144,911,415 | PR_kwDOCUB6oc5nbILV | 29,148 | Token level timestamps for long-form generation in Whisper | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29148). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | MEMBER | null | # What does this PR do?
Continuation of PR #28984. Adds token level timestamps for long-form generation. The previous PR had a quite different of way to add timestamps, specifically by calling `extract_timestamps` for each segment and each batch separately. I believe, it can be done in one batch, and then divided into segments the same way sequences are divided.
The final timestamps are already aligned with the total length, so there is not need to add start_time for each segment. Although, I am not sure if that is what we want to have, so I can remove this "total duration alignment" is needed.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [X] 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).
- [X] 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.
@sanchit-gandhi
@patrickvonplaten
@gante ? | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29148/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29148/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29148",
"html_url": "https://github.com/huggingface/transformers/pull/29148",
"diff_url": "https://github.com/huggingface/transformers/pull/29148.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29148.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29147 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29147/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29147/comments | https://api.github.com/repos/huggingface/transformers/issues/29147/events | https://github.com/huggingface/transformers/pull/29147 | 2,144,785,389 | PR_kwDOCUB6oc5nasd- | 29,147 | Fix drop path being ignored in DINOv2 | {
"login": "fepegar",
"id": 12688084,
"node_id": "MDQ6VXNlcjEyNjg4MDg0",
"avatar_url": "https://avatars.githubusercontent.com/u/12688084?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fepegar",
"html_url": "https://github.com/fepegar",
"followers_url": "https://api.github.com/users/fepegar/followers",
"following_url": "https://api.github.com/users/fepegar/following{/other_user}",
"gists_url": "https://api.github.com/users/fepegar/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fepegar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fepegar/subscriptions",
"organizations_url": "https://api.github.com/users/fepegar/orgs",
"repos_url": "https://api.github.com/users/fepegar/repos",
"events_url": "https://api.github.com/users/fepegar/events{/privacy}",
"received_events_url": "https://api.github.com/users/fepegar/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"Thanks for reviewing, @amyeroberts!"
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
<!--
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 -->
A `drop_path_rate` parameter exists in the DINOv2 model, which is propagated all the way to the DINOv2 layers, but never used. This PR addresses this by using the drop path layers in the `forward` pass of the DINOv2 layers, and removing an (I think) unnecessary extra instantiation.
Fixes #29140.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] 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?
@amyeroberts @NielsRogge @molbap
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29147/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29147/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29147",
"html_url": "https://github.com/huggingface/transformers/pull/29147",
"diff_url": "https://github.com/huggingface/transformers/pull/29147.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29147.patch",
"merged_at": 1708450319000
} |
https://api.github.com/repos/huggingface/transformers/issues/29146 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29146/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29146/comments | https://api.github.com/repos/huggingface/transformers/issues/29146/events | https://github.com/huggingface/transformers/pull/29146 | 2,144,586,510 | PR_kwDOCUB6oc5naAbp | 29,146 | Generate: missing generation config eos token setting in encoder-decoder tests | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29146). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | MEMBER | null | # What does this PR do?
These tests were failing with low likelihood, all for the same reason as fixed in [this recent PR](https://github.com/huggingface/transformers/pull/28923): there should be no EOS token to enable endless generation, but the generation config still had the default value.
I couldn't find more occurrences of this pattern.
Example of a failed run fixed by this PR: https://app.circleci.com/jobs/github/huggingface/transformers/1099434 | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29146/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29146/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29146",
"html_url": "https://github.com/huggingface/transformers/pull/29146",
"diff_url": "https://github.com/huggingface/transformers/pull/29146.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29146.patch",
"merged_at": 1708445871000
} |
https://api.github.com/repos/huggingface/transformers/issues/29145 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29145/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29145/comments | https://api.github.com/repos/huggingface/transformers/issues/29145/events | https://github.com/huggingface/transformers/issues/29145 | 2,144,556,865 | I_kwDOCUB6oc5_01dB | 29,145 | AI2 Olmo 7B does not support Flash-Attention 2.0. ValueError: OLMoForCausalLM does not support Flash Attention 2.0 yet. | {
"login": "KaifAhmad1",
"id": 98801504,
"node_id": "U_kgDOBeOXYA",
"avatar_url": "https://avatars.githubusercontent.com/u/98801504?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/KaifAhmad1",
"html_url": "https://github.com/KaifAhmad1",
"followers_url": "https://api.github.com/users/KaifAhmad1/followers",
"following_url": "https://api.github.com/users/KaifAhmad1/following{/other_user}",
"gists_url": "https://api.github.com/users/KaifAhmad1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/KaifAhmad1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KaifAhmad1/subscriptions",
"organizations_url": "https://api.github.com/users/KaifAhmad1/orgs",
"repos_url": "https://api.github.com/users/KaifAhmad1/repos",
"events_url": "https://api.github.com/users/KaifAhmad1/events{/privacy}",
"received_events_url": "https://api.github.com/users/KaifAhmad1/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 1843244711,
"node_id": "MDU6TGFiZWwxODQzMjQ0NzEx",
"url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model",
"name": "New model",
"color": "fbca04",
"default": false,
"description": ""
}
] | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | NONE | null | ### Model description
Model Name: allenai/OLMo-7B
### Open source status
- [X] The model implementation is available
- [X] The model weights are available
### Provide useful links for the implementation
_No response_ | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29145/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29145/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29144 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29144/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29144/comments | https://api.github.com/repos/huggingface/transformers/issues/29144/events | https://github.com/huggingface/transformers/pull/29144 | 2,144,483,260 | PR_kwDOCUB6oc5nZpun | 29,144 | bug-fix: avoid 'Expected all tensors to be on the same device' error when doing multi-GPU training | {
"login": "kallewoof",
"id": 250224,
"node_id": "MDQ6VXNlcjI1MDIyNA==",
"avatar_url": "https://avatars.githubusercontent.com/u/250224?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kallewoof",
"html_url": "https://github.com/kallewoof",
"followers_url": "https://api.github.com/users/kallewoof/followers",
"following_url": "https://api.github.com/users/kallewoof/following{/other_user}",
"gists_url": "https://api.github.com/users/kallewoof/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kallewoof/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kallewoof/subscriptions",
"organizations_url": "https://api.github.com/users/kallewoof/orgs",
"repos_url": "https://api.github.com/users/kallewoof/repos",
"events_url": "https://api.github.com/users/kallewoof/events{/privacy}",
"received_events_url": "https://api.github.com/users/kallewoof/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | When doing DPO training, if the model has been split over multiple GPUs, the `tr_loss` and the `tr_loss_step` end up on different devices at some point, resulting in a
```
Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1
```
error. This patch makes an explicit copy of the `tr_loss_step` value on the same device as the `tr_loss` value, when necessary.
Ping @patrickvonplaten (git blame last touched), @younesbelkada
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29144/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29144/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29144",
"html_url": "https://github.com/huggingface/transformers/pull/29144",
"diff_url": "https://github.com/huggingface/transformers/pull/29144.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29144.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29143 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29143/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29143/comments | https://api.github.com/repos/huggingface/transformers/issues/29143/events | https://github.com/huggingface/transformers/pull/29143 | 2,144,476,455 | PR_kwDOCUB6oc5nZoPN | 29,143 | Llama: update rope scaling to match static cache changes | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29143). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | MEMBER | null | # What does this PR do?
(see title :))
Review suggestion:
1. Review changes in Llama
2. Review the rest | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29143/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29143/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29143",
"html_url": "https://github.com/huggingface/transformers/pull/29143",
"diff_url": "https://github.com/huggingface/transformers/pull/29143.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29143.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29142 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29142/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29142/comments | https://api.github.com/repos/huggingface/transformers/issues/29142/events | https://github.com/huggingface/transformers/pull/29142 | 2,144,430,707 | PR_kwDOCUB6oc5nZeOR | 29,142 | Add training version check for AQLM quantizer. | {
"login": "BlackSamorez",
"id": 16901341,
"node_id": "MDQ6VXNlcjE2OTAxMzQx",
"avatar_url": "https://avatars.githubusercontent.com/u/16901341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BlackSamorez",
"html_url": "https://github.com/BlackSamorez",
"followers_url": "https://api.github.com/users/BlackSamorez/followers",
"following_url": "https://api.github.com/users/BlackSamorez/following{/other_user}",
"gists_url": "https://api.github.com/users/BlackSamorez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BlackSamorez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BlackSamorez/subscriptions",
"organizations_url": "https://api.github.com/users/BlackSamorez/orgs",
"repos_url": "https://api.github.com/users/BlackSamorez/repos",
"events_url": "https://api.github.com/users/BlackSamorez/events{/privacy}",
"received_events_url": "https://api.github.com/users/BlackSamorez/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29142). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
<!--
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 -->
Following this [PR](https://github.com/Vahe1994/AQLM/pull/26) form `aqlm` and this [PR](https://github.com/huggingface/peft/pull/1476) from `PEFT` it is necessary to check if AQLM supports training or not. It appears that this check is bypassed when not using trainer.
## 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#create-a-pull-request),
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
@younesbelkada | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29142/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29142/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29142",
"html_url": "https://github.com/huggingface/transformers/pull/29142",
"diff_url": "https://github.com/huggingface/transformers/pull/29142.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29142.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29141 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29141/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29141/comments | https://api.github.com/repos/huggingface/transformers/issues/29141/events | https://github.com/huggingface/transformers/pull/29141 | 2,144,232,619 | PR_kwDOCUB6oc5nYyzq | 29,141 | Save (circleci) cache at the end of a job | {
"login": "ydshieh",
"id": 2521628,
"node_id": "MDQ6VXNlcjI1MjE2Mjg=",
"avatar_url": "https://avatars.githubusercontent.com/u/2521628?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ydshieh",
"html_url": "https://github.com/ydshieh",
"followers_url": "https://api.github.com/users/ydshieh/followers",
"following_url": "https://api.github.com/users/ydshieh/following{/other_user}",
"gists_url": "https://api.github.com/users/ydshieh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ydshieh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ydshieh/subscriptions",
"organizations_url": "https://api.github.com/users/ydshieh/orgs",
"repos_url": "https://api.github.com/users/ydshieh/repos",
"events_url": "https://api.github.com/users/ydshieh/events{/privacy}",
"received_events_url": "https://api.github.com/users/ydshieh/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29141). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | COLLABORATOR | null | # What does this PR do?
This way, `pytest` will run before `cache saving` and we have access to the results earlier in the case of partial or no cache loaded. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29141/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29141/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29141",
"html_url": "https://github.com/huggingface/transformers/pull/29141",
"diff_url": "https://github.com/huggingface/transformers/pull/29141.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29141.patch",
"merged_at": 1708435896000
} |
https://api.github.com/repos/huggingface/transformers/issues/29140 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29140/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29140/comments | https://api.github.com/repos/huggingface/transformers/issues/29140/events | https://github.com/huggingface/transformers/issues/29140 | 2,144,160,231 | I_kwDOCUB6oc5_zUnn | 29,140 | Drop path is ignored in DINOv2 | {
"login": "fepegar",
"id": 12688084,
"node_id": "MDQ6VXNlcjEyNjg4MDg0",
"avatar_url": "https://avatars.githubusercontent.com/u/12688084?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fepegar",
"html_url": "https://github.com/fepegar",
"followers_url": "https://api.github.com/users/fepegar/followers",
"following_url": "https://api.github.com/users/fepegar/following{/other_user}",
"gists_url": "https://api.github.com/users/fepegar/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fepegar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fepegar/subscriptions",
"organizations_url": "https://api.github.com/users/fepegar/orgs",
"repos_url": "https://api.github.com/users/fepegar/repos",
"events_url": "https://api.github.com/users/fepegar/events{/privacy}",
"received_events_url": "https://api.github.com/users/fepegar/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"Hey, thanks for the issue! I've checked out your branch, from what I'm seeing tests are passing on your fix, would you mind opening a PR? \r\nAlso, since this will affect training, do you have a script that compares both in a training scenario? AFAIK current integration tests for Dinov2 are not in a training setti... | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | ### System Info
- `transformers` version: 4.38.0.dev0
- Platform: Linux-5.15.0-91-generic-x86_64-with-glibc2.31
- Python version: 3.11.7
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.2.0 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: not necessarily
- Using distributed or parallel set-up in script?: no
### Who can help?
@amyeroberts @NielsRogge
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
I'm not getting any errors, and I think sharing a script doesn't make sense in this case.
The issue is simply that two `Dinov2DropPath` layers are being instantiated in the `Dinov2Layer`:
https://github.com/huggingface/transformers/blob/7d312ad2e9473cd3a0ea3e9b206b8ed3c147e9be/src/transformers/models/dinov2/modeling_dinov2.py#L374-L392
But they're not being used anywhere else:
https://github.com/huggingface/transformers/blob/7d312ad2e9473cd3a0ea3e9b206b8ed3c147e9be/src/transformers/models/dinov2/modeling_dinov2.py#L394-L423
### Expected behavior
These layers should probably not be ignored. Moreover, I think there's no reason to instantiate two different ones.
I've implemented a fix in https://github.com/fepegar/transformers/pull/1/files. Please let me know if you'd like me to open a PR here.
I've tried running `pytest`, but I'm getting some `pytest`-related errors (not failing tests). Happy to report that somewhere else as well. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29140/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29140/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29139 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29139/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29139/comments | https://api.github.com/repos/huggingface/transformers/issues/29139/events | https://github.com/huggingface/transformers/issues/29139 | 2,144,132,992 | I_kwDOCUB6oc5_zN-A | 29,139 | past_key_values for SeamlessM4Tv2ForSpeechToText is not working as expected | {
"login": "vapemaster-kz",
"id": 65128133,
"node_id": "MDQ6VXNlcjY1MTI4MTMz",
"avatar_url": "https://avatars.githubusercontent.com/u/65128133?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vapemaster-kz",
"html_url": "https://github.com/vapemaster-kz",
"followers_url": "https://api.github.com/users/vapemaster-kz/followers",
"following_url": "https://api.github.com/users/vapemaster-kz/following{/other_user}",
"gists_url": "https://api.github.com/users/vapemaster-kz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vapemaster-kz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vapemaster-kz/subscriptions",
"organizations_url": "https://api.github.com/users/vapemaster-kz/orgs",
"repos_url": "https://api.github.com/users/vapemaster-kz/repos",
"events_url": "https://api.github.com/users/vapemaster-kz/events{/privacy}",
"received_events_url": "https://api.github.com/users/vapemaster-kz/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @ylacombe "
] | 1,708 | 1,708 | null | NONE | null | ### System Info
transformers version: 4.37.2
python verison: 3.8.6.
OS: Windows 11
### Who can help?
@sanchit-gandhi
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)
### Reproduction
I have segments of audio, and I would like to pass past_key_values between them. I exptected the transcribtion quality to increase, but rather it became unreadable.
```python
processor = AutoProcessor.from_pretrained(path_to_model)
model = SeamlessM4Tv2ForSpeechToText.from_pretrained(path_to_model)
audio_chunks = [audio_segments]
past_key_values= None
for i in range(5):
audio_inputs = processor(audios=audio_chunks[i], return_tensors="pt", sampling_rate=16_000)
output = model.generate(**audio_inputs, tgt_lang="rus", repetition_penalty=1.1, return_dict_in_generate=True, past_key_values=past_key_values)
tmp_result = processor.decode(output[0][0], skip_special_tokens=True)
past_key_values = output['past_key_values']
```
### Expected behavior
The transcription quality is supposed to increase when I pass past_key_values (or at least have similar transcribation quality as when past_key_values=None).
The audio is the same. In other words, I had some audio, applied VAD to segment it into batches, and then fed this segments to the model one by one. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29139/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29139/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29138 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29138/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29138/comments | https://api.github.com/repos/huggingface/transformers/issues/29138/events | https://github.com/huggingface/transformers/pull/29138 | 2,144,115,768 | PR_kwDOCUB6oc5nYZN3 | 29,138 | Fix ROPE embeddings for LLama | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | MEMBER | null | # What does this PR do?
This [test](https://app.circleci.com/pipelines/github/huggingface/transformers/84847/workflows/2a5e5769-9431-4e2b-babb-81a112558a97/jobs/1098065) failed on my PR and I checked to see the reason. I found that the changes introduced to make llama compile compatible are causing the issue.
The fixes here are tested with fullgraph compile, compilation is still working without graph breaks. Additionally, the failing [test]((https://app.circleci.com/pipelines/github/huggingface/transformers/84847/workflows/2a5e5769-9431-4e2b-babb-81a112558a97/jobs/1098065)) was run 500 times. I found that aside from rope embeddings, the cause of test failure was in SDPA attention. I cannot say what is the reason exactly, but running the test 500 times gives 95% success in SDPA and 100% success in eager, using the fixes introduced in this PR. Prior to these fixes, the tests were running with 90% success for both attentions.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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.
@gante
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29138/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29138/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29138",
"html_url": "https://github.com/huggingface/transformers/pull/29138",
"diff_url": "https://github.com/huggingface/transformers/pull/29138.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29138.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29137 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29137/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29137/comments | https://api.github.com/repos/huggingface/transformers/issues/29137/events | https://github.com/huggingface/transformers/issues/29137 | 2,144,069,859 | I_kwDOCUB6oc5_y-jj | 29,137 | transformers.AutoTokenizer.from_pretrained( ... use_Fast=False) fails with 'TypeError: not a string' for some tokenizers | {
"login": "Jeronymous",
"id": 22522728,
"node_id": "MDQ6VXNlcjIyNTIyNzI4",
"avatar_url": "https://avatars.githubusercontent.com/u/22522728?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Jeronymous",
"html_url": "https://github.com/Jeronymous",
"followers_url": "https://api.github.com/users/Jeronymous/followers",
"following_url": "https://api.github.com/users/Jeronymous/following{/other_user}",
"gists_url": "https://api.github.com/users/Jeronymous/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Jeronymous/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Jeronymous/subscriptions",
"organizations_url": "https://api.github.com/users/Jeronymous/orgs",
"repos_url": "https://api.github.com/users/Jeronymous/repos",
"events_url": "https://api.github.com/users/Jeronymous/events{/privacy}",
"received_events_url": "https://api.github.com/users/Jeronymous/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"cc @ArthurZucker ",
"Hey! Thanks for reporting. \r\n`tokenizer.Load(self.vocab_file)` seems to be the issue here. If you check the repo it does not have the `tokenizer.model` .\r\nYou should raise the issue there! \r\n",
"Thanks @ArthurZucker 👍 "
] | 1,708 | 1,708 | 1,708 | NONE | null | ### System Info
- `transformers` version: 4.37.2
- Platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.19.4
- Safetensors version: 0.4.1
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.2+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
Also I tried the following versions:
- `tokenizers` version: 0.15.0 and 0.15.2 (latest)
- `sentencepiece` version: 0.1.99 and 0.2.0 (latest)
### Who can help?
[ArthurZucker](https://github.com/ArthurZucker)
### Information
- [X] The official example scripts
- [ ] My own modified scripts
### Tasks
- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
(that may be a duplicate of https://github.com/huggingface/transformers/issues/27845)
```
import transformers
tokenizer = transformers.AutoTokenizer.from_pretrained("croissantllm/CroissantLLMBase", use_fast=False)
```
This fails with
```
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-1-9fe531439285> in <module>
1 import transformers
----> 2 tokenizer = transformers.AutoTokenizer.from_pretrained("croissantllm/CroissantLLMBase", use_fast=False)
~/.local/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py in from_pretrained(cls, pretrained_model_name_or_path, *inputs, **kwargs)
812 f"Tokenizer class {tokenizer_class_candidate} does not exist or is not currently imported."
813 )
--> 814 return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
815
816 # Otherwise we have to be creative.
~/.local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, cache_dir, force_download, local_files_only, token, revision, *init_inputs, **kwargs)
2027 logger.info(f"loading file {file_path} from cache at {resolved_vocab_files[file_id]}")
2028
-> 2029 return cls._from_pretrained(
2030 resolved_vocab_files,
2031 pretrained_model_name_or_path,
~/.local/lib/python3.10/site-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, resolved_vocab_files, pretrained_model_name_or_path, init_configuration, token, cache_dir, local_files_only, _commit_hash, _is_local, *init_inputs, **kwargs)
2259 # Instantiate the tokenizer.
2260 try:
-> 2261 tokenizer = cls(*init_inputs, **init_kwargs)
2262 except OSError:
2263 raise OSError(
~/.local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py in __init__(self, vocab_file, unk_token, bos_token, eos_token, pad_token, sp_model_kwargs, add_bos_token, add_eos_token, clean_up_tokenization_spaces, use_default_system_prompt, spaces_between_special_tokens, legacy, **kwargs)
176 self.add_eos_token = add_eos_token
177 self.use_default_system_prompt = use_default_system_prompt
--> 178 self.sp_model = self.get_spm_processor(kwargs.pop("from_slow", False))
179
180 super().__init__(
~/.local/lib/python3.10/site-packages/transformers/models/llama/tokenization_llama.py in get_spm_processor(self, from_slow)
201 tokenizer = spm.SentencePieceProcessor(**self.sp_model_kwargs)
202 if self.legacy or from_slow: # no dependency on protobuf
--> 203 tokenizer.Load(self.vocab_file)
204 return tokenizer
205
/usr/local/lib/python3.10/dist-packages/sentencepiece/__init__.py in Load(self, model_file, model_proto)
903 if model_proto:
904 return self.LoadFromSerializedProto(model_proto)
--> 905 return self.LoadFromFile(model_file)
906
907
/usr/local/lib/python3.10/dist-packages/sentencepiece/__init__.py in LoadFromFile(self, arg)
308
309 def LoadFromFile(self, arg):
--> 310 return _sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
311
312 def _EncodeAsIds(self, text, enable_sampling, nbest_size, alpha, add_bos, add_eos, reverse, emit_unk_piece):
TypeError: not a string
```
### Expected behavior
I would expect that tokenizer to load.
(Note: I had this error while investigating why the fast tokenizer does not scale well with the text length, but this is another issue) | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29137/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29137/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29136 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29136/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29136/comments | https://api.github.com/repos/huggingface/transformers/issues/29136/events | https://github.com/huggingface/transformers/pull/29136 | 2,144,048,828 | PR_kwDOCUB6oc5nYKjd | 29,136 | Generate: low memory tests are flaky | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29136). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"@amyeroberts #29109 seems to have fixed most of the issue (this test does compare ... | 1,708 | 1,708 | null | MEMBER | null | # What does this PR do?
As identified by @molbap -- generate tests with the `low_memory` flag are flaky. The full reason is the same as explained in [this comment](https://github.com/huggingface/transformers/issues/25420#issuecomment-1775317535).
The error likelihood has low (~3%), but still quite disruptive for transformers devs. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29136/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29136/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29136",
"html_url": "https://github.com/huggingface/transformers/pull/29136",
"diff_url": "https://github.com/huggingface/transformers/pull/29136.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29136.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29135 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29135/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29135/comments | https://api.github.com/repos/huggingface/transformers/issues/29135/events | https://github.com/huggingface/transformers/pull/29135 | 2,144,037,386 | PR_kwDOCUB6oc5nYICS | 29,135 | Revert low cpu mem tie weights | {
"login": "amyeroberts",
"id": 22614925,
"node_id": "MDQ6VXNlcjIyNjE0OTI1",
"avatar_url": "https://avatars.githubusercontent.com/u/22614925?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amyeroberts",
"html_url": "https://github.com/amyeroberts",
"followers_url": "https://api.github.com/users/amyeroberts/followers",
"following_url": "https://api.github.com/users/amyeroberts/following{/other_user}",
"gists_url": "https://api.github.com/users/amyeroberts/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amyeroberts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amyeroberts/subscriptions",
"organizations_url": "https://api.github.com/users/amyeroberts/orgs",
"repos_url": "https://api.github.com/users/amyeroberts/repos",
"events_url": "https://api.github.com/users/amyeroberts/events{/privacy}",
"received_events_url": "https://api.github.com/users/amyeroberts/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29135). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"Sounds good, thanks for taking care of this!"
] | 1,708 | 1,708 | 1,708 | COLLABORATOR | null | # What does this PR do?
Reverts #28948 and #29043
See relevant comment: https://github.com/huggingface/transformers/pull/29110#issuecomment-1953847826
cc @hackyon @ydshieh
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29135/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29135/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29135",
"html_url": "https://github.com/huggingface/transformers/pull/29135",
"diff_url": "https://github.com/huggingface/transformers/pull/29135.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29135.patch",
"merged_at": 1708430807000
} |
https://api.github.com/repos/huggingface/transformers/issues/29134 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29134/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29134/comments | https://api.github.com/repos/huggingface/transformers/issues/29134/events | https://github.com/huggingface/transformers/pull/29134 | 2,143,960,967 | PR_kwDOCUB6oc5nX3V4 | 29,134 | Add generate kwargs to VQA pipeline | {
"login": "regisss",
"id": 15324346,
"node_id": "MDQ6VXNlcjE1MzI0MzQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/15324346?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/regisss",
"html_url": "https://github.com/regisss",
"followers_url": "https://api.github.com/users/regisss/followers",
"following_url": "https://api.github.com/users/regisss/following{/other_user}",
"gists_url": "https://api.github.com/users/regisss/gists{/gist_id}",
"starred_url": "https://api.github.com/users/regisss/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/regisss/subscriptions",
"organizations_url": "https://api.github.com/users/regisss/orgs",
"repos_url": "https://api.github.com/users/regisss/repos",
"events_url": "https://api.github.com/users/regisss/events{/privacy}",
"received_events_url": "https://api.github.com/users/regisss/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29134). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
<!--
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 -->
As per title.
## 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#create-a-pull-request),
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29134/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29134/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29134",
"html_url": "https://github.com/huggingface/transformers/pull/29134",
"diff_url": "https://github.com/huggingface/transformers/pull/29134.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29134.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29133 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29133/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29133/comments | https://api.github.com/repos/huggingface/transformers/issues/29133/events | https://github.com/huggingface/transformers/pull/29133 | 2,143,951,741 | PR_kwDOCUB6oc5nX1Va | 29,133 | [`cuda kernels`] only compile them when initializing | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29133). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"I'll make sure of that before merging! Testing now!",
"```bash\r\nFAILED tests/m... | 1,708 | 1,708 | 1,708 | COLLABORATOR | null | # What does this PR do?
Fixes #29130, from 1min to 6seconds | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29133/reactions",
"total_count": 3,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 3,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29133/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29133",
"html_url": "https://github.com/huggingface/transformers/pull/29133",
"diff_url": "https://github.com/huggingface/transformers/pull/29133.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29133.patch",
"merged_at": 1708429139000
} |
https://api.github.com/repos/huggingface/transformers/issues/29132 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29132/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29132/comments | https://api.github.com/repos/huggingface/transformers/issues/29132/events | https://github.com/huggingface/transformers/issues/29132 | 2,143,872,350 | I_kwDOCUB6oc5_yOVe | 29,132 | SPAM | {
"login": "cook9019",
"id": 141466977,
"node_id": "U_kgDOCG6dYQ",
"avatar_url": "https://avatars.githubusercontent.com/u/141466977?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/cook9019",
"html_url": "https://github.com/cook9019",
"followers_url": "https://api.github.com/users/cook9019/followers",
"following_url": "https://api.github.com/users/cook9019/following{/other_user}",
"gists_url": "https://api.github.com/users/cook9019/gists{/gist_id}",
"starred_url": "https://api.github.com/users/cook9019/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/cook9019/subscriptions",
"organizations_url": "https://api.github.com/users/cook9019/orgs",
"repos_url": "https://api.github.com/users/cook9019/repos",
"events_url": "https://api.github.com/users/cook9019/events{/privacy}",
"received_events_url": "https://api.github.com/users/cook9019/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | NONE | null | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29132/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29132/timeline | not_planned | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29131 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29131/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29131/comments | https://api.github.com/repos/huggingface/transformers/issues/29131/events | https://github.com/huggingface/transformers/pull/29131 | 2,143,812,725 | PR_kwDOCUB6oc5nXWfA | 29,131 | added the max_matching_ngram_size to GenerationConfig | {
"login": "mosheber",
"id": 22236370,
"node_id": "MDQ6VXNlcjIyMjM2Mzcw",
"avatar_url": "https://avatars.githubusercontent.com/u/22236370?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/mosheber",
"html_url": "https://github.com/mosheber",
"followers_url": "https://api.github.com/users/mosheber/followers",
"following_url": "https://api.github.com/users/mosheber/following{/other_user}",
"gists_url": "https://api.github.com/users/mosheber/gists{/gist_id}",
"starred_url": "https://api.github.com/users/mosheber/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/mosheber/subscriptions",
"organizations_url": "https://api.github.com/users/mosheber/orgs",
"repos_url": "https://api.github.com/users/mosheber/repos",
"events_url": "https://api.github.com/users/mosheber/events{/privacy}",
"received_events_url": "https://api.github.com/users/mosheber/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
* Added the max_matching_ngram_size parameter into the GenerationConfig, for the PromptLookupCandidateGenerator.
* Included the max_matching_ngram_size when calling the __init__ of PromptLookupCandidateGenerator in _get_candidate_generator, in case it is specified.
## 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.
@gante , would appreciate it if you could give this PR a glance, and thank you in advance.
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29131/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29131/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29131",
"html_url": "https://github.com/huggingface/transformers/pull/29131",
"diff_url": "https://github.com/huggingface/transformers/pull/29131.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29131.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29130 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29130/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29130/comments | https://api.github.com/repos/huggingface/transformers/issues/29130/events | https://github.com/huggingface/transformers/issues/29130 | 2,143,788,296 | I_kwDOCUB6oc5_x50I | 29,130 | Move kernel compilation to init rather than at import stage | {
"login": "NielsRogge",
"id": 48327001,
"node_id": "MDQ6VXNlcjQ4MzI3MDAx",
"avatar_url": "https://avatars.githubusercontent.com/u/48327001?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NielsRogge",
"html_url": "https://github.com/NielsRogge",
"followers_url": "https://api.github.com/users/NielsRogge/followers",
"following_url": "https://api.github.com/users/NielsRogge/following{/other_user}",
"gists_url": "https://api.github.com/users/NielsRogge/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NielsRogge/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NielsRogge/subscriptions",
"organizations_url": "https://api.github.com/users/NielsRogge/orgs",
"repos_url": "https://api.github.com/users/NielsRogge/repos",
"events_url": "https://api.github.com/users/NielsRogge/events{/privacy}",
"received_events_url": "https://api.github.com/users/NielsRogge/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 1862634478,
"node_id": "MDU6TGFiZWwxODYyNjM0NDc4",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Should%20Fix",
"name": "Should Fix",
"color": "FF0000",
"default": false,
"description": "This has been identified as a bug and should be fixed."
},
{
"... | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | ### Feature request
Some models like Deformable DETR rely on custom CUDA kernels to be compiled as seen [here](https://github.com/huggingface/transformers/blob/f7ef7cec6c6c162087421f36a17eabdbb223579d/src/transformers/models/deformable_detr/modeling_deformable_detr.py#L54).
Currently these are compiled when importing the Transformers library, but this needs to happen later, when initializing the models.
All custom CUDA kernels are defined here: https://github.com/huggingface/transformers/tree/main/src/transformers/kernels
### Motivation
This is pretty important to fix actually as currently running `make fixup` on machines that have `ninja` installed will compile all these kernels before running the quality checks, making it super slow.. thanks @younesbelkada for the info
### Your contribution
Not sure I can help with this, the current workaround is simply removing `ninja` from the environment | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29130/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29130/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29129 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29129/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29129/comments | https://api.github.com/repos/huggingface/transformers/issues/29129/events | https://github.com/huggingface/transformers/issues/29129 | 2,143,773,084 | I_kwDOCUB6oc5_x2Gc | 29,129 | Flash attention implementation with BERT base model | {
"login": "ghost",
"id": 10137,
"node_id": "MDQ6VXNlcjEwMTM3",
"avatar_url": "https://avatars.githubusercontent.com/u/10137?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ghost",
"html_url": "https://github.com/ghost",
"followers_url": "https://api.github.com/users/ghost/followers",
"following_url": "https://api.github.com/users/ghost/following{/other_user}",
"gists_url": "https://api.github.com/users/ghost/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ghost/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ghost/subscriptions",
"organizations_url": "https://api.github.com/users/ghost/orgs",
"repos_url": "https://api.github.com/users/ghost/repos",
"events_url": "https://api.github.com/users/ghost/events{/privacy}",
"received_events_url": "https://api.github.com/users/ghost/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 1843244711,
"node_id": "MDU6TGFiZWwxODQzMjQ0NzEx",
"url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model",
"name": "New model",
"color": "fbca04",
"default": false,
"description": ""
}
] | open | false | null | [] | [
"Not that expert but I suggest you can try bettertransformer for extreme speed up. ( In my knowledge that flash-attn is mainly focused on kv cache which is not exist on Bert-like model in most cases. )",
"> Not that expert but I suggest you can try bettertransformer for extreme speed up. ( In my knowledge that fl... | 1,708 | 1,708 | null | NONE | null | ### Model description
hello and thanks community.
I am trying to replace standard attention by flash attention in the BERT base Model. Anyone please help not able to find any tutorial or any discussions.
or just give some directions how to do that ..I have got the idea of making attention prob drop prob = 0 . it makes sense but not sure how it is going to work.
@tridao
@arthur
@jamaliki
@sorenmc
@LysandreJik @ArthurZucker
### Open source status
- [x] The model implementation is available
- [x] The model weights are available
### Provide useful links for the implementation
_No response_ | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29129/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29129/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29128 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29128/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29128/comments | https://api.github.com/repos/huggingface/transformers/issues/29128/events | https://github.com/huggingface/transformers/issues/29128 | 2,143,692,799 | I_kwDOCUB6oc5_xif_ | 29,128 | bart-large-xsum model: There were missing keys in the checkpoint model loaded: ['model.encoder.embed_tokens.weight', 'model.decoder.embed_tokens.weight', 'lm_head.weight']. | {
"login": "Aisuko",
"id": 8053949,
"node_id": "MDQ6VXNlcjgwNTM5NDk=",
"avatar_url": "https://avatars.githubusercontent.com/u/8053949?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Aisuko",
"html_url": "https://github.com/Aisuko",
"followers_url": "https://api.github.com/users/Aisuko/followers",
"following_url": "https://api.github.com/users/Aisuko/following{/other_user}",
"gists_url": "https://api.github.com/users/Aisuko/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Aisuko/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Aisuko/subscriptions",
"organizations_url": "https://api.github.com/users/Aisuko/orgs",
"repos_url": "https://api.github.com/users/Aisuko/repos",
"events_url": "https://api.github.com/users/Aisuko/events{/privacy}",
"received_events_url": "https://api.github.com/users/Aisuko/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @ArthurZucker @younesbelkada ",
"Hey @Aisuko, could you provide a **minimal** reproducer ? That would help use! \r\nAlso note that the `generation parameters` issues can probably be safely ignored. The missing keys is however a bit more problematic! \r\nMight be tied weights that are not tied properly, is `ti... | 1,708 | 1,708 | null | NONE | null | ### System Info
- `transformers` version: 4.37.2
- Platform: Linux-5.15.133+-x86_64-with-glibc2.31
- Python version: 3.10.13
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: 0.26.1
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.2 (True)
- Tensorflow version (GPU?): 2.15.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.7.5 (gpu)
- Jax version: 0.4.23
- JaxLib version: 0.4.23.dev20240116
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [X] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
Thanks for your great work.
Please take a look at the notebook below in Kaggle. https://www.kaggle.com/code/aisuko/text-summarization-with-bart-series-llm/notebook
After training process finished it will show the warning message below
```
Some non-default generation parameters are set in the model config. These should go into a GenerationConfig file (https://huggingface.co/docs/transformers/generation_strategies#save-a-custom-decoding-strategy-with-your-model) instead. This warning will be raised to an exception in v4.41.
Non-default generation parameters: {'max_length': 62, 'min_length': 11, 'early_stopping': True, 'num_beams': 6, 'no_repeat_ngram_size': 3, 'forced_eos_token_id': 2}
There were missing keys in the checkpoint model loaded: ['model.encoder.embed_tokens.weight', 'model.decoder.embed_tokens.weight', 'lm_head.weight'].
```
And the fine-tuned model cannot be used to do inference. I saw a similar type of issue https://github.com/huggingface/transformers/issues/27972
### Expected behavior
No warning issue and I can use the fine-tuned model to do inference. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29128/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29128/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29127 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29127/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29127/comments | https://api.github.com/repos/huggingface/transformers/issues/29127/events | https://github.com/huggingface/transformers/issues/29127 | 2,143,620,996 | I_kwDOCUB6oc5_xQ-E | 29,127 | err_handle(layoutlmv3): Error message doesn't give much clarity when boxes not containing enough information | {
"login": "Sushaanth-Suresh-Kumar",
"id": 123300765,
"node_id": "U_kgDOB1lrnQ",
"avatar_url": "https://avatars.githubusercontent.com/u/123300765?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Sushaanth-Suresh-Kumar",
"html_url": "https://github.com/Sushaanth-Suresh-Kumar",
"followers_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/followers",
"following_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/following{/other_user}",
"gists_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/subscriptions",
"organizations_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/orgs",
"repos_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/repos",
"events_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/events{/privacy}",
"received_events_url": "https://api.github.com/users/Sushaanth-Suresh-Kumar/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Would you like to open a PR to improve the error? 🤗 ",
"Sure"
] | 1,708 | 1,708 | null | NONE | null | ### System Info
- `transformers` version: 4.37.2
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.11.5
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.2.0+cpu (False)
- Tensorflow version (GPU?): 2.15.0 (False)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: no
- Using distributed or parallel set-up in script?: no
### Who can help?
@younesbelkada
@ArthurZucker
### Information
- [X] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)
### Reproduction
****
Model I am using LayoutLMv3:
when `boxes = [[123, 53], [36, 87], ...]` (basically any list which is not according to the proper format)
by proper format I mean `[[123, 346, 234, 634], [356, 568, 234, 25], ...]`
```python
encoding = processor(
image_1,
text,
boxes=boxes,
max_length=512,
padding="max_length",
truncation=True,
return_tensors="pt"
)
```
It produces a this error message
```
ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length. Perhaps your features (labels in this case) have excessive nesting (inputs type list where type int is expected).
```
**To Reproduce**
Steps to reproduce the behavior:
1. add any list of boxes with not enough values like `boxes = [[123, 53], [36, 87], ...]`
2. when run it throws the ValueError mentioned above
### Expected behavior
Can throw an error saying
```
ValueError: boxes doesn't have enough values inside each box. Each box should contain 4 values
``` | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29127/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29127/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29126 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29126/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29126/comments | https://api.github.com/repos/huggingface/transformers/issues/29126/events | https://github.com/huggingface/transformers/issues/29126 | 2,143,539,045 | I_kwDOCUB6oc5_w89l | 29,126 | WARNING: tokenization mismatch: 43 vs. 44. (ignored) | {
"login": "lucasjinreal",
"id": 21303438,
"node_id": "MDQ6VXNlcjIxMzAzNDM4",
"avatar_url": "https://avatars.githubusercontent.com/u/21303438?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lucasjinreal",
"html_url": "https://github.com/lucasjinreal",
"followers_url": "https://api.github.com/users/lucasjinreal/followers",
"following_url": "https://api.github.com/users/lucasjinreal/following{/other_user}",
"gists_url": "https://api.github.com/users/lucasjinreal/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lucasjinreal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucasjinreal/subscriptions",
"organizations_url": "https://api.github.com/users/lucasjinreal/orgs",
"repos_url": "https://api.github.com/users/lucasjinreal/repos",
"events_url": "https://api.github.com/users/lucasjinreal/events{/privacy}",
"received_events_url": "https://api.github.com/users/lucasjinreal/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @lucasjinreal, \r\n\r\nWithout a code sample to replicate, information about the running environment or more information about the error - including full trackback - there isn't much we can do to help you here."
] | 1,708 | 1,708 | null | NONE | null | Recently there are many errors got either from fastchat or llava code base if using latest transfomers.
WARNING: tokenization mismatch: 43 vs. 44. (ignored)
What does this happen and how to dismiss it? Will it effect the final training result? | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29126/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29126/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29125 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29125/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29125/comments | https://api.github.com/repos/huggingface/transformers/issues/29125/events | https://github.com/huggingface/transformers/pull/29125 | 2,143,504,797 | PR_kwDOCUB6oc5nWUBE | 29,125 | feat: Upgrade Weights & Biases callback | {
"login": "parambharat",
"id": 12809212,
"node_id": "MDQ6VXNlcjEyODA5MjEy",
"avatar_url": "https://avatars.githubusercontent.com/u/12809212?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/parambharat",
"html_url": "https://github.com/parambharat",
"followers_url": "https://api.github.com/users/parambharat/followers",
"following_url": "https://api.github.com/users/parambharat/following{/other_user}",
"gists_url": "https://api.github.com/users/parambharat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/parambharat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/parambharat/subscriptions",
"organizations_url": "https://api.github.com/users/parambharat/orgs",
"repos_url": "https://api.github.com/users/parambharat/repos",
"events_url": "https://api.github.com/users/parambharat/events{/privacy}",
"received_events_url": "https://api.github.com/users/parambharat/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
This PR adds a few new functionalities to the Weights & Biases Callback
- Logs Peft and Lora Config to wandb if present
- Adds model parameter counts to wandb config and artifact metadata
- Adds on_predict methods to log prediction metrics
- Prints the model architecture to a file alongside the wandb artifact
- Logs initial and final models to the wandb artifact to full reproducibility
- Adds steps and epoch aliases to checkpoint artifacts
- Here's a [link](https://wandb.ai/parambharat/test-transformers/artifacts/model/model-rg4pcjcv/v3) to the what the logged artifacts look like
- Here's a run [overview page](https://wandb.ai/parambharat/test-transformers/runs/rg4pcjcv/overview?workspace=user-parambharat) with added config and metadata for the run with peft configs logged
## Before submitting
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
## Who can review?
- trainer: @muellerzr and @pacman100 | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29125/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29125/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29125",
"html_url": "https://github.com/huggingface/transformers/pull/29125",
"diff_url": "https://github.com/huggingface/transformers/pull/29125.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29125.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29124 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29124/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29124/comments | https://api.github.com/repos/huggingface/transformers/issues/29124/events | https://github.com/huggingface/transformers/pull/29124 | 2,143,420,111 | PR_kwDOCUB6oc5nWBoW | 29,124 | added unrolled whisper_generation.py | {
"login": "robertgshaw2-neuralmagic",
"id": 114415538,
"node_id": "U_kgDOBtHXsg",
"avatar_url": "https://avatars.githubusercontent.com/u/114415538?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/robertgshaw2-neuralmagic",
"html_url": "https://github.com/robertgshaw2-neuralmagic",
"followers_url": "https://api.github.com/users/robertgshaw2-neuralmagic/followers",
"following_url": "https://api.github.com/users/robertgshaw2-neuralmagic/following{/other_user}",
"gists_url": "https://api.github.com/users/robertgshaw2-neuralmagic/gists{/gist_id}",
"starred_url": "https://api.github.com/users/robertgshaw2-neuralmagic/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/robertgshaw2-neuralmagic/subscriptions",
"organizations_url": "https://api.github.com/users/robertgshaw2-neuralmagic/orgs",
"repos_url": "https://api.github.com/users/robertgshaw2-neuralmagic/repos",
"events_url": "https://api.github.com/users/robertgshaw2-neuralmagic/events{/privacy}",
"received_events_url": "https://api.github.com/users/robertgshaw2-neuralmagic/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | NONE | null | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29124/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29124/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29124",
"html_url": "https://github.com/huggingface/transformers/pull/29124",
"diff_url": "https://github.com/huggingface/transformers/pull/29124.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29124.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29123 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29123/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29123/comments | https://api.github.com/repos/huggingface/transformers/issues/29123/events | https://github.com/huggingface/transformers/pull/29123 | 2,143,416,822 | PR_kwDOCUB6oc5nWA8d | 29,123 | [`Core generation`] Let's be less restrictive on the arguments passed to the generation calls. | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29123). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | COLLABORATOR | null | # What does this PR do?
Updates generate calls | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29123/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29123/timeline | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29123",
"html_url": "https://github.com/huggingface/transformers/pull/29123",
"diff_url": "https://github.com/huggingface/transformers/pull/29123.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29123.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29122 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29122/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29122/comments | https://api.github.com/repos/huggingface/transformers/issues/29122/events | https://github.com/huggingface/transformers/pull/29122 | 2,143,413,555 | PR_kwDOCUB6oc5nWARN | 29,122 | FIX [`bnb` / `tests`] Propagate the changes from #29092 to 4-bit tests | {
"login": "younesbelkada",
"id": 49240599,
"node_id": "MDQ6VXNlcjQ5MjQwNTk5",
"avatar_url": "https://avatars.githubusercontent.com/u/49240599?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/younesbelkada",
"html_url": "https://github.com/younesbelkada",
"followers_url": "https://api.github.com/users/younesbelkada/followers",
"following_url": "https://api.github.com/users/younesbelkada/following{/other_user}",
"gists_url": "https://api.github.com/users/younesbelkada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/younesbelkada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/younesbelkada/subscriptions",
"organizations_url": "https://api.github.com/users/younesbelkada/orgs",
"repos_url": "https://api.github.com/users/younesbelkada/repos",
"events_url": "https://api.github.com/users/younesbelkada/events{/privacy}",
"received_events_url": "https://api.github.com/users/younesbelkada/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29122). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
As per title, I overlooked the fix and forgot to push the changes of https://github.com/huggingface/transformers/pull/29092 in 4-bit tests 😢
cc @amyeroberts @Titus-von-Koeller | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29122/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29122/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29122",
"html_url": "https://github.com/huggingface/transformers/pull/29122",
"diff_url": "https://github.com/huggingface/transformers/pull/29122.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29122.patch",
"merged_at": 1708423875000
} |
https://api.github.com/repos/huggingface/transformers/issues/29121 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29121/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29121/comments | https://api.github.com/repos/huggingface/transformers/issues/29121/events | https://github.com/huggingface/transformers/issues/29121 | 2,143,187,142 | I_kwDOCUB6oc5_vnDG | 29,121 | AttributeError: 'DistilBertModel' object has no attribute '_use_flash_attention_2' | {
"login": "javilonso",
"id": 31996659,
"node_id": "MDQ6VXNlcjMxOTk2NjU5",
"avatar_url": "https://avatars.githubusercontent.com/u/31996659?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/javilonso",
"html_url": "https://github.com/javilonso",
"followers_url": "https://api.github.com/users/javilonso/followers",
"following_url": "https://api.github.com/users/javilonso/following{/other_user}",
"gists_url": "https://api.github.com/users/javilonso/gists{/gist_id}",
"starred_url": "https://api.github.com/users/javilonso/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/javilonso/subscriptions",
"organizations_url": "https://api.github.com/users/javilonso/orgs",
"repos_url": "https://api.github.com/users/javilonso/repos",
"events_url": "https://api.github.com/users/javilonso/events{/privacy}",
"received_events_url": "https://api.github.com/users/javilonso/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @javilonso ! \r\nI quickly tried on transformers main: \r\n```python\r\nfrom transformers import pipeline\r\n\r\nunmasker = pipeline('fill-mask', model='distilbert-base-uncased')\r\nunmasker(\"Hello I'm a [MASK] model.\")\r\n```\r\nBut I did not managed to repro, can you share a snippet to reproduce the issue?\... | 1,708 | 1,708 | null | NONE | null | ### System Info
Obtaining this error in last transformers 4.37.2, but works correctly in transformers 4.35.2
Simple inference with a finetuned distilbert model.
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
1. Install transformers 4.37.2
2. Perform inference with model https://huggingface.co/distilbert/distilbert-base-uncased
### Expected behavior
Inference should go through without errors | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29121/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29121/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29120 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29120/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29120/comments | https://api.github.com/repos/huggingface/transformers/issues/29120/events | https://github.com/huggingface/transformers/pull/29120 | 2,143,042,742 | PR_kwDOCUB6oc5nUwcG | 29,120 | Starcoder2 model | {
"login": "jlamypoirier",
"id": 18523627,
"node_id": "MDQ6VXNlcjE4NTIzNjI3",
"avatar_url": "https://avatars.githubusercontent.com/u/18523627?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jlamypoirier",
"html_url": "https://github.com/jlamypoirier",
"followers_url": "https://api.github.com/users/jlamypoirier/followers",
"following_url": "https://api.github.com/users/jlamypoirier/following{/other_user}",
"gists_url": "https://api.github.com/users/jlamypoirier/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jlamypoirier/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jlamypoirier/subscriptions",
"organizations_url": "https://api.github.com/users/jlamypoirier/orgs",
"repos_url": "https://api.github.com/users/jlamypoirier/repos",
"events_url": "https://api.github.com/users/jlamypoirier/events{/privacy}",
"received_events_url": "https://api.github.com/users/jlamypoirier/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | CONTRIBUTOR | null | The Starcoder2 model, adapted from Mistral. All changes are done through options, so Mistral itself is still supported. Main changes:
* Use layer norm (RMS still available as option)
* Use standard MLP (gated still available as option)
* Add back biases (optional)
* Change (default?) tokenizer class
*Embedding and residual dropout
It does not support absolute embeddings, so can't support Santacoder or Starcoder
Todo:
* Forward changes from #27931, #29027 (and future changes from Feb. 19)
* Documentation
* Copyright
* Point to starcoder2 checkpoint
* Other minor things (see todos)
@younesbelkada | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29120/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29120/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29120",
"html_url": "https://github.com/huggingface/transformers/pull/29120",
"diff_url": "https://github.com/huggingface/transformers/pull/29120.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29120.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29119 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29119/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29119/comments | https://api.github.com/repos/huggingface/transformers/issues/29119/events | https://github.com/huggingface/transformers/pull/29119 | 2,143,005,049 | PR_kwDOCUB6oc5nUoNF | 29,119 | Generate: unset GenerationConfig parameters do not raise warning | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29119). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | MEMBER | null | # What does this PR do?:
Thank you @fxmarty for raising [this issue](https://github.com/huggingface/transformers/pull/25381#issuecomment-1952527813).
This PR allows users to unset (= set to `None`) unused parameters to ensure `generation_config.validate()` doesn't throw a warning. Previously, this was not possible when a parameter had a non-`None` default.
For instance, the following snippet would throw a warning before this PR:
```py
from transformers import GenerationConfig
generation_config = GenerationConfig()
generation_config.update(temperature=None)
generation_config.validate()
# "... UserWarning: `do_sample` is set to `False`. However, `temperature` is set to `None` -- this flag is only used in sample-based generation modes. You should set `do_sample=True` or unset `temperature`."
``` | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29119/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29119/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29119",
"html_url": "https://github.com/huggingface/transformers/pull/29119",
"diff_url": "https://github.com/huggingface/transformers/pull/29119.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29119.patch",
"merged_at": 1708428871000
} |
https://api.github.com/repos/huggingface/transformers/issues/29118 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29118/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29118/comments | https://api.github.com/repos/huggingface/transformers/issues/29118/events | https://github.com/huggingface/transformers/pull/29118 | 2,142,996,665 | PR_kwDOCUB6oc5nUmWT | 29,118 | Skipping test_save_load_low_cpu_mem_usage() for all failing models | {
"login": "hackyon",
"id": 1557853,
"node_id": "MDQ6VXNlcjE1NTc4NTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1557853?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hackyon",
"html_url": "https://github.com/hackyon",
"followers_url": "https://api.github.com/users/hackyon/followers",
"following_url": "https://api.github.com/users/hackyon/following{/other_user}",
"gists_url": "https://api.github.com/users/hackyon/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hackyon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hackyon/subscriptions",
"organizations_url": "https://api.github.com/users/hackyon/orgs",
"repos_url": "https://api.github.com/users/hackyon/repos",
"events_url": "https://api.github.com/users/hackyon/events{/privacy}",
"received_events_url": "https://api.github.com/users/hackyon/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hello @amyeroberts,\r\n\r\nI came up this PR to simply ignores all the failing tests for test_save_load_low_cpu_mem_usage(). This change should be safe as it only touches tests.\r\n\r\nThis should help unblock any PRs from being merged, while we work on getting tie_weights() into some of these models with #29024.\... | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
Skips all failing unit tests for test_save_load_low_cpu_mem_usage(). This should be temporary for some of them until the correct tie_weights() have been added to the models.
I created this temporary PR just in case it takes longer to make progress with #29024, and we don't want to block other PRs while we wait for feedback.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] 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).
- [x] 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.
@amyeroberts
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29118/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29118/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29118",
"html_url": "https://github.com/huggingface/transformers/pull/29118",
"diff_url": "https://github.com/huggingface/transformers/pull/29118.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29118.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29117 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29117/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29117/comments | https://api.github.com/repos/huggingface/transformers/issues/29117/events | https://github.com/huggingface/transformers/pull/29117 | 2,142,967,049 | PR_kwDOCUB6oc5nUf4p | 29,117 | Move misplaced line | {
"login": "kno10",
"id": 3997899,
"node_id": "MDQ6VXNlcjM5OTc4OTk=",
"avatar_url": "https://avatars.githubusercontent.com/u/3997899?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kno10",
"html_url": "https://github.com/kno10",
"followers_url": "https://api.github.com/users/kno10/followers",
"following_url": "https://api.github.com/users/kno10/following{/other_user}",
"gists_url": "https://api.github.com/users/kno10/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kno10/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kno10/subscriptions",
"organizations_url": "https://api.github.com/users/kno10/orgs",
"repos_url": "https://api.github.com/users/kno10/repos",
"events_url": "https://api.github.com/users/kno10/events{/privacy}",
"received_events_url": "https://api.github.com/users/kno10/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29117). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | Move misplaced line, improve code comment.
No functional change, the loss_fct is not used earlier and did not match the code comment either.
## Before submitting
- [X] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
## Who can review?
@ArthurZucker and @younesbelkada
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29117/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29117/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29117",
"html_url": "https://github.com/huggingface/transformers/pull/29117",
"diff_url": "https://github.com/huggingface/transformers/pull/29117.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29117.patch",
"merged_at": 1708392288000
} |
https://api.github.com/repos/huggingface/transformers/issues/29116 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29116/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29116/comments | https://api.github.com/repos/huggingface/transformers/issues/29116/events | https://github.com/huggingface/transformers/pull/29116 | 2,142,944,502 | PR_kwDOCUB6oc5nUbC6 | 29,116 | Track each row separately for stopping criteria | {
"login": "zucchini-nlp",
"id": 100715397,
"node_id": "U_kgDOBgDLhQ",
"avatar_url": "https://avatars.githubusercontent.com/u/100715397?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/zucchini-nlp",
"html_url": "https://github.com/zucchini-nlp",
"followers_url": "https://api.github.com/users/zucchini-nlp/followers",
"following_url": "https://api.github.com/users/zucchini-nlp/following{/other_user}",
"gists_url": "https://api.github.com/users/zucchini-nlp/gists{/gist_id}",
"starred_url": "https://api.github.com/users/zucchini-nlp/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/zucchini-nlp/subscriptions",
"organizations_url": "https://api.github.com/users/zucchini-nlp/orgs",
"repos_url": "https://api.github.com/users/zucchini-nlp/repos",
"events_url": "https://api.github.com/users/zucchini-nlp/events{/privacy}",
"received_events_url": "https://api.github.com/users/zucchini-nlp/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29116). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"Yep, should be unrelated to stopping criteria but I will check ",
"@gante , I fo... | 1,708 | 1,708 | null | MEMBER | null | # What does this PR do?
Addresses the question raised in #28932. I accidentally messed up the first PR (#29056) that was approved, so this is the second version with the same changes.
## 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#create-a-pull-request),
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.
@gante , can you please look again into this. It's the same thing you approved earlier. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29116/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29116/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29116",
"html_url": "https://github.com/huggingface/transformers/pull/29116",
"diff_url": "https://github.com/huggingface/transformers/pull/29116.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29116.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29115 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29115/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29115/comments | https://api.github.com/repos/huggingface/transformers/issues/29115/events | https://github.com/huggingface/transformers/pull/29115 | 2,142,911,771 | PR_kwDOCUB6oc5nUT_w | 29,115 | Switch transformer for sequence classification | {
"login": "jlamprou",
"id": 41962910,
"node_id": "MDQ6VXNlcjQxOTYyOTEw",
"avatar_url": "https://avatars.githubusercontent.com/u/41962910?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jlamprou",
"html_url": "https://github.com/jlamprou",
"followers_url": "https://api.github.com/users/jlamprou/followers",
"following_url": "https://api.github.com/users/jlamprou/following{/other_user}",
"gists_url": "https://api.github.com/users/jlamprou/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jlamprou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jlamprou/subscriptions",
"organizations_url": "https://api.github.com/users/jlamprou/orgs",
"repos_url": "https://api.github.com/users/jlamprou/repos",
"events_url": "https://api.github.com/users/jlamprou/events{/privacy}",
"received_events_url": "https://api.github.com/users/jlamprou/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"> Hey! Thanks for contributing. As there are no released checkpoints for sequence classification, we usually try to:\r\n> \r\n> 1. Open an issue with the feature request\r\n> \r\n> 2. If the issue has strong support from the community (usually around 10 likes for example) the add support for it 🤗\r\n> \r\... | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
This adds a sequence classification head to the PyTorch implementation of SwitchTransformers, following the pattern of T5ForSequenceClassification since it is also an encoder-decoder sequence classification model.
# NOTE:
- [ ] Failing tests, because we haven't a Checkpoint trained on classification.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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.
- [x] 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).
- [x] 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.
Hey @ArthurZucker and @younesbelkada I would greatly appreciate a review on this when you have a chance.
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29115/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29115/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29115",
"html_url": "https://github.com/huggingface/transformers/pull/29115",
"diff_url": "https://github.com/huggingface/transformers/pull/29115.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29115.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29114 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29114/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29114/comments | https://api.github.com/repos/huggingface/transformers/issues/29114/events | https://github.com/huggingface/transformers/pull/29114 | 2,142,818,811 | PR_kwDOCUB6oc5nT_rS | 29,114 | Make torch.compile compilation >2x faster when using static cache + `generate` | {
"login": "fxmarty",
"id": 9808326,
"node_id": "MDQ6VXNlcjk4MDgzMjY=",
"avatar_url": "https://avatars.githubusercontent.com/u/9808326?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/fxmarty",
"html_url": "https://github.com/fxmarty",
"followers_url": "https://api.github.com/users/fxmarty/followers",
"following_url": "https://api.github.com/users/fxmarty/following{/other_user}",
"gists_url": "https://api.github.com/users/fxmarty/gists{/gist_id}",
"starred_url": "https://api.github.com/users/fxmarty/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/fxmarty/subscriptions",
"organizations_url": "https://api.github.com/users/fxmarty/orgs",
"repos_url": "https://api.github.com/users/fxmarty/repos",
"events_url": "https://api.github.com/users/fxmarty/events{/privacy}",
"received_events_url": "https://api.github.com/users/fxmarty/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29114). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"@ArthurZucker @gante @LysandreJik This PR fixes many issues with the current `torc... | 1,708 | 1,708 | null | COLLABORATOR | null | This PR improves the compilation time of llama model with `torch.compile` when using `generate`, avoiding recompilation, recaptures of CUDA graphs & a bug in PyTorch w.r.t. indexing. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29114/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 1
} | https://api.github.com/repos/huggingface/transformers/issues/29114/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29114",
"html_url": "https://github.com/huggingface/transformers/pull/29114",
"diff_url": "https://github.com/huggingface/transformers/pull/29114.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29114.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29113 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29113/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29113/comments | https://api.github.com/repos/huggingface/transformers/issues/29113/events | https://github.com/huggingface/transformers/issues/29113 | 2,142,798,975 | I_kwDOCUB6oc5_uIR_ | 29,113 | ValueError: lags cannot go further than history length, found lag 37 while history length is only 16 | {
"login": "nikhilajoshy",
"id": 37141775,
"node_id": "MDQ6VXNlcjM3MTQxNzc1",
"avatar_url": "https://avatars.githubusercontent.com/u/37141775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nikhilajoshy",
"html_url": "https://github.com/nikhilajoshy",
"followers_url": "https://api.github.com/users/nikhilajoshy/followers",
"following_url": "https://api.github.com/users/nikhilajoshy/following{/other_user}",
"gists_url": "https://api.github.com/users/nikhilajoshy/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nikhilajoshy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nikhilajoshy/subscriptions",
"organizations_url": "https://api.github.com/users/nikhilajoshy/orgs",
"repos_url": "https://api.github.com/users/nikhilajoshy/repos",
"events_url": "https://api.github.com/users/nikhilajoshy/events{/privacy}",
"received_events_url": "https://api.github.com/users/nikhilajoshy/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | {
"login": "kashif",
"id": 8100,
"node_id": "MDQ6VXNlcjgxMDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/8100?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kashif",
"html_url": "https://github.com/kashif",
"followers_url": "https://api.github.com/users/kashif/followers",
"following_url": "https://api.github.com/users/kashif/following{/other_user}",
"gists_url": "https://api.github.com/users/kashif/gists{/gist_id}",
"starred_url": "https://api.github.com/users/kashif/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/kashif/subscriptions",
"organizations_url": "https://api.github.com/users/kashif/orgs",
"repos_url": "https://api.github.com/users/kashif/repos",
"events_url": "https://api.github.com/users/kashif/events{/privacy}",
"received_events_url": "https://api.github.com/users/kashif/received_events",
"type": "User",
"site_admin": false
} | [
{
"login": "kashif",
"id": 8100,
"node_id": "MDQ6VXNlcjgxMDA=",
"avatar_url": "https://avatars.githubusercontent.com/u/8100?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/kashif",
"html_url": "https://github.com/kashif",
"followers_url": "https://api.github.com/users/k... | [
"cc @kashif @NielsRogge ",
"@nikhilajoshy can you kindly paste in some more verbose error?",
"@kashif \r\n```\r\noutputs = model(\r\n ^^^^^^\r\n File \"/home/nikhila/encdec_venv/lib/python3.11/site-packages/torch/nn/modules/module.py\", line 1511, in _wrapped_call_impl\r\n return self._call_im... | 1,708 | 1,708 | null | NONE | null | ### System Info
- `transformers` version: 4.37.2
- Platform: Linux-5.15.0-94-generic-x86_64-with-glibc2.31
- Python version: 3.11.7
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: 0.27.2
- Accelerate config: not found
- PyTorch version (GPU?): 2.2.0+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
`model = TimeSeriesTransformerModel.from_pretrained(
"models/time-series-transformer-tourism-monthly"
)
outputs = model(
past_values=past_values,
past_time_features=past_time_features,
past_observed_mask=past_observed_mask,
# static_categorical_features=static_categorical_features"],
# static_real_features=static_real_features"],
future_values=future_values,
future_time_features=future_time_features,
)
`
### Expected behavior
Size of the arguments passed to model is below:
past values torch.Size([502, 8])
past_time_features torch.Size([502, 8, 1])
past_observed_mask torch.Size([502, 8])
future_values torch.Size([502, 8])
future_time_features torch.Size([502, 8, 1]) | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29113/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29113/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29112 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29112/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29112/comments | https://api.github.com/repos/huggingface/transformers/issues/29112/events | https://github.com/huggingface/transformers/pull/29112 | 2,142,709,791 | PR_kwDOCUB6oc5nTn1C | 29,112 | Remove static pretrained maps from the library's internals | {
"login": "LysandreJik",
"id": 30755778,
"node_id": "MDQ6VXNlcjMwNzU1Nzc4",
"avatar_url": "https://avatars.githubusercontent.com/u/30755778?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LysandreJik",
"html_url": "https://github.com/LysandreJik",
"followers_url": "https://api.github.com/users/LysandreJik/followers",
"following_url": "https://api.github.com/users/LysandreJik/following{/other_user}",
"gists_url": "https://api.github.com/users/LysandreJik/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LysandreJik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LysandreJik/subscriptions",
"organizations_url": "https://api.github.com/users/LysandreJik/orgs",
"repos_url": "https://api.github.com/users/LysandreJik/repos",
"events_url": "https://api.github.com/users/LysandreJik/events{/privacy}",
"received_events_url": "https://api.github.com/users/LysandreJik/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Before this ungodly PR gets merged, I need to check that every checkpoint referenced here behaves the same once its pretrained map has been removed. \r\n\r\nI'll link the PRs open as a result in this comment.\r\n\r\n🟣: merged\r\n🟢: open\r\n🔴: closed\r\n🟡: not open yet\r\n\r\n## Repos with PRs opened\r\n\r\n###... | 1,708 | 1,708 | null | MEMBER | null | null | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29112/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29112/timeline | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29112",
"html_url": "https://github.com/huggingface/transformers/pull/29112",
"diff_url": "https://github.com/huggingface/transformers/pull/29112.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29112.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29111 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29111/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29111/comments | https://api.github.com/repos/huggingface/transformers/issues/29111/events | https://github.com/huggingface/transformers/issues/29111 | 2,142,682,356 | I_kwDOCUB6oc5_trz0 | 29,111 | RWKV5 tokenizer truncation | {
"login": "sedrick-keh-tri",
"id": 133716510,
"node_id": "U_kgDOB_haHg",
"avatar_url": "https://avatars.githubusercontent.com/u/133716510?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sedrick-keh-tri",
"html_url": "https://github.com/sedrick-keh-tri",
"followers_url": "https://api.github.com/users/sedrick-keh-tri/followers",
"following_url": "https://api.github.com/users/sedrick-keh-tri/following{/other_user}",
"gists_url": "https://api.github.com/users/sedrick-keh-tri/gists{/gist_id}",
"starred_url": "https://api.github.com/users/sedrick-keh-tri/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sedrick-keh-tri/subscriptions",
"organizations_url": "https://api.github.com/users/sedrick-keh-tri/orgs",
"repos_url": "https://api.github.com/users/sedrick-keh-tri/repos",
"events_url": "https://api.github.com/users/sedrick-keh-tri/events{/privacy}",
"received_events_url": "https://api.github.com/users/sedrick-keh-tri/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @ArthurZucker ",
"Hey! THanks for opening an issue. The problem is that you are using `trust_remote_code=True` and thus the `https://huggingface.co/RWKV/v5-Eagle-7B-HF/blob/main/tokenization_rwkv_world.py` file is used. The code is not on transformers yet! \r\n\r\nUse the tokenizer from #29095 should fix this... | 1,708 | 1,708 | null | NONE | null | ### System Info
Python 3.10. Transformers 4.37.2
### Who can help?
@arthur
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("RWKV/HF_v5-Eagle-7B", trust_remote_code=True)
long_str = ""
for i in range(10000):
long_str = long_str + " " + str(i)
print(len(long_str)) # 48890
long_str_tokenized = tokenizer(long_str, truncation=True, max_length=2048)
print(len(long_str_tokenized['input_ids'])) # 19900
### Expected behavior
Proper truncation to max_length | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29111/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29111/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29110 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29110/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29110/comments | https://api.github.com/repos/huggingface/transformers/issues/29110/events | https://github.com/huggingface/transformers/pull/29110 | 2,142,647,107 | PR_kwDOCUB6oc5nTaYs | 29,110 | Skip failing test_save_load_low_cpu_mem_usage tests | {
"login": "amyeroberts",
"id": 22614925,
"node_id": "MDQ6VXNlcjIyNjE0OTI1",
"avatar_url": "https://avatars.githubusercontent.com/u/22614925?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/amyeroberts",
"html_url": "https://github.com/amyeroberts",
"followers_url": "https://api.github.com/users/amyeroberts/followers",
"following_url": "https://api.github.com/users/amyeroberts/following{/other_user}",
"gists_url": "https://api.github.com/users/amyeroberts/gists{/gist_id}",
"starred_url": "https://api.github.com/users/amyeroberts/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/amyeroberts/subscriptions",
"organizations_url": "https://api.github.com/users/amyeroberts/orgs",
"repos_url": "https://api.github.com/users/amyeroberts/repos",
"events_url": "https://api.github.com/users/amyeroberts/events{/privacy}",
"received_events_url": "https://api.github.com/users/amyeroberts/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29110). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"I also in favor of reverting the original PR #28948 - if that PR is not something ... | 1,708 | 1,708 | null | COLLABORATOR | null | # What does this PR do?
Related to #29043 and #28948
Fixes more failing model tests on main which weren't picked up by the test fetcher cc @ydshieh cc @ArthurZucker | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29110/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29110/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29110",
"html_url": "https://github.com/huggingface/transformers/pull/29110",
"diff_url": "https://github.com/huggingface/transformers/pull/29110.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29110.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29109 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29109/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29109/comments | https://api.github.com/repos/huggingface/transformers/issues/29109/events | https://github.com/huggingface/transformers/pull/29109 | 2,142,417,003 | PR_kwDOCUB6oc5nSns8 | 29,109 | Llama: fix batched generation | {
"login": "gante",
"id": 12240844,
"node_id": "MDQ6VXNlcjEyMjQwODQ0",
"avatar_url": "https://avatars.githubusercontent.com/u/12240844?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gante",
"html_url": "https://github.com/gante",
"followers_url": "https://api.github.com/users/gante/followers",
"following_url": "https://api.github.com/users/gante/following{/other_user}",
"gists_url": "https://api.github.com/users/gante/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gante/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gante/subscriptions",
"organizations_url": "https://api.github.com/users/gante/orgs",
"repos_url": "https://api.github.com/users/gante/repos",
"events_url": "https://api.github.com/users/gante/events{/privacy}",
"received_events_url": "https://api.github.com/users/gante/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29109). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"I'll have to run the benchmark on the A100 to make sure everything is alright but ... | 1,708 | 1,708 | 1,708 | MEMBER | null | # What does this PR do?
Fixes batched inference on llama, after the static cache changes were added. For instance, `RUN_SLOW=1 py.test tests/test_cache_utils.py::CacheIntegrationTest::test_dynamic_cache_beam_search` now passes.
### What was wrong?
`position_ids` has shape `[bsz, seq_len]`. The line computing `freqs` was correct for batch size = 1, but incorrect for larger batch sizes: it was summing the values for the different batch members. Therefore, we need to create another dimension to prevent this sum from happening, which is what this PR does.
### Throughput impact of changes
None 🙌 [Measured on my end, RTX3090 + `TinyLlama/TinyLlama-1.1B-Chat-v1.0`]
Before this PR

After this PR

| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29109/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29109/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29109",
"html_url": "https://github.com/huggingface/transformers/pull/29109",
"diff_url": "https://github.com/huggingface/transformers/pull/29109.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29109.patch",
"merged_at": 1708424597000
} |
https://api.github.com/repos/huggingface/transformers/issues/29108 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29108/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29108/comments | https://api.github.com/repos/huggingface/transformers/issues/29108/events | https://github.com/huggingface/transformers/pull/29108 | 2,142,388,605 | PR_kwDOCUB6oc5nShdP | 29,108 | [Phi] Add support for sdpa | {
"login": "hackyon",
"id": 1557853,
"node_id": "MDQ6VXNlcjE1NTc4NTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1557853?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hackyon",
"html_url": "https://github.com/hackyon",
"followers_url": "https://api.github.com/users/hackyon/followers",
"following_url": "https://api.github.com/users/hackyon/following{/other_user}",
"gists_url": "https://api.github.com/users/hackyon/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hackyon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hackyon/subscriptions",
"organizations_url": "https://api.github.com/users/hackyon/orgs",
"repos_url": "https://api.github.com/users/hackyon/repos",
"events_url": "https://api.github.com/users/hackyon/events{/privacy}",
"received_events_url": "https://api.github.com/users/hackyon/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"Hey @gugarosa @ArthurZucker @younesbelkada 👋\r\n\r\nI'm looking for more places to add support for SDPA and figured Phi-2 could be a good one. \r\n\r\nBeen reading up on the issues regarding attention overflow for Phi-2 (#28673, #28488), and I think SPDA would probably be affected by it as well (if it chooses the... | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
Adding support for SDPA to Phi (See #28005)
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] 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.
- [x] 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.
@fxmarty @ArthurZucker
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29108/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29108/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29108",
"html_url": "https://github.com/huggingface/transformers/pull/29108",
"diff_url": "https://github.com/huggingface/transformers/pull/29108.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29108.patch",
"merged_at": 1708435992000
} |
https://api.github.com/repos/huggingface/transformers/issues/29107 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29107/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29107/comments | https://api.github.com/repos/huggingface/transformers/issues/29107/events | https://github.com/huggingface/transformers/issues/29107 | 2,142,291,862 | I_kwDOCUB6oc5_sMeW | 29,107 | Cannot use time series transformer as encoder and gpt model as decoder using encoder decoder architecture from hugging face | {
"login": "nikhilajoshy",
"id": 37141775,
"node_id": "MDQ6VXNlcjM3MTQxNzc1",
"avatar_url": "https://avatars.githubusercontent.com/u/37141775?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/nikhilajoshy",
"html_url": "https://github.com/nikhilajoshy",
"followers_url": "https://api.github.com/users/nikhilajoshy/followers",
"following_url": "https://api.github.com/users/nikhilajoshy/following{/other_user}",
"gists_url": "https://api.github.com/users/nikhilajoshy/gists{/gist_id}",
"starred_url": "https://api.github.com/users/nikhilajoshy/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/nikhilajoshy/subscriptions",
"organizations_url": "https://api.github.com/users/nikhilajoshy/orgs",
"repos_url": "https://api.github.com/users/nikhilajoshy/repos",
"events_url": "https://api.github.com/users/nikhilajoshy/events{/privacy}",
"received_events_url": "https://api.github.com/users/nikhilajoshy/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @nikhilajoshy, thanks for raising an issue! \r\n\r\nThis is a question best placed in our [forums](https://discuss.huggingface.co/). We try to reserve the github issues for feature requests and bug reports."
] | 1,708 | 1,708 | null | NONE | null | ### System Info
-
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
EncoderDecoderModel.from_pretrained()
### Expected behavior
I want to use EncoderDecoderModel.from_pretrained() where huggingface/time-series-transformer-tourism-monthly is the encoder and openai-community/gpt2 as decoder but as mentioned in https://huggingface.co/blog/warm-starting-encoder-decoder, TS transformer does not have a tokenizer and hence not sure what to use as encoder input ids | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29107/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29107/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29106 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29106/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29106/comments | https://api.github.com/repos/huggingface/transformers/issues/29106/events | https://github.com/huggingface/transformers/pull/29106 | 2,142,285,524 | PR_kwDOCUB6oc5nSKnH | 29,106 | support SDPA Attention in stablelm | {
"login": "eaidova",
"id": 29454499,
"node_id": "MDQ6VXNlcjI5NDU0NDk5",
"avatar_url": "https://avatars.githubusercontent.com/u/29454499?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/eaidova",
"html_url": "https://github.com/eaidova",
"followers_url": "https://api.github.com/users/eaidova/followers",
"following_url": "https://api.github.com/users/eaidova/following{/other_user}",
"gists_url": "https://api.github.com/users/eaidova/gists{/gist_id}",
"starred_url": "https://api.github.com/users/eaidova/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/eaidova/subscriptions",
"organizations_url": "https://api.github.com/users/eaidova/orgs",
"repos_url": "https://api.github.com/users/eaidova/repos",
"events_url": "https://api.github.com/users/eaidova/events{/privacy}",
"received_events_url": "https://api.github.com/users/eaidova/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @fxmarty ",
"> Looks alright but we need to add an integration test iMO :)\r\n\r\nadded",
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29106). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the la... | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
enable SDPA attention in stablelm architecture
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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?
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29106/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29106/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29106",
"html_url": "https://github.com/huggingface/transformers/pull/29106",
"diff_url": "https://github.com/huggingface/transformers/pull/29106.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29106.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29105 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29105/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29105/comments | https://api.github.com/repos/huggingface/transformers/issues/29105/events | https://github.com/huggingface/transformers/pull/29105 | 2,142,229,012 | PR_kwDOCUB6oc5nR-Lw | 29,105 | Fix the `bert-base-cased` tokenizer configuration test | {
"login": "LysandreJik",
"id": 30755778,
"node_id": "MDQ6VXNlcjMwNzU1Nzc4",
"avatar_url": "https://avatars.githubusercontent.com/u/30755778?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LysandreJik",
"html_url": "https://github.com/LysandreJik",
"followers_url": "https://api.github.com/users/LysandreJik/followers",
"following_url": "https://api.github.com/users/LysandreJik/following{/other_user}",
"gists_url": "https://api.github.com/users/LysandreJik/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LysandreJik/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LysandreJik/subscriptions",
"organizations_url": "https://api.github.com/users/LysandreJik/orgs",
"repos_url": "https://api.github.com/users/LysandreJik/repos",
"events_url": "https://api.github.com/users/LysandreJik/events{/privacy}",
"received_events_url": "https://api.github.com/users/LysandreJik/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29105). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | MEMBER | null | In the process of updating the tokenizer configurations on the Hub, this test needs to be updated to reflect the new value of the configuration. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29105/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29105/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29105",
"html_url": "https://github.com/huggingface/transformers/pull/29105",
"diff_url": "https://github.com/huggingface/transformers/pull/29105.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29105.patch",
"merged_at": 1708345405000
} |
https://api.github.com/repos/huggingface/transformers/issues/29104 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29104/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29104/comments | https://api.github.com/repos/huggingface/transformers/issues/29104/events | https://github.com/huggingface/transformers/pull/29104 | 2,142,219,632 | PR_kwDOCUB6oc5nR8G6 | 29,104 | Added image_captioning version in es and included in toctree file | {
"login": "gisturiz",
"id": 48292332,
"node_id": "MDQ6VXNlcjQ4MjkyMzMy",
"avatar_url": "https://avatars.githubusercontent.com/u/48292332?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gisturiz",
"html_url": "https://github.com/gisturiz",
"followers_url": "https://api.github.com/users/gisturiz/followers",
"following_url": "https://api.github.com/users/gisturiz/following{/other_user}",
"gists_url": "https://api.github.com/users/gisturiz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gisturiz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gisturiz/subscriptions",
"organizations_url": "https://api.github.com/users/gisturiz/orgs",
"repos_url": "https://api.github.com/users/gisturiz/repos",
"events_url": "https://api.github.com/users/gisturiz/events{/privacy}",
"received_events_url": "https://api.github.com/users/gisturiz/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29104). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
Translated image_captioning from en to es from issue https://github.com/huggingface/transformers/issues/28936 began by @stevhliu. I will continue to go through the documentation and make the correct translations.
(closed previous PR and reopened to rebasing issue)
Fixes # https://github.com/huggingface/transformers/issues/28936
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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?
@stevhliu @aaronjimv
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29104/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29104/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29104",
"html_url": "https://github.com/huggingface/transformers/pull/29104",
"diff_url": "https://github.com/huggingface/transformers/pull/29104.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29104.patch",
"merged_at": 1708449195000
} |
https://api.github.com/repos/huggingface/transformers/issues/29103 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29103/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29103/comments | https://api.github.com/repos/huggingface/transformers/issues/29103/events | https://github.com/huggingface/transformers/issues/29103 | 2,142,189,413 | I_kwDOCUB6oc5_rzdl | 29,103 | Request to add FLMR | {
"login": "LinWeizheDragon",
"id": 33350454,
"node_id": "MDQ6VXNlcjMzMzUwNDU0",
"avatar_url": "https://avatars.githubusercontent.com/u/33350454?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LinWeizheDragon",
"html_url": "https://github.com/LinWeizheDragon",
"followers_url": "https://api.github.com/users/LinWeizheDragon/followers",
"following_url": "https://api.github.com/users/LinWeizheDragon/following{/other_user}",
"gists_url": "https://api.github.com/users/LinWeizheDragon/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LinWeizheDragon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LinWeizheDragon/subscriptions",
"organizations_url": "https://api.github.com/users/LinWeizheDragon/orgs",
"repos_url": "https://api.github.com/users/LinWeizheDragon/repos",
"events_url": "https://api.github.com/users/LinWeizheDragon/events{/privacy}",
"received_events_url": "https://api.github.com/users/LinWeizheDragon/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 1843244711,
"node_id": "MDU6TGFiZWwxODQzMjQ0NzEx",
"url": "https://api.github.com/repos/huggingface/transformers/labels/New%20model",
"name": "New model",
"color": "fbca04",
"default": false,
"description": ""
}
] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | ### Model description
## Basic Information
This issue requests adding Fine-grained Late-interaction Multi-modal Retriever (FLMR).
The model leverages late interaction (as originally proposed by Stanford [ColBERT](https://github.com/stanford-futuredata/ColBERT)) to compute token-level similarity between every query token and document token, which enables more accurate retrieval relative to DPR-like systems.
The model was proposed in [here](https://openreview.net/forum?id=IWWWulAX7g) (NeurIPS 2023) and [here](https://arxiv.org/abs/2402.08327) (a follow-up version that was pre-trained on more than ten million of multi-modal retrieval data).
## Resources
- Project page [here](https://preflmr.github.io/)
- Official codebase [here](https://github.com/linweizhedragon/retrieval-augmented-visual-question-answering)
- The pre-trained checkpoints are [here](https://huggingface.co/models?search=PreFLMR).
## Why adding this model
1. This work has gained attention from researchers across the world. We received many requests during NeurIPS 2023 to provide an easy implementation of this model.
2. The work has been recognized by the authors of ColBERT [twitter post](https://twitter.com/lateinteraction/status/1757652639503007893)
3. There exists no implementation for late-interaction retrieval models in hf-transformers, which have been extensively researched in these years.
4. There are many requests in the original codebase [an example issue](https://github.com/LinWeizheDragon/Retrieval-Augmented-Visual-Question-Answering/issues/24)
5. As original authors, we have finished 99% of the model, including an example for indexing and searching. Limited work is required to have it on huggingface-transformers! #29062
### Open source status
- [x] The model implementation is available
- [X] The model weights are available
### Provide useful links for the implementation
The PR is already here:
#29062 | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29103/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29103/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29102 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29102/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29102/comments | https://api.github.com/repos/huggingface/transformers/issues/29102/events | https://github.com/huggingface/transformers/pull/29102 | 2,141,970,710 | PR_kwDOCUB6oc5nRFh9 | 29,102 | Fix two tiny typos in `pipelines/base.py::Pipeline::_sanitize_parameters()`'s docstring | {
"login": "sadra-barikbin",
"id": 22097587,
"node_id": "MDQ6VXNlcjIyMDk3NTg3",
"avatar_url": "https://avatars.githubusercontent.com/u/22097587?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/sadra-barikbin",
"html_url": "https://github.com/sadra-barikbin",
"followers_url": "https://api.github.com/users/sadra-barikbin/followers",
"following_url": "https://api.github.com/users/sadra-barikbin/following{/other_user}",
"gists_url": "https://api.github.com/users/sadra-barikbin/gists{/gist_id}",
"starred_url": "https://api.github.com/users/sadra-barikbin/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/sadra-barikbin/subscriptions",
"organizations_url": "https://api.github.com/users/sadra-barikbin/orgs",
"repos_url": "https://api.github.com/users/sadra-barikbin/repos",
"events_url": "https://api.github.com/users/sadra-barikbin/events{/privacy}",
"received_events_url": "https://api.github.com/users/sadra-barikbin/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"One more thing. We have `False` for default value of `clean_up_tokenization_spaces` argument in `TextGenerationPipeline`'s docstring:\r\nhttps://github.com/huggingface/transformers/blob/593230f0a1150ea9c0477b9d859f25daf73c8c33/src/transformers/pipelines/text_generation.py#L207-L208\r\n\r\nbut its default value in ... | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | Hi there!
To fix two tiny typos in `pipelines/base.py::Pipeline::_sanitize_parameters()`'s docstring.
@Narsil
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29102/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29102/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29102",
"html_url": "https://github.com/huggingface/transformers/pull/29102",
"diff_url": "https://github.com/huggingface/transformers/pull/29102.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29102.patch",
"merged_at": 1708368629000
} |
https://api.github.com/repos/huggingface/transformers/issues/29101 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29101/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29101/comments | https://api.github.com/repos/huggingface/transformers/issues/29101/events | https://github.com/huggingface/transformers/issues/29101 | 2,141,799,722 | I_kwDOCUB6oc5_qUUq | 29,101 | Models with remote code are not loaded correctly when there's `.` in their name. | {
"login": "BlackSamorez",
"id": 16901341,
"node_id": "MDQ6VXNlcjE2OTAxMzQx",
"avatar_url": "https://avatars.githubusercontent.com/u/16901341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BlackSamorez",
"html_url": "https://github.com/BlackSamorez",
"followers_url": "https://api.github.com/users/BlackSamorez/followers",
"following_url": "https://api.github.com/users/BlackSamorez/following{/other_user}",
"gists_url": "https://api.github.com/users/BlackSamorez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BlackSamorez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BlackSamorez/subscriptions",
"organizations_url": "https://api.github.com/users/BlackSamorez/orgs",
"repos_url": "https://api.github.com/users/BlackSamorez/repos",
"events_url": "https://api.github.com/users/BlackSamorez/events{/privacy}",
"received_events_url": "https://api.github.com/users/BlackSamorez/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"cc @Rocketknight1 ",
"Hi @BlackSamorez, this issue has been reported already at #28919. We're working on a fix right now! I'm going to close this issue as a duplicate."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | ### System Info
```
- `transformers` version: 4.37.0
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: 0.28.0.dev0
- Accelerate config: not found
- PyTorch version (GPU?): 2.2.0+cu121 (True)
- Tensorflow version (GPU?): 2.15.0 (True)
- Flax version (CPU?/GPU?/TPU?): 0.8.1 (cpu)
- Jax version: 0.4.23
- JaxLib version: 0.4.23
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
```
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
quantized_model = AutoModelForCausalLM.from_pretrained(
"BlackSamorez/Mixtral-8x7B-Instruct-v0.1-AQLM-2Bit-1x16-hf",
trust_remote_code=True, torch_dtype="auto", device_map="cuda"
)
```
produces:
```
ModuleNotFoundError: No module named 'transformers_modules.BlackSamorez.Mixtral-8x7B-Instruct-v0'
```
It's clear that `.` in the name break custom code imports
### Expected behavior
Expected that model is loaded correctly. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29101/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29101/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29100 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29100/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29100/comments | https://api.github.com/repos/huggingface/transformers/issues/29100/events | https://github.com/huggingface/transformers/issues/29100 | 2,141,751,170 | I_kwDOCUB6oc5_qIeC | 29,100 | Getting Assertion Error when calling neo4j chain for inference | {
"login": "KaifAhmad1",
"id": 98801504,
"node_id": "U_kgDOBeOXYA",
"avatar_url": "https://avatars.githubusercontent.com/u/98801504?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/KaifAhmad1",
"html_url": "https://github.com/KaifAhmad1",
"followers_url": "https://api.github.com/users/KaifAhmad1/followers",
"following_url": "https://api.github.com/users/KaifAhmad1/following{/other_user}",
"gists_url": "https://api.github.com/users/KaifAhmad1/gists{/gist_id}",
"starred_url": "https://api.github.com/users/KaifAhmad1/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/KaifAhmad1/subscriptions",
"organizations_url": "https://api.github.com/users/KaifAhmad1/orgs",
"repos_url": "https://api.github.com/users/KaifAhmad1/repos",
"events_url": "https://api.github.com/users/KaifAhmad1/events{/privacy}",
"received_events_url": "https://api.github.com/users/KaifAhmad1/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @KaifAhmad1, thanks for opening an issue! \r\n\r\nPlease make sure to provide a minimal code reproducer and information about the bug encountered, including the full error traceback when reporting an issue.\r\n\r\nIf the error is coming from `bitsandbytes` there isn't anything the transformers team can do. ",
... | 1,708 | 1,708 | null | NONE | null | ### System Info
langchain version = 0.1.7
bitsandbytes = 0.42.0
pip = 24.0
cuda = 12.1
OS Windows 11 x64
### Who can help?
Hey, @SunMarc @younesbelkada please help me out.
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)
### Reproduction
I've brought up this concern on LangChain, but Duso-Bot is indicating that it's actually related to BitsAndBytes.
Here is the discussion link and issue: https://github.com/langchain-ai/langchain/discussions/17701
also raised on bitsandbytes repo but did not get support. Link: https://github.com/TimDettmers/bitsandbytes/issues/1067
### Expected behavior
It wil give the answes without raising the exception. answer | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29100/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29100/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29099 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29099/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29099/comments | https://api.github.com/repos/huggingface/transformers/issues/29099/events | https://github.com/huggingface/transformers/pull/29099 | 2,141,668,363 | PR_kwDOCUB6oc5nQDN9 | 29,099 | Fix the behavior of collecting 'num_input_tokens_seen' | {
"login": "YouliangHUANG",
"id": 56789071,
"node_id": "MDQ6VXNlcjU2Nzg5MDcx",
"avatar_url": "https://avatars.githubusercontent.com/u/56789071?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/YouliangHUANG",
"html_url": "https://github.com/YouliangHUANG",
"followers_url": "https://api.github.com/users/YouliangHUANG/followers",
"following_url": "https://api.github.com/users/YouliangHUANG/following{/other_user}",
"gists_url": "https://api.github.com/users/YouliangHUANG/gists{/gist_id}",
"starred_url": "https://api.github.com/users/YouliangHUANG/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/YouliangHUANG/subscriptions",
"organizations_url": "https://api.github.com/users/YouliangHUANG/orgs",
"repos_url": "https://api.github.com/users/YouliangHUANG/repos",
"events_url": "https://api.github.com/users/YouliangHUANG/events{/privacy}",
"received_events_url": "https://api.github.com/users/YouliangHUANG/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
The length of "inputs[main_input_name]" is not guaranteed to be the same when using DDP, which may make the training process hang. Besides, in a distributed setup, it costs a lot to gather the WHOLE input tensors on different workers. It is better to call .numel() first and then .gather().
Fixes https://github.com/huggingface/transformers/issues/28791
The modified code has already passed the relevant test ``tests/trainer/test_trainer_distributed.py`` with additional argument 'include_num_input_tokens_seen'.
## Who can review?
@pacman100
@muellerzr
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29099/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29099/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29099",
"html_url": "https://github.com/huggingface/transformers/pull/29099",
"diff_url": "https://github.com/huggingface/transformers/pull/29099.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29099.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29098 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29098/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29098/comments | https://api.github.com/repos/huggingface/transformers/issues/29098/events | https://github.com/huggingface/transformers/issues/29098 | 2,141,628,529 | I_kwDOCUB6oc5_pqhx | 29,098 | Flashatten2 avaiable should handle if hardware support or not? | {
"login": "lucasjinreal",
"id": 21303438,
"node_id": "MDQ6VXNlcjIxMzAzNDM4",
"avatar_url": "https://avatars.githubusercontent.com/u/21303438?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/lucasjinreal",
"html_url": "https://github.com/lucasjinreal",
"followers_url": "https://api.github.com/users/lucasjinreal/followers",
"following_url": "https://api.github.com/users/lucasjinreal/following{/other_user}",
"gists_url": "https://api.github.com/users/lucasjinreal/gists{/gist_id}",
"starred_url": "https://api.github.com/users/lucasjinreal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/lucasjinreal/subscriptions",
"organizations_url": "https://api.github.com/users/lucasjinreal/orgs",
"repos_url": "https://api.github.com/users/lucasjinreal/repos",
"events_url": "https://api.github.com/users/lucasjinreal/events{/privacy}",
"received_events_url": "https://api.github.com/users/lucasjinreal/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @lucasjinreal, thanks for opening an issue! \r\n\r\nPlease make sure to follow the [issue template](https://github.com/huggingface/transformers/blob/main/.github/ISSUE_TEMPLATE/bug-report.yml) and provide: \r\n* A minimal code reproducer\r\n* All relevant error information including the full error traceback\r\n... | 1,708 | 1,708 | null | NONE | null | For some docker images the flashattn installed, but v100 not support.
It will return True and raise error in runtime.
Also, since torch already support flash2 inside, add torch2.2 check and using inside version? | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29098/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29098/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29097 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29097/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29097/comments | https://api.github.com/repos/huggingface/transformers/issues/29097/events | https://github.com/huggingface/transformers/pull/29097 | 2,141,556,123 | PR_kwDOCUB6oc5nPqeA | 29,097 | change version | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29097). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"We still have failing for `test_save_load_low_cpu_mem_usage` which are already on ... | 1,708 | 1,708 | 1,708 | COLLABORATOR | null | # What does this PR do?
Try to change cached version | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29097/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 1,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29097/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29097",
"html_url": "https://github.com/huggingface/transformers/pull/29097",
"diff_url": "https://github.com/huggingface/transformers/pull/29097.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29097.patch",
"merged_at": 1708351724000
} |
https://api.github.com/repos/huggingface/transformers/issues/29096 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29096/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29096/comments | https://api.github.com/repos/huggingface/transformers/issues/29096/events | https://github.com/huggingface/transformers/pull/29096 | 2,141,530,987 | PR_kwDOCUB6oc5nPk6E | 29,096 | Fix: Fixed the previous tracking URI setting logic to prevent clashes with original MLflow code. | {
"login": "seanswyi",
"id": 20367759,
"node_id": "MDQ6VXNlcjIwMzY3NzU5",
"avatar_url": "https://avatars.githubusercontent.com/u/20367759?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/seanswyi",
"html_url": "https://github.com/seanswyi",
"followers_url": "https://api.github.com/users/seanswyi/followers",
"following_url": "https://api.github.com/users/seanswyi/following{/other_user}",
"gists_url": "https://api.github.com/users/seanswyi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/seanswyi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/seanswyi/subscriptions",
"organizations_url": "https://api.github.com/users/seanswyi/orgs",
"repos_url": "https://api.github.com/users/seanswyi/repos",
"events_url": "https://api.github.com/users/seanswyi/events{/privacy}",
"received_events_url": "https://api.github.com/users/seanswyi/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"@seanswyi For the failing tests, these are unrelated and a known issue happening on our CI. We're currently working on a fix for it and will let you know asap once it's merged and you can rebase to get the CI green",
"@amyeroberts No worries, thanks for the heads up!",
"@seanswyi The failing tests should now b... | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
The previous code was calling the `mlflow.set_tracking_uri` function regardless of whether or not the environment variable `MLFLOW_TRACKING_URI` is even set. This led to clashes with the original MLflow implementation and therefore the logic was changed to only calling the function when the environment variable is explicitly set.
<!--
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)~~ Doesn't fix a specific issue but addresses a problem that was brought up as a comment in the aforementioned PR: https://github.com/huggingface/transformers/pull/29032#issuecomment-1951595909
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
Pull Request section?
- [x] 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. https://github.com/omnious/model-classifier/blob/885efa563cba97e58ed5c5874a2c9d0f32daded2/tests/unit/test_model.py#L1185
- [x] 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.
Maintainers: @amyeroberts @muellerzr @pacman100
Original author of MLflowCallback: @noise-field
Author of comment and MLflow maintainer: @harupy
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29096/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29096/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29096",
"html_url": "https://github.com/huggingface/transformers/pull/29096",
"diff_url": "https://github.com/huggingface/transformers/pull/29096.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29096.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29095 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29095/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29095/comments | https://api.github.com/repos/huggingface/transformers/issues/29095/events | https://github.com/huggingface/transformers/pull/29095 | 2,141,352,273 | PR_kwDOCUB6oc5nO96x | 29,095 | [`RWKV5`] Add support for RWKV5 model | {
"login": "ArthurZucker",
"id": 48595927,
"node_id": "MDQ6VXNlcjQ4NTk1OTI3",
"avatar_url": "https://avatars.githubusercontent.com/u/48595927?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ArthurZucker",
"html_url": "https://github.com/ArthurZucker",
"followers_url": "https://api.github.com/users/ArthurZucker/followers",
"following_url": "https://api.github.com/users/ArthurZucker/following{/other_user}",
"gists_url": "https://api.github.com/users/ArthurZucker/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ArthurZucker/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ArthurZucker/subscriptions",
"organizations_url": "https://api.github.com/users/ArthurZucker/orgs",
"repos_url": "https://api.github.com/users/ArthurZucker/repos",
"events_url": "https://api.github.com/users/ArthurZucker/events{/privacy}",
"received_events_url": "https://api.github.com/users/ArthurZucker/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29095). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"Not sure if this is the appropriate place to post this, but I've been running into... | 1,708 | 1,708 | null | COLLABORATOR | null | # What does this PR do?
Adds RWKV5, superseeds #26963 | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29095/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29095/timeline | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29095",
"html_url": "https://github.com/huggingface/transformers/pull/29095",
"diff_url": "https://github.com/huggingface/transformers/pull/29095.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29095.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29094 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29094/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29094/comments | https://api.github.com/repos/huggingface/transformers/issues/29094/events | https://github.com/huggingface/transformers/issues/29094 | 2,141,335,890 | I_kwDOCUB6oc5_ojFS | 29,094 | altclip can not be traced by fx? | {
"login": "TXacs",
"id": 60869411,
"node_id": "MDQ6VXNlcjYwODY5NDEx",
"avatar_url": "https://avatars.githubusercontent.com/u/60869411?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/TXacs",
"html_url": "https://github.com/TXacs",
"followers_url": "https://api.github.com/users/TXacs/followers",
"following_url": "https://api.github.com/users/TXacs/following{/other_user}",
"gists_url": "https://api.github.com/users/TXacs/gists{/gist_id}",
"starred_url": "https://api.github.com/users/TXacs/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/TXacs/subscriptions",
"organizations_url": "https://api.github.com/users/TXacs/orgs",
"repos_url": "https://api.github.com/users/TXacs/repos",
"events_url": "https://api.github.com/users/TXacs/events{/privacy}",
"received_events_url": "https://api.github.com/users/TXacs/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @TXacs, thanks for raising this issue! \r\n\r\nYou need to pass in `input_names` to `symbolic_trace`:\r\n\r\n```py\r\nfrom config import load_config\r\n\r\nfrom transformers import (\r\n AltCLIPModel,\r\n AltCLIPConfig,\r\n)\r\nfrom transformers.utils.fx import symbolic_trace\r\n\r\ndef main():\r\n con... | 1,708 | 1,708 | null | NONE | null | ### System Info
- `transformers` version: 4.37.1
- Platform: Linux-5.4.0-47-generic-x86_64-with-glibc2.17
- Python version: 3.8.13
- Huggingface_hub version: 0.19.4
- Safetensors version: 0.3.1
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.2+cu118 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)
### Reproduction
```python
from config import load_config
from transformers import (
AltCLIPModel,
AltCLIPConfig,
)
from transformers.utils.fx import symbolic_trace
def main():
config_kwarg = load_config("altclip")
config = AltCLIPConfig(
**config_kwarg
)
# create model
model = AltCLIPModel(config)
traced_model = symbolic_trace(model)
if __name__ == "__main__":
main()
```
### Expected behavior
When I run the above code, it reports an error: `ValueError: You have to specify pixel_values.`
Somebody can help me? | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29094/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29094/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29093 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29093/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29093/comments | https://api.github.com/repos/huggingface/transformers/issues/29093/events | https://github.com/huggingface/transformers/issues/29093 | 2,141,302,021 | I_kwDOCUB6oc5_oa0F | 29,093 | Generation doesn't work as expected with input_embeds | {
"login": "dipta007",
"id": 13894030,
"node_id": "MDQ6VXNlcjEzODk0MDMw",
"avatar_url": "https://avatars.githubusercontent.com/u/13894030?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dipta007",
"html_url": "https://github.com/dipta007",
"followers_url": "https://api.github.com/users/dipta007/followers",
"following_url": "https://api.github.com/users/dipta007/following{/other_user}",
"gists_url": "https://api.github.com/users/dipta007/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dipta007/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dipta007/subscriptions",
"organizations_url": "https://api.github.com/users/dipta007/orgs",
"repos_url": "https://api.github.com/users/dipta007/repos",
"events_url": "https://api.github.com/users/dipta007/events{/privacy}",
"received_events_url": "https://api.github.com/users/dipta007/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"@dipta007 ,hi! This [PR](https://github.com/huggingface/transformers/pull/28994) fixed it",
"@dipta007 as @zucchini-nlp wrote, if you add `!pip install --upgrade git+https://github.com/huggingface/transformers.git` on top of your notebook it will work 🤗 ",
"Thanks"
] | 1,708 | 1,708 | 1,708 | NONE | null | ### System Info
- `transformers` version: 4.35.2
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.0+cu121 (False)
- Tensorflow version (GPU?): 2.15.0 (False)
- Flax version (CPU?/GPU?/TPU?): 0.8.1 (cpu)
- Jax version: 0.4.23
- JaxLib version: 0.4.23
### Who can help?
@gante
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
Colab: https://colab.research.google.com/drive/1tIgcJVofkzTic9ChhG8rNAQmFjrE1HYd?usp=sharing
### Expected behavior
Output should be generated for both using `input_ids` or `inputs_embed`.
But when giving `inputs_embed`, it doesn't consider the input length in `max_length` stopping criteria. So it raises an exception when the output exceeds `model.max_length`. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29093/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29093/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29092 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29092/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29092/comments | https://api.github.com/repos/huggingface/transformers/issues/29092/events | https://github.com/huggingface/transformers/pull/29092 | 2,141,298,539 | PR_kwDOCUB6oc5nOyRk | 29,092 | FIX [`bnb` / `tests`]: Fix currently failing bnb tests | {
"login": "younesbelkada",
"id": 49240599,
"node_id": "MDQ6VXNlcjQ5MjQwNTk5",
"avatar_url": "https://avatars.githubusercontent.com/u/49240599?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/younesbelkada",
"html_url": "https://github.com/younesbelkada",
"followers_url": "https://api.github.com/users/younesbelkada/followers",
"following_url": "https://api.github.com/users/younesbelkada/following{/other_user}",
"gists_url": "https://api.github.com/users/younesbelkada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/younesbelkada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/younesbelkada/subscriptions",
"organizations_url": "https://api.github.com/users/younesbelkada/orgs",
"repos_url": "https://api.github.com/users/younesbelkada/repos",
"events_url": "https://api.github.com/users/younesbelkada/events{/privacy}",
"received_events_url": "https://api.github.com/users/younesbelkada/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29092). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
https://github.com/huggingface/transformers/pull/29001 changed the logic of handling how to get linear layers from testing models. In fact, the `model_type` should always stay `"gpt2"` and not `"openai-community/gpt2"`
cc @amyeroberts @Titus-von-Koeller | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29092/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29092/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29092",
"html_url": "https://github.com/huggingface/transformers/pull/29092",
"diff_url": "https://github.com/huggingface/transformers/pull/29092.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29092.patch",
"merged_at": 1708335552000
} |
https://api.github.com/repos/huggingface/transformers/issues/29091 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29091/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29091/comments | https://api.github.com/repos/huggingface/transformers/issues/29091/events | https://github.com/huggingface/transformers/pull/29091 | 2,141,252,840 | PR_kwDOCUB6oc5nOoYV | 29,091 | fix the post-processing link | {
"login": "davies-w",
"id": 6550854,
"node_id": "MDQ6VXNlcjY1NTA4NTQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/6550854?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/davies-w",
"html_url": "https://github.com/davies-w",
"followers_url": "https://api.github.com/users/davies-w/followers",
"following_url": "https://api.github.com/users/davies-w/following{/other_user}",
"gists_url": "https://api.github.com/users/davies-w/gists{/gist_id}",
"starred_url": "https://api.github.com/users/davies-w/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/davies-w/subscriptions",
"organizations_url": "https://api.github.com/users/davies-w/orgs",
"repos_url": "https://api.github.com/users/davies-w/repos",
"events_url": "https://api.github.com/users/davies-w/events{/privacy}",
"received_events_url": "https://api.github.com/users/davies-w/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29091). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | The link in evaluation was missing a hyphen between post and processing. I fixed this, for English only. Someone with the ability to do a global search/replace should fix the other languages (if indeed they have this issue).
# What does this PR do?
Fixes a broken link in the documentation.
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29091/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29091/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29091",
"html_url": "https://github.com/huggingface/transformers/pull/29091",
"diff_url": "https://github.com/huggingface/transformers/pull/29091.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29091.patch",
"merged_at": 1708337758000
} |
https://api.github.com/repos/huggingface/transformers/issues/29090 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29090/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29090/comments | https://api.github.com/repos/huggingface/transformers/issues/29090/events | https://github.com/huggingface/transformers/pull/29090 | 2,141,198,507 | PR_kwDOCUB6oc5nOdgh | 29,090 | Do not use pooling for squad conversions when thread == 1 | {
"login": "hackyon",
"id": 1557853,
"node_id": "MDQ6VXNlcjE1NTc4NTM=",
"avatar_url": "https://avatars.githubusercontent.com/u/1557853?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/hackyon",
"html_url": "https://github.com/hackyon",
"followers_url": "https://api.github.com/users/hackyon/followers",
"following_url": "https://api.github.com/users/hackyon/following{/other_user}",
"gists_url": "https://api.github.com/users/hackyon/gists{/gist_id}",
"starred_url": "https://api.github.com/users/hackyon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/hackyon/subscriptions",
"organizations_url": "https://api.github.com/users/hackyon/orgs",
"repos_url": "https://api.github.com/users/hackyon/repos",
"events_url": "https://api.github.com/users/hackyon/events{/privacy}",
"received_events_url": "https://api.github.com/users/hackyon/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | Testing this on CI tool. Improvement seems to happen only for certain machines.
This significantly improves the time it takes for the qa pipeline test. For example, the bert torch tests went from ~90s to ~15s locally.
# What does this PR do?
<!--
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#create-a-pull-request),
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29090/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29090/timeline | null | true | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29090",
"html_url": "https://github.com/huggingface/transformers/pull/29090",
"diff_url": "https://github.com/huggingface/transformers/pull/29090.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29090.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29089 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29089/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29089/comments | https://api.github.com/repos/huggingface/transformers/issues/29089/events | https://github.com/huggingface/transformers/issues/29089 | 2,141,162,788 | I_kwDOCUB6oc5_n40k | 29,089 | Caching image prototype embeddings for image-guided object detection using OWL-ViT | {
"login": "jakubhejhal",
"id": 97042178,
"node_id": "U_kgDOBci_Ag",
"avatar_url": "https://avatars.githubusercontent.com/u/97042178?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/jakubhejhal",
"html_url": "https://github.com/jakubhejhal",
"followers_url": "https://api.github.com/users/jakubhejhal/followers",
"following_url": "https://api.github.com/users/jakubhejhal/following{/other_user}",
"gists_url": "https://api.github.com/users/jakubhejhal/gists{/gist_id}",
"starred_url": "https://api.github.com/users/jakubhejhal/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/jakubhejhal/subscriptions",
"organizations_url": "https://api.github.com/users/jakubhejhal/orgs",
"repos_url": "https://api.github.com/users/jakubhejhal/repos",
"events_url": "https://api.github.com/users/jakubhejhal/events{/privacy}",
"received_events_url": "https://api.github.com/users/jakubhejhal/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"Hi, thanks for raising an issue! \r\n\r\nThis is a question best placed in our [forums](https://discuss.huggingface.co/). We try to reserve the github issues for feature requests and bug reports."
] | 1,708 | 1,708 | 1,708 | NONE | null | ### Feature request
The [OWL-ViT](https://arxiv.org/abs/2205.06230) model currently supports image-guided one-shot object detection by using reference image embeddings as the input to the classification head instead of the text embedding. This is implemented by the [image_guided_detection](https://huggingface.co/docs/transformers/v4.37.2/en/model_doc/owlvit#transformers.OwlViTForObjectDetection.image_guided_detection) method.
There are 2 problems
- it doesn't support passing multiple reference images as input
- the reference image is passed through the image encoder every time
In practice I'd like to use the model's `image_guided_detection` for inference on larger dataset and computing the reference image query embedding for each image I'm doing an inference on is clearly wasteful, as the query embeddings are not dependent on the target image.
1) Is there a way to cache the query image embeddings?
2) And is there a way to use multiple query images for one target image?
### Motivation
In practice One-shot learning is an extreme case of Few-Shot learning and it's usually very hard / impossible to represent the whole class with only one reference image.
Therefore a natural extension is to use multiple prototypical images capturing the detected object in various situations, lightning conditions etc.
But as of now, the running time of the OWL-ViT scales linearly with the number of query images, which makes it impractical for real-world usage.
### Your contribution
I'm unfortunately not very experienced with hugging face and I don't know even where to start if I tried to implement this myself. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29089/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29089/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29088 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29088/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29088/comments | https://api.github.com/repos/huggingface/transformers/issues/29088/events | https://github.com/huggingface/transformers/pull/29088 | 2,141,149,538 | PR_kwDOCUB6oc5nOT2h | 29,088 | Remove misleading model disclaimers in docs for gpt2 and gpt neo QA. | {
"login": "Whenning42",
"id": 8920171,
"node_id": "MDQ6VXNlcjg5MjAxNzE=",
"avatar_url": "https://avatars.githubusercontent.com/u/8920171?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Whenning42",
"html_url": "https://github.com/Whenning42",
"followers_url": "https://api.github.com/users/Whenning42/followers",
"following_url": "https://api.github.com/users/Whenning42/following{/other_user}",
"gists_url": "https://api.github.com/users/Whenning42/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Whenning42/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Whenning42/subscriptions",
"organizations_url": "https://api.github.com/users/Whenning42/orgs",
"repos_url": "https://api.github.com/users/Whenning42/repos",
"events_url": "https://api.github.com/users/Whenning42/events{/privacy}",
"received_events_url": "https://api.github.com/users/Whenning42/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Hi @Whenning42, thanks for opening this PR! \r\n\r\nCould you share what the effect is of removing the `real_checkpoint` argument? Does the disclaimer disappear? "
] | 1,708 | 1,708 | null | NONE | null | The removed disclaimers suggest the real checkpoints aren't correct and that they need to be replaced by themselves.
GPT 2 disclaimer:
"This example uses a random model as the real ones are all very big. To get proper results, you should use gpt2 instead of gpt2. If you get out-of-memory when loading that checkpoint, you can try adding device_map="auto" in the from_pretrained call."
and
GPT Neo disclaimer:
"This example uses a random model as the real ones are all very big. To get proper results, you should use EleutherAI/gpt-neo-1.3B instead of EleutherAI/gpt-neo-1.3B. If you get out-of-memory when loading that checkpoint, you can try adding device_map="auto" in the from_pretrained call."
# What does this PR do?
Remove misleading model disclaimers in docs for gpt2 and gpt neo QA.
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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?
@stevhliu or @MKhalusova for documentation review. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29088/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29088/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29088",
"html_url": "https://github.com/huggingface/transformers/pull/29088",
"diff_url": "https://github.com/huggingface/transformers/pull/29088.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29088.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29087 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29087/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29087/comments | https://api.github.com/repos/huggingface/transformers/issues/29087/events | https://github.com/huggingface/transformers/issues/29087 | 2,141,128,881 | I_kwDOCUB6oc5_nwix | 29,087 | Mixtral inference breaks when `output_router_logits=True` | {
"login": "LeonardoEmili",
"id": 36575651,
"node_id": "MDQ6VXNlcjM2NTc1NjUx",
"avatar_url": "https://avatars.githubusercontent.com/u/36575651?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LeonardoEmili",
"html_url": "https://github.com/LeonardoEmili",
"followers_url": "https://api.github.com/users/LeonardoEmili/followers",
"following_url": "https://api.github.com/users/LeonardoEmili/following{/other_user}",
"gists_url": "https://api.github.com/users/LeonardoEmili/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LeonardoEmili/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LeonardoEmili/subscriptions",
"organizations_url": "https://api.github.com/users/LeonardoEmili/orgs",
"repos_url": "https://api.github.com/users/LeonardoEmili/repos",
"events_url": "https://api.github.com/users/LeonardoEmili/events{/privacy}",
"received_events_url": "https://api.github.com/users/LeonardoEmili/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"When running inference you should set `model .config.output_router_logits=False`",
"Thanks @ArthurZucker, I believe it is a bit hard to spot the correct behaviour from the [docs](https://huggingface.co/docs/transformers/main/model_doc/mixtral#transformers.MixtralModel.forward.output_router_logits) so I was wonde... | 1,708 | 1,708 | null | NONE | null | ### System Info
- `transformers` version: 4.38.0.dev0
- Platform: Linux-5.15.0-1038-oracle-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: 0.26.1
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.1+cu121 (True)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: yes, 8x A100 80GBs
- Using distributed or parallel set-up in script?: yes, using `device_map="auto"`
### Who can help?
@ArthurZucker @gante
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)
### Reproduction
The snippet
```python3
from transformers import AutoTokenizer, MixtralForCausalLM
import torch
model = MixtralForCausalLM.from_pretrained(<path_to_finetuned_Mixtral-8x7B-v0.1>)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(<path_to_finetuned_Mixtral-8x7B-v0.1>)
prompts = ['Pu', 'Av', 'Il', 'Please', 'access']
batch = tokenizer(prompts, padding=True, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**batch, max_new_tokens=400, do_sample=True, top_p=0.9, temperature=0.1, min_length=None, use_cache=True, top_k=50,
bos_token_id=tokenizer.bos_token_id, eos_token_id=tokenizer.eos_token_id, pad_token_id=tokenizer.pad_token_id,
)
```
produces
```
Traceback (most recent call last):
File "/job_workspace/axolotl/scripts/custom_modules/checkpoint_selection/evaluate_model_checkpoint.py", line 283, in main
hypothesis = llm.batch_translate(batch["prompts"], batch["tl_names"])
File "/job_workspace/axolotl/scripts/custom_modules/checkpoint_selection/evaluate_model_checkpoint.py", line 140, in batch_translate
outputs = self._model.generate(
File "/usr/local/lib/python3.10/dist-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py", line 1525, in generate
return self.sample(
File "/usr/local/lib/python3.10/dist-packages/transformers/generation/utils.py", line 2598, in sample
outputs = self(
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1518, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py", line 1527, in _call_impl
return forward_call(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py", line 165, in new_forward
output = module._old_forward(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/transformers/models/mixtral/modeling_mixtral.py", line 1392, in forward
aux_loss = load_balancing_loss_func(
File "/usr/local/lib/python3.10/dist-packages/transformers/models/mixtral/modeling_mixtral.py", line 132, in load_balancing_loss_func
tokens_per_expert = torch.sum(expert_mask.float() * expert_attention_mask, dim=0) / torch.sum(
RuntimeError: The size of tensor a (160) must match the size of tensor b (0) at non-singleton dimension 0
```
**Important details**:
- the model is a Q-Lora fine-tuned version of `Mixtral-8x7B-v0.1` using [axolotl](https://github.com/OpenAccess-AI-Collective/axolotl), different weights but same shapes
- task is instruction following where the model learns to translate the English prompt in Italian
- the issue only arises for some input data which is likely very short (see the snippet above)
### Expected behavior
- **Doubt/clarification**: it seems that Mixtral in inference shall not output `output_router_logits` (see [official docs](https://huggingface.co/docs/transformers/main/model_doc/mixtral#transformers.MixtralModel.forward.output_router_logits)) and its usage should only be limited during training (as described [here](https://152334h.github.io/blog/mixtral-vs-oss/)). I believe this was set by during training and then stored into the checkpoints, disabling it in the configs produces the expected results.
- **Proposal**: shall we always override this configuration to [False](https://github.com/huggingface/transformers/blob/161fe425c9c87af3b22b382f28239b0504d91d37/src/transformers/models/mixtral/modeling_mixtral.py#L1391) when `model.eval()` is called?
- **Expected outcome**: completion consistently returned with variable prompt | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29087/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29087/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29086 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29086/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29086/comments | https://api.github.com/repos/huggingface/transformers/issues/29086/events | https://github.com/huggingface/transformers/pull/29086 | 2,141,128,404 | PR_kwDOCUB6oc5nOPwa | 29,086 | 🌐 [i18n-KO] Translated generation_strategies.md to Korean | {
"login": "AI4Harmony",
"id": 160417616,
"node_id": "U_kgDOCY_HUA",
"avatar_url": "https://avatars.githubusercontent.com/u/160417616?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AI4Harmony",
"html_url": "https://github.com/AI4Harmony",
"followers_url": "https://api.github.com/users/AI4Harmony/followers",
"following_url": "https://api.github.com/users/AI4Harmony/following{/other_user}",
"gists_url": "https://api.github.com/users/AI4Harmony/gists{/gist_id}",
"starred_url": "https://api.github.com/users/AI4Harmony/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AI4Harmony/subscriptions",
"organizations_url": "https://api.github.com/users/AI4Harmony/orgs",
"repos_url": "https://api.github.com/users/AI4Harmony/repos",
"events_url": "https://api.github.com/users/AI4Harmony/events{/privacy}",
"received_events_url": "https://api.github.com/users/AI4Harmony/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29086). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
Translated the generation_strategies.md file of the documentation to Korean.
Thank you in advance for your review.
Part of https://github.com/huggingface/transformers/issues/20179
## Before submitting
- [x] Check for missing / redundant translations (번역 누락/중복 검사)
- [x] Grammar Check (맞춤법 검사)
- [x] Review or Add new terms to glossary (용어 확인 및 추가)
- [x] Check Inline TOC (e.g. [[lowercased-header]])
- [x] Check live-preview for gotchas (live-preview로 정상작동 확인)
## Who can review?
As followed the guide, I would like to give a review request to @ArthurZucker, @sgugger, @eunseojo.
and also send the review request to Team PseudoLab just in case. @0525hhgus, @kihoon71, @sim-so, @gabrielwithappy, @HanNayeoniee, @wonhyeongseo.
## Before submitting
- [x] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] 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.
- [x] 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? | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29086/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29086/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29086",
"html_url": "https://github.com/huggingface/transformers/pull/29086",
"diff_url": "https://github.com/huggingface/transformers/pull/29086.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29086.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29085 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29085/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29085/comments | https://api.github.com/repos/huggingface/transformers/issues/29085/events | https://github.com/huggingface/transformers/pull/29085 | 2,141,125,268 | PR_kwDOCUB6oc5nOPKB | 29,085 | [WIP] Update legacy Repository usage in `examples/pytorch/text-classification/run_glue_no_trainer.py | {
"login": "Hvanderwilk",
"id": 15908112,
"node_id": "MDQ6VXNlcjE1OTA4MTEy",
"avatar_url": "https://avatars.githubusercontent.com/u/15908112?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Hvanderwilk",
"html_url": "https://github.com/Hvanderwilk",
"followers_url": "https://api.github.com/users/Hvanderwilk/followers",
"following_url": "https://api.github.com/users/Hvanderwilk/following{/other_user}",
"gists_url": "https://api.github.com/users/Hvanderwilk/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Hvanderwilk/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Hvanderwilk/subscriptions",
"organizations_url": "https://api.github.com/users/Hvanderwilk/orgs",
"repos_url": "https://api.github.com/users/Hvanderwilk/repos",
"events_url": "https://api.github.com/users/Hvanderwilk/events{/privacy}",
"received_events_url": "https://api.github.com/users/Hvanderwilk/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
The usage in the example is marked for deprecation here https://huggingface.co/docs/huggingface_hub/guides/upload#legacy-upload-files-with-git-lfs. Use the new recommended methods.
<!--
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 -->
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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.
- [x] 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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29085/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29085/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29085",
"html_url": "https://github.com/huggingface/transformers/pull/29085",
"diff_url": "https://github.com/huggingface/transformers/pull/29085.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29085.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29084 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29084/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29084/comments | https://api.github.com/repos/huggingface/transformers/issues/29084/events | https://github.com/huggingface/transformers/pull/29084 | 2,141,100,964 | PR_kwDOCUB6oc5nOKKF | 29,084 | [Mistral, Mixtral] Improve docs | {
"login": "NielsRogge",
"id": 48327001,
"node_id": "MDQ6VXNlcjQ4MzI3MDAx",
"avatar_url": "https://avatars.githubusercontent.com/u/48327001?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/NielsRogge",
"html_url": "https://github.com/NielsRogge",
"followers_url": "https://api.github.com/users/NielsRogge/followers",
"following_url": "https://api.github.com/users/NielsRogge/following{/other_user}",
"gists_url": "https://api.github.com/users/NielsRogge/gists{/gist_id}",
"starred_url": "https://api.github.com/users/NielsRogge/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/NielsRogge/subscriptions",
"organizations_url": "https://api.github.com/users/NielsRogge/orgs",
"repos_url": "https://api.github.com/users/NielsRogge/repos",
"events_url": "https://api.github.com/users/NielsRogge/events{/privacy}",
"received_events_url": "https://api.github.com/users/NielsRogge/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29084). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
This PR improves the docs of Mistral and Mixtral, by including:
- explaining the difference between base models vs instruction tuned ones, including the newer [v2 checkpoint](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) of Mistral-7B
- use of chat templates
- quantization tips and tricks
- memory requirements
- resources such as the [Alignment Handbook](https://github.com/huggingface/alignment-handbook) by HF | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29084/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29084/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29084",
"html_url": "https://github.com/huggingface/transformers/pull/29084",
"diff_url": "https://github.com/huggingface/transformers/pull/29084.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29084.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29083 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29083/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29083/comments | https://api.github.com/repos/huggingface/transformers/issues/29083/events | https://github.com/huggingface/transformers/pull/29083 | 2,141,091,613 | PR_kwDOCUB6oc5nOIOL | 29,083 | Allow repo_id--module.classname config definition even if loading from path | {
"login": "rl337",
"id": 387895,
"node_id": "MDQ6VXNlcjM4Nzg5NQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/387895?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/rl337",
"html_url": "https://github.com/rl337",
"followers_url": "https://api.github.com/users/rl337/followers",
"following_url": "https://api.github.com/users/rl337/following{/other_user}",
"gists_url": "https://api.github.com/users/rl337/gists{/gist_id}",
"starred_url": "https://api.github.com/users/rl337/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/rl337/subscriptions",
"organizations_url": "https://api.github.com/users/rl337/orgs",
"repos_url": "https://api.github.com/users/rl337/repos",
"events_url": "https://api.github.com/users/rl337/events{/privacy}",
"received_events_url": "https://api.github.com/users/rl337/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"c @Rocketknight1 "
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | When you have a model that's in a path that's not exactly the repo_id relative to the current directory and the config has AutoConfig of the form model_id--module.classname in it, you can't load the model using the path to the model because resolving module.classname ends up being relative to repo_id as defined in the config.
Let me lay this out.
```
path/to/large/storage/
models/
model_a/
config.json
tokenizer_config.json
model_config.py
model_impl.py
model_b/
...
path/to/sourcecode/
my_module/
__init__.py
__main__.py
```
What i want to do is, from my `__main__.py` load my model from `AutoModel.from_pretrained()` so I pass `path/to/large/storage/models/model_a` as model_id_or_path with `local_files_only=True` because i only want to use the specific model that i have on my filesystem.
When you try to do this, you end up with an exception that looks like this:
```Could not locate the model_config.py inside rl337/cicero-ffn.
Traceback (most recent call last):
File "/Users/rlee/dev/singularity/.venv/lib/python3.9/site-packages/transformers/utils/hub.py", line 398, in cached_file
resolved_file = hf_hub_download(
File "/Users/rlee/dev/singularity/.venv/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
return fn(*args, **kwargs)
File "/Users/rlee/dev/singularity/.venv/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1363, in hf_hub_download
raise LocalEntryNotFoundError(
huggingface_hub.utils._errors.LocalEntryNotFoundError: Cannot find the requested files in the disk cache and outgoing traffic has been disabled. To enable hf.co look-ups and downloads online, set 'local_files_only' to False.
```
Here, even though I'm trying to load the model from a path it's trying to resolve the code relative to the repo_id. This is problematic because if i made changes to the model code and i'm not restricting downloads, i may download and use out of date code from the hub. If i don't notice that it's downloaded code, it'd be super confusing to debug.
The workaround is to edit the config.json to remove the repo_id-- part of the definition which is kind of annoying because if you want to push changes to the hub after, you need to remember to add the repo_id-- back in.
I think the root problem here is when the model_id_or_path is specified as a path, really what it's doing is its acting like a path to the config.json and then it doesn't treat the directory it loads the config.json from to be a self contained model. It instead tries to resolve things defined in the config.json relative to the current directory or relative to the model hub/cache. Concretely it requires a directory structure that looks more like this:
```
path/to/sourcecode/
my_module/
__init__.py
__main__.py
username/model_id/
config.json
tokenizer_config.json
model_config.py
model_impl.py
```
When i run my `__main__.py` from the directory designated by `path/to/sourcecode`, everything seems to work okay because resolution of the model_id `username/model_id` happens relative to the current directory.
# What does this PR do?
This PR adds a check to see if the repo_or_path is a path containing the module file to download. If it is, load from that path instead of referencing the repo_id. It then tries to load the model.classname from the path rather than the repo_id when dynamically loading classes.
At this point, the config.json was already loaded from the path so likely the path is okay to load code from especially if trust_remote_code is true.. which it must be at this point.
<!--
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#create-a-pull-request),
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29083/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29083/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29083",
"html_url": "https://github.com/huggingface/transformers/pull/29083",
"diff_url": "https://github.com/huggingface/transformers/pull/29083.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29083.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29082 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29082/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29082/comments | https://api.github.com/repos/huggingface/transformers/issues/29082/events | https://github.com/huggingface/transformers/pull/29082 | 2,140,990,281 | PR_kwDOCUB6oc5nN0GE | 29,082 | FEAT [`Trainer` / `bnb`]: Add RMSProp from `bitsandbytes` to HF `Trainer` | {
"login": "younesbelkada",
"id": 49240599,
"node_id": "MDQ6VXNlcjQ5MjQwNTk5",
"avatar_url": "https://avatars.githubusercontent.com/u/49240599?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/younesbelkada",
"html_url": "https://github.com/younesbelkada",
"followers_url": "https://api.github.com/users/younesbelkada/followers",
"following_url": "https://api.github.com/users/younesbelkada/following{/other_user}",
"gists_url": "https://api.github.com/users/younesbelkada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/younesbelkada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/younesbelkada/subscriptions",
"organizations_url": "https://api.github.com/users/younesbelkada/orgs",
"repos_url": "https://api.github.com/users/younesbelkada/repos",
"events_url": "https://api.github.com/users/younesbelkada/events{/privacy}",
"received_events_url": "https://api.github.com/users/younesbelkada/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29082). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
As requested by the community, this PR adds the support for bnb RMSProp optimizers to HF Trainer !
`RMSProp` exists in bitsandbytes since its first commit: https://github.com/TimDettmers/bitsandbytes/commit/7439924891496025edf60c9da6a782f362a50c70#diff-8384af03566f84c3055f3fee7b1516696a1546d130d63935714af17781d6202b so this PR is compatible with all versions of bnb.
I also added nice tests, which all pass on my machine
Fixes: https://github.com/huggingface/trl/issues/1336
cc @amyeroberts and @Titus-von-Koeller FYI !
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29082/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 1,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29082/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29082",
"html_url": "https://github.com/huggingface/transformers/pull/29082",
"diff_url": "https://github.com/huggingface/transformers/pull/29082.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29082.patch",
"merged_at": 1708393382000
} |
https://api.github.com/repos/huggingface/transformers/issues/29081 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29081/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29081/comments | https://api.github.com/repos/huggingface/transformers/issues/29081/events | https://github.com/huggingface/transformers/pull/29081 | 2,140,736,966 | PR_kwDOCUB6oc5nM-Px | 29,081 | token healing impl | {
"login": "Ayenem",
"id": 50707385,
"node_id": "MDQ6VXNlcjUwNzA3Mzg1",
"avatar_url": "https://avatars.githubusercontent.com/u/50707385?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Ayenem",
"html_url": "https://github.com/Ayenem",
"followers_url": "https://api.github.com/users/Ayenem/followers",
"following_url": "https://api.github.com/users/Ayenem/following{/other_user}",
"gists_url": "https://api.github.com/users/Ayenem/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Ayenem/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ayenem/subscriptions",
"organizations_url": "https://api.github.com/users/Ayenem/orgs",
"repos_url": "https://api.github.com/users/Ayenem/repos",
"events_url": "https://api.github.com/users/Ayenem/events{/privacy}",
"received_events_url": "https://api.github.com/users/Ayenem/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29081). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"CI is failing due to an automatic update in the pytest package, we are tracking it... | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
Token healing rectifies the token boundary bias in greedy tokenization. It does this by trimming and regrowing the prompt to better align with the model's tokenizer, thus enhancing generation quality. The improvement is clearest with completion models.
Token boundary bias is a silent performance killer that doesn't seem very well known. It has clear impact on completion quality.
A more thorough explanation of the problem: [The Art of Prompt Design: Prompt Boundaries and Token Healing | by Scott Lundberg](https://towardsdatascience.com/the-art-of-prompt-design-prompt-boundaries-and-token-healing-3b2448b0be38).
### Motivation
Given a completion prompt with a partial url ending with `:`, the model might have seen the expected completion `://` as a _single_ token in training. However, the prompt's tail token `:` tells it that the next token is not `//`, and so it generates a wrong completion. Such errors compound in auto-regressive language models.
Fixes [#28346](https://github.com/huggingface/transformers/issues/28346)
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#start-contributing-pull-requests),
Pull Request section?
- [x] 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.
- [x] 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).
- [x] Did you write any new necessary tests?
## Who can review?
- @gante | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29081/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 1,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29081/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29081",
"html_url": "https://github.com/huggingface/transformers/pull/29081",
"diff_url": "https://github.com/huggingface/transformers/pull/29081.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29081.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29080 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29080/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29080/comments | https://api.github.com/repos/huggingface/transformers/issues/29080/events | https://github.com/huggingface/transformers/issues/29080 | 2,140,668,237 | I_kwDOCUB6oc5_mAFN | 29,080 | repetition_penalty not being applied | {
"login": "adenhaus",
"id": 57678819,
"node_id": "MDQ6VXNlcjU3Njc4ODE5",
"avatar_url": "https://avatars.githubusercontent.com/u/57678819?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/adenhaus",
"html_url": "https://github.com/adenhaus",
"followers_url": "https://api.github.com/users/adenhaus/followers",
"following_url": "https://api.github.com/users/adenhaus/following{/other_user}",
"gists_url": "https://api.github.com/users/adenhaus/gists{/gist_id}",
"starred_url": "https://api.github.com/users/adenhaus/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/adenhaus/subscriptions",
"organizations_url": "https://api.github.com/users/adenhaus/orgs",
"repos_url": "https://api.github.com/users/adenhaus/repos",
"events_url": "https://api.github.com/users/adenhaus/events{/privacy}",
"received_events_url": "https://api.github.com/users/adenhaus/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"I just noticed the same issue. I think it would be a useful feature.",
"`repetition_penalty` is working on my end:\r\n\r\n```py\r\nfrom transformers import AutoModelForCausalLM, AutoTokenizer\r\n\r\ntokenizer = AutoTokenizer.from_pretrained(\"distilgpt2\")\r\nmodel = AutoModelForCausalLM.from_pretrained(\"distil... | 1,708 | 1,708 | 1,708 | NONE | null | ### System Info
- `transformers` version: 4.37.2
- Platform: Linux-6.1.58+-x86_64-with-glibc2.35
- Python version: 3.10.12
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: 0.27.2
- Accelerate config: not found
- PyTorch version (GPU?): 2.1.0+cu121 (False)
- Tensorflow version (GPU?): 2.15.0 (False)
- Flax version (CPU?/GPU?/TPU?): 0.8.1 (cpu)
- Jax version: 0.4.23
- JaxLib version: 0.4.23
### Who can help?
@gante @ArthurZucker @younesbelkada
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
Download a model and do inference. Change the repetition_penalty. You will see the output does not change_
### Expected behavior
The output should change when repetition_penalty is changed. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29080/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29080/timeline | not_planned | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29079 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29079/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29079/comments | https://api.github.com/repos/huggingface/transformers/issues/29079/events | https://github.com/huggingface/transformers/pull/29079 | 2,140,536,642 | PR_kwDOCUB6oc5nMT9Q | 29,079 | Quantization support for CUDA graph generation. | {
"login": "BlackSamorez",
"id": 16901341,
"node_id": "MDQ6VXNlcjE2OTAxMzQx",
"avatar_url": "https://avatars.githubusercontent.com/u/16901341?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/BlackSamorez",
"html_url": "https://github.com/BlackSamorez",
"followers_url": "https://api.github.com/users/BlackSamorez/followers",
"following_url": "https://api.github.com/users/BlackSamorez/following{/other_user}",
"gists_url": "https://api.github.com/users/BlackSamorez/gists{/gist_id}",
"starred_url": "https://api.github.com/users/BlackSamorez/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/BlackSamorez/subscriptions",
"organizations_url": "https://api.github.com/users/BlackSamorez/orgs",
"repos_url": "https://api.github.com/users/BlackSamorez/repos",
"events_url": "https://api.github.com/users/BlackSamorez/events{/privacy}",
"received_events_url": "https://api.github.com/users/BlackSamorez/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @younesbelkada "
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
<!--
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 -->
As of now, this PR fixes a small problem preventing one from using CUDA graph generation from #28937 with quantized models.
In the long run, It would be great to have compiled generation actually working for GPTQ/AQLM/other quantization methods.
## 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#create-a-pull-request),
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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29079/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29079/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29079",
"html_url": "https://github.com/huggingface/transformers/pull/29079",
"diff_url": "https://github.com/huggingface/transformers/pull/29079.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29079.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29078 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29078/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29078/comments | https://api.github.com/repos/huggingface/transformers/issues/29078/events | https://github.com/huggingface/transformers/issues/29078 | 2,140,402,242 | I_kwDOCUB6oc5_k_JC | 29,078 | Error while using load_best_model_at_end with LoRA adapters inside Trainer and SFTTrainer | {
"login": "deshwalmahesh",
"id": 50293852,
"node_id": "MDQ6VXNlcjUwMjkzODUy",
"avatar_url": "https://avatars.githubusercontent.com/u/50293852?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/deshwalmahesh",
"html_url": "https://github.com/deshwalmahesh",
"followers_url": "https://api.github.com/users/deshwalmahesh/followers",
"following_url": "https://api.github.com/users/deshwalmahesh/following{/other_user}",
"gists_url": "https://api.github.com/users/deshwalmahesh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/deshwalmahesh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/deshwalmahesh/subscriptions",
"organizations_url": "https://api.github.com/users/deshwalmahesh/orgs",
"repos_url": "https://api.github.com/users/deshwalmahesh/repos",
"events_url": "https://api.github.com/users/deshwalmahesh/events{/privacy}",
"received_events_url": "https://api.github.com/users/deshwalmahesh/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"cc @younesbelkada ",
"Hi @deshwalmahesh \r\nThanks for the issue! \r\nJust to confirm, what PEFT version do you have ? Can oyou try out with the latest PEFT ? `pip install -U peft`"
] | 1,708 | 1,708 | null | NONE | null | ### System Info
I'm using version `4.37` and when you use any of the model like `AutoModelForCausalLM, AutoModelForSequenceClassification` along with LoRA adapters, you get error after training gets finished. I used `load_best_model_at_end` with `TrainingArguments` on both the above mentioned models with `Trainer` as well as `SFTTrainer`. I tried it with both Classification and SFT
### Who can help?
@muellerz @pacman100 @ArthurZucker @younes
### Information
- [X] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] My own task or dataset (give details below)
### Reproduction
1. Model:
```
model = PhiForSequenceClassification.from_pretrained(model_name, num_labels = 1, trust_remote_code=True, torch_dtype=torch.bfloat16)
model.config.pad_token_id = model.config.eos_token_id
model.gradient_checkpointing_enable() #gradient checkpointing to save memory
model = prepare_model_for_kbit_training(model, use_gradient_checkpointing=True)
lora_config = LoraConfig(
r=256,
lora_alpha=512,
target_modules=[
'q_proj','k_proj','v_proj','dense','fc1','fc2',], #print(model) will show the modules to use
bias="none",
lora_dropout=0.05,
task_type=TaskType.SEQ_CLS)
model = get_peft_model(model, lora_config) # LORA
```
3. Args:
```
training_args = TrainingArguments(load_best_model_at_end = False )
trainer = Trainer(
model = model,
train_dataset=tokenized_train_dataset,
eval_dataset=tokenized_val_dataset,
args=training_args,
data_collator = DataCollatorWithPadding(tokenizer=tokenizer),
compute_metrics = compute_metrics_for_regression,
callbacks = [EarlyStoppingCallback(early_stopping_patience=3)]
)
trainer.train()
```
### Expected behavior
it should not give the below at the end of training:
```
RuntimeError: Error(s) in loading state_dict for PeftModelForSequenceClassification:
Missing key(s) in state_dict: "base_model.model.model.embed_tokens.weight", "base_model.model.model.layers.0.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.0.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.0.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.0.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.0.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.0.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.0.self_attn.dense.base_layer.weight", "base_model.model.model.layers.0.self_attn.dense.base_layer.bias", "base_model.model.model.layers.0.mlp.fc1.base_layer.weight", "base_model.model.model.layers.0.mlp.fc1.base_layer.bias", "base_model.model.model.layers.0.mlp.fc2.base_layer.weight", "base_model.model.model.layers.0.mlp.fc2.base_layer.bias", "base_model.model.model.layers.0.input_layernorm.weight", "base_model.model.model.layers.0.input_layernorm.bias", "base_model.model.model.layers.1.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.1.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.1.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.1.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.1.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.1.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.1.self_attn.dense.base_layer.weight", "base_model.model.model.layers.1.self_attn.dense.base_layer.bias", "base_model.model.model.layers.1.mlp.fc1.base_layer.weight", "base_model.model.model.layers.1.mlp.fc1.base_layer.bias", "base_model.model.model.layers.1.mlp.fc2.base_layer.weight", "base_model.model.model.layers.1.mlp.fc2.base_layer.bias", "base_model.model.model.layers.1.input_layernorm.weight", "base_model.model.model.layers.1.input_layernorm.bias", "base_model.model.model.layers.2.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.2.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.2.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.2.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.2.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.2.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.2.self_attn.dense.base_layer.weight", "base_model.model.model.layers.2.self_attn.dense.base_layer.bias", "base_model.model.model.layers.2.mlp.fc1.base_layer.weight", "base_model.model.model.layers.2.mlp.fc1.base_layer.bias", "base_model.model.model.layers.2.mlp.fc2.base_layer.weight", "base_model.model.model.layers.2.mlp.fc2.base_layer.bias", "base_model.model.model.layers.2.input_layernorm.weight", "base_model.model.model.layers.2.input_layernorm.bias", "base_model.model.model.layers.3.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.3.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.3.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.3.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.3.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.3.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.3.self_attn.dense.base_layer.weight", "base_model.model.model.layers.3.self_attn.dense.base_layer.bias", "base_model.model.model.layers.3.mlp.fc1.base_layer.weight", "base_model.model.model.layers.3.mlp.fc1.base_layer.bias", "base_model.model.model.layers.3.mlp.fc2.base_layer.weight", "base_model.model.model.layers.3.mlp.fc2.base_layer.bias", "base_model.model.model.layers.3.input_layernorm.weight", "base_model.model.model.layers.3.input_layernorm.bias", "base_model.model.model.layers.4.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.4.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.4.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.4.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.4.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.4.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.4.self_attn.dense.base_layer.weight", "base_model.model.model.layers.4.self_attn.dense.base_layer.bias", "base_model.model.model.layers.4.mlp.fc1.base_layer.weight", "base_model.model.model.layers.4.mlp.fc1.base_layer.bias", "base_model.model.model.layers.4.mlp.fc2.base_layer.weight", "base_model.model.model.layers.4.mlp.fc2.base_layer.bias", "base_model.model.model.layers.4.input_layernorm.weight", "base_model.model.model.layers.4.input_layernorm.bias", "base_model.model.model.layers.5.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.5.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.5.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.5.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.5.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.5.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.5.self_attn.dense.base_layer.weight", "base_model.model.model.layers.5.self_attn.dense.base_layer.bias", "base_model.model.model.layers.5.mlp.fc1.base_layer.weight", "base_model.model.model.layers.5.mlp.fc1.base_layer.bias", "base_model.model.model.layers.5.mlp.fc2.base_layer.weight", "base_model.model.model.layers.5.mlp.fc2.base_layer.bias", "base_model.model.model.layers.5.input_layernorm.weight", "base_model.model.model.layers.5.input_layernorm.bias", "base_model.model.model.layers.6.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.6.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.6.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.6.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.6.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.6.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.6.self_attn.dense.base_layer.weight", "base_model.model.model.layers.6.self_attn.dense.base_layer.bias", "base_model.model.model.layers.6.mlp.fc1.base_layer.weight", "base_model.model.model.layers.6.mlp.fc1.base_layer.bias", "base_model.model.model.layers.6.mlp.fc2.base_layer.weight", "base_model.model.model.layers.6.mlp.fc2.base_layer.bias", "base_model.model.model.layers.6.input_layernorm.weight", "base_model.model.model.layers.6.input_layernorm.bias", "base_model.model.model.layers.7.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.7.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.7.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.7.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.7.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.7.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.7.self_attn.dense.base_layer.weight", "base_model.model.model.layers.7.self_attn.dense.base_layer.bias", "base_model.model.model.layers.7.mlp.fc1.base_layer.weight", "base_model.model.model.layers.7.mlp.fc1.base_layer.bias", "base_model.model.model.layers.7.mlp.fc2.base_layer.weight", "base_model.model.model.layers.7.mlp.fc2.base_layer.bias", "base_model.model.model.layers.7.input_layernorm.weight", "base_model.model.model.layers.7.input_layernorm.bias", "base_model.model.model.layers.8.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.8.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.8.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.8.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.8.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.8.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.8.self_attn.dense.base_layer.weight", "base_model.model.model.layers.8.self_attn.dense.base_layer.bias", "base_model.model.model.layers.8.mlp.fc1.base_layer.weight", "base_model.model.model.layers.8.mlp.fc1.base_layer.bias", "base_model.model.model.layers.8.mlp.fc2.base_layer.weight", "base_model.model.model.layers.8.mlp.fc2.base_layer.bias", "base_model.model.model.layers.8.input_layernorm.weight", "base_model.model.model.layers.8.input_layernorm.bias", "base_model.model.model.layers.9.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.9.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.9.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.9.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.9.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.9.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.9.self_attn.dense.base_layer.weight", "base_model.model.model.layers.9.self_attn.dense.base_layer.bias", "base_model.model.model.layers.9.mlp.fc1.base_layer.weight", "base_model.model.model.layers.9.mlp.fc1.base_layer.bias", "base_model.model.model.layers.9.mlp.fc2.base_layer.weight", "base_model.model.model.layers.9.mlp.fc2.base_layer.bias", "base_model.model.model.layers.9.input_layernorm.weight", "base_model.model.model.layers.9.input_layernorm.bias", "base_model.model.model.layers.10.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.10.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.10.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.10.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.10.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.10.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.10.self_attn.dense.base_layer.weight", "base_model.model.model.layers.10.self_attn.dense.base_layer.bias", "base_model.model.model.layers.10.mlp.fc1.base_layer.weight", "base_model.model.model.layers.10.mlp.fc1.base_layer.bias", "base_model.model.model.layers.10.mlp.fc2.base_layer.weight", "base_model.model.model.layers.10.mlp.fc2.base_layer.bias", "base_model.model.model.layers.10.input_layernorm.weight", "base_model.model.model.layers.10.input_layernorm.bias", "base_model.model.model.layers.11.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.11.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.11.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.11.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.11.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.11.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.11.self_attn.dense.base_layer.weight", "base_model.model.model.layers.11.self_attn.dense.base_layer.bias", "base_model.model.model.layers.11.mlp.fc1.base_layer.weight", "base_model.model.model.layers.11.mlp.fc1.base_layer.bias", "base_model.model.model.layers.11.mlp.fc2.base_layer.weight", "base_model.model.model.layers.11.mlp.fc2.base_layer.bias", "base_model.model.model.layers.11.input_layernorm.weight", "base_model.model.model.layers.11.input_layernorm.bias", "base_model.model.model.layers.12.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.12.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.12.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.12.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.12.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.12.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.12.self_attn.dense.base_layer.weight", "base_model.model.model.layers.12.self_attn.dense.base_layer.bias", "base_model.model.model.layers.12.mlp.fc1.base_layer.weight", "base_model.model.model.layers.12.mlp.fc1.base_layer.bias", "base_model.model.model.layers.12.mlp.fc2.base_layer.weight", "base_model.model.model.layers.12.mlp.fc2.base_layer.bias", "base_model.model.model.layers.12.input_layernorm.weight", "base_model.model.model.layers.12.input_layernorm.bias", "base_model.model.model.layers.13.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.13.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.13.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.13.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.13.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.13.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.13.self_attn.dense.base_layer.weight", "base_model.model.model.layers.13.self_attn.dense.base_layer.bias", "base_model.model.model.layers.13.mlp.fc1.base_layer.weight", "base_model.model.model.layers.13.mlp.fc1.base_layer.bias", "base_model.model.model.layers.13.mlp.fc2.base_layer.weight", "base_model.model.model.layers.13.mlp.fc2.base_layer.bias", "base_model.model.model.layers.13.input_layernorm.weight", "base_model.model.model.layers.13.input_layernorm.bias", "base_model.model.model.layers.14.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.14.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.14.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.14.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.14.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.14.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.14.self_attn.dense.base_layer.weight", "base_model.model.model.layers.14.self_attn.dense.base_layer.bias", "base_model.model.model.layers.14.mlp.fc1.base_layer.weight", "base_model.model.model.layers.14.mlp.fc1.base_layer.bias", "base_model.model.model.layers.14.mlp.fc2.base_layer.weight", "base_model.model.model.layers.14.mlp.fc2.base_layer.bias", "base_model.model.model.layers.14.input_layernorm.weight", "base_model.model.model.layers.14.input_layernorm.bias", "base_model.model.model.layers.15.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.15.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.15.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.15.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.15.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.15.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.15.self_attn.dense.base_layer.weight", "base_model.model.model.layers.15.self_attn.dense.base_layer.bias", "base_model.model.model.layers.15.mlp.fc1.base_layer.weight", "base_model.model.model.layers.15.mlp.fc1.base_layer.bias", "base_model.model.model.layers.15.mlp.fc2.base_layer.weight", "base_model.model.model.layers.15.mlp.fc2.base_layer.bias", "base_model.model.model.layers.15.input_layernorm.weight", "base_model.model.model.layers.15.input_layernorm.bias", "base_model.model.model.layers.16.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.16.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.16.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.16.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.16.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.16.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.16.self_attn.dense.base_layer.weight", "base_model.model.model.layers.16.self_attn.dense.base_layer.bias", "base_model.model.model.layers.16.mlp.fc1.base_layer.weight", "base_model.model.model.layers.16.mlp.fc1.base_layer.bias", "base_model.model.model.layers.16.mlp.fc2.base_layer.weight", "base_model.model.model.layers.16.mlp.fc2.base_layer.bias", "base_model.model.model.layers.16.input_layernorm.weight", "base_model.model.model.layers.16.input_layernorm.bias", "base_model.model.model.layers.17.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.17.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.17.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.17.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.17.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.17.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.17.self_attn.dense.base_layer.weight", "base_model.model.model.layers.17.self_attn.dense.base_layer.bias", "base_model.model.model.layers.17.mlp.fc1.base_layer.weight", "base_model.model.model.layers.17.mlp.fc1.base_layer.bias", "base_model.model.model.layers.17.mlp.fc2.base_layer.weight", "base_model.model.model.layers.17.mlp.fc2.base_layer.bias", "base_model.model.model.layers.17.input_layernorm.weight", "base_model.model.model.layers.17.input_layernorm.bias", "base_model.model.model.layers.18.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.18.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.18.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.18.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.18.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.18.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.18.self_attn.dense.base_layer.weight", "base_model.model.model.layers.18.self_attn.dense.base_layer.bias", "base_model.model.model.layers.18.mlp.fc1.base_layer.weight", "base_model.model.model.layers.18.mlp.fc1.base_layer.bias", "base_model.model.model.layers.18.mlp.fc2.base_layer.weight", "base_model.model.model.layers.18.mlp.fc2.base_layer.bias", "base_model.model.model.layers.18.input_layernorm.weight", "base_model.model.model.layers.18.input_layernorm.bias", "base_model.model.model.layers.19.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.19.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.19.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.19.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.19.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.19.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.19.self_attn.dense.base_layer.weight", "base_model.model.model.layers.19.self_attn.dense.base_layer.bias", "base_model.model.model.layers.19.mlp.fc1.base_layer.weight", "base_model.model.model.layers.19.mlp.fc1.base_layer.bias", "base_model.model.model.layers.19.mlp.fc2.base_layer.weight", "base_model.model.model.layers.19.mlp.fc2.base_layer.bias", "base_model.model.model.layers.19.input_layernorm.weight", "base_model.model.model.layers.19.input_layernorm.bias", "base_model.model.model.layers.20.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.20.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.20.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.20.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.20.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.20.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.20.self_attn.dense.base_layer.weight", "base_model.model.model.layers.20.self_attn.dense.base_layer.bias", "base_model.model.model.layers.20.mlp.fc1.base_layer.weight", "base_model.model.model.layers.20.mlp.fc1.base_layer.bias", "base_model.model.model.layers.20.mlp.fc2.base_layer.weight", "base_model.model.model.layers.20.mlp.fc2.base_layer.bias", "base_model.model.model.layers.20.input_layernorm.weight", "base_model.model.model.layers.20.input_layernorm.bias", "base_model.model.model.layers.21.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.21.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.21.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.21.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.21.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.21.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.21.self_attn.dense.base_layer.weight", "base_model.model.model.layers.21.self_attn.dense.base_layer.bias", "base_model.model.model.layers.21.mlp.fc1.base_layer.weight", "base_model.model.model.layers.21.mlp.fc1.base_layer.bias", "base_model.model.model.layers.21.mlp.fc2.base_layer.weight", "base_model.model.model.layers.21.mlp.fc2.base_layer.bias", "base_model.model.model.layers.21.input_layernorm.weight", "base_model.model.model.layers.21.input_layernorm.bias", "base_model.model.model.layers.22.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.22.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.22.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.22.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.22.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.22.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.22.self_attn.dense.base_layer.weight", "base_model.model.model.layers.22.self_attn.dense.base_layer.bias", "base_model.model.model.layers.22.mlp.fc1.base_layer.weight", "base_model.model.model.layers.22.mlp.fc1.base_layer.bias", "base_model.model.model.layers.22.mlp.fc2.base_layer.weight", "base_model.model.model.layers.22.mlp.fc2.base_layer.bias", "base_model.model.model.layers.22.input_layernorm.weight", "base_model.model.model.layers.22.input_layernorm.bias", "base_model.model.model.layers.23.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.23.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.23.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.23.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.23.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.23.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.23.self_attn.dense.base_layer.weight", "base_model.model.model.layers.23.self_attn.dense.base_layer.bias", "base_model.model.model.layers.23.mlp.fc1.base_layer.weight", "base_model.model.model.layers.23.mlp.fc1.base_layer.bias", "base_model.model.model.layers.23.mlp.fc2.base_layer.weight", "base_model.model.model.layers.23.mlp.fc2.base_layer.bias", "base_model.model.model.layers.23.input_layernorm.weight", "base_model.model.model.layers.23.input_layernorm.bias", "base_model.model.model.layers.24.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.24.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.24.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.24.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.24.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.24.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.24.self_attn.dense.base_layer.weight", "base_model.model.model.layers.24.self_attn.dense.base_layer.bias", "base_model.model.model.layers.24.mlp.fc1.base_layer.weight", "base_model.model.model.layers.24.mlp.fc1.base_layer.bias", "base_model.model.model.layers.24.mlp.fc2.base_layer.weight", "base_model.model.model.layers.24.mlp.fc2.base_layer.bias", "base_model.model.model.layers.24.input_layernorm.weight", "base_model.model.model.layers.24.input_layernorm.bias", "base_model.model.model.layers.25.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.25.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.25.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.25.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.25.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.25.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.25.self_attn.dense.base_layer.weight", "base_model.model.model.layers.25.self_attn.dense.base_layer.bias", "base_model.model.model.layers.25.mlp.fc1.base_layer.weight", "base_model.model.model.layers.25.mlp.fc1.base_layer.bias", "base_model.model.model.layers.25.mlp.fc2.base_layer.weight", "base_model.model.model.layers.25.mlp.fc2.base_layer.bias", "base_model.model.model.layers.25.input_layernorm.weight", "base_model.model.model.layers.25.input_layernorm.bias", "base_model.model.model.layers.26.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.26.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.26.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.26.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.26.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.26.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.26.self_attn.dense.base_layer.weight", "base_model.model.model.layers.26.self_attn.dense.base_layer.bias", "base_model.model.model.layers.26.mlp.fc1.base_layer.weight", "base_model.model.model.layers.26.mlp.fc1.base_layer.bias", "base_model.model.model.layers.26.mlp.fc2.base_layer.weight", "base_model.model.model.layers.26.mlp.fc2.base_layer.bias", "base_model.model.model.layers.26.input_layernorm.weight", "base_model.model.model.layers.26.input_layernorm.bias", "base_model.model.model.layers.27.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.27.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.27.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.27.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.27.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.27.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.27.self_attn.dense.base_layer.weight", "base_model.model.model.layers.27.self_attn.dense.base_layer.bias", "base_model.model.model.layers.27.mlp.fc1.base_layer.weight", "base_model.model.model.layers.27.mlp.fc1.base_layer.bias", "base_model.model.model.layers.27.mlp.fc2.base_layer.weight", "base_model.model.model.layers.27.mlp.fc2.base_layer.bias", "base_model.model.model.layers.27.input_layernorm.weight", "base_model.model.model.layers.27.input_layernorm.bias", "base_model.model.model.layers.28.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.28.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.28.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.28.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.28.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.28.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.28.self_attn.dense.base_layer.weight", "base_model.model.model.layers.28.self_attn.dense.base_layer.bias", "base_model.model.model.layers.28.mlp.fc1.base_layer.weight", "base_model.model.model.layers.28.mlp.fc1.base_layer.bias", "base_model.model.model.layers.28.mlp.fc2.base_layer.weight", "base_model.model.model.layers.28.mlp.fc2.base_layer.bias", "base_model.model.model.layers.28.input_layernorm.weight", "base_model.model.model.layers.28.input_layernorm.bias", "base_model.model.model.layers.29.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.29.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.29.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.29.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.29.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.29.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.29.self_attn.dense.base_layer.weight", "base_model.model.model.layers.29.self_attn.dense.base_layer.bias", "base_model.model.model.layers.29.mlp.fc1.base_layer.weight", "base_model.model.model.layers.29.mlp.fc1.base_layer.bias", "base_model.model.model.layers.29.mlp.fc2.base_layer.weight", "base_model.model.model.layers.29.mlp.fc2.base_layer.bias", "base_model.model.model.layers.29.input_layernorm.weight", "base_model.model.model.layers.29.input_layernorm.bias", "base_model.model.model.layers.30.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.30.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.30.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.30.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.30.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.30.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.30.self_attn.dense.base_layer.weight", "base_model.model.model.layers.30.self_attn.dense.base_layer.bias", "base_model.model.model.layers.30.mlp.fc1.base_layer.weight", "base_model.model.model.layers.30.mlp.fc1.base_layer.bias", "base_model.model.model.layers.30.mlp.fc2.base_layer.weight", "base_model.model.model.layers.30.mlp.fc2.base_layer.bias", "base_model.model.model.layers.30.input_layernorm.weight", "base_model.model.model.layers.30.input_layernorm.bias", "base_model.model.model.layers.31.self_attn.q_proj.base_layer.weight", "base_model.model.model.layers.31.self_attn.q_proj.base_layer.bias", "base_model.model.model.layers.31.self_attn.k_proj.base_layer.weight", "base_model.model.model.layers.31.self_attn.k_proj.base_layer.bias", "base_model.model.model.layers.31.self_attn.v_proj.base_layer.weight", "base_model.model.model.layers.31.self_attn.v_proj.base_layer.bias", "base_model.model.model.layers.31.self_attn.dense.base_layer.weight", "base_model.model.model.layers.31.self_attn.dense.base_layer.bias", "base_model.model.model.layers.31.mlp.fc1.base_layer.weight", "base_model.model.model.layers.31.mlp.fc1.base_layer.bias", "base_model.model.model.layers.31.mlp.fc2.base_layer.weight", "base_model.model.model.layers.31.mlp.fc2.base_layer.bias", "base_model.model.model.layers.31.input_layernorm.weight", "base_model.model.model.layers.31.input_layernorm.bias", "base_model.model.model.final_layernorm.weight", "base_model.model.model.final_layernorm.bias", "base_model.model.score.original_module.weight"
``` | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29078/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29078/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29077 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29077/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29077/comments | https://api.github.com/repos/huggingface/transformers/issues/29077/events | https://github.com/huggingface/transformers/pull/29077 | 2,139,899,107 | PR_kwDOCUB6oc5nKCnG | 29,077 | New model support RTDETR | {
"login": "SangbumChoi",
"id": 34004152,
"node_id": "MDQ6VXNlcjM0MDA0MTUy",
"avatar_url": "https://avatars.githubusercontent.com/u/34004152?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SangbumChoi",
"html_url": "https://github.com/SangbumChoi",
"followers_url": "https://api.github.com/users/SangbumChoi/followers",
"following_url": "https://api.github.com/users/SangbumChoi/following{/other_user}",
"gists_url": "https://api.github.com/users/SangbumChoi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SangbumChoi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SangbumChoi/subscriptions",
"organizations_url": "https://api.github.com/users/SangbumChoi/orgs",
"repos_url": "https://api.github.com/users/SangbumChoi/repos",
"events_url": "https://api.github.com/users/SangbumChoi/events{/privacy}",
"received_events_url": "https://api.github.com/users/SangbumChoi/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Looking good @SangbumChoi! Let us know when the PR is ready for review 🤗 "
] | 1,708 | 1,708 | null | CONTRIBUTOR | null | # What does this PR do?
This is the new model for RTDETR that is complete version from https://github.com/huggingface/transformers/pull/27247
There are several TO DOs
- [X] reslove conflicts
- [ ] weight files for other 7 RTDETR
- [ ] Edit testing script
- [ ] (optional) enable training
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [X] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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.
- [X] 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).
- [X] 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 @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
@amyeroberts @NielsRogge | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29077/reactions",
"total_count": 1,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 1,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29077/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29077",
"html_url": "https://github.com/huggingface/transformers/pull/29077",
"diff_url": "https://github.com/huggingface/transformers/pull/29077.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29077.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29076 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29076/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29076/comments | https://api.github.com/repos/huggingface/transformers/issues/29076/events | https://github.com/huggingface/transformers/issues/29076 | 2,139,855,433 | I_kwDOCUB6oc5_i5pJ | 29,076 | RingAttention Support | {
"login": "Hambaobao",
"id": 48345096,
"node_id": "MDQ6VXNlcjQ4MzQ1MDk2",
"avatar_url": "https://avatars.githubusercontent.com/u/48345096?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Hambaobao",
"html_url": "https://github.com/Hambaobao",
"followers_url": "https://api.github.com/users/Hambaobao/followers",
"following_url": "https://api.github.com/users/Hambaobao/following{/other_user}",
"gists_url": "https://api.github.com/users/Hambaobao/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Hambaobao/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Hambaobao/subscriptions",
"organizations_url": "https://api.github.com/users/Hambaobao/orgs",
"repos_url": "https://api.github.com/users/Hambaobao/repos",
"events_url": "https://api.github.com/users/Hambaobao/events{/privacy}",
"received_events_url": "https://api.github.com/users/Hambaobao/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 2648621985,
"node_id": "MDU6TGFiZWwyNjQ4NjIxOTg1",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Feature%20request",
"name": "Feature request",
"color": "FBCA04",
"default": false,
"description": "Request for a new feature"
}
] | open | false | null | [] | [] | 1,708 | 1,708 | null | NONE | null | ### Feature request
Hello,
I would like to inquire about the potential inclusion of [RingAttention](https://github.com/lhao499/ring-attention) in `Transformers`, which could enable training with longer sequences.
### Motivation
The incorporation of `RingAttention` would significantly enhance the capabilities for users engaged in advanced projects involving `LLMs` and `LMMs`. I believe this feature would make `Transformers` even more versatile and valuable for the research and development community.
### Your contribution
References:
- [RingAttention](https://github.com/lhao499/ring-attention)
- [LWM](https://github.com/LargeWorldModel/LWM) | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29076/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29076/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29075 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29075/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29075/comments | https://api.github.com/repos/huggingface/transformers/issues/29075/events | https://github.com/huggingface/transformers/issues/29075 | 2,139,821,427 | I_kwDOCUB6oc5_ixVz | 29,075 | Inputs left-padded passed to Instruct-Mistral-7B, with FlashAttention-2, causes garbage outputs for the padded sequences | {
"login": "millicentli",
"id": 20379204,
"node_id": "MDQ6VXNlcjIwMzc5MjA0",
"avatar_url": "https://avatars.githubusercontent.com/u/20379204?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/millicentli",
"html_url": "https://github.com/millicentli",
"followers_url": "https://api.github.com/users/millicentli/followers",
"following_url": "https://api.github.com/users/millicentli/following{/other_user}",
"gists_url": "https://api.github.com/users/millicentli/gists{/gist_id}",
"starred_url": "https://api.github.com/users/millicentli/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/millicentli/subscriptions",
"organizations_url": "https://api.github.com/users/millicentli/orgs",
"repos_url": "https://api.github.com/users/millicentli/repos",
"events_url": "https://api.github.com/users/millicentli/events{/privacy}",
"received_events_url": "https://api.github.com/users/millicentli/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"Update: so downgrading to `transformers`: 4.34.0 fixed this issue. See: https://discuss.huggingface.co/t/fine-tuned-mistral-7b-inference-issue-for-4k-context-length-token-with-transformer-4-35/65295\r\n\r\nThis is still a problem though with the `transformers` version noted though, so would like a fix if possible ... | 1,708 | 1,708 | null | NONE | null | ### System Info
transformers version: 4.36.2
Pytorch version: 2.2.0
Platform: Rocky Linux release 8.8 (Green Obsidian), 4.18.0-477.27.1.el8_8.x86_64
Python version: Python 3.9.18
Accelerate version: 0.26.1
FlashAttention-2 version: 2.5.3
### Who can help?
@ArthurZucker, @younesbelkada
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [x] My own task or dataset (give details below)
### Reproduction
Inference on Mistral-7B seems to vary wildly with padding when using FlashAttention-2, versus having no padding with FlashAttention-2.
The behavior for inference with FA-2 seems to be dependent on the complexity of the task -- in my case, I'm doing multi-document summarization, and my example is a multi-document example. I didn't try too hard to find a simpler example because a simple input text didn't seem to exhibit the same issues.
In addition for the reproduction, I've included the text I use (the examples below will take in the text for debugging).
[text.txt](https://github.com/huggingface/transformers/files/14317626/text.txt)
Example (minimal reproduction):
With FlashAttention-2
```
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
model_name = "mistralai/Mistral-7B-Instruct-v0.1"
torch_dtype = torch.bfloat16
tokenizer_kwargs = {
"add_bos_token": False,
"add_eos_token": False,
"padding_side": "left"
}
config = AutoConfig.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
config=config,
torch_dtype=torch_dtype,
low_cpu_mem_usage=True,
attn_implementation="flash_attention_2",
device_map="balanced"
)
tokenizer = AutoTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
tokenizer.pad_token_id = tokenizer.eos_token_id
tokenizer.sep_token = "[END DOCUMENT]"
f = open("text.txt", "r")
inputs = f.readlines()
inputs = tokenizer(inputs, return_tensors="pt")
# Find indices where = 2
pad_indices = (inputs['input_ids'] == 2).nonzero()
inputs['attention_mask'][:, pad_indices] = 0
inputs = {k: inputs[k].cuda() for k in inputs}
outputs = model.generate(
**inputs,
num_beams=2,
no_repeat_ngram_size=3,
max_new_tokens=256,
pad_token_id=tokenizer.pad_token_id
)
print(tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:][0].reshape(1, -1)))
```
The output:
> ['The</s>']
Without FlashAttention-2
```
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, AutoConfig
model_name = "mistralai/Mistral-7B-Instruct-v0.1"
torch_dtype = torch.bfloat16
tokenizer_kwargs = {
"add_bos_token": False,
"add_eos_token": False,
"padding_side": "left"
}
config = AutoConfig.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
config=config,
torch_dtype=torch_dtype,
low_cpu_mem_usage=True,
device_map="balanced"
)
tokenizer = AutoTokenizer.from_pretrained(model_name, **tokenizer_kwargs)
tokenizer.pad_token_id = tokenizer.eos_token_id
tokenizer.sep_token = "[END DOCUMENT]"
f = open("text.txt", "r")
inputs = f.readlines()
inputs = tokenizer(inputs, return_tensors="pt")
# Find indices where = 2
pad_indices = (inputs['input_ids'] == 2).nonzero()
inputs['attention_mask'][:, pad_indices] = 0
inputs = {k: inputs[k].cuda() for k in inputs}
outputs = model.generate(
**inputs,
num_beams=2,
no_repeat_ngram_size=3,
max_new_tokens=256,
pad_token_id=tokenizer.pad_token_id
)
print(tokenizer.batch_decode(outputs[:, inputs['input_ids'].shape[1]:][0].reshape(1, -1)))
```
The output:
> ['The above documents discuss various studies and research related to the effects of breast- feeding on the health and development of newborn babies. Some studies suggest that breast- fed babies have a lower risk of certain health problems, such as infections and allergies, while others find no significant differences between breast- and formula-fed babies.\n\nOne study found that exclusive breast -feeding for at least six months was associated with a reduced risk of SIDS (Sudden Infant Death Syndrome) in infants aged 6-12 months. Another study found no significant association between breast - feeding and SIDS risk in infancy, but did find that breast - fed babies had a lower incidence and severity of respitory infections in the early months of life compared to formula- fed infancy.\nIn addition, some studies have found that breast feeding may have a positive effect on the cognitive and emotional development of babies. For example, one study found a positive correlation between breast feeding duration and cognitive development in infancies.\nOverall, the evidence suggests that breastfeeds is beneficial for newborn health and well-being, but more research is needed to fully understand the effects and to identify the optimal duration and frequency of feeding for different babies']
Discovered this issue by debugging and removing the padding from the beginning of the sequence; if the padding is gone from the beginning of the sequence, then the behavior w/ and w/o FA-2 is similar. Other attempts at debugging: upgraded FA-2 version to the latest, and torch version to 2.2.0, but neither solution fixed the problem. Did the Pytorch upgrade because of https://github.com/pytorch/pytorch/issues/112577 but this didn't seem to be the problem. Also upgraded transformers to be 4.37.2 and it was still a problem there.
### Expected behavior
The behavior for inference with FA-2 should be similar as inference without FA-2, but it's wildly different. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29075/reactions",
"total_count": 1,
"+1": 1,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29075/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29074 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29074/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29074/comments | https://api.github.com/repos/huggingface/transformers/issues/29074/events | https://github.com/huggingface/transformers/issues/29074 | 2,139,812,888 | I_kwDOCUB6oc5_ivQY | 29,074 | NotImplementedError | {
"login": "vincent507cpu",
"id": 29680509,
"node_id": "MDQ6VXNlcjI5NjgwNTA5",
"avatar_url": "https://avatars.githubusercontent.com/u/29680509?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vincent507cpu",
"html_url": "https://github.com/vincent507cpu",
"followers_url": "https://api.github.com/users/vincent507cpu/followers",
"following_url": "https://api.github.com/users/vincent507cpu/following{/other_user}",
"gists_url": "https://api.github.com/users/vincent507cpu/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vincent507cpu/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vincent507cpu/subscriptions",
"organizations_url": "https://api.github.com/users/vincent507cpu/orgs",
"repos_url": "https://api.github.com/users/vincent507cpu/repos",
"events_url": "https://api.github.com/users/vincent507cpu/events{/privacy}",
"received_events_url": "https://api.github.com/users/vincent507cpu/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [] | 1,708 | 1,708 | 1,708 | NONE | null | ### System Info
I was trying to run **https://github.com/dvlab-research/LongLoRA/blob/main/fine-tune.py**, but I first encountered `ValueError: Tokenizer class ChatGLMTokenizer does not exist or is not currently imported.` (it's been solved by switching line 135 and line 141 snippests). Then I had a new error (please see below).
Could anyone help me? Thanks a lot!
### Who can help?
_No response_
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
`python fine-tune.py --output_dir ./output_models/chatglm3-6b-32k`
### Expected behavior
```
/home/zwj/GitHub/LongLoRA-main/llama_attn_replace.py:464: UserWarning: Flash attention is only supported on A100 or H100 GPU during training due to head dim > 64 backward.ref: https://github.com/HazyResearch/flash-attention/issues/190#issuecomment-1523359593
warnings.warn(
Loading checkpoint shards: 100%|█████████████████████████████████████████████| 7/7 [00:02<00:00, 3.38it/s]
Traceback (most recent call last):
File "/home/zwj/GitHub/LongLoRA-main/fine-tune.py", line 217, in <module>
train()
File "/home/zwj/GitHub/LongLoRA-main/fine-tune.py", line 165, in train
smart_tokenizer_and_embedding_resize(
File "/home/zwj/GitHub/LongLoRA-main/fine-tune.py", line 81, in smart_tokenizer_and_embedding_resize
model.resize_token_embeddings(len(tokenizer))
File "/home/zwj/miniconda3/envs/longlora/lib/python3.11/site-packages/transformers/modeling_utils.py", line 1811, in resize_token_embeddings
model_embeds = self._resize_token_embeddings(new_num_tokens, pad_to_multiple_of)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zwj/miniconda3/envs/longlora/lib/python3.11/site-packages/transformers/modeling_utils.py", line 1832, in _resize_token_embeddings
self.set_input_embeddings(new_embeddings)
File "/home/zwj/miniconda3/envs/longlora/lib/python3.11/site-packages/transformers/modeling_utils.py", line 1610, in set_input_embeddings
base_model.set_input_embeddings(value)
File "/home/zwj/miniconda3/envs/longlora/lib/python3.11/site-packages/transformers/modeling_utils.py", line 1612, in set_input_embeddings
raise NotImplementedError
NotImplementedError
``` | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29074/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29074/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29073 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29073/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29073/comments | https://api.github.com/repos/huggingface/transformers/issues/29073/events | https://github.com/huggingface/transformers/pull/29073 | 2,139,700,801 | PR_kwDOCUB6oc5nJX8g | 29,073 | Bump cryptography from 42.0.0 to 42.0.2 in /examples/research_projects/decision_transformer | {
"login": "dependabot[bot]",
"id": 49699333,
"node_id": "MDM6Qm90NDk2OTkzMzM=",
"avatar_url": "https://avatars.githubusercontent.com/in/29110?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/dependabot%5Bbot%5D",
"html_url": "https://github.com/apps/dependabot",
"followers_url": "https://api.github.com/users/dependabot%5Bbot%5D/followers",
"following_url": "https://api.github.com/users/dependabot%5Bbot%5D/following{/other_user}",
"gists_url": "https://api.github.com/users/dependabot%5Bbot%5D/gists{/gist_id}",
"starred_url": "https://api.github.com/users/dependabot%5Bbot%5D/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/dependabot%5Bbot%5D/subscriptions",
"organizations_url": "https://api.github.com/users/dependabot%5Bbot%5D/orgs",
"repos_url": "https://api.github.com/users/dependabot%5Bbot%5D/repos",
"events_url": "https://api.github.com/users/dependabot%5Bbot%5D/events{/privacy}",
"received_events_url": "https://api.github.com/users/dependabot%5Bbot%5D/received_events",
"type": "Bot",
"site_admin": false
} | [
{
"id": 1905493434,
"node_id": "MDU6TGFiZWwxOTA1NDkzNDM0",
"url": "https://api.github.com/repos/huggingface/transformers/labels/dependencies",
"name": "dependencies",
"color": "0366d6",
"default": false,
"description": "Pull requests that update a dependency file"
},
{
"id": 6410... | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29073). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"OK, I won't notify you again about this release, but will get in touch when a new ... | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | Bumps [cryptography](https://github.com/pyca/cryptography) from 42.0.0 to 42.0.2.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst">cryptography's changelog</a>.</em></p>
<blockquote>
<p>42.0.2 - 2024-01-30</p>
<pre><code>
* Updated Windows, macOS, and Linux wheels to be compiled with OpenSSL 3.2.1.
* Fixed an issue that prevented the use of Python buffer protocol objects in
``sign`` and ``verify`` methods on asymmetric keys.
* Fixed an issue with incorrect keyword-argument naming with ``EllipticCurvePrivateKey``
:meth:`~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey.exchange`,
``X25519PrivateKey``
:meth:`~cryptography.hazmat.primitives.asymmetric.x25519.X25519PrivateKey.exchange`,
``X448PrivateKey``
:meth:`~cryptography.hazmat.primitives.asymmetric.x448.X448PrivateKey.exchange`,
and ``DHPrivateKey``
:meth:`~cryptography.hazmat.primitives.asymmetric.dh.DHPrivateKey.exchange`.
<p>.. _v42-0-1:</p>
<p>42.0.1 - 2024-01-24
</code></pre></p>
<ul>
<li>Fixed an issue with incorrect keyword-argument naming with <code>EllipticCurvePrivateKey</code>
:meth:<code>~cryptography.hazmat.primitives.asymmetric.ec.EllipticCurvePrivateKey.sign</code>.</li>
<li>Resolved compatibility issue with loading certain RSA public keys in
:func:<code>~cryptography.hazmat.primitives.serialization.load_pem_public_key</code>.</li>
</ul>
<p>.. _v42-0-0:</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/pyca/cryptography/commit/2202123b50de1b8788f909a3e5afe350c56ad81e"><code>2202123</code></a> changelog and version bump 42.0.2 (<a href="https://redirect.github.com/pyca/cryptography/issues/10268">#10268</a>)</li>
<li><a href="https://github.com/pyca/cryptography/commit/f7032bdd409838f67fc2b93343f897fb5f397d80"><code>f7032bd</code></a> bump openssl in CI (<a href="https://redirect.github.com/pyca/cryptography/issues/10298">#10298</a>) (<a href="https://redirect.github.com/pyca/cryptography/issues/10299">#10299</a>)</li>
<li><a href="https://github.com/pyca/cryptography/commit/002e886f16d8857151c09b11dc86b35f2ac9aec3"><code>002e886</code></a> Fixes <a href="https://redirect.github.com/pyca/cryptography/issues/10294">#10294</a> -- correct accidental change to exchange kwarg (<a href="https://redirect.github.com/pyca/cryptography/issues/10295">#10295</a>) (<a href="https://redirect.github.com/pyca/cryptography/issues/10296">#10296</a>)</li>
<li><a href="https://github.com/pyca/cryptography/commit/92fa9f2f606caea5d499c825e832be5bac6f0c23"><code>92fa9f2</code></a> support bytes-like consistently across our asym sign/verify APIs (<a href="https://redirect.github.com/pyca/cryptography/issues/10260">#10260</a>) (<a href="https://redirect.github.com/pyca/cryptography/issues/1">#1</a>...</li>
<li><a href="https://github.com/pyca/cryptography/commit/6478f7e28be54b51931277235de01b249ceabd96"><code>6478f7e</code></a> explicitly support bytes-like for signature/data in RSA sign/verify (<a href="https://redirect.github.com/pyca/cryptography/issues/10259">#10259</a>) ...</li>
<li><a href="https://github.com/pyca/cryptography/commit/4bb8596ae02d95bb054dbcf55e8771379dbe0c19"><code>4bb8596</code></a> fix the release script (<a href="https://redirect.github.com/pyca/cryptography/issues/10233">#10233</a>) (<a href="https://redirect.github.com/pyca/cryptography/issues/10254">#10254</a>)</li>
<li><a href="https://github.com/pyca/cryptography/commit/337437dc2e62772bde4ad5544f4b1db9ee7572d9"><code>337437d</code></a> 42.0.1 bump (<a href="https://redirect.github.com/pyca/cryptography/issues/10252">#10252</a>)</li>
<li><a href="https://github.com/pyca/cryptography/commit/56255de6b2d1a2d2e502b0275231ca81907f33f1"><code>56255de</code></a> allow SPKI RSA keys to be parsed even if they have an incorrect delimiter (<a href="https://redirect.github.com/pyca/cryptography/issues/1">#1</a>...</li>
<li><a href="https://github.com/pyca/cryptography/commit/12f038b38af76e36efe8cef09597010c97647e8f"><code>12f038b</code></a> fixes <a href="https://redirect.github.com/pyca/cryptography/issues/10237">#10237</a> -- correct EC sign parameter name (<a href="https://redirect.github.com/pyca/cryptography/issues/10239">#10239</a>) (<a href="https://redirect.github.com/pyca/cryptography/issues/10240">#10240</a>)</li>
<li>See full diff in <a href="https://github.com/pyca/cryptography/compare/42.0.0...42.0.2">compare view</a></li>
</ul>
</details>
<br />
<details>
<summary>Most Recent Ignore Conditions Applied to This Pull Request</summary>
| Dependency Name | Ignore Conditions |
| --- | --- |
| cryptography | [< 42, > 41.0.2] |
</details>
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/huggingface/transformers/network/alerts).
</details> | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29073/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29073/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29073",
"html_url": "https://github.com/huggingface/transformers/pull/29073",
"diff_url": "https://github.com/huggingface/transformers/pull/29073.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29073.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29072 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29072/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29072/comments | https://api.github.com/repos/huggingface/transformers/issues/29072/events | https://github.com/huggingface/transformers/pull/29072 | 2,139,666,847 | PR_kwDOCUB6oc5nJQGo | 29,072 | Fix a typo in `examples/pytorch/text-classification/run_classification.py` | {
"login": "Ja1Zhou",
"id": 50169346,
"node_id": "MDQ6VXNlcjUwMTY5MzQ2",
"avatar_url": "https://avatars.githubusercontent.com/u/50169346?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Ja1Zhou",
"html_url": "https://github.com/Ja1Zhou",
"followers_url": "https://api.github.com/users/Ja1Zhou/followers",
"following_url": "https://api.github.com/users/Ja1Zhou/following{/other_user}",
"gists_url": "https://api.github.com/users/Ja1Zhou/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Ja1Zhou/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Ja1Zhou/subscriptions",
"organizations_url": "https://api.github.com/users/Ja1Zhou/orgs",
"repos_url": "https://api.github.com/users/Ja1Zhou/repos",
"events_url": "https://api.github.com/users/Ja1Zhou/events{/privacy}",
"received_events_url": "https://api.github.com/users/Ja1Zhou/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29072). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | Hi there, this commit fixes a tiny typo in the provided pytorch text classification pipeline. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29072/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29072/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29072",
"html_url": "https://github.com/huggingface/transformers/pull/29072",
"diff_url": "https://github.com/huggingface/transformers/pull/29072.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29072.patch",
"merged_at": 1708347676000
} |
https://api.github.com/repos/huggingface/transformers/issues/29071 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29071/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29071/comments | https://api.github.com/repos/huggingface/transformers/issues/29071/events | https://github.com/huggingface/transformers/pull/29071 | 2,139,637,479 | PR_kwDOCUB6oc5nJJty | 29,071 | Typo in `modeling_clip.ClipVisionTransformer` | {
"login": "AdityaKane2001",
"id": 64411306,
"node_id": "MDQ6VXNlcjY0NDExMzA2",
"avatar_url": "https://avatars.githubusercontent.com/u/64411306?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/AdityaKane2001",
"html_url": "https://github.com/AdityaKane2001",
"followers_url": "https://api.github.com/users/AdityaKane2001/followers",
"following_url": "https://api.github.com/users/AdityaKane2001/following{/other_user}",
"gists_url": "https://api.github.com/users/AdityaKane2001/gists{/gist_id}",
"starred_url": "https://api.github.com/users/AdityaKane2001/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/AdityaKane2001/subscriptions",
"organizations_url": "https://api.github.com/users/AdityaKane2001/orgs",
"repos_url": "https://api.github.com/users/AdityaKane2001/repos",
"events_url": "https://api.github.com/users/AdityaKane2001/events{/privacy}",
"received_events_url": "https://api.github.com/users/AdityaKane2001/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"@amyeroberts \r\n\r\nYes, I realized that when I tried to incorporate the change in my fork. Maybe the maintainers might have to do this, but what would be a solution in this case? Apart from the brute-force one, i.e. changing names in _all_ hosted clip weights.\r\n\r\n",
"Maybe overloading a try-catch mechanism... | 1,708 | 1,708 | null | CONTRIBUTOR | null | Fixed a typo in `modeling_clip.py`. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29071/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29071/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29071",
"html_url": "https://github.com/huggingface/transformers/pull/29071",
"diff_url": "https://github.com/huggingface/transformers/pull/29071.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29071.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29070 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29070/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29070/comments | https://api.github.com/repos/huggingface/transformers/issues/29070/events | https://github.com/huggingface/transformers/pull/29070 | 2,139,577,470 | PR_kwDOCUB6oc5nI8e4 | 29,070 | Add support for fine-tuning CLIP-like models using contrastive-image-text example | {
"login": "tjs-intel",
"id": 74561858,
"node_id": "MDQ6VXNlcjc0NTYxODU4",
"avatar_url": "https://avatars.githubusercontent.com/u/74561858?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/tjs-intel",
"html_url": "https://github.com/tjs-intel",
"followers_url": "https://api.github.com/users/tjs-intel/followers",
"following_url": "https://api.github.com/users/tjs-intel/following{/other_user}",
"gists_url": "https://api.github.com/users/tjs-intel/gists{/gist_id}",
"starred_url": "https://api.github.com/users/tjs-intel/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/tjs-intel/subscriptions",
"organizations_url": "https://api.github.com/users/tjs-intel/orgs",
"repos_url": "https://api.github.com/users/tjs-intel/repos",
"events_url": "https://api.github.com/users/tjs-intel/events{/privacy}",
"received_events_url": "https://api.github.com/users/tjs-intel/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"Fixing up this PR as per the contributor guidelines now",
"Happy to receive suggestions for any test candidates",
"This has been manually tested by replacing `openai/clip-vit-base-patch32` in the contrastive-image-text example with the following models:\r\n\r\n```\r\n\tOFA-Sys/chinese-clip-vit-base-patch16\r\n... | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
The example [contrastive-image-text](https://github.com/huggingface/transformers/blob/f497f56/examples/pytorch/contrastive-image-text/README.md) works for fine-tuning models that have the `model_type` "clip", but for other models like "chinese_clip" and "siglip" the `VisionTextDualEncoderConfig` class is too specific to CLIP models.
This PR adds support for [Chinese-CLIP](https://huggingface.co/docs/transformers/en/model_doc/chinese_clip) and [SigLIP](https://huggingface.co/docs/transformers/en/model_doc/siglip) vision models to be fine-tuned with the contrastive-image-text example.
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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?
@amyeroberts @patil-suraj @patrickvonplaten
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29070/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29070/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29070",
"html_url": "https://github.com/huggingface/transformers/pull/29070",
"diff_url": "https://github.com/huggingface/transformers/pull/29070.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29070.patch",
"merged_at": 1708430912000
} |
https://api.github.com/repos/huggingface/transformers/issues/29069 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29069/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29069/comments | https://api.github.com/repos/huggingface/transformers/issues/29069/events | https://github.com/huggingface/transformers/issues/29069 | 2,139,529,715 | I_kwDOCUB6oc5_hqHz | 29,069 | is_vision_availble() is slow and called a lot | {
"login": "collosi",
"id": 138069,
"node_id": "MDQ6VXNlcjEzODA2OQ==",
"avatar_url": "https://avatars.githubusercontent.com/u/138069?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/collosi",
"html_url": "https://github.com/collosi",
"followers_url": "https://api.github.com/users/collosi/followers",
"following_url": "https://api.github.com/users/collosi/following{/other_user}",
"gists_url": "https://api.github.com/users/collosi/gists{/gist_id}",
"starred_url": "https://api.github.com/users/collosi/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/collosi/subscriptions",
"organizations_url": "https://api.github.com/users/collosi/orgs",
"repos_url": "https://api.github.com/users/collosi/repos",
"events_url": "https://api.github.com/users/collosi/events{/privacy}",
"received_events_url": "https://api.github.com/users/collosi/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 2648621985,
"node_id": "MDU6TGFiZWwyNjQ4NjIxOTg1",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Feature%20request",
"name": "Feature request",
"color": "FBCA04",
"default": false,
"description": "Request for a new feature"
},
{
"id": 5769473378,
... | open | false | null | [] | [
"@collosi can you share a minimal code snippet to reproduce your issue?"
] | 1,708 | 1,708 | null | NONE | null | ### Feature request
Memoize the result of `is_vision_availble()`, because it depends on installed packages which are unlikely to change.
### Motivation
`is_vision_availble()` in import_utils.py is slow, in that it results in many calls to os.stat and os.list_dir, because it is checking import metadata. Because it is used in places like `is_valid_image()`, it can be called A LOT when trying to bootstrap an image dataset. For example in my use case of opening a PIL Image, and immediately transforming it with a transforms.Compose(), the calls to stat and list_dir account for more than half of the runtime.
### Your contribution
Sorry, I'm not a great python developer. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29069/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29069/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29068 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29068/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29068/comments | https://api.github.com/repos/huggingface/transformers/issues/29068/events | https://github.com/huggingface/transformers/issues/29068 | 2,139,498,780 | I_kwDOCUB6oc5_hikc | 29,068 | Add Support for Dataclasses to Trainer | {
"login": "ntenenz",
"id": 8411908,
"node_id": "MDQ6VXNlcjg0MTE5MDg=",
"avatar_url": "https://avatars.githubusercontent.com/u/8411908?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ntenenz",
"html_url": "https://github.com/ntenenz",
"followers_url": "https://api.github.com/users/ntenenz/followers",
"following_url": "https://api.github.com/users/ntenenz/following{/other_user}",
"gists_url": "https://api.github.com/users/ntenenz/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ntenenz/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ntenenz/subscriptions",
"organizations_url": "https://api.github.com/users/ntenenz/orgs",
"repos_url": "https://api.github.com/users/ntenenz/repos",
"events_url": "https://api.github.com/users/ntenenz/events{/privacy}",
"received_events_url": "https://api.github.com/users/ntenenz/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 2155169140,
"node_id": "MDU6TGFiZWwyMTU1MTY5MTQw",
"url": "https://api.github.com/repos/huggingface/transformers/labels/trainer",
"name": "trainer",
"color": "2ef289",
"default": false,
"description": ""
},
{
"id": 2648621985,
"node_id": "MDU6TGFiZWwyNjQ4NjIxOTg1",
... | open | false | null | [] | [
"cc @muellerzr "
] | 1,708 | 1,708 | null | NONE | null | ### Feature request
Update Trainer._prepare_input to natively support python dataclasses for support of more structured objects.
### Motivation
_prepare_input will seamlessly transfer the tensors contained in many datatypes (list, tuple, dict, etc.) to the appropriate device. However, it will not do so for dataclass objects.
Python dataclasses often provide better ergonomics than TypedDict, which is likely the closest supported alternative. Adding support appears to be a small change to the codebase with nice benefits to the user.
### Your contribution
If the PR is as simple as it initially appears, I would be willing to submit a PR. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29068/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29068/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29067 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29067/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29067/comments | https://api.github.com/repos/huggingface/transformers/issues/29067/events | https://github.com/huggingface/transformers/issues/29067 | 2,139,183,717 | I_kwDOCUB6oc5_gVpl | 29,067 | FalconAttention Doesn't use `alibi` when `alibi` is not None if `_use_sdpa==True` | {
"login": "SamanehSaadat",
"id": 1986164,
"node_id": "MDQ6VXNlcjE5ODYxNjQ=",
"avatar_url": "https://avatars.githubusercontent.com/u/1986164?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/SamanehSaadat",
"html_url": "https://github.com/SamanehSaadat",
"followers_url": "https://api.github.com/users/SamanehSaadat/followers",
"following_url": "https://api.github.com/users/SamanehSaadat/following{/other_user}",
"gists_url": "https://api.github.com/users/SamanehSaadat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/SamanehSaadat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/SamanehSaadat/subscriptions",
"organizations_url": "https://api.github.com/users/SamanehSaadat/orgs",
"repos_url": "https://api.github.com/users/SamanehSaadat/repos",
"events_url": "https://api.github.com/users/SamanehSaadat/events{/privacy}",
"received_events_url": "https://api.github.com/users/SamanehSaadat/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"HEy! Pretty sure that is because it's not supported in `sdpa` nor is `flash_attention`. We should / could raise an error however. ",
"Hi @SamanehSaadat thank you for the notice, please refer to: https://github.com/huggingface/transformers/blob/2f1003be86f11c8d97d7c2e6a7739dbb6fa795f2/src/transformers/models/falc... | 1,708 | 1,708 | 1,708 | NONE | null | ### System Info
- `transformers` version: 4.37.0.dev0
- Platform: Linux-6.5.13-1rodete2-amd64-x86_64
- Python version: 3.10.13
- Huggingface_hub version: 0.20.3
- Safetensors version: 0.4.2
- Accelerate version: not installed
- Accelerate config: not found
- PyTorch version (GPU?): 2.2.0+cu121 (False)
- Tensorflow version (GPU?): not installed (NA)
- Flax version (CPU?/GPU?/TPU?): not installed (NA)
- Jax version: not installed
- JaxLib version: not installed
- Using GPU in script?: <fill in>
- Using distributed or parallel set-up in script?: <fill in>
### Who can help?
@fxmarty
@ArthurZucker
@younesbelkada
### Information
- [ ] The official example scripts
- [ ] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction
I found this issue when I was reading the Falcon code:
[This else](https://github.com/huggingface/transformers/blob/main/src/transformers/models/falcon/modeling_falcon.py#L477-L526) is related to when `alibi is not None`:
* When `_use_sdpa==False`, `alibi` is added to `attention_scores` [here](https://github.com/huggingface/transformers/blob/main/src/transformers/models/falcon/modeling_falcon.py#L503)
* But when `_use_sdpa==True`, `alibi` hasn't been used anywhere in [this part of code](https://github.com/huggingface/transformers/blob/2f1003be86f11c8d97d7c2e6a7739dbb6fa795f2/src/transformers/models/falcon/modeling_falcon.py#L478-L490).
### Expected behavior
`alibi` should be used when `alibi` is not `None`. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29067/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29067/timeline | completed | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29066 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29066/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29066/comments | https://api.github.com/repos/huggingface/transformers/issues/29066/events | https://github.com/huggingface/transformers/pull/29066 | 2,139,025,735 | PR_kwDOCUB6oc5nHBPp | 29,066 | Bnb test fix for different hardwares | {
"login": "Titus-von-Koeller",
"id": 9048635,
"node_id": "MDQ6VXNlcjkwNDg2MzU=",
"avatar_url": "https://avatars.githubusercontent.com/u/9048635?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Titus-von-Koeller",
"html_url": "https://github.com/Titus-von-Koeller",
"followers_url": "https://api.github.com/users/Titus-von-Koeller/followers",
"following_url": "https://api.github.com/users/Titus-von-Koeller/following{/other_user}",
"gists_url": "https://api.github.com/users/Titus-von-Koeller/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Titus-von-Koeller/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Titus-von-Koeller/subscriptions",
"organizations_url": "https://api.github.com/users/Titus-von-Koeller/orgs",
"repos_url": "https://api.github.com/users/Titus-von-Koeller/repos",
"events_url": "https://api.github.com/users/Titus-von-Koeller/events{/privacy}",
"received_events_url": "https://api.github.com/users/Titus-von-Koeller/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | {
"login": "younesbelkada",
"id": 49240599,
"node_id": "MDQ6VXNlcjQ5MjQwNTk5",
"avatar_url": "https://avatars.githubusercontent.com/u/49240599?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/younesbelkada",
"html_url": "https://github.com/younesbelkada",
"followers_url": "https://api.github.com/users/younesbelkada/followers",
"following_url": "https://api.github.com/users/younesbelkada/following{/other_user}",
"gists_url": "https://api.github.com/users/younesbelkada/gists{/gist_id}",
"starred_url": "https://api.github.com/users/younesbelkada/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/younesbelkada/subscriptions",
"organizations_url": "https://api.github.com/users/younesbelkada/orgs",
"repos_url": "https://api.github.com/users/younesbelkada/repos",
"events_url": "https://api.github.com/users/younesbelkada/events{/privacy}",
"received_events_url": "https://api.github.com/users/younesbelkada/received_events",
"type": "User",
"site_admin": false
} | [
{
"login": "younesbelkada",
"id": 49240599,
"node_id": "MDQ6VXNlcjQ5MjQwNTk5",
"avatar_url": "https://avatars.githubusercontent.com/u/49240599?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/younesbelkada",
"html_url": "https://github.com/younesbelkada",
"followers_url"... | [
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29066). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"Could one of you please merge? I don't have permission to do so."
] | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | Just updating the acceptable generated text, as this is slightly different based on hardware from what I can tell. The first commit is based on what I observed on my dev VM with A10G and the second commit is based on what I saw [in the failing BNB integration pipeline](https://github.com/huggingface/peft/actions/runs/7925057159/job/21637597387#step:9:83).
In my eyes, both text strings seem similar enough. I already spoke about this with @younesbelkada regarding the first commit. The second seems a similar case. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29066/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29066/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29066",
"html_url": "https://github.com/huggingface/transformers/pull/29066",
"diff_url": "https://github.com/huggingface/transformers/pull/29066.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29066.patch",
"merged_at": 1708365885000
} |
https://api.github.com/repos/huggingface/transformers/issues/29065 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29065/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29065/comments | https://api.github.com/repos/huggingface/transformers/issues/29065/events | https://github.com/huggingface/transformers/pull/29065 | 2,139,009,551 | PR_kwDOCUB6oc5nG9pQ | 29,065 | Fix WhisperNoSpeechDetection when input is full silence | {
"login": "ylacombe",
"id": 52246514,
"node_id": "MDQ6VXNlcjUyMjQ2NTE0",
"avatar_url": "https://avatars.githubusercontent.com/u/52246514?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/ylacombe",
"html_url": "https://github.com/ylacombe",
"followers_url": "https://api.github.com/users/ylacombe/followers",
"following_url": "https://api.github.com/users/ylacombe/following{/other_user}",
"gists_url": "https://api.github.com/users/ylacombe/gists{/gist_id}",
"starred_url": "https://api.github.com/users/ylacombe/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/ylacombe/subscriptions",
"organizations_url": "https://api.github.com/users/ylacombe/orgs",
"repos_url": "https://api.github.com/users/ylacombe/repos",
"events_url": "https://api.github.com/users/ylacombe/events{/privacy}",
"received_events_url": "https://api.github.com/users/ylacombe/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"I want to add a test, but I realized most of the slow tests of Whisper were already failing, independently of this PR. \r\ncc @sanchit-gandhi ",
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29065). All of your documentation changes will be reflected on that endpoint.... | 1,708 | 1,708 | null | COLLABORATOR | null | # What does this PR do?
@cifkao found an edge case that happens when the input of Whisper.generate is a full silence. This is a simple tentative PR.
cc @sanchit-gandhi
<!-- Remove if not applicable -->
Fixes #29036
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29065/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29065/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29065",
"html_url": "https://github.com/huggingface/transformers/pull/29065",
"diff_url": "https://github.com/huggingface/transformers/pull/29065.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29065.patch",
"merged_at": null
} |
https://api.github.com/repos/huggingface/transformers/issues/29064 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29064/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29064/comments | https://api.github.com/repos/huggingface/transformers/issues/29064/events | https://github.com/huggingface/transformers/issues/29064 | 2,138,935,677 | I_kwDOCUB6oc5_fZF9 | 29,064 | Swapping `tqdm` to `rich` | {
"login": "alexge233",
"id": 6159747,
"node_id": "MDQ6VXNlcjYxNTk3NDc=",
"avatar_url": "https://avatars.githubusercontent.com/u/6159747?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/alexge233",
"html_url": "https://github.com/alexge233",
"followers_url": "https://api.github.com/users/alexge233/followers",
"following_url": "https://api.github.com/users/alexge233/following{/other_user}",
"gists_url": "https://api.github.com/users/alexge233/gists{/gist_id}",
"starred_url": "https://api.github.com/users/alexge233/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/alexge233/subscriptions",
"organizations_url": "https://api.github.com/users/alexge233/orgs",
"repos_url": "https://api.github.com/users/alexge233/repos",
"events_url": "https://api.github.com/users/alexge233/events{/privacy}",
"received_events_url": "https://api.github.com/users/alexge233/received_events",
"type": "User",
"site_admin": false
} | [
{
"id": 2648621985,
"node_id": "MDU6TGFiZWwyNjQ4NjIxOTg1",
"url": "https://api.github.com/repos/huggingface/transformers/labels/Feature%20request",
"name": "Feature request",
"color": "FBCA04",
"default": false,
"description": "Request for a new feature"
}
] | open | false | null | [] | [
"> I can see on github it's at `transformers/src/transformers/tokenization_utils_fast.py` and I can see in lines #790 and #791 that there's a further method `train_from_iterator` but at this point I can't find where the actual code is? Can anyone point me to the right direction?\r\n\r\n`train_from_iterator` is defi... | 1,708 | 1,708 | null | NONE | null | ### Feature request
Hi, for `AutoTokenizer.train_new_from_iterator` there's a hardcoded `tqdm` progress bar I want to swap to `rich` and I'm happy to PR it back.
I can see on github it's at `transformers/src/transformers/tokenization_utils_fast.py` and I can see in lines #790 and #791 that there's a further method `train_from_iterator` but at this point I can't find where the actual code is? Can anyone point me to the right direction?
Also, is there any reason to go against adding `rich` as a dependency?
Where are the `tqdm` specific bits of code, so I can go through them?
Thanks!
### Motivation
I'm not fond of `tqdm` it seems to create issues when used on AWS, SageMaker, etc. It's span is large and doesn't contain nearly enough information as `rich` can. I wanna start by going over `AutoTokenizer` because it's where I first spotted it.
### Your contribution
Slowly work through bits of code which rely on `tqdm` and add the option to swap for `rich` instead. | {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29064/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29064/timeline | null | null | null |
https://api.github.com/repos/huggingface/transformers/issues/29063 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29063/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29063/comments | https://api.github.com/repos/huggingface/transformers/issues/29063/events | https://github.com/huggingface/transformers/pull/29063 | 2,138,892,403 | PR_kwDOCUB6oc5nGj0m | 29,063 | Raise unused kwargs image processor | {
"login": "molbap",
"id": 39954772,
"node_id": "MDQ6VXNlcjM5OTU0Nzcy",
"avatar_url": "https://avatars.githubusercontent.com/u/39954772?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/molbap",
"html_url": "https://github.com/molbap",
"followers_url": "https://api.github.com/users/molbap/followers",
"following_url": "https://api.github.com/users/molbap/following{/other_user}",
"gists_url": "https://api.github.com/users/molbap/gists{/gist_id}",
"starred_url": "https://api.github.com/users/molbap/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/molbap/subscriptions",
"organizations_url": "https://api.github.com/users/molbap/orgs",
"repos_url": "https://api.github.com/users/molbap/repos",
"events_url": "https://api.github.com/users/molbap/events{/privacy}",
"received_events_url": "https://api.github.com/users/molbap/received_events",
"type": "User",
"site_admin": false
} | [] | closed | false | null | [] | [
"Finishing up draft, removing this validation functionality from #28711 ",
"The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_29063). All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.",
"Main ... | 1,708 | 1,708 | 1,708 | CONTRIBUTOR | null | # What does this PR do?
This PR captures all kwargs passed to an `ImageProcessor` `preprocess` method and compares them to what's expected, raising an exception or logging an informative message when a difference is found.
This will
1) Make preprocess methods more reliable
2) Inform users when an expected kwargs has no actual impact in the preprocessing
- [x] Did you write any new necessary tests?
## Who can review?
- vision models: @amyeroberts
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29063/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29063/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29063",
"html_url": "https://github.com/huggingface/transformers/pull/29063",
"diff_url": "https://github.com/huggingface/transformers/pull/29063.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29063.patch",
"merged_at": 1708442420000
} |
https://api.github.com/repos/huggingface/transformers/issues/29062 | https://api.github.com/repos/huggingface/transformers | https://api.github.com/repos/huggingface/transformers/issues/29062/labels{/name} | https://api.github.com/repos/huggingface/transformers/issues/29062/comments | https://api.github.com/repos/huggingface/transformers/issues/29062/events | https://github.com/huggingface/transformers/pull/29062 | 2,138,763,388 | PR_kwDOCUB6oc5nGHd6 | 29,062 | [WIP] Add FLMR model | {
"login": "LinWeizheDragon",
"id": 33350454,
"node_id": "MDQ6VXNlcjMzMzUwNDU0",
"avatar_url": "https://avatars.githubusercontent.com/u/33350454?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/LinWeizheDragon",
"html_url": "https://github.com/LinWeizheDragon",
"followers_url": "https://api.github.com/users/LinWeizheDragon/followers",
"following_url": "https://api.github.com/users/LinWeizheDragon/following{/other_user}",
"gists_url": "https://api.github.com/users/LinWeizheDragon/gists{/gist_id}",
"starred_url": "https://api.github.com/users/LinWeizheDragon/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/LinWeizheDragon/subscriptions",
"organizations_url": "https://api.github.com/users/LinWeizheDragon/orgs",
"repos_url": "https://api.github.com/users/LinWeizheDragon/repos",
"events_url": "https://api.github.com/users/LinWeizheDragon/events{/privacy}",
"received_events_url": "https://api.github.com/users/LinWeizheDragon/received_events",
"type": "User",
"site_admin": false
} | [] | open | false | null | [] | [
"@ArthurZucker\r\n@younesbelkada\r\n@amyeroberts\r\nCan anyone help me to finish this PR or assign someone knowledgeable? The whole process is a little complicated and I have no idea what to do next. Thanks!",
"Hello @LinWeizheDragon, could you update the readme to have links to the pretrained checkpoints, the or... | 1,708 | 1,708 | null | NONE | null | # What does this PR do?
<!--
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 -->
This PR aims to add a new model, Fine-grained Late-interaction Multi-modal Retriever (FLMR). The model was proposed in [here](https://openreview.net/forum?id=IWWWulAX7g) and [here](https://arxiv.org/abs/2402.08327). This PR contains the following content:
- Model class for both FLMR and PreFLMR.
- Example scripts to run indexing and inference with FLMR and PreFLMR.
The original code base of this work is at [here](https://github.com/linweizhedragon/retrieval-augmented-visual-question-answering). The pre-trained checkpoints are [here](https://huggingface.co/models?search=PreFLMR).
## Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [x] Did you read the [contributor guideline](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md#create-a-pull-request),
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.
- [x] 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).
- [x] 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.
@ArthurZucker
@younesbelkada
@amyeroberts
<!-- Your PR will be replied to more quickly if you can figure out the right person to tag with @
If you know how to use git blame, that is the easiest way, otherwise, here is a rough guide of **who to tag**.
Please tag fewer than 3 people.
Models:
- text models: @ArthurZucker and @younesbelkada
- vision models: @amyeroberts
- speech models: @sanchit-gandhi
- graph models: @clefourrier
Library:
- flax: @sanchit-gandhi
- generate: @gante
- pipelines: @Narsil
- tensorflow: @gante and @Rocketknight1
- tokenizers: @ArthurZucker
- trainer: @muellerzr and @pacman100
Integrations:
- deepspeed: HF Trainer/Accelerate: @pacman100
- ray/raytune: @richardliaw, @amogkam
- Big Model Inference: @SunMarc
- quantization (bitsandbytes, autogpt): @SunMarc and @younesbelkada
Documentation: @stevhliu and @MKhalusova
HF projects:
- accelerate: [different repo](https://github.com/huggingface/accelerate)
- datasets: [different repo](https://github.com/huggingface/datasets)
- diffusers: [different repo](https://github.com/huggingface/diffusers)
- rust tokenizers: [different repo](https://github.com/huggingface/tokenizers)
Maintained examples (not research project or legacy):
- Flax: @sanchit-gandhi
- PyTorch: See Models above and tag the person corresponding to the modality of the example.
- TensorFlow: @Rocketknight1
-->
| {
"url": "https://api.github.com/repos/huggingface/transformers/issues/29062/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} | https://api.github.com/repos/huggingface/transformers/issues/29062/timeline | null | false | {
"url": "https://api.github.com/repos/huggingface/transformers/pulls/29062",
"html_url": "https://github.com/huggingface/transformers/pull/29062",
"diff_url": "https://github.com/huggingface/transformers/pull/29062.diff",
"patch_url": "https://github.com/huggingface/transformers/pull/29062.patch",
"merged_at": null
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.