File size: 2,495 Bytes
4a9fbef fed11ce 4a9fbef fed11ce 4a9fbef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
---
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
---
<!-- 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](https://huggingface.co/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
- 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 |