CoolFace
Modelpublic

Thimira/sinhala-llama-2-7b-chat-hf

sourceHugging Facellama2updated 2y agoView on Hugging Face
3likes45downloads
Model Card

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

sinhala-llama-2-7b-chat-hf

This model is a fine-tuned version of NousResearch/Llama-2-7b-chat-hf on the Thimira/sinhala-llm-dataset-llama-prompt-format dataset.

Model description

This is a model for Sinhala language text generation which is fine-tuned from the base llama-2-7b-chat-hf model.

Currently the capabilities of themodel are extremely limited, and requires further data and fine-tuning to be useful. Feel free to experiment with the model and provide feedback.

Usage example

python
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline

tokenizer = AutoTokenizer.from_pretrained("Thimira/sinhala-llama-2-7b-chat-hf")
model = AutoModelForCausalLM.from_pretrained("Thimira/sinhala-llama-2-7b-chat-hf")

pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=200)

prompt = "ඔබට සිංහල භාෂාව තේරුම් ගත හැකිද?"
result = pipe(f"<s>[INST] {prompt} [/INST]")
print(result[0]['generated_text'])

Intended uses & limitations

The Sinhala-LLaMA models are intended for assistant-like chat in the Sinhala language.

To get the expected features and performance from these models the LLaMA 2 prompt format needs to be followed, including the INST and <<SYS>> tags, BOS and EOS tokens, and the whitespaces and breaklines in between.

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 0.0002
  • —trainbatchsize: 2
  • —evalbatchsize: 8
  • —seed: 42
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: constant
  • —lrschedulerwarmup_ratio: 0.03
  • —num_epochs: 2

Training results

Framework versions

  • —PEFT 0.10.0
  • —Transformers 4.40.2
  • —Pytorch 2.1.0
  • —Datasets 2.19.1
  • —Tokenizers 0.19.1