Downloads · 30 days
68
7% of all-time downloads
RichardErkhov/Bahasalab_-_Bahasa-4b-chat-gguf
Bahasalab_-_Bahasa-4b-chat-gguf is a machine learning model from RichardErkhov. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Downloads · 30 days
68
7% of all-time downloads
All-time downloads
934
Public
Repo size
46.4 GB
Likes
0
Public
Click a slice to open those files.
.gguf53.7 GB · 100%
From the Hugging Face model README
Quantization made by Richard Erkhov.
Bahasa-4b-chat - GGUF
| Name | Quant method | Size |
|---|---|---|
| Bahasa-4b-chat.Q2_K.gguf | Q2_K | 1.51GB |
| Bahasa-4b-chat.IQ3_XS.gguf | IQ3_XS | 1.66GB |
| Bahasa-4b-chat.IQ3_S.gguf | IQ3_S | 1.73GB |
| Bahasa-4b-chat.Q3_K_S.gguf | Q3_K_S | 1.73GB |
| Bahasa-4b-chat.IQ3_M.gguf | IQ3_M | 1.81GB |
| Bahasa-4b-chat.Q3_K.gguf | Q3_K | 1.89GB |
| Bahasa-4b-chat.Q3_K_M.gguf | Q3_K_M | 1.89GB |
| Bahasa-4b-chat.Q3_K_L.gguf | Q3_K_L | 2.03GB |
| Bahasa-4b-chat.IQ4_XS.gguf | IQ4_XS | 2.08GB |
| Bahasa-4b-chat.Q4_0.gguf | Q4_0 | 2.17GB |
| Bahasa-4b-chat.IQ4_NL.gguf | IQ4_NL | 2.18GB |
| Bahasa-4b-chat.Q4_K_S.gguf | Q4_K_S | 2.18GB |
| Bahasa-4b-chat.Q4_K.gguf | Q4_K | 2.29GB |
| Bahasa-4b-chat.Q4_K_M.gguf | Q4_K_M | 2.29GB |
| Bahasa-4b-chat.Q4_1.gguf | Q4_1 | 2.38GB |
| Bahasa-4b-chat.Q5_0.gguf | Q5_0 | 2.58GB |
| Bahasa-4b-chat.Q5_K_S.gguf | Q5_K_S | 2.58GB |
| Bahasa-4b-chat.Q5_K.gguf | Q5_K | 2.64GB |
| Bahasa-4b-chat.Q5_K_M.gguf | Q5_K_M | 2.64GB |
| Bahasa-4b-chat.Q5_1.gguf | Q5_1 | 2.79GB |
| Bahasa-4b-chat.Q6_K.gguf | Q6_K | 3.03GB |
| Bahasa-4b-chat.Q8_0.gguf | Q8_0 | 3.92GB |
language:
Bahasa-4b
Bahasa-4b is continued training from qwen-4b using 10 billion high quality text of Indonesian. The model outperforms some 4b, and even 7b models for Indonesian tasks.
Bahasa AI
This model is intended for various NLP tasks that require understanding and generating Indonesian language. It is suitable for applications such as question answering, sentiment analysis, document summarization, and more.
Bahasa-4b was trained on a 10 billion subset data of Indonesian dataset from a collected pool of 100 billion.
The following table shows the performance of Bahasa-4b compared to the models Sailor_4b and Mistral-7B-v0.1 across several benchmarks:
| Dataset | Version | Metric | Mode | Sailor_4b | Bahasa-4b-hf | Mistral-7B-v0.1 |
|---|---|---|---|---|---|---|
| tydiqa-id | 0e9309 | EM | gen | 53.98 | 55.04 | 63.54 |
| tydiqa-id | 0e9309 | F1 | gen | 73.48 | 75.39 | 78.73 |
| xcopa-id | 36c11c | EM | ppl | 69.2 | 73.2 | 62.40 |
| xcopa-id | 36c11c | F1 | ppl | 69.2 | 73.2 | - |
| m3exam-id-ppl | ede415 | EM | ppl | 31.27 | 44.47 | 26.68 |
| belebele-id-ppl | 7fe030 | EM | ppl | 41.33 | 42.33 | 41.33 |
from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto
model = AutoModelForCausalLM.from_pretrained(
"Bahasalab/Bahasa-4b-chat-v2",
torch_dtype="auto",
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Bahasalab/Bahasa-4b-chat")
messages = [
{"role": "system", "content": "Kamu adalah asisten yang membantu"},
{"role": "user", "content": "kamu siapa"}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
generated_ids = model.generate(
input_ids=model_inputs.input_ids,
attention_mask=model_inputs.attention_mask,
max_new_tokens=512,
eos_token_id=tokenizer.eos_token_id
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
This data demonstrates that Bahasa-4b consistently outperforms the Sailor_4b model in various Indonesian language tasks, showing improvements in both EM (Exact Match) and F1 scores across different datasets, and is competitive with the Mistral-7B-v0.1 model.