CoolFace
Modelpublic

Shekswess/trlm-stage-3-dpo-final-2

sourceHugging Faceapache-2.0updated 11mo agoView on Hugging Face
1likes13downloads
Model Card

image/png

🧠 trlm-stage-3-dpo-final-2

trlm-stage-3-dpo-final-2 is the Stage 3 post-training model for the Tiny Reasoning Language Model (trlm) project. This stage focuses on preference alignment using Direct Preference Optimization (DPO) with 50k preference pairs.


πŸ“– Model Description

  • β€”Base Model: Shekswess/trlm-stage-2-sft-final-2
  • β€”Type: Causal Language Model (decoder-only transformer)
  • β€”Stage: Post-training Stage 3 (DPO)
  • β€”Objective: Align model outputs with human-preferred reasoning and answers by contrasting chosen vs rejected completions.

This stage improves the model’s alignment, coherence, and reasoning stability.


🎯 Intended Uses & Limitations

Intended Uses

  • β€”Aligned reasoning assistant with structured <think> traces
  • β€”Multi-turn reasoning with preference-optimized outputs
  • β€”Safer, more useful responses for reasoning tasks

Limitations

  • β€”Trained only on preference data β†’ may inherit biases from source datasets
  • β€”Limited parameter count (135M) restricts knowledge breadth
  • β€”Still prone to hallucinations under complex reasoning chains

πŸ“Š Training Data

This model was trained on the dataset: πŸ‘‰ **Shekswess/trlm-dpo-stage-3-final-2**

Dataset summary:

  • β€”Entries: 50,000 preference pairs
  • β€”Source: scottgeng00/olmo-3-preference-mix-deltas_reasoning-yolo_scottmix-DECON-chfiltered
  • β€”Focus: Preference alignment with chosen vs rejected responses
Source DatasetSplitEntries%
scottgeng00/olmo-3-preference-mix-deltasreasoning-yoloscottmix-DECON-chfilteredtrain50,000100%

βš™οΈ Training Procedure

Training Hyperparameters

  • β€”Learning rate: 1e-5
  • β€”Train batch size: 32
  • β€”Eval batch size: 8
  • β€”Gradient accumulation steps: 4
  • β€”Total effective batch size: 128
  • β€”Optimizer: AdamW (betas=(0.9, 0.999), eps=1e-08)
  • β€”LR Scheduler: Cosine with minimum LR + warmup ratio 0.1
  • β€”Epochs: 1
  • β€”Seed: 42

Framework Versions

  • β€”Transformers: 4.56.2
  • β€”PyTorch: 2.7.1+rocm7.0.0.git698b58a9
  • β€”Datasets: 4.0.0
  • β€”Tokenizers: 0.22.1

πŸš€ Usage

python
from transformers import AutoTokenizer, AutoModelForCausalLM

model_name = "Shekswess/trlm-stage-3-dpo-final-2"

# Load tokenizer & model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

# Example inference with preference-aligned reasoning
messages = [
    {"role": "user", "content": "Explain why the sky is blue in simple terms."}
]

# Apply chat template
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt")

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Part of the Tiny Reasoning Language Model (trlm) post-training pipeline.