noamaanMulla-03/transformers-issues huggingface dataset:
No checkpoint saved during training
Author: lxlxlxx
Pull request: no

### System Info

- `transformers` version: 4.10.0
- Platform: Windows-10-10.0.22000-SP0
- Python version: 3.9.0
- PyTorch version (GPU?): 1.13.1+cu116 (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
- [ ] 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

.

### Expected behavior

There is no checkpoint saved during the training.

My arguments are:
--do_train --train_file xxxxx  --output_dir xxxx --model_name_or_path bert-base-uncased --eval_steps 1 --num_train_epochs 5 --per_device_train_batch_size 24 --learning_rate 5e-5 --max_seq_length 16 --pooler_type cls --temp 0.05 --downscale_dim 64 --fp16 --num_hidden_layers 4 --keep_in_memory True --save_strategy "steps" --save_steps 20

Can anyone give me a hint on it? Many thanks for considering my request.

Comments:
Hi @lxlxlxx thanks for raising this issue. Could you share which script you're running e.g. `run_mlm.py`? 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.
Add FocalNet
Author: NielsRogge
Pull request: yes

# What does this PR do?

This PR adds FocalNet to the library.

To do:

- [x] remove print_values
- [x] Upload checkpoints
- [x] Update model cards
- [x] Update integration tests
- [x] Transfer checkpoints

Comments:
_The documentation is not available anymore as the PR was closed or merged._

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

CC @NielsRogge 

I cleaned up the config dependent arguments a bit, uploaded the models and edited the model cards. @amyeroberts @sgugger could you take another look?

FocalNet is the backbone of X-Decoder so it'd be great it to merge the PR soon.
[i18n-KO] Translated `accelerate.mdx` to Korean
Author: 0525hhgus
Pull request: yes

# What does this PR do?

Translated the `accelerate.mdx` 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] 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?

<!-- 제출 전 체크리스트로, 가짜연구소만의 체크리스트도 <details>로 감싸서 만들어두면 더 좋을 것 같아요. -->

## Who can review?
<!-- 가짜연구소 팀원들과 리뷰가 끝난 후에만 허깅페이스 직원들에게 리뷰 요청하는 아래 주석을 노출해주세요! -->
Team PseudoLab, may you please review this PR?

@0525hhgus, @KIHOON71, @sim-so, @gabrielwithappy, @HanNayeoniee, @wonhyeongseo, @jungnerd

May you please review this PR?
@sgugger, @ArthurZucker, @eunseojo


Comments:
_The documentation is not available anymore as the PR was closed or merged._

May you please review this PR?
@sgugger, @ArthurZucker, @eunseojo
Generate: Add exception path for Donut
Author: gante
Pull request: yes

# What does this PR do?

The multimodal generalization added in #22748 added a regression Donut -- Donut is never expecting a BOS token, having a task-specific token in its place.

This PR adds an exception code path to handle it. All related slow tests are now passing.

cc @NielsRogge 

Comments:
_The documentation is not available anymore as the PR was closed or merged._
Update tiny models and a few fixes
Author: ydshieh
Pull request: yes

# What does this PR do?

- Update tiny models, including:
  - Sam
  - BigCode
  - (recent) GPTNeoXForSequenceClassification
- Fix wrong condition introduced in my PR #22774 (it doesn't break things, but it will affect the creation of `pipeline_to_model_mapping` for new model types)
- Fix import in `test_pipelines_mask_generation.py`

2 fixes need @ArthurZucker .

Comments:
_The documentation is not available anymore as the PR was closed or merged._

The result of `Check Tiny Models / Check tiny models (push)` could be ignored.
Add an attribute to disable custom kernels in deformable detr in order to make the model ONNX exportable
Author: fxmarty
Pull request: yes

As per title and reported in https://github.com/huggingface/transformers/issues/22330 and https://github.com/huggingface/optimum/pull/931

This option will allow us to patch the model on the fly during the export to avoid going into the try/catch logic that is not supported by PyTorch ONNX export.

Comments:
_The documentation is not available anymore as the PR was closed or merged._

@fxmarty Following up on this, I agree with @sgugger's suggestion and think that a config argument would be a better alternative. 

Thank you will update!

