Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌐 [i18n-ZH] Translate chat_templating.md into Chinese #28790

Merged
merged 18 commits into from
Feb 26, 2024

Conversation

shibing624
Copy link
Contributor

What does this PR do?

Translate chat_templating.md into Chinese
part of #20095

Who can review?

Documentation: @stevhliu
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.

NielsRogge and others added 10 commits April 13, 2023 09:01
* Add model to doc tests

* Remove generate and replace by prepare_inputs_for_generation

* More fixes

* Remove print statements

* Update integration tests

* Fix generate

* Remove model from auto mapping

* Use auto processor

* Fix integration tests

* Fix test

* Add inference code snippet

* Remove is_encoder_decoder

* Update docs

* Remove notebook link
…ce#22750)

fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
# Conflicts:
#	README.md
#	examples/flax/question-answering/run_qa.py
#	examples/flax/text-classification/run_flax_glue.py
#	examples/flax/token-classification/run_flax_ner.py
#	examples/pytorch/audio-classification/run_audio_classification.py
#	examples/pytorch/contrastive-image-text/run_clip.py
#	examples/pytorch/image-classification/run_image_classification.py
#	examples/pytorch/image-classification/run_image_classification_no_trainer.py
#	examples/pytorch/image-pretraining/run_mae.py
#	examples/pytorch/image-pretraining/run_mim.py
#	examples/pytorch/language-modeling/run_clm.py
#	examples/pytorch/language-modeling/run_clm_no_trainer.py
#	examples/pytorch/language-modeling/run_mlm.py
#	examples/pytorch/language-modeling/run_mlm_no_trainer.py
#	examples/pytorch/language-modeling/run_plm.py
#	examples/pytorch/multiple-choice/run_swag.py
#	examples/pytorch/multiple-choice/run_swag_no_trainer.py
#	examples/pytorch/question-answering/run_qa.py
#	examples/pytorch/question-answering/run_qa_beam_search.py
#	examples/pytorch/question-answering/run_qa_beam_search_no_trainer.py
#	examples/pytorch/question-answering/run_qa_no_trainer.py
#	examples/pytorch/question-answering/run_seq2seq_qa.py
#	examples/pytorch/semantic-segmentation/run_semantic_segmentation.py
#	examples/pytorch/semantic-segmentation/run_semantic_segmentation_no_trainer.py
#	examples/pytorch/speech-recognition/run_speech_recognition_ctc.py
#	examples/pytorch/speech-recognition/run_speech_recognition_seq2seq.py
#	examples/pytorch/summarization/run_summarization.py
#	examples/pytorch/summarization/run_summarization_no_trainer.py
#	examples/pytorch/text-classification/run_glue.py
#	examples/pytorch/text-classification/run_glue_no_trainer.py
#	examples/pytorch/text-classification/run_xnli.py
#	examples/pytorch/token-classification/run_ner.py
#	examples/pytorch/token-classification/run_ner_no_trainer.py
#	examples/pytorch/translation/run_translation.py
#	examples/pytorch/translation/run_translation_no_trainer.py
#	examples/tensorflow/contrastive-image-text/run_clip.py
#	examples/tensorflow/image-classification/run_image_classification.py
#	examples/tensorflow/multiple-choice/run_swag.py
#	examples/tensorflow/question-answering/run_qa.py
#	examples/tensorflow/summarization/run_summarization.py
#	examples/tensorflow/text-classification/run_glue.py
#	examples/tensorflow/translation/run_translation.py
#	setup.py
#	src/transformers/__init__.py
#	src/transformers/models/pix2struct/modeling_pix2struct.py
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the translation! Aside from the broken links, it LGTM 🙂

I can't review the content itself because I'm not a native speaker. Do you know anyone else in the community who would be interested in contributing and reviewing your work? Pinging @yyLeaves @jiaqiw09 who have translated Chinese docs in the past if you're interested!

docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
```


如果您喜欢这个模板,下面是一行代码的模板形式,它可以直接复制到您的代码中。这一行代码还包括了[generation prompts](#什么是"generation prompts"?),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
如果您喜欢这个模板,下面是一行代码的模板形式,它可以直接复制到您的代码中。这一行代码还包括了[generation prompts](#什么是"generation prompts"?),
如果您喜欢这个模板,下面是一行代码的模板形式,它可以直接复制到您的代码中。这一行代码还包括了[generation prompts](#什么是generation-prompts)

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
@shibing624
Copy link
Contributor Author

@yyLeaves @jiaqiw09 @bojone @yuanzhoulvpi please help to reviewing the translate work.

Copy link
Contributor

@windsonsea windsonsea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding a space between English and Chinese, which would enhance the overall appearance.

docs/source/zh/_toctree.yml Outdated Show resolved Hide resolved
docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
docs/source/zh/chat_templating.md Outdated Show resolved Hide resolved
shibing624 and others added 7 commits February 24, 2024 13:03
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Copy link
Contributor Author

@shibing624 shibing624 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks,updated

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks everyone!

@stevhliu stevhliu merged commit 734eb25 into huggingface:main Feb 26, 2024
8 checks passed
itazap pushed a commit that referenced this pull request May 14, 2024
* [Pix2struct] Simplify generation (#22527)

* Add model to doc tests

* Remove generate and replace by prepare_inputs_for_generation

* More fixes

* Remove print statements

* Update integration tests

* Fix generate

* Remove model from auto mapping

* Use auto processor

* Fix integration tests

* Fix test

* Add inference code snippet

* Remove is_encoder_decoder

* Update docs

* Remove notebook link

* Release: v4.28.0

* Revert (for now) the change on `Deta` in #22437 (#22750)

fix

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>

* Patch release: v4.28.1

* update zh chat template.

* Update docs/source/zh/chat_templating.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Update docs/source/zh/_toctree.yml

Co-authored-by: Michael <haifeng.yao@daocloud.io>

* Update docs/source/zh/chat_templating.md

Co-authored-by: Michael <haifeng.yao@daocloud.io>

* Update docs/source/zh/chat_templating.md

Co-authored-by: Michael <haifeng.yao@daocloud.io>

* Update docs/source/zh/chat_templating.md

Co-authored-by: Michael <haifeng.yao@daocloud.io>

* Update docs/source/zh/chat_templating.md

Co-authored-by: Michael <haifeng.yao@daocloud.io>

* Update docs/source/zh/chat_templating.md

Co-authored-by: Michael <haifeng.yao@daocloud.io>

* Update docs/source/zh/chat_templating.md

Co-authored-by: Michael <haifeng.yao@daocloud.io>

---------

Co-authored-by: NielsRogge <48327001+NielsRogge@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <Sylvain.gugger@gmail.com>
Co-authored-by: Yih-Dar <2521628+ydshieh@users.noreply.github.com>
Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Michael <haifeng.yao@daocloud.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants