Downloads · 30 days
3
1% of all-time downloads
cfierro/llama-3.1-8b-fft-othello-multi-format-replay-1e-5-500k
llama-3.1-8b-fft-othello-multi-format-replay-1e-5-500k is a text generation model from cfierro. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as llama3.1.
should probably proofread and complete it, then remove this comment. --
Downloads · 30 days
3
1% of all-time downloads
All-time downloads
532
Public
Parameters
266K
32.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.1 GB · 100%
From the Hugging Face model README
axolotl version: 0.10.0
base_model: meta-llama/Llama-3.1-8B-Instruct
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: false
# ============================================================================
# Full FT on REAL Othello (Li et al.'s synthetic distribution), multi-format.
# The Othello twin of fullft-othello-snake-8b-multi-format-replay.yaml: same
# masked prefix, same seven move-notation formats, same `input_output` masking —
# only the game changes, so the two runs are directly comparable.
# Data: data/push_othello_dataset.py -> data/push_input_output_dataset.py --game othello
# ============================================================================
# --- Dataset: continued pre-training with a masked constant prefix ---
# `segments`: "<|begin_of_text|>Game of bjk\n\n" is label:false (context, not in
# the loss); the formatted moves + <|end_of_text|> are label:true (trained).
#
# SCALE — read before launching. The full train split is 20,000,000 games, i.e.
# the paper's scale, NOT Snake-Othello's 50k. Measured on the real dataset:
# * a game averages 186 Llama-3 tokens in the multi-format mix (127 for the
# ~70% fixed_prefix rows; the labelled formats run 2-3x longer)
# -> ~3.73B trained tokens over 20M games
# * effective batch = 4 GPUs * micro 4 * accum 1 = 16 packed sequences of 1024
# = 16,384 tokens/step -> ~227,000 steps per epoch (Snake-Othello 50k: ~320)
# * at ~3-5 s/step that is ~2 weeks game-only, ~4 weeks with a 1:1 chat replay
# So pick the scale deliberately by SLICING the split (never by editing the
# dataset), and keep the replay budget below in step with it. Steps/h below are
# for the CURRENT 2:1 game:chat replay (chat = game_tokens / 2):
# split: train[:50000] # ~851 steps, ~1 h (the first run: 80% valid)
# split: train[:200000] # ~3,406 steps, ~3-5 h
# split: train[:500000] # ~8,514 steps, ~7-12 h <- current
# WHY 500k. The first run (50k games, 1:1-ish replay) reached ~80% valid moves,
# against 99.7% for Snake-Othello at the same 50k games: real Othello legality is
# a global bracketing rule over the whole board, so it needs far more data than
# snake's head-local rule. Li et al. get ~0.01% error at 20M games and ~5% on the
# much smaller championship set, i.e. this task saturates somewhere in 1e5-1e7
# games. Error falls roughly log-linearly in data, so the useful unit is a
# MULTIPLIER: 2x is inside the eval's noise (~±0.5pp on 1k games), 10x is a step.
# Scale by another 10x only if the valid-move curve is still climbing at the end.
# Keep num_epochs at 1: with 20M unique games there is no shortage of fresh data,
# so a second epoch is pure repetition — spend the budget on more games instead.
datasets:
- path: cfierro/othello-llama3-multi-format
type: input_output
split: train[:500000]
# --- Replay: general chat data (Llama-3 chat-template formatted) ---
# Sized for THIS slice, at 2:1 game:chat — NOT the snake configs' subset (that
# one is 5.35M tokens, which against 93M game tokens would be ~0.06:1, i.e. no
# replay at all). Rebuild whenever the slice changes; 186 tokens/game:
# python data/push_replay_subset.py --game_tokens 93000000 --ratio 2 \
# --repo cfierro/tulu3-sft-replay-othello-500k
# 2:1 rather than the snake runs' 1:1 buys ~1.5x more games per hour, which is
# what the valid-move rate needs; the snake collapse-to-moves-only happened at
# ZERO replay, not at 2:1. Check the chat outputs on the resulting checkpoint —
# if instruction-following degraded, rebuild at --ratio 1 (~11,374 steps).
- path: cfierro/tulu3-sft-replay-othello-500k
type: chat_template
field_messages: messages
split: train
chat_template: llama3
train_on_inputs: false # REQUIRED for input_output masking to take effect
dataset_prepared_path: /projects/nlp/data/constanzam/learning-facts/axolotl/datasets/llama-3.1-8b/othello-multi-format-replay
# The -500k suffix is the game slice: the 50k run already owns the unsuffixed
# name (locally, on wandb and on the Hub), and it is the 80%-valid baseline this
# run is measured against — do not overwrite it. Bump the suffix with the slice.
output_dir: /projects/nlp/data/constanzam/learning-facts/axolotl/models/llama-3.1-8b-fft-othello-multi-format-replay-1e-5-500k
sequence_len: 1024 # games are ~127 tokens; long context is unused here
sample_packing: true # pack many short games per sequence (block-diagonal attn)
eval_sample_packing: false
# --- Validation on held-out GAMES ---
# NOT the `test` split: that one is reserved for the actual evaluation
# (data/prepare_othello_eval_dataset.py expands its first 5,000 games into the
# valid-move eval sets). load_best_model_at_end selects a checkpoint on whatever
# is named here, so pointing it at `test` would be selecting on the test set.
#
# Validation comes from the FAR END of the train split instead. Those games are
# unseen as long as the training slice above does not reach them, and a negative
# slice stays correct however far that slice is scaled up.
#
# 500 games, the same count the snake runs validate on — and already a sharper
# signal, since an Othello game is ~60 moves (~186 tokens) against snake's ~33
# (~150), so 500 games here is ~93k eval tokens vs ~50k there. eval_sample_packing
# is off, so each game is its own sequence: 500 games = ~31 forward passes per
# evaluation, and there are ~17 of those at eval_steps: 500.
# val_set_size: 0 disables the random carve, which would otherwise mix game +
# chat rows into the val set.
val_set_size: 0
test_datasets:
- path: cfierro/othello-llama3-multi-format
type: input_output
split: train[-500:]
wandb_project: othello-ft
wandb_entity: cfierro
wandb_watch:
wandb_name: llama-3.1-8b-fft-othello-multi-format-replay-1e-5-500k
wandb_log_model: "false"
# --- Multi-GPU: 4x A40 (48GB) per node ---
# Full FT of an 8B model needs ZeRO-3 to shard weights+grads+optimizer.
# Effective batch = 4 GPUs * micro 4 * grad_accum 1 = 16 packed sequences.
# Confirm the real step count with `axolotl preprocess ... --debug` before
# committing a multi-day run.
gradient_accumulation_steps: 1
micro_batch_size: 4
num_epochs: 1 # 20M unique games: a second pass is pure repetition
save_strategy: steps
save_steps: 2000
save_total_limit: 10
eval_strategy: steps # must match save_strategy for load_best_model_at_end
eval_steps: 500
# Step-granular save/eval, not epoch: one epoch is ~8,514 steps here, so epoch
# granularity would mean no checkpoint and no eval until the run is over. 500
# gives ~17 evals — enough to read the scaling curve mid-run and kill the job
# early if eval_loss has flattened. save_total_limit keeps the last 3 plus the
# best. If the slice is scaled again, keep save_steps well under the total step
# count, or nothing is ever saved and load_best_model_at_end has no checkpoint
# to restore.
load_best_model_at_end: true
metric_for_best_model: eval_loss
greater_is_better: false
# Needs a write-scoped HF token on the cluster (HF_TOKEN or `huggingface-cli login`).
hub_model_id: cfierro/llama-3.1-8b-fft-othello-multi-format-replay-1e-5-500k
hub_strategy: end
hub_private_repo: false
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 1e-5 # matches the snake multi-format run, for comparability
bf16: auto
tf32: false
gradient_checkpointing: true
auto_resume_from_checkpoints: true
logging_steps: 1
flash_attention: true
warmup_ratio: 0.03
save_total_limit: 3
weight_decay: 0.0
special_tokens:
pad_token: <|end_of_text|>
# DeepSpeed ZeRO Stage 3 — shards weights, gradients, and optimizer across GPUs
deepspeed: deepspeed_configs/zero3.json
# NOTE ON CHAT REPLAY. Chat data is NOT the binding constraint — compute is.
# allenai/tulu-3-sft-mixture has ~939k conversations, ~737k after the builder
# drops `aya`, and at the ~250 assistant tokens/kept row the snake subset measured
# that pool is ~143M trained tokens: enough for a full 1:1 replay up to ~770k
# games, and for this run's 2:1 up to ~1.5M. Past that the pool binds and the
# ratio has to fall (or rows repeat). What is NOT affordable is the full 20M
# games: at 1:1 that is ~7.5B tokens of training.
# push_replay_subset.py sizes the subset by tokens (--game_tokens / --ratio), so
# it follows whatever slice is set above — but only if it is RERUN. Keep the
# slice and the --game_tokens budget in sync, or the replay ratio silently drifts
# and instruction-following degrades (the game-only snake run collapsed to
# emitting nothing but moves). Same seed + same filters means a bigger budget is a
# superset of a smaller one, so scaling up never swaps out conversations the
# previous run already saw.
# Verify the data + loss mask before training:
# axolotl preprocess axolotl_configs/fullft-othello-8b-multi-format-replay.yaml --debug
# Confirm the prefix tokens show -100 (masked) and the move tokens + <|end_of_text|>
# are trained, and that the player-labelled formats show non-alternating colours on
# the ~34% of games that contain a pass.
</details><br>
This model is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct on the cfierro/othello-llama3-multi-format and the cfierro/tulu3-sft-replay-othello-500k datasets. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0 | 0 | 1.5235 |
| 0.8086 | 0.0219 | 500 | 0.9051 |
| 0.905 | 0.0437 | 1000 | 0.8784 |
| 0.7056 | 0.0656 | 1500 | 0.8522 |
| 0.8202 | 0.0874 | 2000 | 0.8411 |
| 0.8127 | 0.1093 | 2500 | 0.8354 |
| 0.846 | 0.1311 | 3000 | 0.8298 |
| 0.6429 | 0.1530 | 3500 | 0.8253 |
| 0.8679 | 0.1748 | 4000 | 0.8243 |
| 0.6056 | 0.1967 | 4500 | 0.8161 |
| 0.9736 | 0.2185 | 5000 | 0.8146 |
| 0.9236 | 0.2404 | 5500 | 0.8138 |
| 0.8982 | 0.2622 | 6000 | 0.8101 |
| 0.9503 | 0.2841 | 6500 | 0.8086 |
| 0.7195 | 0.3059 | 7000 | 0.8060 |
| 0.7456 | 0.3278 | 7500 | 0.8042 |
| 0.6373 | 0.3496 | 8000 | 0.8027 |
| 0.811 | 0.3715 | 8500 | 0.7998 |
| 0.9112 | 0.3933 | 9000 | 0.8009 |
| 0.7036 | 0.4152 | 9500 | 0.7980 |
| 0.8361 | 0.4370 | 10000 | 0.7965 |
| 0.8206 | 0.4589 | 10500 | 0.7963 |
| 0.8206 | 0.4589 | 10500 | 0.7963 |
| 0.7505 | 0.4807 | 11000 | 0.7932 |
| 0.7537 | 0.5026 | 11500 | 0.7927 |
| 0.9249 | 0.5244 | 12000 | 0.7916 |
| 0.699 | 0.5463 | 12500 | 0.7903 |
| 0.699 | 0.5681 | 13000 | 0.7891 |
| 0.7106 | 0.5900 | 13500 | 0.7895 |
| 0.7697 | 0.6118 | 14000 | 0.7877 |
| 0.8092 | 0.6337 | 14500 | 0.7866 |
| 0.8007 | 0.6555 | 15000 | 0.7849 |
| 0.7333 | 0.6774 | 15500 | 0.7845 |
| 0.717 | 0.6992 | 16000 | 0.7837 |
| 0.8466 | 0.7211 | 16500 | 0.7834 |
| 0.7314 | 0.7429 | 17000 | 0.7824 |
| 0.7431 | 0.7648 | 17500 | 0.7820 |
| 0.7285 | 0.7866 | 18000 | 0.7811 |
| 0.6168 | 0.8085 | 18500 | 0.7803 |
| 0.7369 | 0.8303 | 19000 | 0.7801 |
| 0.9069 | 0.8522 | 19500 | 0.7799 |
| 0.805 | 0.8740 | 20000 | 0.7795 |
| 0.6583 | 0.8959 | 20500 | 0.7794 |
| 0.9734 | 0.9177 | 21000 | 0.7791 |
| 0.6884 | 0.9396 | 21500 | 0.7790 |
| 0.7319 | 0.9614 | 22000 | 0.7790 |
| 0.8223 | 0.9833 | 22500 | 0.7790 |