transformers/docs/source
Joao Gante 4bc723f87d
Generate: use GenerationConfig as the basis for .generate() parametrization (#20388)
* generate from config mvp

* fix failing tests

* max_time test

* Load default gen config at model load time; Update docs

* further documentation; add tests

* adapt rag to the new structure

* handle models not instantiated with from_pretained (like in tests)

* better default generation config

* add can_generate fn

* handle legacy use case of ad hoc model config changes

* initialize gen config from config in individual methods, if gen config is none

* fix _get_decoder_start_token_id when called outside GenerationMixin

* correct model config load order (set attr > model config > decoder config)

* update rag to match latest changes

* Apply suggestions from code review

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* load gen config from model config in model.from_pretrained

* fix can_generate fn

* handle generate calls without a previous from_pretrained (e.g. tests)

* add legacy behavior (and a warning)

* lower logger severity

Co-authored-by: Patrick von Platen <patrick.v.platen@gmail.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
2022-12-15 18:27:20 +00:00
..
de Convert tokenizer outputs for Keras in doc example (#20732) 2022-12-12 16:14:04 +00:00
en Generate: use GenerationConfig as the basis for .generate() parametrization (#20388) 2022-12-15 18:27:20 +00:00
es Spanish translation of the file debugging.mdx (#20566) 2022-12-12 10:38:56 -05:00
it [docs] set overflowing image width to auto-scale (#20197) 2022-11-15 01:13:40 +01:00
ko fix: "BigSicence" typo in docs (#20331) 2022-11-21 09:44:54 -05:00
pt [docs] set overflowing image width to auto-scale (#20197) 2022-11-15 01:13:40 +01:00
zh translate zh quicktour(#20095) (#20181) 2022-11-21 08:44:18 -05:00
_config.py Use doc builder styler (#16412) 2022-03-28 07:45:18 -04:00