Safetensors
gemma2
kiliangoto's picture
Update README.md
d1b22fc verified
|
raw
history blame
8 kB
metadata
base_model:
  - GoToCompany/gemma2-9b-cpt-sahabatai-v1-base
language:
  - en
  - id
  - jv
  - su
license: gemma

Gemma2 9B CPT Sahabat AI v1 Instruct

Sahabat AI is a collection of Large Language Models (LLMs) which has been pretrained and instruct-tuned for Indonesian languages.

Llama3 8B CPT Sahabat AI v1 Instruct is an Indonesian-focused model which has been fine-tuned with around 448,000 Indonesian instruction-completion pairs alongside an Indonesian-dialect pool consisting of 96,000 instruction-completion pairs in Javanese and 98,000 instruction-completion pairs in Sundanese. Additionally, we also included 129,000 instruction-completion pairs in English.

Sahabat is Indonesian for "Close Friends."

  • Developed by: PT GoTo Gojek Tokopedia Tbk, AI Singapore
  • Funded by: PT GoTo Gojek Tokopedia Tbk, AI Singapore
  • Model type: Decoder
  • Languages: English, Indonesian, Javanese, Sundanese
  • License: Gemma Community License

Model Details

Model Description

We performed instruction tuning in Indonesian, Javanese, Sundanese as well as English on our continued pre-trained Gemma2 9B CPT Sahabat AI v1, a decoder model using the Gemma2 architecture, to create Gemma2 9B CPT Sahabat AI v1 Instruct.

For tokenisation, the model employs the default tokenizer used in Gemma-2-9B. The model has a context length of 8192.

Benchmark Performance

We evaluated Gemma2 9B CPT Sahabat AI v1 Instruct on general language capabilities.

General Language Capabilities

For the evaluation of general language capabilities, we employed the

  • SEA HELM (also known as BHASA) evaluation benchmark across a variety of tasks.
    • 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).
    • We also added support for Javanese and Sundanese for the BHASA tasks whenever applicable
  • IndoMMLU
    • These tasks include examination questions on Humanities, Indonesian language, Local languages and cultures, Social science and STEM across primary, middle, and high school levels.
  • and the well known English MMLU

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.

The evaluation was done zero-shot with native prompts on a sample of 100-1000 instances for each dataset.

Usage

Gemma2 9B CPT Sahabat AI v1 Instruct can be run using the 🤗 Transformers library

# Please use transformers==4.45.2

import transformers
import torch

model_id =  # PLACEHOLDER 

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)
messages = [
    {"role": "user", "content": "Apa sentimen dari kalimat berikut ini?\nKalimat: Buku ini sangat membosankan.\nJawaban: "},
]

outputs = pipeline(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])

Caveats

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.

Limitations

Safety

Current Sahabat AI 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.

Technical Specifications

Fine-Tuning Details

Gemma2 9B CPT Sahabat AI v1 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 4 hours, with alignment taking 2 hours, both on 8x H100-80GB GPUs.

Data

Gemma2 9B CPT Sahabat AI v1 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.

Call for Contributions

We encourage researchers, developers, and language enthusiasts to actively contribute to the enhancement and expansion of Sahabat. 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 Indonesian languages. Join us in shaping the future of Sahabat by sharing your expertise and insights to make these models more accessible, accurate, and versatile.

The Team (by ascending alphabetical order)

AI Singapore

Chan Adwin
Chau Shiau Ching
Cheng Nicholas
Choa Esther
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
Teng Walter
Teo Eng Sipp Leslie
Teo Wei Yi
Tjhi William
Yeo Yeow Tong
Yong Xianbin

PT GoTo Gojek Tokopedia Tbk

Anissa Dininta
Choiri Hendra Hadhil
Goel Priyank
Saini Ajay Kumar
Shalev Ofir
Tan Daryl
Tep Kilian Rithi
Tiwari Anupam
Widjojo Daniel

Contact

For more info, please contact us using this Sahabat Inquiry Form.

Disclaimer

This is the repository for the Instruct model. The model has 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.

References

IndoMMLU Reference

@inproceedings{koto-etal-2023-indommlu,
    title = "Large Language Models Only Pass Primary School Exams in {I}ndonesia: A Comprehensive Test on {I}ndo{MMLU}",
    author = "Fajri Koto and Nurul Aisyah and Haonan Li and Timothy Baldwin",
    booktitle = "Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing (EMNLP)",
    month = December,
    year = "2023",
    address = "Singapore",
    publisher = "Association for Computational Linguistics",
}
}