Konthee commited on
Commit
f4eff74
1 Parent(s): f658023

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +18 -0
README.md CHANGED
@@ -3,7 +3,25 @@ library_name: transformers
3
  tags: []
4
  ---
5
 
 
 
 
 
6
  ```python
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  text = 'มะ ใด จะ เตี้ยง ใคร่ อยาก กิ๋น เข้า เข้า เจ๊า วัน นี้ ก่อ บ่า ได้ กิ๋น ลุก ขวาย บ่า ตัน กิ๋น'
8
  messages = [
9
  {"role": "system", "content": "translate Northern thai language to Central thai language."},
 
3
  tags: []
4
  ---
5
 
6
+
7
+ ## How to use
8
+
9
+
10
  ```python
11
+ from transformers import AutoModelForCausalLM,AutoTokenizer
12
+
13
+ base_model = 'Konthee/llama-3.1-8b-instruct-North-Thai'
14
+
15
+ tokenizer = AutoTokenizer.from_pretrained(base_model_name)
16
+ base_model = AutoModelForCausalLM.from_pretrained(
17
+ base_model_name,
18
+ low_cpu_mem_usage=True,
19
+ return_dict=True,
20
+ torch_dtype=torch.float16,
21
+ device_map="auto",
22
+ )
23
+
24
+
25
  text = 'มะ ใด จะ เตี้ยง ใคร่ อยาก กิ๋น เข้า เข้า เจ๊า วัน นี้ ก่อ บ่า ได้ กิ๋น ลุก ขวาย บ่า ตัน กิ๋น'
26
  messages = [
27
  {"role": "system", "content": "translate Northern thai language to Central thai language."},