Team Ai
Modelpublic

Pavarissy/merlinite-sql-7b-thai-instructlab

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes17downloads
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. -->

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

bash
!pip install -qU transformers accelerate

To implement the model

python
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
  • —trainbatchsize: 1
  • —evalbatchsize: 8
  • —seed: 42
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —num_epochs: 5
  • —mixedprecisiontraining: 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