File size: 2,643 Bytes
d59674d
 
 
 
 
 
 
 
 
 
ecb9679
 
 
 
 
 
 
 
 
 
f2a964a
ecb9679
f2a964a
 
ecb9679
f2a964a
 
ecb9679
f2a964a
 
 
 
 
ecb9679
f2a964a
ecb9679
f2a964a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ecb9679
 
 
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
---
license: gemma
language:
- ja
base_model:
- google/gemma-2-2b-jpn-it
tags:
- gemma2
---

# 本モデルについて About this model.

[google/gemma-2-2b-jpn-it](https://huggingface.co/google/gemma-2-2b-jpn-it)を日本語が多く含まれる重要度行列(iMatrix)を使って量子化したgguf版です。  
日本語対応能力が多めに保持されている事を期待しています。  
[gemma-2-9b-itの4bit量子化版で比較](https://huggingface.co/dahara1/imatrix-jpn-test)したところ、perplexityスコアがわずかに改善する事がわかっています。

This is a quantized gguf version of [google/gemma-2-2b-jpn-it](https://huggingface.co/google/gemma-2-2b-jpn-it) using an importance matrix (iMatrix) that contains many Japanese words.  
I hope it retains more Japanese support.  
When [compared with the 4-bit quantized version of gemma-2-9b-it](https://huggingface.co/google/gemma-2-2b-jpn-it), we found that the perplexity score improved slightly.  

# 使い方 How to Use. 

ggufフォーマットに対応したツールは様々なものがあるのでお好きなツールをお使いください。例えば、[llama.cpp](https://github.com/ggerganov/llama.cpp)での使い方は以下です  
There are many tools that support the gguf format, so please use the one you like. For example, the usage for [llama.cpp](https://github.com/ggerganov/llama.cpp) is as follows.  

Windows11のターミナル(CMD, Power shell)では日本語が化けてしまうのでブラウザを使ってください  
Please use a browser as Japanese characters will be garbled in the Windows 11 terminal (CMD, Power shell).  

公式マニュアルに従ってllama.cppをビルドします  
Build llama.cpp according to the official manual  

ダウンロードしたモデルを指定して下記コマンドを実行します  
Execute command.  
```
llama.cpp\build\bin\Release\llama-server -m .\gemma-2-9b-it-Q4_K_M-fp16.gguf
```
ブラウザでhttp://127.0.0.1:8080を開きます  
Open http://127.0.0.1:8080 in your browser  


![image/png](https://cdn-uploads.huggingface.co/production/uploads/630469550907b9a115c91e62/PHli0VVox8bt6ziQoP02B.png)


# どのモデルを使うべきですか? Which model should I use?

人によって意見が異なりますが、目安としては以下です  
- できればQ4以上
- メモリが許す限り大きいモデル(例えば、利用可能なメモリの7割程度)

Opinions vary from person to person, but here are some guidelines:  
- Preferably Q4 or higher
- As large a model as memory allows (for example, about 70% of available memory)