Xwin-LM-7B-V0.1-AWQ-calib-ja
Xwin-LMさんが公開している、Xwin-LM-13B-V0.1を、 日本語のキャリブレーションセットで生成したAWQモデルになります。
キャリブレーションセットはizumi-lab/wikipedia-ja-20230720から、
100kほどランダムサンプリングしています。
mmnga/wikipedia-ja-20230720-100k
AWQモデル
Paper arxiv:2306.00978
キャリブレーションセットからActivationを行うことによって、量子化する際に重要な重みを検出し、f16で保護します。
日本語のキャリブレーションセットを使用して生成すると、どれくらい変化があるのか検証する為に作成しました。
GPTQはこちら
mmnga/Xwin-LM-7B-GPTQ-calib-ja-2k
Usage
google colabを利用する場合、A100でのみ動作します。ご注意ください。
pip install autoawq transformers
from awq import AutoAWQForCausalLM
from transformers import AutoTokenizer
model_name_or_path = "mmnga/Xwin-LM-7B-AWQ-calib-ja-100k"
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True)
model = AutoAWQForCausalLM.from_quantized(model_name_or_path, safetensors=True, fuse_layers=True)
prompt = """日本の観光地の平均気温をjsonで書き出すと、"""
tokens = tokenizer(
prompt,
return_tensors='pt'
).input_ids.cuda()
# Generate output
generation_output = model.generate(
tokens,
do_sample=True,
temperature=0.7,
top_p=0.95,
top_k=40,
max_new_tokens=512
)
print(tokenizer.decode(generation_output[0]))
Citation
@software{xwin-lm,
title = {Xwin-LM},
author = {Xwin-LM Team},
url = {https://github.com/Xwin-LM/Xwin-LM},
version = {pre-release},
year = {2023},
month = {9},
}
@misc{touvron2023llama,
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
author={Hugo Touvron and Louis Martin and Kevin Stone and Peter Albert and Amjad Almahairi and Yasmine Babaei and Nikolay Bashlykov and Soumya Batra and Prajjwal Bhargava and Shruti Bhosale and Dan Bikel and Lukas Blecher and Cristian Canton Ferrer and Moya Chen and Guillem Cucurull and David Esiobu and Jude Fernandes and Jeremy Fu and Wenyin Fu and Brian Fuller and Cynthia Gao and Vedanuj Goswami and Naman Goyal and Anthony Hartshorn and Saghar Hosseini and Rui Hou and Hakan Inan and Marcin Kardas and Viktor Kerkez and Madian Khabsa and Isabel Kloumann and Artem Korenev and Punit Singh Koura and Marie-Anne Lachaux and Thibaut Lavril and Jenya Lee and Diana Liskovich and Yinghai Lu and Yuning Mao and Xavier Martinet and Todor Mihaylov and Pushkar Mishra and Igor Molybog and Yixin Nie and Andrew Poulton and Jeremy Reizenstein and Rashi Rungta and Kalyan Saladi and Alan Schelten and Ruan Silva and Eric Michael Smith and Ranjan Subramanian and Xiaoqing Ellen Tan and Binh Tang and Ross Taylor and Adina Williams and Jian Xiang Kuan and Puxin Xu and Zheng Yan and Iliyan Zarov and Yuchen Zhang and Angela Fan and Melanie Kambadur and Sharan Narang and Aurelien Rodriguez and Robert Stojnic and Sergey Edunov and Thomas Scialom},
year={2023},
eprint={2307.09288},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 11
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.