The model was trained using a rigorous 4-stage curriculum designed to layer capabilities sequentially:
1import jax
2import jax.numpy as jnp
3from flax.training import train_state
4from flax import serialization
5from safetensors.flax import load_file
6from transformers import AutoTokenizer
7import flax.linen as nn
8
9# 1. Define Architecture (Must match training config)
10class TransformerLM(nn.Module):
11 vocab_size: int
12 embed_dim: int = 768
13 num_layers: int = 12
14 num_heads: int = 12
15 num_kv_heads: int = 4
16 mlp_dim: int = 3072
17 max_length: int = 2048
18 dropout_rate: float = 0.0
19
20 # ... (Insert full model class definition here from the training script) ...
21
22# 2. Load Resources
23repo_id = "Arko007/Zenyx_Base_220M"
24tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-0.5B-Instruct", trust_remote_code=True)
25
26# 3. Initialize & Load Weights
27model = TransformerLM(vocab_size=len(tokenizer))
28dummy_input = jnp.ones((1, 1), dtype=jnp.int32)
29params = model.init(jax.random.PRNGKey(0), dummy_input)['params']
30
31# Load Safetensors
32# Ensure model.safetensors is downloaded locally
33loaded_params = load_file("model.safetensors")
34print("Weights loaded successfully!")
1@misc{ZenyxBase220M,
2 title = {Zenyx-Base-220M: High-Density Foundation Model},
3 author = {Arko007},
4 year = {2025},
5 publisher = {HuggingFace},
6 url = {[https://huggingface.co/Arko007/Zenyx_Base_220M](https://huggingface.co/Arko007/Zenyx_Base_220M)}
7}