Downloads · 30 days
25
0% of all-time downloads
mmnga/cyberagent-calm2-7b-chat-GPTQ-calib-ja-1k
cyberagent-calm2-7b-chat-GPTQ-calib-ja-1k is a text generation model from mmnga. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
cyberagentさんが公開しているcalm2-7b-chatを 日本語のキャリブレーションセットで生成したGPTQモデルになります。
Downloads · 30 days
25
0% of all-time downloads
All-time downloads
5.5K
Public
Repo size
8.9 GB
Likes
5
Public
Click a slice to open those files.
.safetensors4.4 GB · 100%
From the Hugging Face model README
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
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]))