| <!--Copyright 2024 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. | |
| --> | |
| # Gemma2 [[gemma2]] | |
| ## ๊ฐ์ [[overview]] | |
| Gemma2 ๋ชจ๋ธ์ Google์ Gemma2 ํ์ด ์์ฑํ [Gemma2: Open Models Based on Gemini Technology and Research](https://blog.google/technology/developers/google-gemma-2/)์์ ์ ์๋์์ต๋๋ค. | |
| ํ๋ผ๋ฏธํฐ ํฌ๊ธฐ๊ฐ ๊ฐ๊ฐ 90์ต(9B)๊ณผ 270์ต(27B)์ธ ๋ ๊ฐ์ง Gemma2 ๋ชจ๋ธ์ด ์ถ์๋์์ต๋๋ค. | |
| ๋ธ๋ก๊ทธ ๊ฒ์๋ฌผ์ ์ด๋ก์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค: | |
| *์ด์ ์ฐ๋ฆฌ๋ ์ ์ธ๊ณ์ ์ฐ๊ตฌ์์ ๊ฐ๋ฐ์๋ค์๊ฒ Gemma 2๋ฅผ ๊ณต์์ ์ผ๋ก ์ถ์ํฉ๋๋ค. 90์ต(9B)๊ณผ 270์ต(27B) ํ๋ผ๋ฏธํฐ ํฌ๊ธฐ๋ก ์ ๊ณต๋๋ Gemma 2๋ 1์ธ๋๋ณด๋ค ๋ ๋์ ์ฑ๋ฅ๊ณผ ์ถ๋ก ํจ์จ์ฑ์ ์ ๊ณตํ๋ฉฐ, ์๋นํ ์์ ์ฑ ํฅ์์ ํฌํจํ๊ณ ์์ต๋๋ค. ์ฌ์ค 270์ต ๊ท๋ชจ์ ๋ชจ๋ธ์ ํฌ๊ธฐ๊ฐ ๋ ๋ฐฐ ์ด์์ธ ๋ชจ๋ธ๊ณผ ๋น๊ตํด๋ ๊ฒฝ์๋ ฅ ์๋ ๋์์ ์ ๊ณตํ๋ฉฐ, ์ด๋ ์๋ 12์๊น์ง๋ง ํด๋ ๋ ์ ๋ชจ๋ธ์์๋ง ๊ฐ๋ฅํ๋ ์ฑ๋ฅ์ ์ ๊ณตํฉ๋๋ค.* | |
| ํ: | |
| - ์๋ณธ ์ฒดํฌํฌ์ธํธ๋ ๋ณํ ์คํฌ๋ฆฝํธ `src/transformers/models/Gemma2/convert_Gemma2_weights_to_hf.py`๋ฅผ ์ฌ์ฉํ์ฌ ๋ณํํ ์ ์์ต๋๋ค. | |
| ์ด ๋ชจ๋ธ์ [Arthur Zucker](https://huggingface.co/ArthurZ), [Pedro Cuenca](https://huggingface.co/pcuenq), [Tom Arsen]()์ด ๊ธฐ์ฌํ์ต๋๋ค. | |
| ## Gemma2Config [[transformers.Gemma2Config]] | |
| [[autodoc]] Gemma2Config | |
| ## Gemma2Model [[transformers.Gemma2Model]] | |
| [[autodoc]] Gemma2Model | |
| - forward | |
| ## Gemma2ForCausalLM [[transformers.Gemma2ForCausalLM]] | |
| [[autodoc]] Gemma2ForCausalLM | |
| - forward | |
| ## Gemma2ForSequenceClassification [[transformers.Gemma2ForSequenceClassification]] | |
| [[autodoc]] Gemma2ForSequenceClassification | |
| - forward | |
| ## Gemma2ForTokenClassification [[transformers.Gemma2ForTokenClassification]] | |
| [[autodoc]] Gemma2ForTokenClassification | |
| - forward |