Edit model card

cyberagent-calm2-7b-chat-GPTQ-calib-ja-1k

cyberagentさんが公開しているcalm2-7b-chatを 日本語のキャリブレーションセットで生成したGPTQモデルになります。

キャリブレーションセットはizumi-lab/wikipedia-ja-20230720から、 1kほどランダムサンプリングしたものと、
ELYZA-tasks-100のinput/outputを計200ほど追加しています。
mmnga/wikipedia-ja-20230720-1k

モデル一覧
GPTQ
mmnga/cyberagent-calm2-7b-GPTQ-calib-ja-1k
mmnga/cyberagent-calm2-7b-chat-GPTQ-calib-ja-1k

GGUF
mmnga/cyberagent-calm2-7b-gguf
mmnga/cyberagent-calm2-7b-chat-gguf

Usage

pip install auto-gptq[triton]==0.4.2 transformers==4.34.1
import torch
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
from transformers import AutoTokenizer , AutoModelForCausalLM

if torch.cuda.is_available():
    device_name = torch.cuda.get_device_name(0)

model_name_or_path = "mmnga/cyberagent-calm2-7b-chat-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_triton=("A100" in device_name))

# Your test prompt
prompt = """
USER: 今日の夕食のレシピを紹介してください。
ASSISTANT: """
print(tokenizer.decode(model.generate(**tokenizer(prompt, return_tensors="pt").to(model.device), max_length=128)[0]))
Downloads last month
7
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.