gguf endpoints_compatible region:us
---
{}
---
Quantization made by Richard Erkhov.

[Github](https://github.com/RichardErkhov)

[Discord](https://discord.gg/pvy7H8DZMG)

[Request more models](https://github.com/RichardErkhov/quant_request)


gemma-2b-it-ja-poc - GGUF
- Model creator: https://huggingface.co/alfredplpl/
- Original model: https://huggingface.co/alfredplpl/gemma-2b-it-ja-poc/


| Name | Quant method | Size |
| ---- | ---- | ---- |
| [gemma-2b-it-ja-poc.Q2_K.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q2_K.gguf) | Q2_K | 1.08GB |
| [gemma-2b-it-ja-poc.IQ3_XS.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.IQ3_XS.gguf) | IQ3_XS | 1.16GB |
| [gemma-2b-it-ja-poc.IQ3_S.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.IQ3_S.gguf) | IQ3_S | 1.2GB |
| [gemma-2b-it-ja-poc.Q3_K_S.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q3_K_S.gguf) | Q3_K_S | 1.2GB |
| [gemma-2b-it-ja-poc.IQ3_M.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.IQ3_M.gguf) | IQ3_M | 1.22GB |
| [gemma-2b-it-ja-poc.Q3_K.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q3_K.gguf) | Q3_K | 1.29GB |
| [gemma-2b-it-ja-poc.Q3_K_M.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q3_K_M.gguf) | Q3_K_M | 1.29GB |
| [gemma-2b-it-ja-poc.Q3_K_L.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q3_K_L.gguf) | Q3_K_L | 1.36GB |
| [gemma-2b-it-ja-poc.IQ4_XS.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.IQ4_XS.gguf) | IQ4_XS | 1.4GB |
| [gemma-2b-it-ja-poc.Q4_0.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q4_0.gguf) | Q4_0 | 1.44GB |
| [gemma-2b-it-ja-poc.IQ4_NL.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.IQ4_NL.gguf) | IQ4_NL | 1.45GB |
| [gemma-2b-it-ja-poc.Q4_K_S.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q4_K_S.gguf) | Q4_K_S | 1.45GB |
| [gemma-2b-it-ja-poc.Q4_K.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q4_K.gguf) | Q4_K | 1.52GB |
| [gemma-2b-it-ja-poc.Q4_K_M.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q4_K_M.gguf) | Q4_K_M | 1.52GB |
| [gemma-2b-it-ja-poc.Q4_1.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q4_1.gguf) | Q4_1 | 1.56GB |
| [gemma-2b-it-ja-poc.Q5_0.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q5_0.gguf) | Q5_0 | 1.68GB |
| [gemma-2b-it-ja-poc.Q5_K_S.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q5_K_S.gguf) | Q5_K_S | 1.68GB |
| [gemma-2b-it-ja-poc.Q5_K.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q5_K.gguf) | Q5_K | 1.71GB |
| [gemma-2b-it-ja-poc.Q5_K_M.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q5_K_M.gguf) | Q5_K_M | 1.71GB |
| [gemma-2b-it-ja-poc.Q5_1.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q5_1.gguf) | Q5_1 | 1.79GB |
| [gemma-2b-it-ja-poc.Q6_K.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q6_K.gguf) | Q6_K | 1.92GB |
| [gemma-2b-it-ja-poc.Q8_0.gguf](https://huggingface.co/RichardErkhov/alfredplpl_-_gemma-2b-it-ja-poc-gguf/blob/main/gemma-2b-it-ja-poc.Q8_0.gguf) | Q8_0 | 2.49GB |




Original model description:
---
language:
- ja
- en
license: other
library_name: transformers
license_name: gemma-terms-of-use
license_link: https://www.kaggle.com/models/google/gemma/license/consent
---

# Note
このモデルはマージに失敗してバグっているため、[こちら](https://huggingface.co/alfredplpl/gemma-2b-it-ja-poc-2)をおすすめします。


[Google Colab](https://colab.research.google.com/drive/1X3_0hjV0uuRiC_yvKTe4_XJCMOTK2iLN?usp=sharing)

# Usage

```python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

# トークナイザーとモデルの準備
tokenizer = AutoTokenizer.from_pretrained(
  "alfredplpl/gemma-2b-it-ja-poc"
)
model = AutoModelForCausalLM.from_pretrained(
  "alfredplpl/gemma-2b-it-ja-poc"
)

# プロンプトの準備
prompt="""
あなたは親切なアシスタントです。英語は喋らず、日本語だけ喋ってください。
<start_of_turn>user
人生で大切なことはなんですか？<end_of_turn>
<start_of_turn>model"""

# 推論の実行
input_ids = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
    **input_ids,
    max_new_tokens=128,
    do_sample=True,
    top_p=0.95,
    temperature=0.2,
    repetition_penalty=1.1,
)
print(tokenizer.decode(outputs[0]))

```

## Result

```bash
<bos>
あなたは親切なアシスタントです。英語は喋らず、日本語だけ喋ってください。
<start_of_turn>user
人生で大切なことはなんですか？<end_of_turn>
<start_of_turn>model
人生で大切なことはたくさんある。しかし、最も重要なのは、愛する人を大切にし、その人と幸せになることだ。<end_of_turn>
<eos>
```

# Chat Templete

```bash
<bos>
{{system prompt}}
<start_of_turn>user
{{prompt}}<end_of_turn>
<start_of_turn>model
{{response}}<end_of_turn>
<eos>
```

# Base model
- free-ai-ltd/ja-aozora-wikipedia-gemmba-2b (private)

# Dataset for Instruct tuning
- llm-jp/databricks-dolly-15k-ja
- llm-jp/oasst1-21k-ja
- kunishou/oasst1-chat-44k-ja
- kunishou/oasst2-chat-68k-ja
- kunishou/cnn-dailymail-27k-ja
- kunishou/databricks-dolly-69k-ja-en-translation
- kunishou/databricks-dolly-15k-ja

# How to make this model
- [LoRA](https://gist.github.com/alfredplpl/e20cad036c151f38645a1abc87f56a2f)