@amyeroberts Let me know if this is better!
Raise error if `stride` is too high in `TokenClassificationPipeline`
Author: boyleconnor
Pull request: yes

# What does this PR do?

Users were previously not given a warning if they initialized a `TokenClassificationPipeline` with too high a value for `stride` (`stride` is the value that determines how many tokens overlap between chunks if the user choose to split text into chunks).

Unfortunately, it's also possible for a `stride` to be too high if the tokenizer happens to introduce special tokens (e.g. `bert-base-cased` has a maximum length of `512`, but each window gets `2` special tokens, so the highest valid `stride` is `509`) , but there's apparently no easy way to check this in advance (i.e. before the tokenizer is run as part of the pipeline). I think it might be worth fixing the error message ("`pyo3_runtime.PanicException: assertion failed: stride < max_len`") when a tokenizer is called with too high a value of `stride`, to clarify to users that added special tokens subtract from the effective window size.

I also thought it was worth clarifying slightly the function of the `stride` parameter. The way `stride` works in the context of Huggingface tokenizers is almost the opposite of the way it works in many [other contexts](https://www.kaggle.com/code/ryanholbrook/the-sliding-window/tutorial).

Mostly fixes #22789.


## 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).
- [ ] Did you write any new necessary tests?


## Who should review?

@Narsil 


Comments:
_The documentation is not available anymore as the PR was closed or merged._
Decorate `test_codegen_sample_max_time` as flaky
Author: ydshieh
Pull request: yes

# What does this PR do?

Decorate `test_codegen_sample_max_time` as flaky: it fails 0-5 times per month.

Comments:
_The documentation is not available anymore as the PR was closed or merged._

I agree! Probably we can use something like `@cached_property`: I see this but never use it myself so far.

OK. But can I keep `cache_proeprty` as in the current version (it at least avoids loading the checkpoint despite it is downloaded).
I see there are few modeling test files doing this.

If you really want to!
Prepare tests for hfh 0.14
Author: Wauplin
Pull request: yes

Related to the coming release of `huggingface_hub==0.14.0`. It will break some internal tests. The PR fixes these tests. The plan is to merge this PR right after the new release is made. This will not impact `transformers`'s end users. However, PR contributors will have to rebase their branch once this one is merged.

See related [discussion](https://huggingface.slack.com/archives/C02V5EA0A95/p1682337463368609?thread_ts=1681994202.635609&cid=C02V5EA0A95) (private slack).

cc @sgugger @ydshieh 

Comments:
_The documentation is not available anymore as the PR was closed or merged._
Small sam patch
Author: ArthurZucker
Pull request: yes

# What does this PR do?
Fixes #22904 . 
It is backward compatible and prevents having to modify any of the notebooks we shared

Comments:
_The documentation is not available anymore as the PR was closed or merged._

The docs for this PR live [here](https://moon-ci-docs.huggingface.co/docs/transformers/pr_22920). All of your documentation changes will be reflected on that endpoint.
'FlavaModelOutput' object has no attribute 'contrastive_logits_per_image'
Author: ans92
Pull request: no

Hi, I have used a code of Flava model from this link:
```
https://huggingface.co/docs/transformers/model_doc/flava#transformers.FlavaModel.forward.example
```
But I am getting the following error:
```
'FlavaModelOutput' object has no attribute 'contrastive_logits_per_image'
```
Could you please help me in solving the above question. Thank you.

Comments:
Hey @ans92! It seems there's an error in the documentation indeed. This code example works with the `FlavaForPreTraining` model, rather than the `FlavaModel.

Would you like to open a Pr to fix this?

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

I am experiencing this issue as well and the documentation shows it with the `FlavaModel`. 

There are also a large set of warnings when loading the `FlavaModel`, is this normal?

This issue needs re-opening 

Yes agreed, I just ran in the same issue and I also think it needs re-opening. Only following the doc here with `FlavaForPreTraining` works
https://huggingface.co/facebook/flava-full
not related summary
Author: aylix
Pull request: no

I passed a Text about the food industry in the model the summarization would be something about atoms and totally unrelated

Comments:
Hi @aylix, could you please follow the issue template, giving details about the model, your environment, a reproducible snippet, and the expected behaviour? 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.
trainer.push_to_hub(**kwargs) requires "git pull" first
Author: yzhou19
Pull request: no

### System Info

Hi,
I am using the Segformer, following the tutorial https://huggingface.co/blog/fine-tune-segformer
Everytime aftern training the conflict error will come after executing the code "trainer.push_to_hub(**kwargs)".
Error messages:
! [rejected]        main -> main (fetch first)
error: failed to push some refs to 'https://huggingface.co/yiming19/segformer-b0-finetuned-segments-construction-1'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

I could use git pull and git push manually to push model, but why will this error come or before push the model can execute git pull first? 
@sgugger 

Thanks.

### 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

kwargs = {
    "tags": ["vision", "image-segmentation"],
    "finetuned_from": pretrained_model_name,
    "dataset": hf_dataset_identifier,
}

feature_extractor.push_to_hub(hub_model_id)
trainer.push_to_hub(**kwargs)


### Expected behavior

I just follow the tutorial https://huggingface.co/blog/fine-tune-segformer
Should no error come.

Comments:
You either need to `--overwrite_output_dir` or make sure the `output_dir` you are using is a local clone of your repo that is up to date, yes.

Thanks to your fast reply. How could I change the code? Cause I donot want to pull and push in the terminal manually, want to 
 do "pull" firstly then "push" in the code example provided by the link.

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.
🌐 [i18n-KO] Translated `run_scripts.mdx` to Korean
Author: HanNayeoniee
Pull request: yes

<!-- PR의 제목은 "🌐 [i18n-KO] Translated `<your_file>.mdx` to Korean" 으로 부탁드립니당 -->
# What does this PR do?

Translated the `run_scripts.mdx` file of the documentation to Korean.
Thank you in advance for your review. 

Part of https://github.com/huggingface/transformers/issues/20179
<!-- 메인 이슈에 기록이 남아요! 가짜연구소 리포를 사용해 연습하실때는 제거해주시면 감사하겠습니다! :smile: -->

## 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?

<!-- 제출 전 체크리스트로, 가짜연구소만의 체크리스트도 <details>로 감싸서 만들어두면 더 좋을 것 같아요. -->

## Who can review?
<!-- 가짜연구소 팀원들과 리뷰가 끝난 후에만 허깅페이스 직원들에게 리뷰 요청하는 아래 주석을 노출해주세요! -->
<!-- @sgugger, @ArthurZucker, @eunseojo May you please review this PR? -->

Team PseudoLab, may you please review this PR?

@0525hhgus, @KIHOON71, @sim-so, @gabrielwithappy, @HanNayeoniee, @wonhyeongseo, @jungnerd

Comments:
_The documentation is not available anymore as the PR was closed or merged._
🌐 [i18n-KO] Translated `custom_models.mdx` to Korean
Author: HanNayeoniee
Pull request: yes

<!-- PR의 제목은 "🌐 [i18n-KO] Translated `<your_file>.mdx` to Korean" 으로 부탁드립니당 -->
# What does this PR do?

Translated the `custom_models.mdx` file of the documentation to Korean.
Thank you in advance for your review. 

Part of https://github.com/huggingface/transformers/issues/20179
<!-- 메인 이슈에 기록이 남아요! 가짜연구소 리포를 사용해 연습하실때는 제거해주시면 감사하겠습니다! :smile: -->

## 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?

<!-- 제출 전 체크리스트로, 가짜연구소만의 체크리스트도 <details>로 감싸서 만들어두면 더 좋을 것 같아요. -->

## Who can review?
<!-- 가짜연구소 팀원들과 리뷰가 끝난 후에만 허깅페이스 직원들에게 리뷰 요청하는 아래 주석을 노출해주세요! -->
<!-- @sgugger, @ArthurZucker, @eunseojo May you please review this PR? -->

Team PseudoLab, may you please review this PR?
@0525hhgus, @KIHOON71, @sim-so, @gabrielwithappy, @HanNayeoniee, @wonhyeongseo, @jungnerd

May you please review this PR?
@sgugger, @ArthurZucker, @eunseojo

Comments:
_The documentation is not available anymore as the PR was closed or merged._

I think we should discuss whether to translate `configuration` to 구성.
Since the configuration is the name of the class, I think it will be misunderstood when translated into Korean to understand that it is a class.

`configuration`이 class의 이름이기 때문에 한국어로 번역 시 class임을 이해하지 못하도록 오해할 것 같습니다.

> I think we should discuss whether to translate `configuration` to 구성. Since the configuration is the name of the class, I think it will be misunderstood when translated into Korean to understand that it is a class.
> 
> `configuration`이 class의 이름이기 때문에 한국어로 번역 시 class임을 이해하지 못하도록 오해할 것 같습니다.

저도 놓친 부분이네요. 클래스를 의미하는 부분은 `configuration`로, 클래스를 의미하지 않는 부분(본문에서 config라고 적힌 경우)은 `구성`으로 번역하는걸 검토해보겠습니다.

May you please review this PR?
@sgugger, @ArthurZucker, @eunseojo
🌐 [i18n-KO] Translated `tasks/masked_language_modeling.mdx` to Korean
Author: HanNayeoniee
Pull request: yes

<!-- PR의 제목은 "🌐 [i18n-KO] Translated `<your_file>.mdx` to Korean" 으로 부탁드립니당 -->
# What does this PR do?

Translated the `tasks/masked_language_modeling.mdx` file of the documentation to Korean.
Thank you in advance for your review. 

Part of https://github.com/huggingface/transformers/issues/20179
<!-- 메인 이슈에 기록이 남아요! 가짜연구소 리포를 사용해 연습하실때는 제거해주시면 감사하겠습니다! :smile: -->

## 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?

<!-- 제출 전 체크리스트로, 가짜연구소만의 체크리스트도 <details>로 감싸서 만들어두면 더 좋을 것 같아요. -->

## Who can review?
<!-- 가짜연구소 팀원들과 리뷰가 끝난 후에만 허깅페이스 직원들에게 리뷰 요청하는 아래 주석을 노출해주세요! -->
<!-- @sgugger, @ArthurZucker, @eunseojo May you please review this PR? -->

Team PseudoLab, may you please review this PR?
@0525hhgus, @KIHOON71, @sim-so, @gabrielwithappy, @HanNayeoniee, @wonhyeongseo, @jungnerd

May you please review this PR?
@sgugger, @ArthurZucker, @eunseojo

Comments:
_The documentation is not available anymore as the PR was closed or merged._
Contrastive Search does not work at all for Llama 7B
Author: Oxi84
Pull request: no

### System Info

latest transofrmers and everything, rtx 3090

### Who can help?

@ArthurZucker and @younesbelkada

### 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

@yxuansu 

I tried it with Llama 7B and results are very bad, it does not generate anything. Also i tried with T5 and results are very bad, but it is probably not intended to work with T5.


    import transformers
    import torch
    from transformers import AutoTokenizer,AutoModelForCausalLM,LlamaTokenizer  
    tokenizer = AutoTokenizer.from_pretrained("huggyllama/llama-7b")
    model = AutoModelForCausalLM.from_pretrained(
            "huggyllama/llama-7b",
            load_in_8bit=False,
            torch_dtype=torch.float16,
            device_map="auto",
        )

    input_ids = tokenizer.encode('I enjoy walking with my cute dog', return_tensors='pt').to("cuda")
    beam_output = model.generate(
    input_ids, 
    penalty_alpha=0.6, 
    top_k=4,
    max_length=100, 
    )

    print(tokenizer.decode(beam_output[0], skip_special_tokens=True))    

This generates just a dot.

    I enjoy walking with my cute dog.










### Expected behavior

It should generate text actually

Comments:
Actually it does work very well for text generation. It just does not generate anything with this prompt for some reason.

Thanks for investigating! 

As always thanks for hard work on implementing such cool thing as this one. I will share how much it helped, seem like it increases accuracy, but I will need to check much more examples to tell.
Typo in error message in LlamaAttention
Author: othertea
Pull request: no

There's a typo in the `ValueError`'s message on line 219: https://github.com/huggingface/transformers/blob/d04ec99bec8a0b432fc03ed60cea9a1a20ebaf3c/src/transformers/models/llama/modeling_llama.py#L217-L221
It should be `(bsz, self.num_heads, q_len, kv_seq_len)` as it is in line 217.

Comments:
@othertea, good spot! Would you like to open a PR to fix this? 

cc @ArthurZucker 

Yes, I've made a PR!