Pavarissy's picture
Update README.md
fed11ce verified
metadata
base_model: instructlab/merlinite-7b-lab
library_name: peft
license: apache-2.0
tags:
  - trl
  - sft
model-index:
  - name: merlinite-sql-7b-thai-instructlab
    results: []
language:
  - th
pipeline_tag: text-generation

merlinite-sql-7b-thai-instructlab

This model is a fine-tuned version of instructlab/merlinite-7b-lab on an unknown dataset.

Model description

More information needed

How to Use

installing dependencies

!pip install -qU transformers accelerate

To implement the model

from transformers import AutoTokenizer
import transformers
import torch

question = "คะแนนความสามารถทางการเงินสูงสุดสำหรับลูกค้าในแอฟริกาในปี 2022 คือเท่าใด \nHere is a Table: CREATE TABLE financial_capability (id INT, customer_name VARCHAR(50), region VARCHAR(50), score INT, year INT); INSERT INTO financial_capability (id, customer_name, region, score, year) VALUES (1, 'Thabo', 'Africa', 9, 2022), (2, 'Amina', 'Africa', 8, 2022);"

model = "Pavarissy/merlinite-sql-7b-thai-instructlab"
messages = [{"role": "user",
             "content": f"{question}"}]

tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
pipeline = transformers.pipeline(
     "text-generation",
     model=model,
     torch_dtype=torch.float16,
     device_map="auto",
)

# this is model generation part
outputs = pipeline(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 1
  • eval_batch_size: 8
  • seed: 42
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • num_epochs: 5
  • mixed_precision_training: Native AMP

Training results

Framework versions

  • PEFT 0.11.1
  • Transformers 4.42.3
  • Pytorch 2.3.0+cu121
  • Datasets 2.19.1
  • Tokenizers 0.19.1