Edit model card

Llama 3 Youko 70B Instruct GPTQ (rinna/llama-3-youko-70b-instruct-gptq)

rinna-icon

Overview

rinna/llama-3-youko-70b-instruct-gptq is the quantized model for rinna/llama-3-youko-70b-instruct using AutoGPTQ. The quantized version is 4x smaller than the original model and thus requires less memory and provides faster inference.

Size Continual Pre-Training Instruction-Tuning
8B Llama 3 Youko 8B [HF] [GPTQ] Llama 3 Youko 8B Instruct [HF] [GPTQ]
70B Llama 3 Youko 70B [HF] [GPTQ] Llama 3 Youko 70B Instruct [HF] [GPTQ]

Benchmarking

Please refer to rinna's LM benchmark page.


How to use the model

We found this instruction-tuned model tends to generate repeated text more often than its base counterpart, and thus we set repetition_penalty=1.1 for better generation performance. The same repetition penalty was applied to the instruction-tuned model in the aforementioned evaluation experiments.

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "rinna/llama-3-youko-70b-instruct-gptq"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
)

messages = [
    {"role": "system", "content": "あなたは誠実で優秀なアシスタントです。どうか、簡潔かつ正直に答えてください。"},
    {"role": "user", "content": "西田幾多郎とはどんな人物ですか?"},
]

input_ids = tokenizer.apply_chat_template(
    messages,
    add_generation_prompt=True,
    return_tensors="pt"
).to(model.device)

terminators = [
    tokenizer.convert_tokens_to_ids("<|end_of_text|>"),
    tokenizer.convert_tokens_to_ids("<|eot_id|>")
]

outputs = model.generate(
    input_ids,
    max_new_tokens=512,
    eos_token_id=terminators,
    do_sample=True,
    temperature=0.6,
    top_p=0.9,
    repetition_penalty=1.1,
)

response = outputs[0][input_ids.shape[-1]:]
response = tokenizer.decode(response, skip_special_tokens=True)
print(response)

Tokenization

The model uses the original meta-llama/Meta-Llama-3-70B-Instruct tokenizer.


How to cite

@misc{rinna-llama-3-youko-70b-instruct-gptq,
    title = {rinna/llama-3-youko-70b-instruct-gptq},
    author = {Wakatsuki, Toshiaki and Mitsuda, Koh and Chen, Xinqi and Sawada, Kei},
    url = {https://huggingface.co/rinna/llama-3-youko-70b-instruct-gptq}
}

@inproceedings{sawada2024release,
    title = {Release of Pre-Trained Models for the {J}apanese Language},
    author = {Sawada, Kei and Zhao, Tianyu and Shing, Makoto and Mitsui, Kentaro and Kaga, Akio and Hono, Yukiya and Wakatsuki, Toshiaki and Mitsuda, Koh},
    booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
    month = {5},
    year = {2024},
    pages = {13898--13905},
    url = {https://aclanthology.org/2024.lrec-main.1213},
    note = {\url{https://arxiv.org/abs/2404.01657}}
}

References

@article{llama3modelcard,
    title = {Llama 3 Model Card},
    author = {AI@Meta},
    year = {2024},
    url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
}

@article{frantar2022gptq,
    title = {{GPTQ}: Accurate Post-training Compression for Generative Pretrained Transformers},
    author = {Frantar, Elias and Ashkboos, Saleh and Hoefler, Torsten and Alistarh, Dan},
    year = {2022},
    url = {https://arxiv.org/abs/2210.17323}
}

License

Meta Llama 3 Community License

Downloads last month
70
Safetensors
Model size
11.3B params
Tensor type
I32
·
FP16
·
Inference Examples
Inference API (serverless) has been turned off for this model.

Model tree for rinna/llama-3-youko-70b-instruct-gptq

Quantized
(3)
this model

Collection including rinna/llama-3-youko-70b-instruct-gptq