Views
No views yet
gate_proj paired with up_proj before projecting down), which has been shown to offer superior semantic representation over standard ReLU or vanilla GELU.| Hyperparameter | Value | Description |
|---|---|---|
| Parameters | ~100M | Total trainable parameter count |
Layers (num_hidden_layers) | 28 | Deep transformer stack for complex linguistic hierarchy |
Hidden Size (hidden_size) | 512 | Width of the embedding and hidden states |
| Intermediate Size | 2,048 | Dimension of the GeGLU feed-forward layer |
| Attention Heads ($Q$) | 8 | Number of query heads |
| Key-Value Heads ($K, V$) | 2 | Grouped Query Attention (GQA) configuration |
| Head Dimension | 64 | Dimension per attention head |
Context Length (max_position_embeddings) | 2,048 | Maximum sequence token window |
| Vocabulary Size | 5,000 | Custom localized Khmer-optimized vocabulary |
| Rope Theta | 10,000.0 | Base frequency for rotary position embeddings |
transformers pipeline ecosystem.1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4# 1. Specify the model repository path
5model_id = "attentionlab/bayon"
6
7# 2. Load the custom tokenizer and optimized model weights
8tokenizer = AutoTokenizer.from_pretrained(model_id)
9model = AutoModelForCausalLM.from_pretrained(
10 model_id,
11 torch_dtype=torch.bfloat16,
12 device_map="auto"
13)
14
15# 3. Format an example prompt (Basic QA / Text Generation)
16prompt = "សួស្តី តើអ្នកអាច"
17inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
18
19# 4. Generate sequences natively
20with torch.no_grad():
21 outputs = model.generate(
22 **inputs,
23 max_new_tokens=50,
24 do_sample=True,
25 temperature=0.2,
26 top_k=20
27 )
28
29print(tokenizer.decode(outputs[0], skip_special_tokens=True))
30