CoolFace
Modelpublic

WICKED4950/BwETAFv2-130M

sourceHugging Facegpl-3.0updated 1y agoView on Hugging Face
0likes
Model Card

🧾 BwETAFv2-130M: Model Card

Boring’s Experimental Transformer for Autoregression (Flax) A 130M parameter autoregressive language model built using a custom Flax pipeline, loads of tuning, and a sprinkle of existential dread.

Trained on determination, fueled by suffering, powered by free TPUs.

πŸ“Œ Model Summary

  • β€”Model Name: BwETAFv2-130M
  • β€”Parameters: 130,649,088
  • β€”Training Tokens: 3,014,656,000
  • β€”Training Time: 19.32 TPUv2-8 Hours
  • β€”Framework: Flax / JAX
  • β€”Max Context Length: 4096 tokens
  • β€”Tokenizer: GPT-2 BPE (50,257 vocab size)

πŸ§ͺ Hyperparameters

json
{
  num_heads=12,
  attention_dim=768,
  vocab_size=50260,
  num_blocks=12,
  ff_dim=2304,
  dropout_rate=0.1,
  max_len = 8192,
  use_fash_attention = False,
  attn_chunks = 1,
  emb_init_range = 0.02,
  use_rope = True,
  emb_scaling_factor = 1,
  res_scale = 1
}

πŸ›  Optimizer Settings

json
{
  "peaklr":5e-4,
  "warmup_percent":0.03,
  "min_value":1e-8,
  "training_decay":"cosine",
  "weight_decay": 0.1,
  "min_warmup_value":2e-4,
  "b1": 0.9,
  "b2": 0.95,
  "eps": 1e-7
}

πŸ“ˆ Performance

  • β€”Final Validation Loss: 3.59
  • β€”Validation loss Graphs: image/png
  • β€”Training loss Graphs: image/png
  • β€”For detailed stats, refer to stats.json in the model files.

⚑ Quickstart

bash
pip install BwETAF==0.5.1
python
import BwETAF

# πŸ” Quick API test
prompt = "The meaning of life is"
output = BwETAF.SetUpAPI(prompt, "WICKED4950/BwETAFv2-130M")
print(output)

# ⬇️ Load from Hugging Face Hub
model = BwETAF.load_hf("WICKED4950/BwETAFv2-130M")

# πŸ“ Load from local path
BwETAF.load_model("path/to/model")

# πŸ’Ύ Save to local directory
model.save_model("path/to/save")

# πŸ”§ Inspect model
params = model.trainable_variables
structure = model.model_struct
☁️ Colab support and examples coming soon!

🧠 BwETAFv2 Architecture Overview

The BwETAFv2 architecture introduces several refinements over its predecessors, improving convergence, training stability, and scalability. Below is an architecture-level overview shared across all models in this series.


πŸ”© Core Architecture

  • β€”Attention: Standard multi-head self-attention (no GQA, no MQA, no FlashAttention)
  • β€”FFN: Uses Swish-GLU with FF dimension = 3 Γ— model_dim
  • β€”Norm Layer: RMSNorm, pre-layer
  • β€”Positional Encoding: RoPE on embeddings and K/Q vectors
  • β€”Precision:
  • β€”Weights & forward pass: bfloat16 (bf16)
  • β€”Optimizer states: float32
  • β€”Tokenization: GPT-2 BPE (vocab_size = 50257)
  • β€”Bias Terms: No biases in K/Q/V dense projections

βš™οΈ Training Setup

  • β€”Optimizer: AdamW
  • β€”Batch Size: 32 per step
  • β€”Learning Schedule: Cosine decay with linear warmup
  • β€”Chinchilla Scaling Law: Followed (20Γ— tokens per parameter)
  • β€”Context Window during Training:
  • β€”BwETAFv2-53M: 2048
  • β€”BwETAFv2-130M: 4096

πŸ“Š Model Comparison

Model NameParamsTokens SeenTPUv2-8 HoursVal LossContext Length
BwETAFv2-53M53M1.34B3.213.772048
BwETAFv2-130M130M3.01B19.323.594096

πŸ“¬ Contact Me

  • β€”πŸ“Έ Instagram: boring.\_.wicked
  • β€”πŸ’¬ Discord: fused_computation.1 (if you spot me lurking in any AI-related servers)