wannaphong
commited on
Commit
•
6180bb9
1
Parent(s):
3f9c6bf
Update README.md
Browse files
README.md
CHANGED
@@ -24,60 +24,49 @@ The model was trained by LoRA.
|
|
24 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
25 |
|
26 |
- **Developed by:** Wannaphong Phatthiyaphaibun
|
27 |
-
- **
|
28 |
-
- **Shared by [optional]:** [More Information Needed]
|
29 |
-
- **Model type:** [More Information Needed]
|
30 |
- **Language(s) (NLP):** Thai
|
31 |
-
- **License:**
|
32 |
-
- **Finetuned from model
|
33 |
|
34 |
## Uses
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
### Direct Use
|
39 |
-
|
40 |
-
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
41 |
-
|
42 |
-
[More Information Needed]
|
43 |
-
|
44 |
-
### Downstream Use [optional]
|
45 |
-
|
46 |
-
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
47 |
-
|
48 |
-
[More Information Needed]
|
49 |
|
50 |
### Out-of-Scope Use
|
51 |
|
52 |
-
|
53 |
|
54 |
-
[More Information Needed]
|
55 |
|
56 |
## Bias, Risks, and Limitations
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
[More Information Needed]
|
61 |
-
|
62 |
-
### Recommendations
|
63 |
-
|
64 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
65 |
-
|
66 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
67 |
|
68 |
## How to Get Started with the Model
|
69 |
|
70 |
Use the code below to get started with the model.
|
71 |
|
72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
|
74 |
## Training Details
|
75 |
|
76 |
### Training Data
|
77 |
|
78 |
-
|
79 |
-
|
80 |
-
[More Information Needed]
|
81 |
|
82 |
### Training Procedure
|
83 |
|
|
|
24 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
25 |
|
26 |
- **Developed by:** Wannaphong Phatthiyaphaibun
|
27 |
+
- **Model type:** text-generation
|
|
|
|
|
28 |
- **Language(s) (NLP):** Thai
|
29 |
+
- **License:** apache-2.0
|
30 |
+
- **Finetuned from model:** [scb10x/typhoon-7b](https://huggingface.co/scb10x/typhoon-7b)
|
31 |
|
32 |
## Uses
|
33 |
|
34 |
+
Thai users
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
|
36 |
### Out-of-Scope Use
|
37 |
|
38 |
+
Math, Coding, and other language
|
39 |
|
|
|
40 |
|
41 |
## Bias, Risks, and Limitations
|
42 |
|
43 |
+
The model can has a bias from dataset. Use at your own risks!
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
## How to Get Started with the Model
|
46 |
|
47 |
Use the code below to get started with the model.
|
48 |
|
49 |
+
```python
|
50 |
+
# !pip install accelerate sentencepiece transformers bitsandbytes
|
51 |
+
import torch
|
52 |
+
from transformers import pipeline
|
53 |
+
|
54 |
+
pipe = pipeline("text-generation", model="wannaphong/han-llm-7b-v1", torch_dtype=torch.bfloat16, device_map="auto")
|
55 |
+
|
56 |
+
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
|
57 |
+
messages = [
|
58 |
+
{"role": "user", "content": "แมวคืออะไร"},
|
59 |
+
]
|
60 |
+
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
61 |
+
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
|
62 |
+
print(outputs[0]["generated_text"])
|
63 |
+
```
|
64 |
|
65 |
## Training Details
|
66 |
|
67 |
### Training Data
|
68 |
|
69 |
+
[Han Instruct dataset v2.0](https://huggingface.co/datasets/pythainlp/han-instruct-dataset-v2.0)
|
|
|
|
|
70 |
|
71 |
### Training Procedure
|
72 |
|