Downloads · 30 days
9
16% of all-time downloads
Nevidu/Llama-3.1-8B-SiDiaC-CPT
Llama-3.1-8B-SiDiaC-CPT is a text generation model from Nevidu. Use it when you need the model to write or continue text. It is set up for peft.
A LoRA adapter continually pretraining Llama-3.1-8B (via unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit) on the full SiDiaC-v.2.0 corpus. Built as part of a study on diachronic semantic change in Sinhala (see Paper below)…
Downloads · 30 days
9
16% of all-time downloads
All-time downloads
57
Public
Repo size
2.3 GB
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 99%
From the Hugging Face model README
A LoRA adapter continually pretraining Llama-3.1-8B (via
unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit)
on the full SiDiaC-v.2.0 corpus. Built as part of a study on diachronic semantic
change in Sinhala (see Paper below), where the resulting contextual embeddings
feed a leave-one-out (LOO) analysis of per-lemma semantic drift across centuries.
The tokenizer is the stock Llama-3.1 tokenizer (128,256 tokens, unmodified — no
vocabulary expansion for Sinhala). Instead, the token embedding and output layers are
fine-tuned directly (modules_to_save: ["embed_tokens"], lm_head in
target_modules) alongside standard LoRA adapters on the attention/MLP projections.
This checkpoint is referred to as Llama_NO_EXPA / Llama_FT in the accompanying
codebase.
Dynamics of meaning: Towards the Evaluation of Diachronic Semantic Change in Sinhala Nevidu Jayatilleke, Nisansa de Silva (2026)
| Base model | unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit (4-bit) |
| Method | LoRA (via PEFT), rank r=16, lora_alpha=32, lora_dropout=0.05 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj, lm_head |
| Modules saved in full | embed_tokens |
| Task type | Causal LM (continual pretraining) |
| Training framework | Unsloth + TRL |
unsloth has a history of version-compatibility issues with trl/peft/pyarrow/
datasets. This is the exact install sequence used to train and validate this
checkpoint (Colab, CUDA GPU) — deviating from it is the most common cause of load
failures:
pip install "unsloth[colab-new] @ git+https://github.com/unslothai/unsloth.git"
pip install --no-deps xformers trl peft accelerate bitsandbytes
pip install --upgrade transformers accelerate bitsandbytes
# If you hit trl/peft/datasets/pyarrow conflicts, reset them explicitly:
pip uninstall -y trl peft datasets pyarrow
pip install pyarrow==10.0.1
pip install trl peft
bitsandbytes 4-bit loading (used below) requires a CUDA GPU — it will not work on
CPU-only or Apple Silicon (MPS) machines.
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit",
max_seq_length=2048,
load_in_4bit=True,
)
model.load_adapter("Nevidu/Llama-3.1-8B-SiDiaC-CPT")
FastLanguageModel.for_inference(model)
Or with plain transformers + peft:
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = AutoModelForCausalLM.from_pretrained(
"unsloth/meta-llama-3.1-8b-unsloth-bnb-4bit", load_in_4bit=True
)
tokenizer = AutoTokenizer.from_pretrained("Nevidu/Llama-3.1-8B-SiDiaC-CPT")
model = PeftModel.from_pretrained(base, "Nevidu/Llama-3.1-8B-SiDiaC-CPT")
Continually pretrained on the full
Nevidu/SiDiaC-v.2.0 corpus.
Self-supervised continual pretraining (causal LM, next-token prediction) via
trl.SFTTrainer with sequence packing:
| Sequence length | 512 |
| Batch size | 4 per device × 8 gradient accumulation steps (effective 32) |
| Learning rate | 2e-5 |
| Epochs (planned) | 10, with early stopping (patience 3 evals) |
| Eval/save interval | every 50 steps |
| Model selection | best checkpoint by eval loss (load_best_model_at_end) |
| Train/eval split | 90% / 10% |
Training ran for 1,125 steps before early stopping. Evaluation loss decreased from
8.62 (step 0) to a minimum of 4.80 at step 750, after which it began to rise —
the step-750 checkpoint (this one) was restored as the final model per
load_best_model_at_end.
This checkpoint was built to extract per-century contextual word embeddings for diachronic semantic-drift analysis (see the paper), not for general-purpose Sinhala instruction-following or chat. It has not been evaluated for safety, factuality, or general-purpose downstream use, and should be treated as a research artifact rather than a production-ready model.
@article{jayatilleke2026dynamicsmeaningevaluationdiachronic,
title={Dynamics of meaning: Towards the Evaluation of Diachronic Semantic Change in Sinhala},
author={Nevidu Jayatilleke and Nisansa de Silva},
year={2026},
eprint={2609.08609},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2609.08609},
}