Downloads · 30 days
3
9% of all-time downloads
cfierro/qwen2.5-7b-fft-othello-snake-multi-format-replay-1e-5
qwen2.5-7b-fft-othello-snake-multi-format-replay-1e-5 is a machine learning model from cfierro. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Total steps: 931 - Best metric: 0.21658289432525635 - Best checkpoint: /scratch/project/eu-26-55/knowledge-ft/axolotl/models/qwen2.5-7b-fft-othello-snake-multi-format-replay-1e-5/checkpoint-931
Downloads · 30 days
3
9% of all-time downloads
All-time downloads
33
Public
Parameters
333K
61.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt45.9 GB · 75%
From the Hugging Face model README
| Parameter | Value |
|---|---|
| learning_rate | 1e-05 |
| num_train_epochs | 2.0 |
| per_device_train_batch_size | 4 |
| gradient_accumulation_steps | 1 |
| weight_decay | 0.0 |
| warmup_ratio | 0.0 |
| warmup_steps | 55 |
| lr_scheduler_type | SchedulerType.COSINE |
| optim | OptimizerNames.ADAMW_BNB |
| bf16 | True |
| fp16 | False |
| max_grad_norm | 1.0 |
| max_steps | 1862 |
| save_steps | 500 |
| deepspeed | {'bf16': {'enabled': 'auto'}, 'zero_optimization': {'stage': 3, 'offload_optimizer': {'device': 'none'}, 'offload_param': {'device': 'none'}, 'overlap_comm': True, 'contiguous_gradients': True, 'reduce_bucket_size': 500000000.0, 'stage3_prefetch_bucket_size': 400000000.0, 'stage3_param_persistence_threshold': 1000000.0, 'stage3_gather_16bit_weights_on_model_save': True}, 'gradient_accumulation_steps': 'auto', 'gradient_clipping': 'auto', 'train_batch_size': 'auto', 'train_micro_batch_size_per_gpu': 'auto', 'wall_clock_breakdown': False} |
| gradient_checkpointing | True |
| Step | Eval Loss |
|---|---|
| 0 | 1.0097 |
| 931 | 0.2166 |
Note: this is the config file at push time; training parameters above are extracted from the checkpoint and reflect what was actually used.
base_model: Qwen/Qwen2.5-7B-Instruct
model_type: Qwen2ForCausalLM
tokenizer_type: AutoTokenizer
load_in_8bit: false
load_in_4bit: false
# ============================================================================
# Qwen2.5-7B-Instruct port of fullft-othello-snake-8b-multi-format-replay.yaml
# (originally meta-llama/Llama-3.1-8B-Instruct). Same recipe: full FT of the
# Othello-snake task WITH a chat-data replay mix to fight the catastrophic
# forgetting of instruction-following seen in the game-only run. Two sources:
# 1. The game, as a raw `input_output` continuation document (masked prefix),
# MULTI-FORMAT variant: ~70% space-separated moves plus ~5% each of several
# alternative notations, so the model is robust to how a game is written.
# 2. A general chat replay set (Tulu-3 subset) as `type: chat_template`.
#
# QWEN-SPECIFIC NOTES (differ from the Llama config):
# * model_type Qwen2ForCausalLM; native in transformers (no trust_remote_code).
# * Qwen2.5 has NO BOS token; its document terminator is <|endoftext|> (151643).
# * The game dataset MUST be regenerated with Qwen tokens. The Llama dataset
# bakes the literal strings <|begin_of_text|>/<|end_of_text|> into the text
# (consumed verbatim, add_special_tokens=False); Qwen's tokenizer would
# shatter those into junk pieces and never learn to stop. Build a Qwen
# variant with push_input_output_dataset.py (BOS="" , EOS="<|endoftext|>",
# prefix "Game of bjk\n\n") and point `path:` below at it.
# * Chat replay uses tokenizer_default -> Qwen2.5-Instruct's built-in ChatML
# template (<|im_start|>/<|im_end|>), matching inference exactly. The role
# tokens teach the context switch: game-like raw context -> moves; chat
# prompt with an instruction -> language.
# ============================================================================
chat_template: tokenizer_default # Qwen2.5-Instruct ships a correct ChatML template
datasets:
# --- Game shards (template-free, loss-masked continuation, multi-format) ---
# NOTE: this is the QWEN-tokenized rebuild, NOT the llama3 dataset. The first
# shard is sliced to hold out its last 500 games for a game-ONLY validation
# set (see test_datasets below). The other three shards are full.
- path: cfierro/othello-snake-qwen25-multi-format
type: input_output
split: games_0_5k[:-500]
- path: cfierro/othello-snake-qwen25-multi-format
type: input_output
split: games_5k_10k
- path: cfierro/othello-snake-qwen25-multi-format
type: input_output
split: games_10k_25k
- path: cfierro/othello-snake-qwen25-multi-format
type: input_output
split: games_25k_50k
# --- Replay: general chat data (re-tokenized with Qwen's chat template) ---
- path: cfierro/tulu3-sft-replay
type: chat_template
field_messages: messages
split: train
train_on_inputs: false # game: segment labels apply; chat: mask user, train assistant
dataset_prepared_path: /scratch/project/eu-26-55/knowledge-ft/axolotl/datasets/qwen2.5-7b/othello-snake-multi-format-replay
output_dir: /scratch/project/eu-26-55/knowledge-ft/axolotl/models/qwen2.5-7b-fft-othello-snake-multi-format-replay-1e-5
sequence_len: 1024 # games are short; replay was filtered to <=1024 tokens
sample_packing: true # pack many short docs per sequence (block-diagonal attn)
eval_sample_packing: false
# --- Validation loss on GAME DATA ONLY ---
# val_set_size: 0 disables the default carve (which would mix game + chat into the
# val set). test_datasets points eval exclusively at a held-out slice of game data,
# so eval_loss == game performance and drives load_best_model_at_end below.
# NOTE: the split-slicing syntax (`[:-500]` / `[-500:]`) requires your Axolotl to
# forward `split` to load_dataset (verify once with `axolotl preprocess ... --debug`).
val_set_size: 0
test_datasets:
- path: cfierro/othello-snake-qwen25-multi-format
type: input_output
split: games_0_5k[-500:]
wandb_project: othello-snake-ft
wandb_entity: cfierro
wandb_watch:
wandb_name: qwen2.5-7b-fft-othello-snake-multi-format-replay-1e-5
wandb_log_model: "false"
# --- Multi-GPU: 4x A40 (48GB) per node ---
# Full FT of a 7B model needs ZeRO-3 to shard weights+grads+optimizer.
# Effective batch = 4 GPUs * micro 4 * grad_accum 1 = 16 packed sequences.
# Qwen2.5-7B (~7.6B) is slightly smaller than Llama-8B, so the Llama batch dims
# should fit; recompute exact steps with `axolotl preprocess`.
gradient_accumulation_steps: 1
micro_batch_size: 4
num_epochs: 2 # lowered from 3: replay + fewer epochs both reduce forgetting
save_strategy: epoch
eval_strategy: epoch # must match save_strategy for load_best_model_at_end
# --- Auto-upload the BEST (lowest game eval_loss) checkpoint to the Hub ---
# eval_loss here is GAME-ONLY (see test_datasets), so "best" is selected on game
# performance, not on how chatty the model is. Needs a write-scoped HF token on the
# cluster (HF_TOKEN or `huggingface-cli login`).
load_best_model_at_end: true
metric_for_best_model: eval_loss
greater_is_better: false
hub_model_id: cfierro/qwen2.5-7b-fft-othello-snake-multi-format-replay-1e-5
hub_strategy: end
hub_private_repo: false
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 1e-5 # lowered from 2e-5 to reduce drift away from the base model
bf16: auto
tf32: false
gradient_checkpointing: true
resume_from_checkpoint:
logging_steps: 1
flash_attention: true
warmup_ratio: 0.03
save_total_limit: 3 # keep all per-epoch checkpoints; best is always retained
weight_decay: 0.0
special_tokens:
pad_token: "<|endoftext|>" # Qwen2.5 pad/document terminator (NOT <|end_of_text|>)
# DeepSpeed ZeRO Stage 3 — shards weights, gradients, and optimizer across GPUs
deepspeed: deepspeed_configs/zero3.json
# Verify the data mix + loss mask before training:
# axolotl preprocess axolotl_configs/fullft-othello-snake-qwen2.5-7b-multi-format-replay.yaml --debug
# Confirm: game rows show the masked prefix (-100) + trained moves ending in a
# SINGLE <|endoftext|> token (id 151643), NOT a shattered <|end_of_text|>; chat
# rows show masked user/system turns (ChatML) + trained assistant turns.