Downloads · 30 days
12
6% of all-time downloads
caffeinejunkie1/Qwen3-4B-Indo-Alpaca
Qwen3-4B-Indo-Alpaca is a text generation model from caffeinejunkie1. Use it when you need the model to write or continue text. It is set up for transformers.
Qwen3-4B-Indo-Alpaca is an instruction-tuned language model designed for Indonesian natural language processing tasks. Built upon the Qwen3-4B base model, it has been fine-tuned using Supervised Fine-Tuning (SFT) on a…
Downloads · 30 days
12
6% of all-time downloads
All-time downloads
198
Public
Parameters
4B
8.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors8 GB · 100%
From the Hugging Face model README
Qwen3-4B-Indo-Alpaca is an instruction-tuned language model designed for Indonesian natural language processing tasks. Built upon the Qwen3-4B base model, it has been fine-tuned using Supervised Fine-Tuning (SFT) on a translated Indonesian Alpaca-GPT4 dataset. This model is optimized to understand instructions, answer questions, and assist with general conversational tasks in Indonesian.
The model was fine-tuned exclusively on the Ichsan2895/alpaca-gpt4-indonesian dataset. This dataset contains instruction-response pairs originally generated by GPT-4 and translated into Indonesian, providing high-quality demonstrations for instruction following.
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "caffeinejunkie1/Qwen3-4B-Indo-Alpaca"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
messages = [
{"role": "system", "content": "Anda adalah asisten AI yang sangat membantu."},
{"role": "user", "content": "Jelaskan apa itu machine learning dengan bahasa yang sederhana."}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
generated_ids = model.generate(
**model_inputs,
max_new_tokens=256
)
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)