Text Generation
Transformers
GGUF
Inference Endpoints
conversational
mav23 commited on
Commit
c607418
1 Parent(s): e4467bf

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ gemma2-9b-cpt-sea-lionv3-instruct.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ pipeline_tag: text-generation
4
+ base_model:
5
+ - aisingapore/gemma2-9b-cpt-sea-lionv3-base
6
+ language:
7
+ - en
8
+ - zh
9
+ - vi
10
+ - id
11
+ - th
12
+ - fil
13
+ - ta
14
+ - ms
15
+ - km
16
+ - lo
17
+ - my
18
+ - jv
19
+ - su
20
+ license: gemma
21
+ ---
22
+ # Gemma2 9B CPT SEA-LIONv3 Instruct
23
+
24
+ SEA-LION is a collection of Large Language Models (LLMs) which have been pretrained and instruct-tuned for the Southeast Asia (SEA) region.
25
+
26
+ Gemma2 9B CPT SEA-LIONv3 Instruct is a multilingual model which has been fine-tuned with around **500,000 English instruction-completion pairs** alongside a larger pool of around **1,000,000 instruction-completion pairs** from other ASEAN languages, such as Indonesian, Thai and Vietnamese.
27
+
28
+ SEA-LION stands for _Southeast Asian Languages In One Network_.
29
+
30
+ - **Developed by:** Products Pillar, AI Singapore
31
+ - **Funded by:** Singapore NRF
32
+ - **Model type:** Decoder
33
+ - **Languages:** English, Chinese, Vietnamese, Indonesian, Thai, Filipino, Tamil, Malay, Khmer, Lao, Burmese, Javanese, Sundanese
34
+ - **License:** [Gemma Community License](https://ai.google.dev/gemma/terms)
35
+
36
+ ## Model Details
37
+
38
+ ### Model Description
39
+ We performed instruction tuning in English and also in ASEAN languages such as Indonesian, Thai and Vietnamese on our [continued pre-trained Gemma2 9B CPT SEA-LIONv3](https://huggingface.co/aisingapore/gemma2-9b-cpt-sea-lionv3-base), a decoder model using the Gemma2 architecture, to create Gemma2 9B CPT SEA-LIONv3 Instruct.
40
+
41
+ For tokenisation, the model employs the default tokenizer used in Gemma-2-9B. The model has a context length of 8192.
42
+
43
+ ### Benchmark Performance
44
+ We evaluated Gemma2 9B CPT SEA-LIONv3 Instruct on both general language capabilities and instruction-following capabilities.
45
+
46
+ #### General Language Capabilities
47
+ For the evaluation of general language capabilities, we employed the [SEA HELM (also known as BHASA) evaluation benchmark](https://arxiv.org/abs/2309.06085v2) across a variety of tasks.
48
+ These tasks include Question Answering (QA), Sentiment Analysis (Sentiment), Toxicity Detection (Toxicity), Translation in both directions (Eng>Lang & Lang>Eng), Abstractive Summarization (Summ), Causal Reasoning (Causal) and Natural Language Inference (NLI).
49
+
50
+ Note: SEA HELM is implemented using prompts to elicit answers in a strict format. For all tasks, the model is expected to provide an answer tag from which the answer is automatically extracted. For tasks where options are provided, the answer should comprise one of the pre-defined options. The scores for each task is normalised to account for baseline performance due to random chance.
51
+
52
+ The evaluation was done **zero-shot** with native prompts on a sample of 100-1000 instances for each dataset.
53
+
54
+ #### Instruction-following Capabilities
55
+ Since Gemma2 9B CPT SEA-LIONv3 Instruct is an instruction-following model, we also evaluated it on instruction-following capabilities with two datasets, [IFEval](https://arxiv.org/abs/2311.07911) and [MT-Bench](https://arxiv.org/abs/2306.05685).
56
+
57
+ As these two datasets were originally in English, the linguists and native speakers in the team worked together to filter, localize and translate the datasets into the respective target languages to ensure that the examples remained reasonable, meaningful and natural.
58
+
59
+ **IFEval**
60
+
61
+ IFEval evaluates a model's ability to adhere to constraints provided in the prompt, for example beginning a response with a specific word/phrase or answering with a certain number of sections. Additionally, accuracy is normalized by the proportion of responses in the correct language (if the model performs the task correctly but responds in the wrong language, it is judged to have failed the task).
62
+
63
+
64
+ **MT-Bench**
65
+
66
+ MT-Bench evaluates a model's ability to engage in multi-turn (2 turns) conversations and respond in ways that align with human needs. We use `gpt-4-1106-preview` as the judge model and compare against `gpt-3.5-turbo-0125` as the baseline model. The metric used is the weighted win rate against the baseline model (i.e. average win rate across each category: Math, Reasoning, STEM, Humanities, Roleplay, Writing, Extraction). A tie is given a score of 0.5.
67
+
68
+
69
+ For more details on Gemma2 9B CPT SEA-LIONv3 Instruct benchmark performance, please refer to the SEA HELM leaderboard, https://leaderboard.sea-lion.ai/
70
+
71
+
72
+ ### Usage
73
+ Gemma2 9B CPT SEA-LIONv3 Instruct can be run using the 🤗 Transformers library
74
+ ```python
75
+ # Please use transformers==4.45.2
76
+
77
+ import transformers
78
+ import torch
79
+
80
+ model_id = "aisingapore/gemma2-9b-cpt-sea-lionv3-instruct"
81
+
82
+ pipeline = transformers.pipeline(
83
+ "text-generation",
84
+ model=model_id,
85
+ model_kwargs={"torch_dtype": torch.bfloat16},
86
+ device_map="auto",
87
+ )
88
+ messages = [
89
+ {"role": "user", "content": "Apa sentimen dari kalimat berikut ini?\nKalimat: Buku ini sangat membosankan.\nJawaban: "},
90
+ ]
91
+
92
+ outputs = pipeline(
93
+ messages,
94
+ max_new_tokens=256,
95
+ )
96
+ print(outputs[0]["generated_text"][-1])
97
+ ```
98
+
99
+ ### Caveats
100
+ It is important for users to be aware that our model exhibits certain limitations that warrant consideration. Like many LLMs, the model can hallucinate and occasionally generates irrelevant content, introducing fictional elements that are not grounded in the provided context. Users should also exercise caution in interpreting and validating the model's responses due to the potential inconsistencies in its reasoning.
101
+
102
+ ## Limitations
103
+ ### Safety
104
+
105
+ Current SEA-LION models, including this commercially permissive release, have not been aligned for safety. Developers and users should perform their own safety fine-tuning and related security measures. In no event shall the authors be held liable for any claim, damages, or other liability arising from the use of the released weights and codes.
106
+
107
+ ## Technical Specifications
108
+ ### Fine-Tuning Details
109
+ Gemma2 9B CPT SEA-LIONv3 Instruct was built using a combination of a full parameter fine-tune, on-policy alignment, and model merges of the best performing checkpoints. The training process for fine-tuning was approximately 15 hours, with alignment taking 2 hours, both on 8x H100-80GB GPUs.
110
+
111
+ ## Data
112
+ Gemma2 9B CPT SEA-LIONv3 Instruct was trained on a wide range of synthetic instructions, alongside publicly available instructions hand-curated by the team with the assistance of native speakers. In addition, special care was taken to ensure that the datasets used had commercially permissive licenses through verification with the original data source.
113
+
114
+ ## Call for Contributions
115
+ We encourage researchers, developers, and language enthusiasts to actively contribute to the enhancement and expansion of SEA-LION. Contributions can involve identifying and reporting bugs, sharing pre-training, instruction, and preference data, improving documentation usability, proposing and implementing new model evaluation tasks and metrics, or training versions of the model in additional Southeast Asian languages. Join us in shaping the future of SEA-LION by sharing your expertise and insights to make these models more accessible, accurate, and versatile. Please check out our GitHub for further information on the call for contributions.
116
+
117
+ ## The Team
118
+
119
+ Chan Adwin, Choa Esther, Cheng Nicholas, Huang Yuli, Lau Wayne, Lee Chwan Ren, Leong Wai Yi, Leong Wei Qi, Limkonchotiwat Peerat, Liu Bing Jie Darius, Montalan Jann Railey, Ng Boon Cheong Raymond, Ngui Jian Gang, Nguyen Thanh Ngan, Ong Brandon, Ong Tat-Wee David, Ong Zhi Hao, Rengarajan Hamsawardhini, Siow Bryan, Susanto Yosephine, Tai Ngee Chia, Tan Choon Meng, Teo Eng Sipp Leslie, Teo Wei Yi, Tjhi William, Teng Walter, Yeo Yeow Tong, Yong Xianbin
120
+
121
+ ## Acknowledgements
122
+
123
+ [AI Singapore](​​https://aisingapore.org/) is a national programme supported by the National Research Foundation, Singapore and hosted by the National University of Singapore. Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not reflect the views of the National Research Foundation or the National University of Singapore.
124
+
125
+ ## Contact
126
+
127
+ For more info, please contact us using this [SEA-LION Inquiry Form](https://forms.gle/sLCUVb95wmGf43hi6)
128
+
129
+ [Link to SEA-LION's GitHub repository](https://github.com/aisingapore/sealion)
130
+
131
+ ## Disclaimer
132
+
133
+ This is the repository for the commercial instruction-tuned model.
134
+ The model has _not_ been aligned for safety.
135
+ Developers and users should perform their own safety fine-tuning and related security measures.
136
+ In no event shall the authors be held liable for any claims, damages, or other liabilities arising from the use of the released weights and codes.
gemma2-9b-cpt-sea-lionv3-instruct.Q4_0.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d536bd1ea5cd2d37e41a5585993666d4f4387b3066e5fcaafeb4db0b25634d72
3
+ size 5443143072