Low-resource Vocabulary Expansion
Collection
Collection of models for "How Can We Effectively Expand the Vocabulary of LLMs with 0.01GB of Target Language Text?" โข 277 items โข Updated
How to use atsuki-yamaguchi/gemma-2-9b-si-30K-500-mean with Transformers:
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, Gemma2ForMultiCausalLM
tokenizer = AutoTokenizer.from_pretrained("atsuki-yamaguchi/gemma-2-9b-si-30K-500-mean")
model = Gemma2ForMultiCausalLM.from_pretrained("atsuki-yamaguchi/gemma-2-9b-si-30K-500-mean", device_map="auto")This model is built on top of Gemma2 9B adapted for Sinhala using 30K target language sentences sampled from CC-100.
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(
"atsuki-yamaguchi/gemma-2-9b-si-30K-500-mean"
)
tokenizer = AutoTokenizer.from_pretrained(
"atsuki-yamaguchi/gemma-2-9b-si-30K-500-mean"
)
@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},
}
Base model
google/gemma-2-9b