|
--- |
|
license: apache-2.0 |
|
--- |
|
|
|
# llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0-GPTQ-calib-ja-1k |
|
llm-jpさんが公開している、[llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0](https://huggingface.co/llm-jp/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0)を、 |
|
日本語のキャリブレーションセットで生成したGPTQモデルになります。 |
|
|
|
キャリブレーションセットは[izumi-lab/wikipedia-ja-20230720](https://huggingface.co/datasets/izumi-lab/wikipedia-ja-20230720)から、 |
|
1kほどランダムサンプリングしたものと、 |
|
[ELYZA-tasks-100](https://huggingface.co/datasets/elyza/ELYZA-tasks-100)のinput/outputを計200ほど追加しています。 |
|
[mmnga/wikipedia-ja-20230720-1k](https://huggingface.co/datasets/mmnga/wikipedia-ja-20230720-1k) |
|
|
|
モデル一覧 |
|
[mmnga/llm-jp-13b-v1.0-4bit-g128-GPTQ-calib-ja-1k](https://huggingface.co/mmnga/llm-jp-13b-v1.0-4bit-g128-GPTQ-calib-ja-1k) |
|
[mmnga/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0-GPTQ-calib-ja-1k](https://huggingface.co/mmnga/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0-GPTQ-calib-ja-1k) |
|
[mmnga/llm-jp-13b-instruct-full-dolly-oasst-v1.0-GPTQ-calib-ja-1k](https://huggingface.co/mmnga/llm-jp-13b-instruct-full-dolly-oasst-v1.0-GPTQ-calib-ja-1k) |
|
|
|
GGUF版 |
|
[mmnga/llm-jp-13b-v1.0-gguf](https://huggingface.co/mmnga/llm-jp-13b-v1.0-gguf) |
|
[mmnga/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0-gguf](https://huggingface.co/mmnga/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0-gguf) |
|
[mmnga/llm-jp-13b-instruct-full-dolly-oasst-v1.0-gguf](https://huggingface.co/mmnga/llm-jp-13b-instruct-full-dolly-oasst-v1.0-gguf) |
|
|
|
# Usage |
|
|
|
~~~Bash |
|
pip install auto-gptq transformers |
|
~~~ |
|
|
|
~~~python |
|
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig |
|
from transformers import AutoTokenizer |
|
|
|
model_name_or_path = "mmnga/llm-jp-13b-instruct-full-jaster-dolly-oasst-v1.0-GPTQ-calib-ja-1k" |
|
|
|
# Tokenizer |
|
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True) |
|
|
|
# Model |
|
model = AutoGPTQForCausalLM.from_quantized(model_name_or_path, use_safetensors=True, device="cuda:0", use_auth_token=False) |
|
|
|
#Your test prompt |
|
prompt = """今日の晩御飯のレシピをご紹介して ### 回答:""" |
|
print(tokenizer.decode(model.generate(**tokenizer(prompt, return_tensors="pt",add_special_tokens=False).to(model.device), max_new_tokens=100,do_sample=True,top_p=0.95,temperature=0.7)[0])) |
|
~~~ |
|
|