| <!--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. | |
| --> | |
| # Gemma [[gemma]] | |
| ## ๊ฐ์ [[overview]] | |
| Gemma ๋ชจ๋ธ์ Google์ Gemma ํ์ด ์์ฑํ [Gemma: Open Models Based on Gemini Technology and Research](https://blog.google/technology/developers/gemma-open-models/)์์ ์ ์๋์์ต๋๋ค. | |
| Gemma ๋ชจ๋ธ์ 6์กฐ ํ ํฐ์ผ๋ก ํ์ต๋์์ผ๋ฉฐ, 2b์ 7b์ ๋ ๊ฐ์ง ๋ฒ์ ์ผ๋ก ์ถ์๋์์ต๋๋ค. | |
| ๋ ผ๋ฌธ์ ์ด๋ก์ ๋ค์๊ณผ ๊ฐ์ต๋๋ค: | |
| *์ด ์ฐ๊ตฌ๋ ์ธ์ด ์ดํด, ์ถ๋ก ๋ฐ ์์ ์ฑ์ ๋ํ ํ์ ๋ฒค์น๋งํฌ์์ ๋ฐ์ด๋ ์ฑ๋ฅ์ ๋ณด์ด๋ ์๋ก์ด ์คํ ์ธ์ด ๋ชจ๋ธ ๊ณ์ด์ธ Gemma๋ฅผ ์๊ฐํฉ๋๋ค. ์ฐ๋ฆฌ๋ ๋ ๊ฐ์ง ํฌ๊ธฐ(20์ต ๋ฐ 70์ต ๋งค๊ฐ๋ณ์)์ ๋ชจ๋ธ์ ์ถ์ํ๋ฉฐ, ์ฌ์ ํ์ต๋ ์ฒดํฌํฌ์ธํธ์ ๋ฏธ์ธ ์กฐ์ ๋ ์ฒดํฌํฌ์ธํธ๋ฅผ ๋ชจ๋ ์ ๊ณตํฉ๋๋ค. Gemma๋ 18๊ฐ์ ํ ์คํธ ๊ธฐ๋ฐ ์์ ์ค 11๊ฐ์์ ์ ์ฌํ ํฌ๊ธฐ์ ์คํ ๋ชจ๋ธ์ ๋ฅ๊ฐํ๋ฉฐ, ์ฐ๋ฆฌ๋ ๋ชจ๋ธ ๊ฐ๋ฐ์ ๋ํ ์์ธํ ์ค๋ช ๊ณผ ํจ๊ป ์์ ์ฑ๊ณผ ์ฑ ์ ์ธก๋ฉด์ ๋ํ ์ข ํฉ์ ์ธ ํ๊ฐ๋ฅผ ์ ๊ณตํฉ๋๋ค. ์ฐ๋ฆฌ๋ LLM์ ์ฑ ์๊ฐ ์๋ ๊ณต๊ฐ๊ฐ ์ต์ฒจ๋จ ๋ชจ๋ธ์ ์์ ์ฑ์ ํฅ์์ํค๊ณ ๋ค์ ์ธ๋์ LLM ํ์ ์ ๊ฐ๋ฅํ๊ฒ ํ๋ ๋ฐ ์ค์ํ๋ค๊ณ ๋ฏฟ์ต๋๋ค.* | |
| ํ: | |
| - ์๋ณธ ์ฒดํฌํฌ์ธํธ๋ ๋ณํ ์คํฌ๋ฆฝํธ `src/transformers/models/gemma/convert_gemma_weights_to_hf.py`๋ฅผ ์ฌ์ฉํ์ฌ ๋ณํํ ์ ์์ต๋๋ค. | |
| ์ด ๋ชจ๋ธ์ [Arthur Zucker](https://huggingface.co/ArthurZ), [Younes Belkada](https://huggingface.co/ybelkada), [Sanchit Gandhi](https://huggingface.co/sanchit-gandhi), [Pedro Cuenca](https://huggingface.co/pcuenq)๊ฐ ๊ธฐ์ฌํ์ต๋๋ค. | |
| ## GemmaConfig [[transformers.GemmaConfig]] | |
| [[autodoc]] GemmaConfig | |
| ## GemmaTokenizer [[transformers.GemmaTokenizer]] | |
| [[autodoc]] GemmaTokenizer | |
| ## GemmaTokenizerFast [[transformers.GemmaTokenizerFast]] | |
| [[autodoc]] GemmaTokenizerFast | |
| ## GemmaModel [[transformers.GemmaModel]] | |
| [[autodoc]] GemmaModel | |
| - forward | |
| ## GemmaForCausalLM [[transformers.GemmaForCausalLM]] | |
| [[autodoc]] GemmaForCausalLM | |
| - forward | |
| ## GemmaForSequenceClassification [[transformers.GemmaForSequenceClassification]] | |
| [[autodoc]] GemmaForSequenceClassification | |
| - forward | |
| ## GemmaForTokenClassification [[transformers.GemmaForTokenClassification]] | |
| [[autodoc]] GemmaForTokenClassification | |
| - forward | |
| ## FlaxGemmaModel [[transformers.FlaxGemmaModel]] | |
| [[autodoc]] FlaxGemmaModel | |
| - __call__ | |
| ## FlaxGemmaForCausalLM [[transformers.FlaxGemmaForCausalLM]] | |
| [[autodoc]] FlaxGemmaForCausalLM | |
| - __call__ | |