Views
No views yet
1from transformers import AutoTokenizer, AutoModelForCausalLM
2from peft import PeftModelForCausalLM
3
4model = AutoModelForCausalLM.from_pretrained(
5 "atsuki-yamaguchi/Llama-2-7b-hf-ja-30K-align"
6)
7model = PeftModelForCausalLM.from_pretrained(
8 model,
9 "atsuki-yamaguchi/Llama-2-7b-hf-ja-30K-align"
10)
11model = model.merge_and_unload()
12tokenizer = AutoTokenizer.from_pretrained(
13 "atsuki-yamaguchi/Llama-2-7b-hf-ja-30K-align"
14)@article{yamaguchi-etal-2024-effectively,
title={How Can We Effectively Expand the Vocabulary of LLMs with 0.01GB of Target Language Text?},
author={Atsuki Yamaguchi and Aline Villavicencio and Nikolaos Aletras},
year={2024},
journal={ArXiv},
year={2024},
volume={abs/2406.11477},
url={https://arxiv.org/abs/2406.11477},
}