File size: 1,157 Bytes
a9dab4b
 
9b2cb47
 
 
 
 
 
 
 
 
a9dab4b
9b2cb47
 
 
 
 
 
 
 
 
 
 
0568fc8
9b2cb47
 
 
 
 
 
 
 
 
 
 
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
---
library_name: transformers
license: gemma
datasets:
- DeL-TaiseiOzaki/Tengentoppa-sft-v1.0
- Aratako/Magpie-Tanuki-8B-annotated-96k
language:
- ja
base_model:
- google/gemma-2-27b
pipeline_tag: text-generation
---
このモデルはコンペティションのために開発されたモデルです。
# 推論方法
まず、llama-cpp-pythonをインストールしてください。
その後推論用ライブラリをセットアップします。
```sh
git clone https://github.com/weak-kajuma/inference-for-llm-class.git
cd inference-for-llm-class
pip install datasets
```
次に、モデルをダウンロードします。
```sh
# GPUによって量子化サイズや次のセクションの`--ngl`を選んでください。
wget https://huggingface.co/kajuma/gemma-2-27b-instruct/resolve/main/Gemma-2-27B-Instruct_Q6_K.gguf
```
推論プログラムを実行します。
```sh
python answer_llama_cpp.py --model Gemma-2-27B-Instruct_Q6_K.gguf --ngl 46 --data_file data.jsonl
```
ただし`data.jsonl`のフォーマットは以下の通りです。
```jsonl
{"task_id": 0, "input": "質問"}
```
推論後`output.jsonl`が作成されます。