yentinglin commited on
Commit
5552136
1 Parent(s): d2bd70e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +96 -7
README.md CHANGED
@@ -23,17 +23,106 @@ extra_gated_fields:
23
  Any utilization of the Taiwan LLM repository mandates the explicit acknowledgment and attribution to the original author: checkbox
24
  使用Taiwan LLM必須明確地承認和歸功於優必達株式會社 Ubitus 以及原始作者: checkbox
25
  ---
 
26
 
27
- # 🌟 Checkout New [Taiwan-LLM Demo Chat-UI](http://www.twllm.com) 🌟
28
- # Taiwan LLM based on Mistral-7B-v0.1
29
 
30
- continue pretraining on 20 billion tokens in traditional Mandarin and instruction fine-tuning on millions of conversations.
31
 
32
- This version does NOT include CommonCrawl.
 
 
 
 
33
 
34
- # Collaboration with Ubitus K.K. 💪💪💪
35
 
36
- 本項目與 Ubitus K.K. 合作進行。Ubitus 為本項目提供寶貴的技術支持和計算資源。
37
 
38
- Taiwan LLM v2 is conducted in collaboration with [Ubitus K.K.](http://ubitus.net). Ubitus provides valuable technical support and compute resources for the project.
 
 
39
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  Any utilization of the Taiwan LLM repository mandates the explicit acknowledgment and attribution to the original author: checkbox
24
  使用Taiwan LLM必須明確地承認和歸功於優必達株式會社 Ubitus 以及原始作者: checkbox
25
  ---
26
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/5df9c78eda6d0311fd3d541f/CmusIT5OlSXvFrbTJ7l-C.png" alt="Taiwan LLM Logo" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>
27
 
28
+ # 🌟 Checkout [Taiwan-LLM Demo Chat-UI](http://www.twllm.com) 🌟
 
29
 
30
+ # Model Card for Taiwan LLM 7B v2.1 chat
31
 
32
+ Taiwan LLM is an advanced language model tailored for Traditional Chinese, focusing on the linguistic and cultural contexts of Taiwan.
33
+ Developed from a large base model, it's enriched with diverse Taiwanese textual sources and refined through Supervised Fine-Tuning.
34
+ This model excels in language understanding and generation, aligning closely with Taiwan's cultural nuances.
35
+ It demonstrates improved performance on various benchmarks like TC-Eval, showcasing its contextual comprehension and cultural relevance.
36
+ For detailed insights into Taiwan LLM's development and features, refer to our [technical report](https://github.com/MiuLab/Taiwan-LLaMa/blob/main/twllm_paper.pdf).
37
 
 
38
 
39
+ ## Model description
40
 
41
+ - **Model type:** A 7B parameter GPT-like model fine-tuned on a mix of publicly available, synthetic datasets.
42
+ - **Language(s) (NLP):** Primarily Traditional Chinese (zh-tw)
43
+ - **Finetuned from model:** [yentinglin/Taiwan-LLM-7B-v2.0-base](https://huggingface.co/yentinglin/yentinglin/Taiwan-LLM-7B-v2.0-base)
44
 
45
+ ### Model Sources
46
+
47
+ <!-- Provide the basic links for the model. -->
48
+
49
+ - **Repository:** https://github.com/MiuLab/Taiwan-LLaMa
50
+ - **Demo:** https://twllm.com/
51
+
52
+ ## Performance
53
+
54
+
55
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5df9c78eda6d0311fd3d541f/HTwIzw6RDha2-PhuWqSuI.png)
56
+
57
+ ## Intended uses
58
+
59
+ Here's how you can run the model using the `pipeline()` function from 🤗 Transformers:
60
+
61
+ ```python
62
+ # pip install transformers>=4.34
63
+ # pip install accelerate
64
+
65
+ import torch
66
+ from transformers import pipeline
67
+
68
+ pipe = pipeline("text-generation", model="HuggingFaceH4/zephyr-7b-beta", torch_dtype=torch.bfloat16, device_map="auto")
69
+
70
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
71
+ messages = [
72
+ {
73
+ "role": "system",
74
+ "content": "你是一個人工智慧助理",
75
+ },
76
+ {"role": "user", "content": "東北季風如何影響台灣氣候?"},
77
+ ]
78
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
79
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
80
+ print(outputs[0]["generated_text"])
81
+ ```
82
+
83
+ ### Training hyperparameters
84
+
85
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5df9c78eda6d0311fd3d541f/MdvHwdUvH-c926qyRAw7K.png)
86
+
87
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5df9c78eda6d0311fd3d541f/kKpkvxDzOEyiAoTqmzRYO.png)
88
+
89
+
90
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/5df9c78eda6d0311fd3d541f/FsnlJ_fkRxf7fn5RKZnjE.png)
91
+
92
+ The following hyperparameters were used during training:
93
+ - learning_rate: 5e-05
94
+ - distributed_type: multi-GPU
95
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
96
+ - lr_scheduler_type: cosine
97
+ - lr_scheduler_warmup_ratio: 0.03
98
+ - num_epochs: 5.0
99
+
100
+ ## Citation
101
+
102
+ If you find Taiwan LLM is useful in your work, please cite it with:
103
+
104
+ ```
105
+ @inproceedings{lin-chen-2023-llm,
106
+ title = "{LLM}-Eval: Unified Multi-Dimensional Automatic Evaluation for Open-Domain Conversations with Large Language Models",
107
+ author = "Lin, Yen-Ting and Chen, Yun-Nung",
108
+ booktitle = "Proceedings of the 5th Workshop on NLP for Conversational AI (NLP4ConvAI 2023)",
109
+ month = jul,
110
+ year = "2023",
111
+ address = "Toronto, Canada",
112
+ publisher = "Association for Computational Linguistics",
113
+ url = "https://aclanthology.org/2023.nlp4convai-1.5",
114
+ pages = "47--58"
115
+ }
116
+
117
+ @misc{taiwanllama,
118
+ author={Lin, Yen-Ting and Chen, Yun-Nung},
119
+ title={Language Models for Taiwanese Culture},
120
+ year={2023},
121
+ url={https://github.com/MiuLab/Taiwan-LLaMa},
122
+ note={Code and models available at https://github.com/MiuLab/Taiwan-LLaMa},
123
+ }
124
+ ```
125
+
126
+ # Acknowledgement
127
+
128
+ Taiwan LLM v2 is conducted in collaboration with [Ubitus K.K.](http://ubitus.net). Ubitus provides valuable compute resources for the project.