|
--- |
|
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`が作成されます。 |