Commit
•
9d046a7
1
Parent(s):
8859b97
Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
---
|
2 |
-
library_name:
|
3 |
license: cc-by-nc-4.0
|
4 |
language:
|
5 |
- en
|
@@ -12,6 +12,7 @@ tags:
|
|
12 |
- uncensored
|
13 |
- instruct
|
14 |
- alpaca
|
|
|
15 |
---
|
16 |
# DukunLM - Indonesian Language Model 🧙♂️
|
17 |
|
@@ -61,11 +62,7 @@ model = AutoPeftModelForCausalLM.from_pretrained(
|
|
61 |
bnb_4bit_quant_type="nf4",
|
62 |
)
|
63 |
)
|
64 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
65 |
-
"azale-ai/DukunLM-Uncensored-7B",
|
66 |
-
use_fast=False,
|
67 |
-
padding_side="right"
|
68 |
-
)
|
69 |
streamer = TextStreamer(tokenizer)
|
70 |
|
71 |
instruction_prompt = "Jelaskan mengapa air penting bagi kehidupan manusia."
|
@@ -97,9 +94,8 @@ _ = model.generate(
|
|
97 |
streamer=streamer,
|
98 |
pad_token_id=tokenizer.pad_token_id,
|
99 |
eos_token_id=tokenizer.eos_token_id,
|
100 |
-
max_length=2048,
|
101 |
-
|
102 |
-
top_k=4, top_p=0.95
|
103 |
)
|
104 |
```
|
105 |
|
@@ -124,11 +120,7 @@ model = AutoPeftModelForCausalLM.from_pretrained(
|
|
124 |
bnb_4bit_quant_type="nf4",
|
125 |
)
|
126 |
)
|
127 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
128 |
-
"azale-ai/DukunLM-Uncensored-7B",
|
129 |
-
use_fast=False,
|
130 |
-
padding_side="right"
|
131 |
-
)
|
132 |
|
133 |
instruction_prompt = "Bangun dialog chatbot untuk layanan pelanggan yang ingin membantu pelanggan memesan produk tertentu."
|
134 |
input_prompt = "Produk: Sepatu Nike Air Max"
|
@@ -158,9 +150,8 @@ _ = model.generate(
|
|
158 |
inputs=inputs.input_ids,
|
159 |
pad_token_id=tokenizer.pad_token_id,
|
160 |
eos_token_id=tokenizer.eos_token_id,
|
161 |
-
max_length=2048,
|
162 |
-
|
163 |
-
top_k=4, top_p=0.95
|
164 |
)
|
165 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
166 |
```
|
|
|
1 |
---
|
2 |
+
library_name: transformers
|
3 |
license: cc-by-nc-4.0
|
4 |
language:
|
5 |
- en
|
|
|
12 |
- uncensored
|
13 |
- instruct
|
14 |
- alpaca
|
15 |
+
pipeline_tag: text-generation
|
16 |
---
|
17 |
# DukunLM - Indonesian Language Model 🧙♂️
|
18 |
|
|
|
62 |
bnb_4bit_quant_type="nf4",
|
63 |
)
|
64 |
)
|
65 |
+
tokenizer = AutoTokenizer.from_pretrained("azale-ai/DukunLM-Uncensored-7B")
|
|
|
|
|
|
|
|
|
66 |
streamer = TextStreamer(tokenizer)
|
67 |
|
68 |
instruction_prompt = "Jelaskan mengapa air penting bagi kehidupan manusia."
|
|
|
94 |
streamer=streamer,
|
95 |
pad_token_id=tokenizer.pad_token_id,
|
96 |
eos_token_id=tokenizer.eos_token_id,
|
97 |
+
max_length=2048, temperature=0.7,
|
98 |
+
do_sample=True, top_k=4, top_p=0.95
|
|
|
99 |
)
|
100 |
```
|
101 |
|
|
|
120 |
bnb_4bit_quant_type="nf4",
|
121 |
)
|
122 |
)
|
123 |
+
tokenizer = AutoTokenizer.from_pretrained("azale-ai/DukunLM-Uncensored-7B")
|
|
|
|
|
|
|
|
|
124 |
|
125 |
instruction_prompt = "Bangun dialog chatbot untuk layanan pelanggan yang ingin membantu pelanggan memesan produk tertentu."
|
126 |
input_prompt = "Produk: Sepatu Nike Air Max"
|
|
|
150 |
inputs=inputs.input_ids,
|
151 |
pad_token_id=tokenizer.pad_token_id,
|
152 |
eos_token_id=tokenizer.eos_token_id,
|
153 |
+
max_length=2048, temperature=0.7,
|
154 |
+
do_sample=True, top_k=4, top_p=0.95
|
|
|
155 |
)
|
156 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
157 |
```
|