Downloads · 30 days
71
5% of all-time downloads
neosantara/wader-100m-base
wader-100m-base is a text generation model from neosantara. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
71
5% of all-time downloads
All-time downloads
1.5K
Public
Parameters
110M
442 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors442 MB · 98%
From the Hugging Face model README
[English Version: README.en.md]
Model bahasa Indonesia ringan berukuran ~110 Juta parameter yang mengimplementasikan arsitektur DeepSeek-V4 (MLA, MoE, Hyper-Connections), dilatih dari nol menggunakan korpus percakapan bahasa Indonesia berskala besar. Ini adalah model dasar (pretrained base model) — untuk versi Chat/SFT, silakan gunakan neosantara/wader-100m.
Model ini mengimplementasikan inovasi kunci DeepSeek-V4 pada skala miniatur:
| Komponen | Detail |
|---|---|
| Parameter | ~110M total (41M embedding, 69M non-embedding) |
| Hidden size | 320 |
| Layer | 8 |
| Attention heads | 8 (1 KV head — gaya MQA) |
| Head dim | 96 (32 RoPE + 64 NoPE) |
| MLA | q_lora_rank=160, o_groups=2, o_lora_rank=80 |
| MoE | 4 routed experts + 1 shared, top-2 routing |
| Expert FFN | SwiGLU, intermediate_size=640 |
| Routing | sqrtsoftplus scoring, noaux_tc method |
| Hyper-Connections | hc_mult=4, Sinkhorn routing (2 iters) |
| Vocab | 128.000 (Tokenizer DeepSeek-V4) |
| Konteks | 2.048 token |
| Metrik | Nilai |
|---|---|
| Final Train Loss | ~2.83 (Cross-Entropy pada Step 5000) |
| Token Accuracy | ~49.38% (Prediksi kata berikutnya dari awal) |
import torch
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
from huggingface_hub import hf_hub_download
from safetensors.torch import load_file
# PENTING: Model ini mewajibkan penggunaan GPU modern (Ampere/Ada/Hopper) yang mendukung bfloat16.
# Jika dijalankan di CPU atau GPU tua (seperti T4), akan terjadi error NaN.
device = "cuda" if torch.cuda.is_available() else "cpu"
# 1. Load config and model
repo_id = "neosantara/wader-100m-base"
config = AutoConfig.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_config(config, trust_remote_code=True).to(torch.bfloat16).to(device)
# 2. Download and load weights
weights_path = hf_hub_download(repo_id, "model.safetensors")
state_dict = load_file(weights_path)
model.load_state_dict(state_dict, strict=True)
model.eval()
# 3. Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
# 4. Generate Indonesian text completion
prompt = "Indonesia adalah negara kepulauan yang memiliki"
input_ids = tokenizer.encode(prompt, return_tensors="pt").to(device)
with torch.no_grad():
output = model.generate(
input_ids,
max_new_tokens=100,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
pad_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
trust_remote_code=True.bfloat16. Berjalan di CPU murni (float32) atau GPU lama (T4) akan meluapkan limit kalkulasi (overflow) yang menyebabkan NaN error.Apache-2.0