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.
Model Developers
Bahasa AI
Intended Use
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.
Training Data
Bahasa-4b was trained on a 10 billion subset data of Indonesian dataset from a collected pool of 100 billion.
Benchmarks
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 inzip(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.
Runs of acul3 bahasa-4b-v3 on huggingface.co
10
Total runs
-1
24-hour runs
-1
3-day runs
0
7-day runs
4
30-day runs
More Information About bahasa-4b-v3 huggingface.co Model
bahasa-4b-v3 huggingface.co is an AI model on huggingface.co that provides bahasa-4b-v3's model effect (), which can be used instantly with this acul3 bahasa-4b-v3 model. huggingface.co supports a free trial of the bahasa-4b-v3 model, and also provides paid use of the bahasa-4b-v3. Support call bahasa-4b-v3 model through api, including Node.js, Python, http.
bahasa-4b-v3 huggingface.co is an online trial and call api platform, which integrates bahasa-4b-v3's modeling effects, including api services, and provides a free online trial of bahasa-4b-v3, you can try bahasa-4b-v3 online for free by clicking the link below.
acul3 bahasa-4b-v3 online free url in huggingface.co:
bahasa-4b-v3 is an open source model from GitHub that offers a free installation service, and any user can find bahasa-4b-v3 on GitHub to install. At the same time, huggingface.co provides the effect of bahasa-4b-v3 install, users can directly use bahasa-4b-v3 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.