File size: 2,730 Bytes
17c6d62 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
<!--Copyright 2020 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
β οΈ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->
# λͺ¨λΈ
κΈ°λ³Έ ν΄λμ€ [`PreTrainedModel`], [`TFPreTrainedModel`], [`FlaxPreTrainedModel`]λ λ‘컬 νμΌκ³Ό λλ ν 리λ‘λΆν° λͺ¨λΈμ λ‘λνκ³ μ μ₯νκ±°λ λλ (νκΉ
νμ΄μ€ AWS S3 리ν¬μ§ν 리λ‘λΆν° λ€μ΄λ‘λλ) λΌμ΄λΈλ¬λ¦¬μμ μ 곡νλ μ¬μ νλ ¨λ λͺ¨λΈ μ€μ μ λ‘λνκ³ μ μ₯νλ κ²μ μ§μνλ κΈ°λ³Έ λ©μλλ₯Ό ꡬννμμ΅λλ€.
[`PreTrainedModel`]κ³Ό [`TFPreTrainedModel`]μ λν λͺ¨λ λͺ¨λΈλ€μ 곡ν΅μ μΌλ‘ μ§μνλ λ©μλ μ¬λ¬κ°λ₯Ό ꡬννμμ΅λλ€:
- μ ν ν°μ΄ λ¨μ΄μ₯μ μΆκ°λ λ, μ
λ ₯ ν ν° μλ² λ©μ ν¬κΈ°λ₯Ό μ‘°μ ν©λλ€.
- λͺ¨λΈμ μ΄ν
μ
ν€λλ₯Ό κ°μ§μΉκΈ°ν©λλ€.
κ° λͺ¨λΈμ 곡ν΅μΈ λ€λ₯Έ λ©μλλ€μ λ€μμ ν΄λμ€μμ μ μλ©λλ€.
- [`~modeling_utils.ModuleUtilsMixin`](νμ΄ν μΉ λͺ¨λΈμ©)
- ν
μ€νΈ μμ±μ μν [`~modeling_tf_utils.TFModuleUtilsMixin`](ν
μνλ‘ λͺ¨λΈμ©)
- [`~generation.GenerationMixin`](νμ΄ν μΉ λͺ¨λΈμ©)
- [`~generation.FlaxGenerationMixin`](Flax/JAX λͺ¨λΈμ©)
## PreTrainedModel
[[autodoc]] PreTrainedModel
- push_to_hub
- all
μ¬μ©μ μ μ λͺ¨λΈμ μ΄κ³ μ μ΄κΈ°ν(superfast init)κ° νΉμ λͺ¨λΈμ μ μ©λ μ μλμ§ μ¬λΆλ₯Ό κ²°μ νλ `_supports_assign_param_buffer`λ ν¬ν¨ν΄μΌ ν©λλ€.
`test_save_and_load_from_pretrained` μ€ν¨ μ, λͺ¨λΈμ΄ `_supports_assign_param_buffer`λ₯Ό νμλ‘ νλμ§ νμΈνμΈμ.
νμλ‘ νλ€λ©΄ `False`λ‘ μ€μ νμΈμ.
## ModuleUtilsMixin
[[autodoc]] modeling_utils.ModuleUtilsMixin
## TFPreTrainedModel
[[autodoc]] TFPreTrainedModel
- push_to_hub
- all
## TFModelUtilsMixin
[[autodoc]] modeling_tf_utils.TFModelUtilsMixin
## FlaxPreTrainedModel
[[autodoc]] FlaxPreTrainedModel
- push_to_hub
- all
## νλΈμ μ μ₯νκΈ°
[[autodoc]] utils.PushToHubMixin
## 곡μ λ 체ν¬ν¬μΈνΈ
[[autodoc]] modeling_utils.load_sharded_checkpoint
|