Downloads · 30 days
23
4% of all-time downloads
whynlp/tinyllama-zh
tinyllama-zh is a text generation model from whynlp. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
A demo project that pretrains a tinyllama on Chinese corpora, with minimal modification to the huggingface transformers code. It serves as a use case to demonstrate how to use the huggingface version TinyLlama to pret…
Downloads · 30 days
23
4% of all-time downloads
All-time downloads
648
Public
Parameters
1.2B
4.9 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors4.9 GB · 100%
From the Hugging Face model README
A demo project that pretrains a tinyllama on Chinese corpora, with minimal modification to the huggingface transformers code. It serves as a use case to demonstrate how to use the huggingface version TinyLlama to pretrain a model on a large corpus.
See the Github Repo for more details.
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("whynlp/tinyllama-zh", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("whynlp/tinyllama-zh")
This model is trained on WuDaoCorpora Text. The dataset contains about 45B tokens and the model is trained for 2 epochs. The training takes about 6 days on 8 A100 GPUs.
The model uses the THUDM/chatglm3-6b tokenizer from huggingface.
The model does not perform very well (The CMMLU result is slightly above 25). For better performance, one may use a better corpus (e.g. wanjuan). Again, this project only serves as a demonstration of how to pretrain a TinyLlama on a large corpus.