Text Generation
Transformers
Safetensors
Indonesian
English
qwen2
education
indonesia
exam-generator
kurikulum-merdeka
text-generation-inference
unsloth
conversational
Instructions to use DimasMP3/Qwen2.5-Exam-GenAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DimasMP3/Qwen2.5-Exam-GenAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DimasMP3/Qwen2.5-Exam-GenAI") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DimasMP3/Qwen2.5-Exam-GenAI") model = AutoModelForCausalLM.from_pretrained("DimasMP3/Qwen2.5-Exam-GenAI", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DimasMP3/Qwen2.5-Exam-GenAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DimasMP3/Qwen2.5-Exam-GenAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DimasMP3/Qwen2.5-Exam-GenAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/DimasMP3/Qwen2.5-Exam-GenAI
- SGLang
How to use DimasMP3/Qwen2.5-Exam-GenAI with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "DimasMP3/Qwen2.5-Exam-GenAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DimasMP3/Qwen2.5-Exam-GenAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "DimasMP3/Qwen2.5-Exam-GenAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DimasMP3/Qwen2.5-Exam-GenAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use DimasMP3/Qwen2.5-Exam-GenAI with Docker Model Runner:
docker model run hf.co/DimasMP3/Qwen2.5-Exam-GenAI
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,21 +1,89 @@
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/Qwen2.5-7B-Instruct
|
| 3 |
tags:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
- text-generation-inference
|
| 5 |
- transformers
|
| 6 |
- unsloth
|
| 7 |
- qwen2
|
| 8 |
license: apache-2.0
|
| 9 |
language:
|
|
|
|
| 10 |
- en
|
| 11 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
|
|
|
| 1 |
---
|
| 2 |
base_model: unsloth/Qwen2.5-7B-Instruct
|
| 3 |
tags:
|
| 4 |
+
- education
|
| 5 |
+
- indonesia
|
| 6 |
+
- exam-generator
|
| 7 |
+
- kurikulum-merdeka
|
| 8 |
- text-generation-inference
|
| 9 |
- transformers
|
| 10 |
- unsloth
|
| 11 |
- qwen2
|
| 12 |
license: apache-2.0
|
| 13 |
language:
|
| 14 |
+
- id
|
| 15 |
- en
|
| 16 |
---
|
| 17 |
+
datasets:
|
| 18 |
+
- DimasMP3/Indo-Elementary-School-Exams (custom)
|
| 19 |
+
metrics:
|
| 20 |
+
- eval_loss: 0.6869
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
# ๐ Qwen2.5-7B-Indo-Exam-Generator-16bit
|
| 24 |
+
|
| 25 |
+
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200" align="right"/>](https://github.com/unslothai/unsloth)
|
| 26 |
+
|
| 27 |
+
**Developed by:** [Dimas Maulana Putra (DimasMP3)](https://github.com/DimasMP3)
|
| 28 |
+
**Model Type:** Specialized Fine-Tuned for Indonesian Elementary Education
|
| 29 |
+
**Training Status:** Optimal @ Step 500 (Eval Loss: 0.686)
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## ๐ Overview
|
| 34 |
+
**Qwen2.5-Indo-Exam-Generator** adalah model bahasa yang telah di-finetuning secara khusus untuk menjawab tantangan dunia pendidikan di Indonesia. Model ini dilatih menggunakan dataset berkualitas tinggi sebanyak **4.500+ soal sekolah dasar** yang disesuaikan dengan **Kurikulum Merdeka**.
|
| 35 |
+
|
| 36 |
+
Model ini bukan sekadar AI umum; ia dirancang untuk berperan sebagai **Guru Digital** yang mampu menghasilkan soal ujian (pilihan ganda) lengkap dengan kunci jawaban dan pembahasan yang akurat.
|
| 37 |
+
|
| 38 |
+
### โจ Key Features
|
| 39 |
+
- ๐ฎ๐ฉ **Native Indonesian Support:** Memahami istilah pendidikan lokal (IPAS, HOTS, Kurikulum Merdeka).
|
| 40 |
+
- ๐ **Structured Output:** Konsisten dalam menghasilkan format Soal, Opsi (A-D), Kunci, dan Pembahasan.
|
| 41 |
+
- ๐ง **RAG Ready:** Dioptimalkan untuk bekerja dengan sistem *Retrieval-Augmented Generation* (pgvector/Drizzle).
|
| 42 |
+
- ๐ **High Precision:** Fine-tuned dalam format 16-bit untuk akurasi logika yang tajam.
|
| 43 |
+
|
| 44 |
+
---
|
| 45 |
+
|
| 46 |
+
## ๐ Training Results (WandB Metrics)
|
| 47 |
+
Training dilakukan dengan pengawasan ketat terhadap *Validation Loss* untuk mencegah halusinasi:
|
| 48 |
+
|
| 49 |
+
| Metric | Value |
|
| 50 |
+
| :--- | :--- |
|
| 51 |
+
| **Best Step** | 500 |
|
| 52 |
+
| **Validation Loss** | **0.6869** |
|
| 53 |
+
| **Training Loss** | 0.3204 |
|
| 54 |
+
| **Epoch** | 2.43 |
|
| 55 |
+
|
| 56 |
+
> **Note:** Berhenti otomatis via *Early Stopping* di Step 650 untuk memastikan bobot terbaik (Step 500) yang tersimpan.
|
| 57 |
+
|
| 58 |
+
---
|
| 59 |
+
|
| 60 |
+
## ๐ ๏ธ Tech Stack
|
| 61 |
+
Model ini lahir dari perpaduan teknologi mutakhir:
|
| 62 |
+
- **Base Model:** `unsloth/Qwen2.5-7B-Instruct`
|
| 63 |
+
- **Fine-tuning Tool:** [Unsloth](https://github.com/unslothai/unsloth) (2x faster training)
|
| 64 |
+
- **Framework:** Huggingface TRL & Transformers
|
| 65 |
+
- **Optimization:** LoRA (Rank 128)
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## ๐ Cara Penggunaan (Inference)
|
| 70 |
|
| 71 |
+
```python
|
| 72 |
+
from unsloth import FastLanguageModel
|
| 73 |
+
import torch
|
| 74 |
|
| 75 |
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
| 76 |
+
model_name = "DimasMP3/Qwen2.5-7B-Indo-Exam-Generator-16bit",
|
| 77 |
+
max_seq_length = 2048,
|
| 78 |
+
load_in_4bit = True,
|
| 79 |
+
)
|
| 80 |
|
| 81 |
+
prompt = """<|im_start|>system
|
| 82 |
+
Anda adalah Guru SD yang ahli. Buatlah soal pilihan ganda berdasarkan konteks materi ini.<|im_end|>
|
| 83 |
+
<|im_start|>user
|
| 84 |
+
Topik: Ekosistem Laut
|
| 85 |
+
Konteks: Terumbu karang adalah tempat tinggal ikan.<|im_end|>
|
| 86 |
+
<|im_start|>assistant
|
| 87 |
+
"""
|
| 88 |
|
| 89 |
+
# Generate Output...
|