Downloads · 30 days
16
11% of all-time downloads
Pavarissy/merlinite-sql-7b-thai-instructlab
merlinite-sql-7b-thai-instructlab is a text generation model from Pavarissy. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
16
11% of all-time downloads
All-time downloads
150
Public
Repo size
14.2 MB
Likes
0
Public
Click a slice to open those files.
.safetensors13.7 MB · 86%
From the Hugging Face model README
This model is a fine-tuned version of instructlab/merlinite-7b-lab on an unknown dataset.
More information needed
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"])
More information needed
More information needed
The following hyperparameters were used during training: