Lyon28 / caca-6M-untrained

huggingface.co
Total runs: 13
24-hour runs: -6
7-day runs: -7
30-day runs: -11
Model's Last Updated: Juillet 19 2026
text-generation

Introduction of caca-6M-untrained

Model Details of caca-6M-untrained

caca-6M

🚀 CACA-6M

Model Transformer Modern dengan Arsitektur Canggih

License Python 3.8+ PyTorch Transformers

6,698,016 parameters • 6.70M • 4 layers

📖 Dokumentasi • 🚀 Quick Start • 💡 Fitur • 🔧 Training • 📊 Spesifikasi


⚠️ PENTING: Model Belum Dilatih (Untrained)

PERHATIAN : Ini adalah model yang belum melalui proses training . Bobot model masih dalam kondisi random initialization. Output yang dihasilkan akan tidak bermakna dan acak .

Status Model:

  • 🔴 Belum dilatih - Bobot masih random
  • 🟡 Hanya untuk riset - Eksperimen arsitektur & training
  • 🟢 Siap dilatih - Arsitektur sudah teruji

Widget di atas hanya menunjukkan format input yang diharapkan . Setelah model dilatih dengan dataset yang tepat, format yang sama akan menghasilkan output berkualitas.


📋 Deskripsi

Caca adalah arsitektur Large Language Model (LLM) generasi terbaru yang menggabungkan berbagai teknik state-of-the-art dalam deep learning. Model ini dirancang dengan fokus pada efisiensi , skalabilitas , dan performa tinggi .

Caca itu eksperimen open-source Indonesian LLM yang dibuat dari nol secara individual dan bertahap. Bukan kompetitor siapa-siapa, cuma pengen eksplorasi apa yang bisa dilakukan dengan budget terbatas, passion unlimited, dan mindset collaborative. Kalau berguna buat orang lain, alhamdulillah. Kalau enggak, ya tetap fun kok.

Ini proyek eksplorasi, jadi kalau gagal ya bagian dari proses belajar. Kalau berhasil, itu bonus.

🎯 Keunggulan Utama
  • 🇮🇩 Bilingual Support : Optimized untuk Bahasa Indonesia & English
  • ⚡ Ultra Fast : Flash Attention 2 untuk inferensi 3x lebih cepat
  • 💾 Memory Efficient : Grouped Query Attention menghemat 75% KV cache
  • 🎯 Long Context : Support hingga 2,048 token
  • 🔧 Modular : Arsitektur fleksibel dengan berbagai opsi konfigurasi

✨ Fitur Utama
🎯 Core Features
  • ✅ Grouped Query Attention (GQA) - Efisiensi memori dan komputasi superior

    • Query heads: 4
    • KV heads: 2
    • Ratio: 2:1 (hemat 75% KV cache)
  • ✅ Rotary Position Embeddings (RoPE) - Generalisasi konteks panjang lebih baik

    • Theta: 10000
    • Support extrapolation untuk konteks > training length
  • ✅ RMSNorm - Normalisasi lebih stabil dan 50% lebih cepat dari LayerNorm

    • Epsilon: 1e-06
  • ✅ SwiGLU Activation - Performa 10-15% lebih baik dari ReLU/GELU

    • Intermediate size: 384
  • ✅ Flash Attention 2 - Akselerasi hingga 3x dengan memory efficiency

    • Otomatis aktif jika tersedia CUDA
🔥 Advanced Features
🎯 Attention Mechanisms
  • ⚡ Flash Attention v2 - 3x faster with IO-aware algorithm
  • 🔑 Grouped Query Attention (GQA) - 4Q : 2KV heads
  • 🚀 xFormers Support - Memory efficient attention fallback
  • 🎯 PyTorch SDPA - Native scaled dot product attention
📍 Position Encodings
  • 🔄 RoPE - Rotary embeddings (θ=10000)
🪟 Long Context Features
🎓 Training Optimizations
  • 💾 Gradient Checkpointing - Memory efficient training
  • 🎯 Mixed Precision - BF16 & FP16 support
📦 Quantization Support
  • 4️⃣ 4-bit Quantization - NF4, FP4 via bitsandbytes
  • 8️⃣ 8-bit Quantization - LLM.int8() support
  • 🔄 Double Quantization - Further compression
🛠️ Optimization Features
  • 💾 KV Cache - Generasi autoregressive 5-10x lebih cepat
  • 🔧 Gradient Checkpointing - Training model besar dengan memory terbatas
  • 📦 Quantization Ready - Support 4-bit & 8-bit quantization
  • 🎯 Mixed Precision Training - BF16 & FP16 support

📊 Spesifikasi Teknis
Spesifikasi Detail
💎 Total Parameters 6,698,016 (6.70M)
📐 Hidden Size 96
🔢 Intermediate Size 384
🏗️ Num Layers 4
🎯 Attention Heads 4
🔑 KV Heads 2 (GQA)
📏 Head Dimension 24
📚 Vocab Size 32,000 tokens
📖 Max Context 2,048 tokens
🏛️ Architecture Decoder-only Transformer
🎨 Model Type Causal Language Model
📐 Arsitektur Detail
🔍 Klik untuk lihat struktur lengkap
CacaForCausalLM (6.70M)
│
├─ Embedding Layer
│  └─ Token Embeddings: 32,000 × 96
│     └─ Parameters: 3,072,000
│
├─ Transformer Layers (4x)
│  │
│  ├─ Layer {i} (repeated 4 times)
│  │  │
│  │  ├─ Input LayerNorm (RMSNorm)
│  │  │  └─ Params: 96
│  │  │
│  │  ├─ Self-Attention (Grouped Query Attention)
│  │  │  ├─ Q Projection: 96 → 96
│  │  │  ├─ K Projection: 96 → 48
│  │  │  ├─ V Projection: 96 → 48
│  │  │  ├─ O Projection: 96 → 96
│  │  │  ├─ RoPE Embeddings: θ=10000
│  │  │  └─ Flash Attention 2 (if available)
│  │  │
│  │  ├─ Post-Attention LayerNorm (RMSNorm)
│  │  │  └─ Params: 96
│  │  │
│  │  ├─ MLP (SwiGLU)
│  │  │  ├─ Gate: 96 → 384
│  │  │  ├─ Up: 96 → 384
│  │  │  ├─ Activation: SiLU (Swish)
│  │  │  └─ Down: 384 → 96
│  │  │
│  │  └─ Residual Connections (2x per layer)
│  │
│  └─ Total Layer Params: ~0M per layer
│
├─ Final LayerNorm (RMSNorm)
│  └─ Params: 96
│
└─ LM Head (Output Projection)
   └─ Linear: 96 → 32,000
      └─ Parameters: 3,072,000

Perhitungan Parameter:

  • Embeddings: 32,000 × 96 = 3,072,000
  • Layers: 4 layers × ~0M = ~0M
  • Total: 6,698,016 parameters

🚀 Quick Start
📦 Instalasi
# Dependencies dasar
pip install torch>=2.0.0 transformers>=4.35.0 accelerate safetensors

# Optional: Untuk performa maksimal
pip install flash-attn --no-build-isolation  # Flash Attention 2
pip install xformers                          # Memory efficient attention
pip install bitsandbytes                      # Quantization support
💻 Penggunaan Dasar
1️⃣ Load Model
from transformers import AutoModelForCausalLM, AutoConfig
import torch

# Load configuration
config = AutoConfig.from_pretrained(
    "Lyon28/caca-6M-untrained",
    trust_remote_code=True
)

print(f"Model: {config.model_type}")
print(f"Parameters: 6,698,016")
print(f"Hidden size: {config.hidden_size}")
print(f"Layers: {config.num_hidden_layers}")

# Load model
model = AutoModelForCausalLM.from_pretrained(
    "Lyon28/caca-6M-untrained",
    config=config,
    torch_dtype=torch.bfloat16,  # Gunakan BF16 untuk efisiensi
    device_map="auto",            # Otomatis distribusi ke GPU
    trust_remote_code=True
)

print(f"Model loaded! Device: {model.device}")
2️⃣ Verifikasi Model
# Hitung total parameter
total_params = sum(p.numel() for p in model.parameters())
trainable_params = sum(p.numel() for p in model.parameters() if p.requires_grad)

print(f"Total parameters: {total_params:,}")
print(f"Trainable parameters: {trainable_params:,}")
print(f"Model size: {total_params * 2 / 1e9:.2f} GB (BF16)")

# Test forward pass
batch_size, seq_len = 2, 10
input_ids = torch.randint(0, config.vocab_size, (batch_size, seq_len))
input_ids = input_ids.to(model.device)

with torch.no_grad():
    outputs = model(input_ids)

print(f"Output shape: {outputs.logits.shape}")
print("✅ Model berfungsi dengan baik!")
3️⃣ Generate Text (Setelah Training)
from transformers import AutoTokenizer

# Load tokenizer (gunakan tokenizer yang sesuai)
tokenizer = AutoTokenizer.from_pretrained("your-tokenizer-here")

# Prepare input
text = "Jelaskan tentang kecerdasan buatan"
inputs = tokenizer(text, return_tensors="pt").to(model.device)

# Generate
outputs = model.generate(
    **inputs,
    max_new_tokens=100,
    temperature=0.7,
    top_p=0.9,
    top_k=50,
    do_sample=True,
    repetition_penalty=1.1,
    pad_token_id=tokenizer.eos_token_id
)

# Decode
generated_text = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(generated_text)

🔧 Training Guide
📚 Persiapan Dataset
from datasets import load_dataset

# Load dataset (contoh)
dataset = load_dataset("indonesian-nlp/id-wikipedia")

# Atau load dari file lokal
from datasets import Dataset
import pandas as pd

df = pd.read_csv("your_data.csv")
dataset = Dataset.from_pandas(df)

print(f"Dataset size: {len(dataset)}")
🎯 Training Configuration
from transformers import Trainer, TrainingArguments
from transformers import DataCollatorForLanguageModeling

# Training arguments
training_args = TrainingArguments(
    # Output
    output_dir="./caca-6M-trained",
    run_name="caca-6M-v1",
    
    # Training
    num_train_epochs=3,
    per_device_train_batch_size=4,
    gradient_accumulation_steps=8,  # Effective batch size = 32
    learning_rate=2e-4,
    weight_decay=0.1,
    warmup_steps=2000,
    
    # Optimization
    bf16=True,                      # Mixed precision training
    gradient_checkpointing=True,     # Hemat memory
    optim="adamw_torch_fused",      # Optimizer tercepat
    max_grad_norm=1.0,
    
    # Logging & Evaluation
    logging_steps=10,
    logging_first_step=True,
    eval_strategy="steps",
    eval_steps=500,
    save_steps=1000,
    save_total_limit=3,
    
    # Hub integration
    push_to_hub=True,
    hub_model_id="your-username/caca-6M-trained",
    hub_strategy="every_save",
    
    # Distributed training
    ddp_find_unused_parameters=False,
    dataloader_num_workers=4,
)

# Data collator
data_collator = DataCollatorForLanguageModeling(
    tokenizer=tokenizer,
    mlm=False  # Causal LM, bukan Masked LM
)

# Trainer
trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=dataset["train"],
    eval_dataset=dataset["validation"],
    data_collator=data_collator,
)

# Train!
print("🚀 Starting training...")
trainer.train()

# Save final model
print("💾 Saving model...")
trainer.save_model("./caca-6M-final")
trainer.push_to_hub()

print("✅ Training complete!")
📊 Estimasi Resource
💰 Klik untuk melihat estimasi biaya & waktu training

Hardware Requirements:

GPU Memory Batch Size Speed Est. Time (100B tokens)
RTX 3090 (24GB) 24GB 1-2 ~1K tok/s ~30 hari
A100 (40GB) 40GB 4-8 ~5K tok/s ~6 hari
A100 (80GB) 80GB 8-16 ~8K tok/s ~4 hari
8×A100 (80GB) 640GB 64+ ~50K tok/s ~14 jam

Cloud Costs (approximate):

  • AWS p4d.24xlarge (8×A100): $32/hour × 24 hours = ** $768/day**
  • GCP a2-ultragpu-8g: $30/hour × 24 hours = ** $720/day**
  • Lambda Labs (8×A100): $15/hour × 24 hours = ** $360/day**

Tips menghemat biaya:

  • Gunakan spot instances (60-70% lebih murah)
  • Gradient accumulation untuk batch size lebih besar
  • Mixed precision (BF16) untuk 2x speedup
  • Gradient checkpointing untuk hemat memory

💬 Format Chat

Model ini mendukung format chat standar:

# Single-turn
messages = [
    {"role": "user", "content": "Halo! Siapa kamu?"},
]

# Multi-turn conversation
messages = [
    {"role": "system", "content": "Kamu adalah asisten AI yang membantu."},
    {"role": "user", "content": "Jelaskan tentang fotosintesis"},
    {"role": "assistant", "content": "Fotosintesis adalah proses..."},
    {"role": "user", "content": "Apa manfaatnya bagi manusia?"},
]

# Apply chat template
formatted = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)

print(formatted)
# Output:
# System: Kamu adalah asisten AI yang membantu.
#
# User: Jelaskan tentang fotosintesis
# Assistant: Fotosintesis adalah proses...
# User: Apa manfaatnya bagi manusia?
# Assistant:

🎯 Use Cases
✅ Cocok Untuk:
  • 🔬 Penelitian : Eksperimen arsitektur LLM modern
  • 📚 Edukasi : Belajar tentang transformer & training
  • 🎓 Akademis : Paper, thesis, project
  • 🚀 Base Model : Fine-tuning untuk task spesifik
  • 💡 Proof of Concept : Test ide sebelum scale up
❌ Tidak Cocok Untuk:
  • 🚫 Production : Model belum dilatih
  • 🚫 Real-world apps : Output masih random
  • 🚫 Safety-critical : Belum ada safety alignment
  • 🚫 Direct deployment : Perlu training dulu

📖 Dokumentasi
🔗 Links Penting

🤝 Contributing

Kami sangat terbuka untuk kontribusi! Beberapa cara untuk berkontribusi:

  • 🐛 Report bugs : Temukan bug? Buka issue
  • 💡 Suggest features : Punya ide? Share di discussions
  • 📝 Improve docs : PR welcome untuk dokumentasi
  • 🎓 Share results : Training hasil? Share di model card
  • ⭐ Star & Share : Bantu project ini berkembang

📜 License & Citation
📄 License

Model ini dirilis di bawah Apache License 2.0 :

  • ✅ Gratis untuk penggunaan komersial
  • ✅ Gratis untuk penggunaan riset
  • ✅ Boleh modifikasi & distribusi
  • ✅ Tidak ada garansi
📚 Citation

Jika Anda menggunakan model ini dalam penelitian atau project, mohon cite:

@misc{caca-2025,
  author = {Lyon},
  title = {Caca: Modern Transformer Architecture with GQA and Advanced Features},
  year = {2025},
  publisher = {Hugging Face},
  journal = {Hugging Face Model Hub},
  howpublished = {\url{https://huggingface.co/Lyon28/caca-6M-untrained}},
}
🙏 Acknowledgments

Model ini terinspirasi dan mengimplementasikan berbagai penelitian terkini:

🏗️ Core Architecture
🎯 Attention Mechanisms
📍 Position Encodings
🪟 Long Context & Efficiency
🧠 Mixture of Experts (MoE)
🎓 Training Optimizations
📦 Quantization
🎨 Multimodal Components
🛠️ Normalization & Activations
🔧 Implementation & Tools
  • Hugging Face Transformers - Model implementation framework
  • PyTorch - Deep learning framework
  • Safetensors - Secure tensor serialization format
  • Accelerate - Distributed training utilities

Special Thanks to:

  • 🇮🇩 Indonesian NLP Community
  • 🤗 Hugging Face Team
  • 🔬 Open source AI research community
⚠️ Limitations & Bias
Keterbatasan
  • 🔴 Untrained : Model belum dilatih, output random
  • 🟡 No Tokenizer : Perlu prepare tokenizer sendiri
  • 🟡 No Safety : Belum ada content filtering/alignment
  • 🟠 Memory Intensive : Training butuh GPU besar
Potential Biases

Model ini akan mewarisi bias dari data training yang digunakan. Mohon perhatikan:

  • Bahasa : Bias terhadap bahasa mayoritas di dataset
  • Kultur : Bias terhadap perspektif kultur tertentu
  • Gender & Demografis : Potential stereotypes
  • Faktual : Bisa generate informasi tidak akurat

Rekomendasi : Lakukan evaluation & filtering sebelum deployment.


📞 Support & Contact
💬 Community
📧 Contact

Untuk pertanyaan atau kolaborasi:


🌟 Star History

Star History Chart


💝 Dibuat dengan ❤️ untuk komunitas AI Indonesia

Terima kasih telah menggunakan Caca!

Jika project ini bermanfaat, consider untuk:

  • ⭐ Star repository ini
  • 🔗 Share ke teman-teman
  • 💬 Join discussions
  • 🤝 Contribute ke project

Quote Dari caca
Daily Quote

Runs of Lyon28 caca-6M-untrained on huggingface.co

13
Total runs
-6
24-hour runs
-5
3-day runs
-7
7-day runs
-11
30-day runs

More Information About caca-6M-untrained huggingface.co Model

More caca-6M-untrained license Visit here:

https://choosealicense.com/licenses/apache-2.0

caca-6M-untrained huggingface.co

caca-6M-untrained huggingface.co is an AI model on huggingface.co that provides caca-6M-untrained's model effect (), which can be used instantly with this Lyon28 caca-6M-untrained model. huggingface.co supports a free trial of the caca-6M-untrained model, and also provides paid use of the caca-6M-untrained. Support call caca-6M-untrained model through api, including Node.js, Python, http.

caca-6M-untrained huggingface.co Url

https://huggingface.co/Lyon28/caca-6M-untrained

Lyon28 caca-6M-untrained online free

caca-6M-untrained huggingface.co is an online trial and call api platform, which integrates caca-6M-untrained's modeling effects, including api services, and provides a free online trial of caca-6M-untrained, you can try caca-6M-untrained online for free by clicking the link below.

Lyon28 caca-6M-untrained online free url in huggingface.co:

https://huggingface.co/Lyon28/caca-6M-untrained

caca-6M-untrained install

caca-6M-untrained is an open source model from GitHub that offers a free installation service, and any user can find caca-6M-untrained on GitHub to install. At the same time, huggingface.co provides the effect of caca-6M-untrained install, users can directly use caca-6M-untrained installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

caca-6M-untrained install url in huggingface.co:

https://huggingface.co/Lyon28/caca-6M-untrained

Url of caca-6M-untrained

caca-6M-untrained huggingface.co Url

Provider of caca-6M-untrained huggingface.co

Lyon28
ORGANIZATIONS

Other API from Lyon28

huggingface.co

Total runs: 449
Run Growth: 449
Growth Rate: 100.00%
Updated:Décembre 11 2025
huggingface.co

Total runs: 255
Run Growth: 255
Growth Rate: 100.00%
Updated:Décembre 11 2025
huggingface.co

Total runs: 202
Run Growth: 202
Growth Rate: 100.00%
Updated:Décembre 11 2025
huggingface.co

Total runs: 125
Run Growth: 125
Growth Rate: 100.00%
Updated:Décembre 09 2025
huggingface.co

Total runs: 123
Run Growth: 123
Growth Rate: 100.00%
Updated:Décembre 09 2025
huggingface.co

Total runs: 40
Run Growth: 40
Growth Rate: 100.00%
Updated:Décembre 09 2025
huggingface.co

Total runs: 27
Run Growth: 27
Growth Rate: 100.00%
Updated:Décembre 09 2025
huggingface.co

Total runs: 8
Run Growth: 0
Growth Rate: 0.00%
Updated:Juillet 08 2025
huggingface.co

Total runs: 7
Run Growth: -2
Growth Rate: -28.57%
Updated:Juillet 11 2025
huggingface.co

Total runs: 6
Run Growth: -10
Growth Rate: -166.67%
Updated:Août 14 2025
huggingface.co

Total runs: 6
Run Growth: -7
Growth Rate: -116.67%
Updated:Août 12 2025
huggingface.co

Total runs: 6
Run Growth: 3
Growth Rate: 50.00%
Updated:Juillet 01 2025
huggingface.co

Total runs: 5
Run Growth: 5
Growth Rate: 100.00%
Updated:Mai 19 2025
huggingface.co

Total runs: 5
Run Growth: 2
Growth Rate: 40.00%
Updated:Janvier 06 2026
huggingface.co

Total runs: 2
Run Growth: 2
Growth Rate: 100.00%
Updated:Mai 19 2025
huggingface.co

Total runs: 1
Run Growth: -2
Growth Rate: -200.00%
Updated:Juin 28 2025
huggingface.co

Total runs: 1
Run Growth: -2
Growth Rate: -200.00%
Updated:Juillet 01 2025
huggingface.co

Total runs: 1
Run Growth: 1
Growth Rate: 100.00%
Updated:Mai 19 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:Décembre 05 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:Juillet 26 2025
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:Décembre 03 2025